$ret[]=update_sql('UPDATE {watchdog} SET severity = 0');
$ret[]=update_sql('ALTER TABLE {watchdog} ALTER COLUMN severity SET NOT NULL');
$ret[]=update_sql('ALTER TABLE {watchdog} ALTER COLUMN severity SET DEFAULT 0');
}
// This update has been moved to update_fix_watchdog_115 in update.php because it
// is needed for the basic functioning of the update script.
return$ret;
}
...
...
@@ -387,7 +382,7 @@ function system_update_124() {
$result=db_query("SELECT c.nid, c.timestamp, c.name, c.uid, COUNT(c.nid) as comment_count FROM {node} n LEFT JOIN {comments} c ON c.nid = n.nid WHERE c.status = 0 GROUP BY c.nid, c.timestamp, c.name, c.uid");
while($comment_record=db_fetch_object($result)){
$count=db_result(db_query('SELECT COUNT(cid) FROM {comments} WHERE nid = %d AND status = 0',$comment_record->nid));
$ret[]=db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d",$count,$comment_record->timestamp,$comment_record->name,$comment_record->uid,$comment_record->nid);
db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d",$count,$comment_record->timestamp,$comment_record->name,$comment_record->uid,$comment_record->nid);
}
return$ret;
...
...
@@ -1128,7 +1123,7 @@ function system_update_159() {
$ret[]=update_sql('UPDATE {watchdog} SET severity = 0');
$ret[]=update_sql('ALTER TABLE {watchdog} ALTER COLUMN severity SET NOT NULL');
$ret[]=update_sql('ALTER TABLE {watchdog} ALTER COLUMN severity SET DEFAULT 0');
}
variable_set('update_watchdog_115_fixed',TRUE);
}
}
/**
* System update 142 changes the watchdog table, which breaks the update
* script's ability to use logging. This changes the table appropriately.
...
...
@@ -280,8 +303,8 @@ function update_data($module, $number) {
}
functionupdate_selection_page(){
$output='<p>'.t('The version of Drupal you are updating from has been automatically detected. You can select a different version, but you should not need to.').'</p>';
$output.='<p>'.t('Click Update to start the update process.').'</p>';
$output='<p>The version of Drupal you are updating from has been automatically detected. You can select a different version, but you should not need to.</p>';
$output.='<p>Click Update to start the update process.</p>';
$form=array();
$form['start']=array(
...
...
@@ -299,7 +322,7 @@ function update_selection_page() {