diff -r fdaf9070566c -r 8978cb3541ca includes/pageutils.php
--- a/includes/pageutils.php Thu Jan 17 02:03:33 2008 -0500
+++ b/includes/pageutils.php Thu Jan 17 19:49:14 2008 -0500
@@ -211,7 +211,7 @@
if ($db->numrows() > 0 )
{
$r = $db->fetchrow();
- echo '
This page also appears to have some log entries in the database - it seems that it was deleted on ' . $r['date_string'] . '. You can probably roll back the deletion.
';
+ echo 'This page also appears to have some log entries in the database - it seems that it was deleted on ' . enano_date('d M Y h:i a', intval($r['time_id'])) . '. You can probably roll back the deletion.
';
}
$db->free_result();
}
@@ -258,7 +258,7 @@
}
$r = $db->fetchrow();
$db->free_result();
- $message = ' '.RenderMan::render($r['page_text']);
+ $message = ' '.RenderMan::render($r['page_text']);
if( !$paths->pages[$page]['special'] )
{
@@ -618,7 +618,7 @@
if($ticker < $numrows) echo ' '."\n"; else echo ' ';
// Date and time
- echo '' . $r['date_string'] . ' '."\n";
+ echo '' . enano_date('d M Y h:i a', intval($r['time_id'])) . ' '."\n";
// User
if ( $session->get_permissions('mod_misc') && is_valid_ip($r['author']) )
@@ -694,7 +694,7 @@
echo '';
// Date and time
- echo '' . $r['date_string'] . ' ';
+ echo '' . enano_date('d M Y h:i a', intval($r['time_id'])) . ' ';
// User
echo 'pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been rolled back to the state it was in on ' . $rb['date_string'] . '.';
+ return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been rolled back to the state it was in on ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
}
break;
case "rename":
@@ -825,7 +825,7 @@
}
else
{
- return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been rolled back to the name it had ("' . $rb['edit_summary'] . '") before ' . $rb['date_string'] . '.';
+ return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been rolled back to the name it had ("' . $rb['edit_summary'] . '") before ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
}
break;
case "prot":
@@ -835,7 +835,7 @@
if ( !$e )
return "An error occurred during the rollback operation.\nMySQL said: ".$db->get_error()."\n\nSQL backtrace:\n".$db->sql_backtrace();
else
- return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been unprotected according to the log created at ' . $rb['date_string'] . '.';
+ return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been unprotected according to the log created at ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
break;
case "semiprot":
if ( !$perms->get_permissions('protect') )
@@ -844,7 +844,7 @@
if ( !$e )
return "An error occurred during the rollback operation.\nMySQL said: ".$db->get_error()."\n\nSQL backtrace:\n".$db->sql_backtrace();
else
- return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been unprotected according to the log created at ' . $rb['date_string'] . '.';
+ return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been unprotected according to the log created at ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
break;
case "unprot":
if ( !$perms->get_permissions('protect') )
@@ -853,7 +853,7 @@
if ( !$e )
return "An error occurred during the rollback operation.\nMySQL said: ".$db->get_error()."\n\nSQL backtrace:\n".$db->sql_backtrace();
else
- return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been protected according to the log created at ' . $rb['date_string'] . '.';
+ return 'The page "' . $paths->pages[$paths->nslist[$rb['namespace']].$rb['page_id']]['name'].'" has been protected according to the log created at ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
break;
case "delete":
if ( !$perms->get_permissions('history_rollback_extra') )
@@ -865,7 +865,7 @@
$e = $db->sql_query('SELECT page_text,char_tag FROM ' . table_prefix.'logs WHERE page_id=\'' . $rb['page_id'] . '\' AND namespace=\'' . $rb['namespace'] . '\' AND log_type=\'page\' AND action=\'edit\' ORDER BY time_id DESC;'); if(!$e) return("An error occurred during the rollback operation.\nMySQL said: ".$db->get_error()."\n\nSQL backtrace:\n".$db->sql_backtrace());
$r = $db->fetchrow();
$e = $db->sql_query('INSERT INTO ' . table_prefix.'page_text(page_id,namespace,page_text,char_tag) VALUES(\'' . $rb['page_id'] . '\',\'' . $rb['namespace'] . '\',\'' . $db->escape($r['page_text']) . '\',\'' . $r['char_tag'] . '\')'); if(!$e) return("An error occurred during the rollback operation.\nMySQL said: ".$db->get_error()."\n\nSQL backtrace:\n".$db->sql_backtrace());
- return 'The page "' . $name . '" has been undeleted according to the log created at ' . $rb['date_string'] . '.';
+ return 'The page "' . $name . '" has been undeleted according to the log created at ' . enano_date('d M Y h:i a', intval($rb['time_id'])) . '.';
break;
case "reupload":
if ( !$session->get_permissions('history_rollback_extra') )
@@ -1453,7 +1453,7 @@
// This is a special exception for the Enano installer, which doesn't init languages yet.
$lang = new Language('eng');
}
- if(!$session->get_permissions('clear_logs'))
+ if(!$session->get_permissions('clear_logs') && !defined('IN_ENANO_INSTALL'))
{
return $lang->get('etc_access_denied');
}