changeset 1221 | d8c6b8d49604 |
parent 1216 | 4125e19d3b27 |
child 1227 | bdac73ed481e |
1220:fbfd6c852c89 | 1221:d8c6b8d49604 |
---|---|
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 |