]> git.pld-linux.org Git - packages/drupal.git/blob - drupal-cron.patch
- merged 5.7 from DEVEL: cvs up -j HEAD -j DEVEL, except manually re-merged changelog...
[packages/drupal.git] / drupal-cron.patch
1 diff -uNdr drupal-5.7.old/cron.php drupal-5.7/cron.php
2 --- drupal-5.7.old/cron.php     2006-08-09 09:42:55.000000000 +0200
3 +++ drupal-5.7/cron.php 2008-02-16 15:50:48.000000000 +0100
4 @@ -1,3 +1,4 @@
5 +#!/usr/bin/php
6  <?php
7  // $Id$
8  
9 @@ -6,6 +7,13 @@
10   * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
11   */
12  
13 +// If not in 'safe mode', increase the memory limit
14 +if (!ini_get('safe_mode')) {
15 +  ini_set('memory_limit', '20M');
16 +}
17 +
18 +chdir(dirname(__FILE__));
19 +
20  include_once './includes/bootstrap.inc';
21  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
22  drupal_cron_run();
23 diff -uNdr drupal-5.7.old/includes/bootstrap.inc drupal-5.7/includes/bootstrap.inc
24 --- drupal-5.7.old/includes/bootstrap.inc       2008-01-10 23:14:24.000000000 +0100
25 +++ drupal-5.7/includes/bootstrap.inc   2008-02-16 16:02:23.000000000 +0100
26 @@ -201,7 +201,7 @@
27  
28    $confdir = 'sites';
29    $uri = explode('/', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
30 -  $server = explode('.', implode('.', array_reverse(explode(':', rtrim($_SERVER['HTTP_HOST'], '.')))));
31 +  $server = explode('.', implode('.', array_reverse(explode(':', rtrim(@$_SERVER['HTTP_HOST'], '.')))));
32    for ($i = count($uri) - 1; $i > 0; $i--) {
33      for ($j = count($server); $j > 0; $j--) {
34        $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
35 @@ -240,7 +240,7 @@
36    global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile;
37    $conf = array();
38  
39 -  include_once './'. conf_path() .'/settings.php';
40 +  include_once conf_path() .'/settings.php';
41  
42    if (isset($base_url)) {
43      // Parse fixed base URL from settings.php.
44 @@ -258,7 +258,7 @@
45  
46      // As $_SERVER['HTTP_HOST'] is user input, ensure it only contains
47      // characters allowed in hostnames.
48 -    $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']);
49 +    $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', @$_SERVER['HTTP_HOST']);
50  
51      // $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not
52      // be modified by a visitor.
53 @@ -886,7 +886,7 @@
54  
55      case DRUPAL_BOOTSTRAP_ACCESS:
56        // Deny access to hosts which were banned - t() is not yet available.
57 -      if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
58 +      if (drupal_is_denied('host', @$_SERVER['REMOTE_ADDR'])) {
59          header('HTTP/1.1 403 Forbidden');
60          print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.';
61          exit();
This page took 0.025068 seconds and 3 git commands to generate.