]> git.pld-linux.org Git - packages/drupal.git/blame - drupal-cron.patch
- restore r1.15
[packages/drupal.git] / drupal-cron.patch
CommitLineData
f9fd4089
ER
1diff -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
5de01567
ER
4@@ -1,3 +1,4 @@
5+#!/usr/bin/php
6 <?php
7 // $Id$
8
9@@ -6,6 +7,13 @@
7ff7d6f4
ER
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')) {
8873d436 15+ ini_set('memory_limit', '20M');
7ff7d6f4 16+}
5de01567
ER
17+
18+chdir(dirname(__FILE__));
7ff7d6f4 19+
f9fd4089
ER
20 include_once './includes/bootstrap.inc';
21 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
22 drupal_cron_run();
23diff -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 @@
eb116c31 54
f9fd4089
ER
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.037062 seconds and 4 git commands to generate.