includes/pageprocess.php
changeset 1216 4125e19d3b27
parent 1180 4829d15d2782
child 1227 bdac73ed481e
equal deleted inserted replaced
1215:ec7f8f6312bb 1216:4125e19d3b27
   762         if ( !$q )
   762         if ( !$q )
   763           $db->die_json();
   763           $db->die_json();
   764         
   764         
   765         // add reupload log entry
   765         // add reupload log entry
   766         $username = $db->escape($session->username);
   766         $username = $db->escape($session->username);
   767         $q = $db->sql_query('INSERT INTO ' . table_prefix . "logs ( log_type, action, time_id, page_id, namespace, author, edit_summary ) VALUES\n"
   767         $q = $db->sql_query('INSERT INTO ' . table_prefix . "logs ( log_type, action, time_id, page_id, namespace, author, author_uid, edit_summary ) VALUES\n"
   768                           . "  ( 'page', 'reupload', $time, '$this->page_id', '$this->namespace', '$username', '__ROLLBACK__' )");
   768                           . "  ( 'page', 'reupload', $time, '$this->page_id', '$this->namespace', '$username', $session->user_id, '__ROLLBACK__' )");
   769         if ( !$q )
   769         if ( !$q )
   770           $db->die_json();
   770           $db->die_json();
   771         
   771         
   772         return array(
   772         return array(
   773             'success' => true,
   773             'success' => true,
   950       case PROTECT_FULL: $action = 'prot'; break;
   950       case PROTECT_FULL: $action = 'prot'; break;
   951       case PROTECT_NONE: $action = 'unprot'; break;
   951       case PROTECT_NONE: $action = 'unprot'; break;
   952       case PROTECT_SEMI: $action = 'semiprot'; break;
   952       case PROTECT_SEMI: $action = 'semiprot'; break;
   953     }
   953     }
   954     
   954     
   955     $sql = 'INSERT INTO ' . table_prefix . "logs ( log_type, action, page_id, namespace, author, edit_summary, time_id, page_text, date_string ) VALUES\n"
   955     $sql = 'INSERT INTO ' . table_prefix . "logs ( log_type, action, page_id, namespace, author, author_uid, edit_summary, time_id, page_text, date_string ) VALUES\n"
   956          . "  ( 'page', '$action', '{$this->page_id}', '{$this->namespace}', '$username', '$reason', '$time', '$existing_protection', 'DATE_STRING COLUMN OBSOLETE, USE time_id' );";
   956          . "  ( 'page', '$action', '{$this->page_id}', '{$this->namespace}', '$username', $author_uid, '$reason', '$time', '$existing_protection', 'DATE_STRING COLUMN OBSOLETE, USE time_id' );";
   957     if ( !$db->sql_query($sql) )
   957     if ( !$db->sql_query($sql) )
   958     {
   958     {
   959       $db->die_json();
   959       $db->die_json();
   960     }
   960     }
   961     
   961