]> git.pld-linux.org Git - packages/drupal.git/blobdiff - 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
index b85003f807fdf818f09e6e33d95018f569dbcd99..8b90534d91a7d7e10b5aa064e9c09607f6d9dc1f 100644 (file)
@@ -1,27 +1,6 @@
---- ./includes/bootstrap.inc   2005-10-11 10:02:05.000000000 +0300
-+++ /tmp/bootstrap.inc 2005-10-11 10:01:51.000000000 +0300
-@@ -50,7 +50,7 @@
-   $confdir = '/etc/drupal/sites';
-   $uri = explode('/', $_SERVER['PHP_SELF']);
--  $server = explode('.', rtrim($_SERVER['HTTP_HOST'], '.'));
-+  $server = explode('.', rtrim(@$_SERVER['HTTP_HOST'], '.'));
-   for ($i = count($uri) - 1; $i > 0; $i--) {
-     for ($j = count($server); $j > 0; $j--) {
-       $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
---- ./includes/session.inc     2005-08-10 23:43:03.000000000 +0300
-+++ /tmp/session.inc   2005-10-11 10:03:38.000000000 +0300
-@@ -25,7 +25,7 @@
-   $result = db_query_range("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = '%s' AND u.status < 3", $key, 0, 1);
-   if (!db_num_rows($result)) {
--    db_query("INSERT INTO {sessions} (sid, uid, hostname, timestamp) VALUES ('%s', 0, '%s', %d)", $key, $_SERVER["REMOTE_ADDR"], time());
-+    db_query("INSERT INTO {sessions} (sid, uid, hostname, timestamp) VALUES ('%s', 0, '%s', %d)", $key, @$_SERVER["REMOTE_ADDR"], time());
-     $result = db_query("SELECT u.* FROM {users} u WHERE u.uid = 0");
-   }
---- ./cron.php 2005-12-09 20:13:27.000000000 +0200
-+++ drupal-4.6.11/cron.php     2007-01-30 18:02:41.911795649 +0200
+diff -uNdr drupal-5.7.old/cron.php drupal-5.7/cron.php
+--- drupal-5.7.old/cron.php    2006-08-09 09:42:55.000000000 +0200
++++ drupal-5.7/cron.php        2008-02-16 15:50:48.000000000 +0100
 @@ -1,3 +1,4 @@
 +#!/usr/bin/php
  <?php
 +
 +chdir(dirname(__FILE__));
 +
- include_once 'includes/bootstrap.inc';
- include_once 'includes/common.inc' ;
+ include_once './includes/bootstrap.inc';
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ drupal_cron_run();
+diff -uNdr drupal-5.7.old/includes/bootstrap.inc drupal-5.7/includes/bootstrap.inc
+--- drupal-5.7.old/includes/bootstrap.inc      2008-01-10 23:14:24.000000000 +0100
++++ drupal-5.7/includes/bootstrap.inc  2008-02-16 16:02:23.000000000 +0100
+@@ -201,7 +201,7 @@
+   $confdir = 'sites';
+   $uri = explode('/', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
+-  $server = explode('.', implode('.', array_reverse(explode(':', rtrim($_SERVER['HTTP_HOST'], '.')))));
++  $server = explode('.', implode('.', array_reverse(explode(':', rtrim(@$_SERVER['HTTP_HOST'], '.')))));
+   for ($i = count($uri) - 1; $i > 0; $i--) {
+     for ($j = count($server); $j > 0; $j--) {
+       $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
+@@ -240,7 +240,7 @@
+   global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile;
+   $conf = array();
+-  include_once './'. conf_path() .'/settings.php';
++  include_once conf_path() .'/settings.php';
+   if (isset($base_url)) {
+     // Parse fixed base URL from settings.php.
+@@ -258,7 +258,7 @@
+     // As $_SERVER['HTTP_HOST'] is user input, ensure it only contains
+     // characters allowed in hostnames.
+-    $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']);
++    $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', @$_SERVER['HTTP_HOST']);
+     // $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not
+     // be modified by a visitor.
+@@ -886,7 +886,7 @@
  
+     case DRUPAL_BOOTSTRAP_ACCESS:
+       // Deny access to hosts which were banned - t() is not yet available.
+-      if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
++      if (drupal_is_denied('host', @$_SERVER['REMOTE_ADDR'])) {
+         header('HTTP/1.1 403 Forbidden');
+         print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.';
+         exit();
This page took 0.075764 seconds and 4 git commands to generate.