includes/pageutils.php
changeset 234 d5dff8148dfe
parent 194 bf0fdec102e9
child 238 a78537db2850
child 256 62ee6685ad18
equal deleted inserted replaced
233:cc358458a012 234:d5dff8148dfe
   820             $r = $db->fetchrow();
   820             $r = $db->fetchrow();
   821             $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: ".mysql_error()."\n\nSQL backtrace:\n".$db->sql_backtrace());
   821             $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: ".mysql_error()."\n\nSQL backtrace:\n".$db->sql_backtrace());
   822             return 'The page "' . $name . '" has been undeleted according to the log created at ' . $rb['date_string'] . '.';
   822             return 'The page "' . $name . '" has been undeleted according to the log created at ' . $rb['date_string'] . '.';
   823             break;
   823             break;
   824           case "reupload":
   824           case "reupload":
   825             if ( !$session->get_permissions('history_rollbacks_extra') )
   825             if ( !$session->get_permissions('history_rollback_extra') )
   826             {
   826             {
   827               return 'Administrative privileges are required for file rollbacks.';
   827               return 'Administrative privileges are required for file rollbacks.';
   828             }
   828             }
   829             $newtime = time();
   829             $newtime = time();
   830             $newdate = date('d M Y h:i a');
   830             $newdate = date('d M Y h:i a');