Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.268
diff -u -p -r1.268 statistics.module
--- modules/statistics/statistics.module	5 Dec 2007 16:51:30 -0000	1.268
+++ modules/statistics/statistics.module	8 Dec 2007 17:20:50 -0000
@@ -206,7 +206,7 @@ function statistics_cron() {
  *   or FALSE if the query could not be executed correctly.
  */
 function statistics_title_list($dbfield, $dbrows) {
-  return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
+  return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s.". $dbfield ." != 0 AND n.status = 1 ORDER BY s.". $dbfield ." DESC"), 0, $dbrows);
 }
 
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.559
diff -u -p -r1.559 system.module
--- modules/system/system.module	6 Dec 2007 09:58:33 -0000	1.559
+++ modules/system/system.module	8 Dec 2007 17:20:53 -0000
@@ -1113,7 +1113,7 @@ function system_cron() {
   db_query('DELETE FROM {batch} WHERE timestamp < %d', time() - 864000);
 
   // Remove temporary files that are older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
-  $result = db_query('SELECT * FROM {files} WHERE status = %s and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
+  $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
   while ($file = db_fetch_object($result)) {
     if (file_exists($file->filepath)) {
       // If files that exist cannot be deleted, continue so the database remains
