drupal/drupal.patch

changeset 530
5cd084e0397a
parent 529
7d4d11d301d6
child 734
6f237b68bce5
     1.1 --- a/drupal/drupal.patch	Tue Aug 28 18:28:45 2012 +0200
     1.2 +++ b/drupal/drupal.patch	Tue Aug 28 18:28:50 2012 +0200
     1.3 @@ -1,25 +1,21 @@
     1.4 -Fix Reverse Proxy Support:
     1.5 -http://drupal.org/node/244593
     1.6 -http://drupal.org/files/issues/drupal_80.patch
     1.7 -
     1.8  Index: includes/bootstrap.inc
     1.9  --- includes/bootstrap.inc.orig	2008-02-11 15:36:21 +0100
    1.10  +++ includes/bootstrap.inc	2008-04-09 20:47:49 +0200
    1.11 -@@ -272,6 +272,7 @@
    1.12 +@@ -730,6 +730,7 @@
    1.13    */
    1.14 - function conf_init() {
    1.15 + function drupal_settings_initialize() {
    1.16     global $base_url, $base_path, $base_root;
    1.17  +  global $base_url_local;
    1.18   
    1.19     // Export the following settings.php variables to the global namespace
    1.20 -   global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile, $update_free_access;
    1.21 -@@ -723,9 +724,22 @@
    1.22 -  * generate an equivalent using other environment variables.
    1.23 +   global $databases, $cookie_domain, $conf, $installed_profile, $update_free_access, $db_url, $db_prefix, $drupal_hash_salt, $is_https, $base_secure_url, $base_insecure_url;
    1.24 +@@ -1613,8 +1614,22 @@
    1.25 +  * equivalent using other environment variables.
    1.26    */
    1.27   function request_uri() {
    1.28  +  global $base_url;
    1.29  +  global $base_url_local;
    1.30 - 
    1.31 ++
    1.32     if (isset($_SERVER['REQUEST_URI'])) {
    1.33       $uri = $_SERVER['REQUEST_URI'];
    1.34  +    if (isset($base_url) && isset($base_url_local)) {
    1.35 @@ -36,95 +32,24 @@
    1.36     }
    1.37     else {
    1.38       if (isset($_SERVER['argv'])) {
    1.39 -@@ -792,6 +806,7 @@
    1.40 +@@ -1628,6 +1643,7 @@
    1.41       }
    1.42     }
    1.43 -   // Prevent multiple slashes to avoid cross site requests via the FAPI.
    1.44 +   // Prevent multiple slashes to avoid cross site requests via the Form API.
    1.45  +  if (substr($uri, 0, 1) == "/")
    1.46 -   $uri = '/'. ltrim($uri, '/');
    1.47 +   $uri = '/' . ltrim($uri, '/');
    1.48   
    1.49     return $uri;
    1.50 -Index: sites/default/default.settings.php
    1.51 ---- sites/default/default.settings.php.orig	2007-12-20 10:35:10 +0100
    1.52 -+++ sites/default/default.settings.php	2008-04-09 20:47:32 +0200
    1.53 -@@ -126,6 +126,24 @@
    1.54 - # $base_url = 'http://www.example.com';  // NO trailing slash!
    1.55 - 
    1.56 - /**
    1.57 -+ * Local Base URL (optional).
    1.58 -+ *
    1.59 -+ * If you are running Drupal behind a reverse proxy, $base_url (see above)
    1.60 -+ * usually points to the URL of the reverse proxy. Drupal uses this for
    1.61 -+ * all sorts of external URLs. In order to correctly calculate sub-URLs
    1.62 -+ * below $base_url for embedded HTML forms, Drupal also has to know the
    1.63 -+ * URL on the local/origin server under which Drupal is contacted by the
    1.64 -+ * reverse proxy. This is what $base_url_local is for.
    1.65 -+ *
    1.66 -+ * Examples:
    1.67 -+ *   $base_url_local = 'http://www.example.com:8080/drupal';
    1.68 -+ *
    1.69 -+ * It is not allowed to have a trailing slash; Drupal will add it
    1.70 -+ * for you.
    1.71 -+ */
    1.72 -+# $base_url_local = 'http://www.example.com:8080/drupal';  // NO trailing slash!
    1.73 -+
    1.74 -+/**
    1.75 -  * PHP settings:
    1.76 -  *
    1.77 -  * To see what PHP settings are possible, including whether they can
    1.78 -
    1.79 ------------------------------------------------------------------------------
    1.80 -
    1.81 -1. Support HTTP Proxies (mainly for update checks, RSS fetching, etc)
    1.82 -http://drupal.org/node/7881
    1.83 -http://drupal.org/files/issues/proxy_11.patch
    1.84 -(post-adjusted and improved by RSE)
    1.85 -
    1.86 -2. Fix CSS Cache Building Procedure
    1.87 -http://drupal.org/node/275381
    1.88 -http://drupal.org/files/issues/drupal-css-cache-building.patch
    1.89 -(created by RSE)
    1.90 -
    1.91  Index: includes/common.inc
    1.92  --- includes/common.inc.orig	2008-04-09 23:11:44 +0200
    1.93  +++ includes/common.inc	2008-06-26 20:16:16 +0200
    1.94 -@@ -439,13 +439,27 @@
    1.95 -     case 'http':
    1.96 -       $port = isset($uri['port']) ? $uri['port'] : 80;
    1.97 -       $host = $uri['host'] . ($port != 80 ? ':'. $port : '');
    1.98 --      $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
    1.99 -+      if (variable_get('proxy_server', '') != '') {
   1.100 -+        $proxy_server = variable_get('proxy_server', '');
   1.101 -+        $proxy_port = variable_get('proxy_port', 8080);
   1.102 -+        $fp = @fsockopen($proxy_server, $proxy_port, $errno, $errstr, 15);
   1.103 -+      }
   1.104 -+      else {
   1.105 -+        $fp = @fsockopen($uri['host'], $port, $errno, $errstr, 15);
   1.106 -+      }
   1.107 -       break;
   1.108 -     case 'https':
   1.109 -       // Note: Only works for PHP 4.3 compiled with OpenSSL.
   1.110 -       $port = isset($uri['port']) ? $uri['port'] : 443;
   1.111 -       $host = $uri['host'] . ($port != 443 ? ':'. $port : '');
   1.112 --      $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20);
   1.113 -+      if (variable_get('proxy_server', '') != '') {
   1.114 -+        $proxy_server = variable_get('proxy_server', '');
   1.115 -+        $proxy_port = variable_get('proxy_port', 8080);
   1.116 -+        $fp = @fsockopen($proxy_server, $proxy_port, $errno, $errstr, 15);
   1.117 -+      }
   1.118 -+      else {
   1.119 -+        $fp = @fsockopen('ssl://'. $uri['host'], $port, $errno, $errstr, 20);
   1.120 -+      }
   1.121 -       break;
   1.122 -     default:
   1.123 -       $result->error = 'invalid schema '. $uri['scheme'];
   1.124 -@@ -462,9 +476,14 @@
   1.125 +@@ -848,9 +848,14 @@
   1.126     }
   1.127   
   1.128     // Construct the path to act on.
   1.129  -  $path = isset($uri['path']) ? $uri['path'] : '/';
   1.130  -  if (isset($uri['query'])) {
   1.131 --    $path .= '?'. $uri['query'];
   1.132 +-    $path .= '?' . $uri['query'];
   1.133  +  if (variable_get('proxy_server', '') != '') {
   1.134  +    $path = $url;
   1.135  +  }
   1.136 @@ -135,9 +60,9 @@
   1.137  +    }
   1.138     }
   1.139   
   1.140 -   // Create HTTP request.
   1.141 -@@ -482,6 +501,14 @@
   1.142 -     $defaults['Authorization'] = 'Authorization: Basic '. base64_encode($uri['user'] . (!empty($uri['pass']) ? ":". $uri['pass'] : ''));
   1.143 +   // Merge the default headers.
   1.144 +@@ -872,6 +877,14 @@
   1.145 +     $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : ''));
   1.146     }
   1.147   
   1.148  +  // If the proxy server required a username then attempt to authenticate with it
   1.149 @@ -148,13 +73,13 @@
   1.150  +    $defaults['Proxy-Authorization'] = 'Proxy-Authorization: Basic '. $auth_string ."\r\n";
   1.151  +  }
   1.152  +
   1.153 -   foreach ($headers as $header => $value) {
   1.154 -     $defaults[$header] = $header .': '. $value;
   1.155 -   }
   1.156 +   // If the database prefix is being used by SimpleTest to run the tests in a copied
   1.157 +   // database then set the user-agent header to the database prefix so that any
   1.158 +   // calls to other Drupal pages will run the SimpleTest prefixed database. The
   1.159  Index: modules/system/system.admin.inc
   1.160  --- modules/system/system.admin.inc.orig	2008-03-25 12:58:16 +0100
   1.161  +++ modules/system/system.admin.inc	2008-04-24 11:43:07 +0200
   1.162 -@@ -1363,6 +1363,65 @@
   1.163 +@@ -1766,6 +1766,124 @@
   1.164   }
   1.165   
   1.166   /**
   1.167 @@ -217,23 +142,73 @@
   1.168  +}
   1.169  +
   1.170  +/**
   1.171 ++ * Form builder; Configure the site proxy settings.
   1.172 ++ *
   1.173 ++ * @ingroup forms
   1.174 ++ * @see system_settings_form()
   1.175 ++ */
   1.176 ++function system_proxy_settings() {
   1.177 ++
   1.178 ++  $form['forward_proxy'] = array(
   1.179 ++    '#type' => 'fieldset',
   1.180 ++    '#title' => t('Forward proxy settings'),
   1.181 ++    '#description' => t('The proxy server used when Drupal needs to connect to other sites on the Internet.'),
   1.182 ++  );
   1.183 ++  $form['forward_proxy']['proxy_server'] = array(
   1.184 ++    '#type' => 'textfield',
   1.185 ++    '#title' => t('Proxy host name'),
   1.186 ++    '#default_value' => variable_get('proxy_server', ''),
   1.187 ++    '#description' => t('The host name of the proxy server, eg. localhost. If this is empty Drupal will connect directly to the internet.')
   1.188 ++  );
   1.189 ++  $form['forward_proxy']['proxy_port'] = array(
   1.190 ++    '#type' => 'textfield',
   1.191 ++    '#title' => t('Proxy port number'),
   1.192 ++    '#default_value' => variable_get('proxy_port', 8080),
   1.193 ++    '#description' => t('The port number of the proxy server, eg. 8080'),
   1.194 ++  );
   1.195 ++  $form['forward_proxy']['proxy_username'] = array(
   1.196 ++    '#type' => 'textfield',
   1.197 ++    '#title' => t('Proxy username'),
   1.198 ++    '#default_value' => variable_get('proxy_username', ''),
   1.199 ++    '#description' => t('The username used to authenticate with the proxy server.'),
   1.200 ++  );
   1.201 ++  $form['forward_proxy']['proxy_password'] = array(
   1.202 ++    '#type' => 'textfield',
   1.203 ++    '#title' => t('Proxy password'),
   1.204 ++    '#default_value' => variable_get('proxy_password', ''),
   1.205 ++    '#description' => t('The password used to connect to the proxy server. This is kept as plain text.', '')
   1.206 ++  );
   1.207 ++  $form['#validate'][] = 'system_proxy_settings_validate';
   1.208 ++
   1.209 ++  return system_settings_form($form);
   1.210 ++}
   1.211 ++
   1.212 ++/**
   1.213 ++ * Validate the submitted proxy form.
   1.214 ++ */
   1.215 ++function system_proxy_settings_validate($form, &$form_state) {
   1.216 ++  // Validate the proxy settings
   1.217 ++  $form_state['values']['proxy_server'] = trim($form_state['values']['proxy_server']);
   1.218 ++  if ($form_state['values']['proxy_server'] != '') {
   1.219 ++    // TCP allows the port to be between 0 and 65536 inclusive
   1.220 ++    if (!is_numeric($form_state['values']['proxy_port'])) {
   1.221 ++      form_set_error('proxy_port', t('The proxy port is invalid. It must be a number between 0 and 65535.'));
   1.222 ++    }
   1.223 ++    elseif ($form_state['values']['proxy_port'] < 0 || $form_state['values']['proxy_port'] >= 65536) {
   1.224 ++      form_set_error('proxy_port', t('The proxy port is invalid. It must be between 0 and 65535.'));
   1.225 ++    }
   1.226 ++  }
   1.227 ++}
   1.228 ++
   1.229 ++/**
   1.230    * Form builder; Configure the site file handling.
   1.231    *
   1.232    * @ingroup forms
   1.233  Index: modules/system/system.module
   1.234  --- modules/system/system.module.orig	2008-04-09 23:11:49 +0200
   1.235  +++ modules/system/system.module	2008-04-24 11:43:47 +0200
   1.236 -@@ -55,7 +55,7 @@
   1.237 -       $output .= '<li>'. t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) .'</li>';
   1.238 -       $output .= '<li>'. t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) .'</li>';
   1.239 -       $output .= '<li>'. t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, ping module and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) .'</li>';
   1.240 --      $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>';
   1.241 -+      $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@proxy-server">proxy server settings</a>, a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>';
   1.242 -       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'</p>';
   1.243 -       return $output;
   1.244 -     case 'admin':
   1.245 -@@ -406,6 +406,14 @@
   1.246 -     'access arguments' => array('administer site configuration'),
   1.247 +@@ -723,6 +723,14 @@
   1.248 +     'access arguments' => array('access administration pages'),
   1.249       'file' => 'system.admin.inc',
   1.250     );
   1.251  +  $items['admin/settings/proxy'] = array(
   1.252 @@ -244,130 +219,46 @@
   1.253  +    'access arguments' => array('administer site configuration'),
   1.254  +    'file' => 'system.admin.inc',
   1.255  +  );
   1.256 -   $items['admin/settings/file-system'] = array(
   1.257 +   $items['admin/config/media/file-system'] = array(
   1.258       'title' => 'File system',
   1.259       'description' => 'Tell Drupal where to store uploaded files and how they are accessed.',
   1.260 -
   1.261 ------------------------------------------------------------------------------
   1.262 -
   1.263 -Disable "Update notifications" check by default during installation.
   1.264 -
   1.265 -Index: install.php
   1.266 ---- install.php.orig	2008-02-08 23:00:45 +0100
   1.267 -+++ install.php	2008-05-09 13:18:09 +0200
   1.268 -@@ -1069,7 +1069,7 @@
   1.269 -     '#type' => 'checkboxes',
   1.270 -     '#title' => st('Update notifications'),
   1.271 -     '#options' => array(1 => st('Check for updates automatically')),
   1.272 --    '#default_value' => array(1),
   1.273 +Index: includes/install.core.inc
   1.274 +--- includes/install.core.inc.orig	2012-08-01 18:27:42.000000000 +0200
   1.275 ++++ includes/install.core.inc	2012-08-22 21:55:27.582420660 +0200
   1.276 +@@ -1771,7 +1771,7 @@
   1.277 +       1 => st('Check for updates automatically'),
   1.278 +       2 => st('Receive e-mail notifications'),
   1.279 +     ),
   1.280 +-    '#default_value' => array(1, 2),
   1.281  +    '#default_value' => array(),
   1.282 -     '#description' => st('With this option enabled, Drupal will notify you when new releases are available. This will significantly enhance your site\'s security and is <strong>highly recommended</strong>. This requires your site to periodically send anonymous information on its installed components to <a href="@drupal">drupal.org</a>. For more information please see the <a href="@update">update notification information</a>.', array('@drupal' => 'http://drupal.org', '@update' => 'http://drupal.org/handbook/modules/update')),
   1.283 +     '#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="@drupal">Drupal.org</a>.', array('@drupal' => 'http://drupal.org')),
   1.284       '#weight' => 15,
   1.285     );
   1.286 -
   1.287 ------------------------------------------------------------------------------
   1.288 -
   1.289 -No need to always expand the "Menu settings" on node edit pages.
   1.290 -
   1.291 -Index: modules/menu/menu.module
   1.292 ---- modules/menu/menu.module.orig	2008-04-09 23:11:48 +0200
   1.293 -+++ modules/menu/menu.module	2008-05-16 20:03:48 +0200
   1.294 -@@ -366,7 +366,7 @@
   1.295 -       '#title' => t('Menu settings'),
   1.296 -       '#access' => user_access('administer menu'),
   1.297 -       '#collapsible' => TRUE,
   1.298 --      '#collapsed' => FALSE,
   1.299 -+      '#collapsed' => TRUE,
   1.300 -       '#tree' => TRUE,
   1.301 -       '#weight' => -2,
   1.302 -       '#attributes' => array('class' => 'menu-item-form'),
   1.303 -
   1.304 ------------------------------------------------------------------------------
   1.305 -
   1.306 -Use a larger text-area on node edit pages.
   1.307 -
   1.308 -Index: modules/node/node.pages.inc
   1.309 ---- modules/node/node.pages.inc.orig	2008-02-27 20:44:44 +0100
   1.310 -+++ modules/node/node.pages.inc	2008-05-16 20:06:45 +0200
   1.311 -@@ -287,7 +287,8 @@
   1.312 -     '#type' => 'textarea',
   1.313 -     '#title' => check_plain($label),
   1.314 -     '#default_value' => $include ? $node->body : ($node->teaser . $node->body),
   1.315 --    '#rows' => 20,
   1.316 -+    '#rows' => 30,
   1.317 -+    '#cols' => 80,
   1.318 -     '#required' => ($word_count > 0),
   1.319 -   );
   1.320 - 
   1.321 ------------------------------------------------------------------------------
   1.322 -
   1.323 -Avoid incorrect ordering of BLOG entries by removing the
   1.324 -db_rewrite_sql() calls which seem to introduce a wrong ordering.
   1.325 -
   1.326 -Index: modules/blog/blog.module
   1.327 ---- modules/blog/blog.module.orig	2008-05-19 09:27:35 +0200
   1.328 -+++ modules/blog/blog.module	2008-07-29 21:20:42 +0200
   1.329 -@@ -182,13 +182,13 @@
   1.330 -  * Helper function to determine if a user has blog posts already.
   1.331 -  */
   1.332 - function _blog_post_exists($account) {
   1.333 --  return (bool)db_result(db_query_range(db_rewrite_sql("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1"), $account->uid, 0, 1));
   1.334 -+  return (bool)db_result(db_query_range("SELECT 1 FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1", $account->uid, 0, 1));
   1.335 - }
   1.336 +Index: sites/default/default.settings.php
   1.337 +--- sites/default/default.settings.php.orig	2012-08-01 18:27:42.000000000 +0200
   1.338 ++++ sites/default/default.settings.php	2012-08-22 21:39:06.793031214 +0200
   1.339 +@@ -257,6 +257,24 @@
   1.340 + # $base_url = 'http://www.example.com';  // NO trailing slash!
   1.341   
   1.342   /**
   1.343 -  * Implementation of hook_block().
   1.344 ++ * Local Base URL (optional).
   1.345 ++ *
   1.346 ++ * If you are running Drupal behind a reverse proxy, $base_url (see above)
   1.347 ++ * usually points to the URL of the reverse proxy. Drupal uses this for
   1.348 ++ * all sorts of external URLs. In order to correctly calculate sub-URLs
   1.349 ++ * below $base_url for embedded HTML forms, Drupal also has to know the
   1.350 ++ * URL on the local/origin server under which Drupal is contacted by the
   1.351 ++ * reverse proxy. This is what $base_url_local is for.
   1.352 ++ *
   1.353 ++ * Examples:
   1.354 ++ *   $base_url_local = 'http://www.example.com:8080/drupal';
   1.355 ++ *
   1.356 ++ * It is not allowed to have a trailing slash; Drupal will add it
   1.357 ++ * for you.
   1.358 ++ */
   1.359 ++# $base_url_local = 'http://www.example.com:8080/drupal';  // NO trailing slash!
   1.360 ++
   1.361 ++/**
   1.362 +  * PHP settings:
   1.363    *
   1.364 -- * Displays the most recent 10 blog titles.
   1.365 -+ * Displays the most recent 5 blog titles.
   1.366 -  */
   1.367 - function blog_block($op = 'list', $delta = 0) {
   1.368 -   global $user;
   1.369 -@@ -198,7 +198,7 @@
   1.370 -   }
   1.371 -   else if ($op == 'view') {
   1.372 -     if (user_access('access content')) {
   1.373 --      $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 10);
   1.374 -+      $result = db_query_range("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, 5);
   1.375 -       if ($node_title_list = node_title_list($result)) {
   1.376 -         $block['content'] = $node_title_list;
   1.377 -         $block['content'] .= theme('more_link', url('blog'), t('Read the latest blog entries.'));
   1.378 -Index: modules/blog/blog.pages.inc
   1.379 ---- modules/blog/blog.pages.inc.orig	2009-09-14 17:08:00 +0200
   1.380 -+++ modules/blog/blog.pages.inc	2009-09-19 08:53:18 +0200
   1.381 -@@ -25,7 +25,7 @@
   1.382 - 
   1.383 -   $output = theme('item_list', $items);
   1.384 - 
   1.385 --  $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10), 0, NULL, $account->uid);
   1.386 -+  $result = pager_query("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10), 0, NULL, $account->uid);
   1.387 -   $has_posts = FALSE;
   1.388 -   
   1.389 -   while ($node = db_fetch_object($result)) {
   1.390 -@@ -64,7 +64,7 @@
   1.391 - 
   1.392 -   $output = theme('item_list', $items);
   1.393 - 
   1.394 --  $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC"), variable_get('default_nodes_main', 10));
   1.395 -+  $result = pager_query("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC", variable_get('default_nodes_main', 10));
   1.396 -   $has_posts = FALSE;
   1.397 - 
   1.398 -   while ($node = db_fetch_object($result)) {
   1.399 -@@ -87,7 +87,7 @@
   1.400 -  * Menu callback; displays an RSS feed containing recent blog entries of a given user.
   1.401 -  */
   1.402 - function blog_feed_user($account) {
   1.403 --  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10));
   1.404 -+  $result = db_query_range("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC", $account->uid, 0, variable_get('feed_default_items', 10));
   1.405 -   $channel['title'] = t("!name's blog", array('!name' => $account->name));
   1.406 -   $channel['link'] = url('blog/'. $account->uid, array('absolute' => TRUE));
   1.407 - 
   1.408 -@@ -102,7 +102,7 @@
   1.409 -  * Menu callback; displays an RSS feed containing recent blog entries of all users.
   1.410 -  */
   1.411 - function blog_feed_last() {
   1.412 --  $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, variable_get('feed_default_items', 10));
   1.413 -+  $result = db_query_range("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, variable_get('feed_default_items', 10));
   1.414 -   $channel['title'] = t('!site_name blogs', array('!site_name' => variable_get('site_name', 'Drupal')));
   1.415 -   $channel['link'] = url('blog', array('absolute' => TRUE));
   1.416 - 
   1.417 +  * To see what PHP settings are possible, including whether they can be set at

mercurial