]> git.pld-linux.org Git - packages/drupal.git/commitdiff
- merged 5.7 from DEVEL: cvs up -j HEAD -j DEVEL, except manually re-merged changelog...
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 4 May 2010 15:13:55 +0000 (15:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    drupal-19298-cache.patch -> 1.3
    drupal-apache1.conf -> 1.2
    drupal-comment.patch -> 1.2
    drupal-cron.patch -> 1.6
    drupal-disabled_fields.patch -> 1.2
    drupal-emptypass.patch -> 1.5
    drupal-http-reject.patch -> 1.2
    drupal-locale-memory.patch -> 1.2
    drupal-replication.patch -> 1.6
    drupal-sitesdir.patch -> 1.3
    drupal-themedir2.patch -> 1.2
    drupal-topdir.patch -> 1.5
    drupal-update-cli.patch -> 1.4
    drupal.conf -> 1.16
    drupal.cron -> 1.4
    drupal.spec -> 1.79

16 files changed:
drupal-19298-cache.patch [deleted file]
drupal-apache1.conf [new file with mode: 0644]
drupal-comment.patch [deleted file]
drupal-cron.patch
drupal-disabled_fields.patch [deleted file]
drupal-emptypass.patch [deleted file]
drupal-http-reject.patch [deleted file]
drupal-locale-memory.patch [deleted file]
drupal-replication.patch [deleted file]
drupal-sitesdir.patch
drupal-themedir2.patch
drupal-topdir.patch
drupal-update-cli.patch [deleted file]
drupal.conf
drupal.cron
drupal.spec

diff --git a/drupal-19298-cache.patch b/drupal-19298-cache.patch
deleted file mode 100644 (file)
index a6c62c3..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
---- includes/bootstrap.inc.orig        2005-04-08 09:22:33.000000000 -0500
-+++ includes/bootstrap.inc     2005-04-08 17:43:57.000000000 -0500
-@@ -9,6 +9,10 @@
- define('CACHE_PERMANENT', 0);
- define('CACHE_TEMPORARY', -1);
-+define('CACHE_DISABLED', 0);
-+define('CACHE_ENABLED_STRICT', 1);
-+define('CACHE_ENABLED_LOOSE', 2);
-+
- define('WATCHDOG_NOTICE', 0);
- define('WATCHDOG_WARNING', 1);
- define('WATCHDOG_ERROR', 2);
-@@ -196,9 +200,37 @@ function variable_del($name) {
-  *   The cache ID of the data to retrieve.
-  */
- function cache_get($key) {
--  $cache = db_fetch_object(db_query("SELECT data, created, headers FROM {cache} WHERE cid = '%s'", $key));
-+  global $user;
-+  $sid = session_id();
-+
-+  // CACHE_ENABLED_LOOSE garbage collection
-+  $cache_flush = variable_get('cache_flush', 0);
-+  if ($cache_flush && ($cache_flush + variable_get('cache_flush_delay', 300) <= time())) {
-+    // time to flush old cache data
-+    db_query("DELETE FROM {cache} WHERE expire != %d AND expire <= %d", CACHE_PERMANENT, $cache_flush);
-+    variable_set('cache_flush', 0);
-+  }
-+
-+  $cache = db_fetch_object(db_query("SELECT data, created, headers, expire FROM {cache} WHERE cid = '%s'", $key));
-   if (isset($cache->data)) {
--    $cache->data = db_decode_blob($cache->data);
-+    // if data is permanent or using strict caching, always return data
-+    if ($cache->expire == CACHE_PERMANENT || variable_get('cache', CACHE_DISABLED) == CACHE_ENABLED_STRICT) {
-+      $cache->data = db_decode_blob($cache->data);
-+    }
-+    /* if using loose caching, validate data is current before we return it by
-+    ** making sure the cache entry was created before the timestamp in the
-+    ** current session's cache timer.  The cache variable is already loaded
-+    ** into the $user object by sess_read in session.inc
-+    */
-+    else {
-+      if ($user->cache > $cache->created) {
-+        // this cache data is too old and thus not valid for us, ignore it
-+        return 0;
-+      }
-+      else {
-+        $cache->data = db_decode_blob($cache->data);
-+      }
-+    }
-     return $cache;
-   }
-   return 0;
-@@ -235,16 +267,44 @@ function cache_set($cid, $data, $expire 
-  * Expire data from the cache.
-  *
-  * @param $cid
-- *   If set, the cache ID to delete. Otherwise, all cache entries that can expire
-- *   are deleted.
-+ *   If set, the cache ID to delete. Otherwise, all cache entries that can 
-+ *   expire are deleted.
-  *
-  * @param $wildcard
-  *   If set to true, the $cid is treated as a substring to match rather than a
-  *   complete ID.
-  */
- function cache_clear_all($cid = NULL, $wildcard = false) {
-+  global $user;
-+  $sid = session_id();
-+
-   if (empty($cid)) {
--    db_query("DELETE FROM {cache} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, time());
-+    if (variable_get('cache', CACHE_DISABLED) == CACHE_ENABLED_STRICT) {
-+      // strict caching, flush all temporary cache entries
-+      db_query("DELETE FROM {cache} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, time());
-+    }
-+    else {
-+      $cache_flush = variable_get('cache_flush', 0);
-+      /* loose caching, only flush temporary cache entries that have been
-+      ** invalidated for more than maximum allowable time.
-+      */
-+      if ($cache_flush && ($cache_flush + variable_get('cache_flush_delay', 300) <= time())) {
-+        /* only flush cache data older than $cache_flush, as newer data may
-+        ** now be valid.
-+        */
-+        db_query("DELETE FROM {cache} WHERE expire != %d AND expire <= %d", CACHE_PERMANENT, $cache_flush);
-+        variable_set('cache_flush', 0);
-+      }
-+      /* invalidate temporary cache data only for current user/session.  We
-+      ** set $user->cache, which gets saved into the sessions table by 
-+      ** sess_write() in session.inc.
-+      */
-+      $user->cache = time();
-+      if (variable_get('cache_flush', 0) == 0) {
-+        // set timestamp to know which cache entries we eventually clear
-+        variable_set('cache_flush', time());
-+      }
-+    }
-   }
-   else {
-     if ($wildcard) {
---- includes/session.inc.orig  2005-04-08 17:33:12.000000000 -0500
-+++ includes/session.inc       2005-04-08 17:33:38.000000000 -0500
-@@ -45,7 +45,7 @@ function sess_read($key) {
- function sess_write($key, $value) {
-   global $user;
--  db_query("UPDATE {sessions} SET uid = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user->uid, $_SERVER["REMOTE_ADDR"], $value, time(), $key);
-+  db_query("UPDATE {sessions} SET uid = %d, cache = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user->uid, $user->cache, $_SERVER["REMOTE_ADDR"], $value, time(), $key);
-   return '';
- }
---- modules/system.module.orig 2005-04-08 09:16:48.000000000 -0500
-+++ modules/system.module      2005-04-08 09:19:50.000000000 -0500
-@@ -37,7 +37,7 @@ function system_help($section) {
-       <pre>     00 * * * * /home/www/drupal/scripts/cron-lynx.sh</pre>
-       Note that it is essential to access <code>cron.php</code> using a browser on the web site's domain; do not run it using command line PHP and avoid using <code>localhost</code> or <code>127.0.0.1</code> or some of the environment variables will not be set correctly and features may not work as expected.</p>
-       <h3><a id=\"cache\">Cache</a></h3>
--      <p>Drupal has a caching mechanism which stores dynamically generated web pages in a database.  By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load.  Only pages requested by \"anonymous\" users are cached.  In order to reduce server load and save bandwidth, Drupal stores and sends cached pages compressed.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
-+      <p>Drupal has a caching mechanism which stores dynamically generated web pages in a database.  By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load.  Only pages requested by \"anonymous\" users are cached.  In order to reduce server load and save bandwidth, Drupal stores and sends cached pages compressed.  Drupal supports by strict caching and loose caching.  Strict caching immediately deletes cached data as soon as it becomes invalid for any user.  Loose caching delays the deletion of cached data to provide better performance for high traffic sites.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
-     case 'admin/modules#description':
-       return t('Handles general site configuration for administrators.');
-   }
---- database/database.mysql.orig       2005-04-08 09:21:50.000000000 -0500
-+++ database/database.mysql    2005-04-08 09:18:25.000000000 -0500
-@@ -574,6 +574,7 @@
-   sid varchar(32) NOT NULL default '',
-   hostname varchar(128) NOT NULL default '',
-   timestamp int(11) NOT NULL default '0',
-+  cache int(11) NOT NULL default '0',
-   session longtext,
-   KEY uid (uid),
-   PRIMARY KEY (sid),
---- database/database.pgsql.orig       2005-04-08 09:21:55.000000000 -0500
-+++ database/database.pgsql    2005-04-08 09:18:25.000000000 -0500
-@@ -587,6 +587,7 @@
-   sid varchar(32) NOT NULL default '',
-   hostname varchar(128) NOT NULL default '',
-   timestamp integer NOT NULL default '0',
-+  cache integer NOT NULL default '0',
-   session text,
-   PRIMARY KEY (sid)
- );
---- modules/system.module~     2005-12-20 17:03:28.000000000 +0200
-+++ modules/system.module      2005-12-20 17:04:57.000000000 +0200
-@@ -226,7 +226,7 @@ function system_view_general() {
-   $output .= form_group(t('Error handling'), $group);
-   // Caching:
--  $group  = form_radios(t('Cache support'), 'cache', variable_get('cache', 0), array(t('Disabled'), t('Enabled')), t('Enable or disable the caching of rendered pages.  When caching is enabled, Drupal will flush the cache when required to make sure updates take effect immediately.  Check the <a href="%documentation">cache documentation</a> for information on Drupal\'s cache system.', array('%documentation' => url('admin/help/system#cache', NULL, NULL, 'cache'))));
-+  $group  = form_radios(t('Cache support'), 'cache', variable_get('cache', CACHE_DISABLED), array(CACHE_DISABLED => t('Disabled'), CACHE_ENABLED_STRICT => t('Strict'), CACHE_ENABLED_LOOSE => t('Loose')), t('Enable or disable the caching of rendered pages.  When strict caching is enabled, Drupal will flush the entire cache when required to make sure updates take effect immediately.  When loose caching is enabled, Drupal will delay the flushing of the entire cache for several minutes, immediately flushing the cache only for specific users.  Loose caching is intended to improve performance on high traffic sites.  Check the <a href="%documentation">cache documentation</a> for information on Drupal\'s cache system.', array('%documentation' => url('admin/help', NULL, NULL, 'cache'))));
-   $output .= form_group(t('Cache settings'), $group);
---- database/updates.inc       2005-12-20 17:07:37.000000000 +0200
-+++ database/updates.inc       2007-01-05 03:24:26.265230942 +0200
-@@ -108,6 +108,7 @@
-   "2005-04-14" => "update_129",
-   "2005-05-06" => "update_130",
-   "2005-05-07" => "update_131",
-+  "2005-12-20" => "update_cache_1",
-   "2006-12-19" => "update_132",
- );
-@@ -2395,6 +2396,17 @@
-   return $ret;
- }
-+function update_cache_1() {
-+  $ret = array();
-+  if ($GLOBALS['db_type'] == 'mysql') {
-+    $ret[] = update_sql("ALTER TABLE sessions ADD cache int(11) NOT NULL default '0' AFTER timestamp");
-+  }
-+  elseif ($GLOBALS['db_type'] == 'pgsql') {
-+    $ret[] = update_sql("ALTER TABLE sessions ADD cache int(11) NOT NULL default '0' AFTER timestamp");
-+  }
-+  return $ret;
-+}
-+
- function update_sql($sql) {
-   $edit = $_POST["edit"];
-   $result = db_query($sql);
diff --git a/drupal-apache1.conf b/drupal-apache1.conf
new file mode 100644 (file)
index 0000000..7a16704
--- /dev/null
@@ -0,0 +1,106 @@
+#
+# Apache/PHP/Drupal settings.
+
+# Default setup is for running drupal in vhost.
+# You can setup drupal as alias /drupal, but you need to comment/uncomment few things.
+#
+# Please note that drupal-ID's don't work in subdirs, you need vhost for that.
+
+<Directory /usr/share/drupal/htdocs>
+    Options FollowSymLinks
+    AllowOverride None
+    <IfModule mod_access.c>
+        order allow,deny
+        allow from all
+    </IfModule>
+
+    # Set the default handler.
+    <IfModule mod_dir.c>
+        DirectoryIndex index.php
+    </IfModule>
+
+    # Override PHP settings. More in sites/default/settings.php
+    # but the following cannot be changed at runtime.
+
+    # PHP 4, Apache 1.
+    <IfModule mod_php4.c>
+       php_value magic_quotes_gpc                0
+       php_value register_globals                0
+       php_value session.auto_start              0
+       php_value mbstring.http_input             pass
+       php_value mbstring.http_output            pass
+       php_value mbstring.encoding_translation   0
+    </IfModule>
+
+    # PHP 5, Apache 1 and 2.
+    <IfModule mod_php5.c>
+       php_value magic_quotes_gpc                0
+       php_value register_globals                0
+       php_value session.auto_start              0
+       php_value mbstring.http_input             pass
+       php_value mbstring.http_output            pass
+       php_value mbstring.encoding_translation   0
+    </IfModule>
+
+    # Reduce the time dynamically generated pages are cache-able.
+    <IfModule mod_expires.c>
+        ExpiresByType text/html A1
+    </IfModule>
+
+    # Various rewrite rules.
+    <IfModule mod_rewrite.c>
+        RewriteEngine on
+
+        # Modify the RewriteBase if you are using Drupal in a subdirectory and
+        # the rewrite rules are not working properly.
+        # Enable RewriteBase if you have drupal configured in virtualhost root.
+        #RewriteBase /drupal
+
+        # Rewrite old-style URLs of the form 'node.php?id=x'.
+        #RewriteCond %{REQUEST_FILENAME} !-f
+        #RewriteCond %{REQUEST_FILENAME} !-d
+        #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
+        #RewriteRule node.php index.php?q=node/view/%1 [L]
+
+        # Rewrite old-style URLs of the form 'module.php?mod=x'.
+        #RewriteCond %{REQUEST_FILENAME} !-f
+        #RewriteCond %{REQUEST_FILENAME} !-d
+        #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
+        #RewriteRule module.php index.php?q=%1 [L]
+
+        # Rewrite current-style URLs of the form 'index.php?q=x'.
+        RewriteCond %{REQUEST_FILENAME} !-f
+        RewriteCond %{REQUEST_FILENAME} !-d
+        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
+    </IfModule>
+
+    # Customized error messages.
+    ErrorDocument 404 /index.php
+</Directory>
+
+# If having drupal installed as /drupal
+#<IfModule mod_alias.c>
+#    Alias /drupal/files /var/lib/drupal
+#    Alias /drupal /usr/share/drupal/htdocs
+#</IfModule>
+#
+#<Location /drupal>
+#    # Customized error messages.
+#    ErrorDocument 404 /drupal/index.php
+#</Location>
+
+<Directory /var/lib/drupal>
+    allow from all
+</Directory>
+
+<VirtualHost *:80>
+    ServerName drupal
+    ServerAlias www.drupal
+    DocumentRoot /usr/share/drupal/htdocs
+
+    <IfModule mod_alias.c>
+        Alias /files /var/lib/drupal
+    </IfModule>
+</VirtualHost>
+
+# vim: filetype=apache ts=4 sw=4 et
diff --git a/drupal-comment.patch b/drupal-comment.patch
deleted file mode 100644 (file)
index b196f49..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-rediff from from http://drupal.org/node/43145
-diff -ur -w drupal-4.6.5/modules/comment.module drupal-4.6.5.comment/modules/comment.module
---- drupal-4.6.5/modules/comment.module        2005-11-15 22:37:56.000000000 +0200
-+++ drupal-4.6.5.comment/modules/comment.module        2006-01-11 18:01:10.000000000 +0200
-@@ -92,7 +92,7 @@
-     $items[] = array('path' => 'admin/comment/edit', 'title' => t('edit comment'),
-       'callback' => 'comment_admin_edit', 'access' => $access, 'type' => MENU_CALLBACK);
-     $items[] = array('path' => 'admin/comment/delete', 'title' => t('delete comment'),
--      'callback' => 'comment_delete', 'access' => $access, 'type' => MENU_CALLBACK);
-+      'callback' => 'comment_delete', 'access' => 1, 'type' => MENU_CALLBACK);
-     // Tabs:
-     $items[] = array('path' => 'admin/comment/list', 'title' => t('list'),
-@@ -266,8 +266,13 @@
-       break;
-     case 'delete':
-+      if(variable_get('comment_delete_mode', 0) == 1) {
-+        db_query('UPDATE {comments} set status = 1 WHERE nid = %d', $node->nid);
-+        db_query('DELETE FROM {node_comment_statistics} WHERE nid = %d', $node->nid);
-+      } else {
-       db_query('DELETE FROM {comments} WHERE nid = %d', $node->nid);
-       db_query('DELETE FROM {node_comment_statistics} WHERE nid = %d', $node->nid);
-+      }
-       break;
-     case 'update index':
-@@ -320,6 +325,10 @@
-   $group .= form_radios(t('Location of comment submission form'), 'comment_form_location', variable_get('comment_form_location', 0), array(t('Display on separate page'), t('Display below post or comments')));
-   $output .= form_group(t('Comment posting settings'), $group);
-+  $group = form_radios(t('Delete mode'), 'comment_delete_mode', variable_get('comment_delete_mode', 0), array(t('Delete'), t('Unpublish')));
-+  $group .= form_radios(t('Node owner can delete node comments'), 'comment_moderating_nodeowner', variable_get('comment_moderating_nodeowner', 0), array(t('Disabled'), t('Enabled')));
-+  $output .= form_group(t('Comment management settings'), $group);
-+
-   $result = db_query('SELECT fid, filter FROM {moderation_filters} ');
-   while ($filter = db_fetch_object($result)) {
-     $thresholds[$filter->fid] = ($filter->filter);
-@@ -672,6 +681,7 @@
- function comment_links($comment, $return = 1) {
-   global $user;
-+  global $node_info;
-   $links = array();
-@@ -681,8 +691,15 @@
-   }
-   if (node_comment_mode($comment->nid) == 2) {
--    if (user_access('administer comments') && user_access('access administration pages')) {
-+    if ($node_info['uid'] == $user->uid && variable_get('comment_moderating_nodeowner', 0) == 1 || user_access('administer comments') && user_access('access administration pages')) {
-+      if (variable_get('comment_delete_mode', 0) == 1) {
-+        $links[] = l(t('unpublish'), "admin/comment/delete/$comment->cid");
-+      } else {
-       $links[] = l(t('delete'), "admin/comment/delete/$comment->cid");
-+      }
-+    }
-+
-+    if (user_access('administer comments') && user_access('access administration pages')) {
-       $links[] = l(t('edit'), "admin/comment/edit/$comment->cid");
-       $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
-     }
-@@ -707,6 +724,12 @@
- function comment_render($node, $cid = 0) {
-   global $user;
-+  // Give out node owner information to detect node owner:
-+  global $node_info;
-+  $node_info = array();
-+  $node_info['uid'] = $node->uid;
-+  $node_info['nid'] = $node->nid;
-+
-   $mode = $_GET['mode'];
-   $order = $_GET['order'];
-   $threshold = $_GET['threshold'];
-@@ -959,9 +982,18 @@
-   $output = '';
-+  // Access check
-+  if (
-+    user_access('administer comments')
-+    || variable_get('comment_moderating_nodeowner', 0) == 1 // comment_moderating_nodeowner Enabled
-+    && db_fetch_object(db_query('SELECT uid from {node} where nid = %d and uid = %d',$comment->nid,$GLOBALS['user']->uid)) // user owns node
-+  ) {
-+
-   // We'll only delete if the user has confirmed the
-   // deletion using the form in our else clause below.
-+
-   if ($comment->cid && $_POST['edit']['confirm']) {
-+
-     drupal_set_message(t('The comment and all its replies have been deleted.'));
-     // Delete comment and its replies.
-@@ -990,7 +1022,12 @@
-     drupal_set_message(t('The comment no longer exists.'));
-   }
-+  } else {
-+    drupal_set_message(t('You are not authorized to access this page.'));
-+  }
-+
-   print theme('page', $output);
-+
- }
- function comment_save($id, $edit) {
-@@ -1609,8 +1646,13 @@
- function _comment_delete_thread($comment) {
-   // Delete the comment:
-+  if (variable_get('comment_delete_mode', 0) == 1) {
-+    db_query('UPDATE {comments} set status = 1 WHERE cid = %d', $comment->cid);
-+    watchdog('content', t('Comment: unpublished %subject.', array('%subject' => theme('placeholder', $comment->subject))));
-+  } else {
-   db_query('DELETE FROM {comments} WHERE cid = %d', $comment->cid);
-   watchdog('content', t('Comment: deleted %subject.', array('%subject' => theme('placeholder', $comment->subject))));
-+  }
-   module_invoke_all('comment', 'delete', $comment);
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();
diff --git a/drupal-disabled_fields.patch b/drupal-disabled_fields.patch
deleted file mode 100644 (file)
index 293cf85..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- drupal-4.6.8/modules/user.module   2006-03-13 23:29:18.000000000 +0200
-+++ /usr/share/drupal/modules/user.module      2006-07-05 01:09:17.183413371 +0300
-@@ -1046,8 +1046,10 @@
- function user_edit_form($uid, $edit) {
-   // Account information:
-   $group  = form_textfield(t('Username'), 'name', $edit['name'], 30, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
-+  if (user_access('administer user fields')) {
-   $group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 55, t('Insert a valid e-mail address.  All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
-   $group .= form_item(t('Password'), '<input type="password" class="form-password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" class="form-password" name="edit[pass2]" size="12" maxlength="24" />', t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'), NULL, TRUE);
-+  }
-   if (user_access('administer users')) {
-     $group .= form_radios(t('Status'), 'status', $edit['status'], array(t('Blocked'), t('Active')));
-@@ -1082,6 +1084,7 @@
-     form_set_error('name', t('The name %name has been denied access.', array('%name' => theme('placeholder', $edit['name']))));
-   }
-+  if (user_access('administer user fields')) {
-   // Validate the e-mail address:
-   if ($error = user_validate_mail($edit['mail'])) {
-     form_set_error('mail', $error);
-@@ -1092,6 +1095,7 @@
-   else if (user_deny('mail', $edit['mail'])) {
-     form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => theme('placeholder', $edit['mail']))));
-   }
-+  }
-   // Validate the user roles:
-   if (user_access('administer users')) {
diff --git a/drupal-emptypass.patch b/drupal-emptypass.patch
deleted file mode 100644 (file)
index 8fe4943..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- drupal-4.6.5/includes/database.mysql.inc~  2005-12-20 12:05:30.000000000 +0200
-+++ drupal-4.6.5/includes/database.mysql.inc   2005-12-20 12:06:30.000000000 +0200
-@@ -29,7 +29,7 @@
-   }
-   // For replication setups, we will assume that dieing is bad 
--  $connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE);
-+  $connection = mysql_connect($url['host'], $url['user'], (isset($url['pass']) ? $url['pass'] : null), TRUE);
-   if (!is_resource($connection) && $critical) {
-     die(mysql_error());
-   }
diff --git a/drupal-http-reject.patch b/drupal-http-reject.patch
deleted file mode 100644 (file)
index 768950f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- drupal/modules/comment.module~     2007-09-12 11:15:08.000000000 +0300
-+++ drupal/modules/comment.module      2007-09-12 11:15:01.000000000 +0300
-@@ -650,8 +650,11 @@
-           $edit['name'] = $user->name;
-         }
--
--        db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $status, $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']);
-+              if ($edit['name'] == '' && strpos($edit['comment'], 'http://') !== false) {
-+                      error_log("comments Got spammer: cid=$edit[cid] nid=$edit[nid] pid=$edit[pid] uid=$edit[uid] subject=$edit[subject] comment=$edit[comment]");
-+              } else {
-+              db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $status, $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']);
-+              }
-         _comment_update_node_statistics($edit['nid']);
diff --git a/drupal-locale-memory.patch b/drupal-locale-memory.patch
deleted file mode 100644 (file)
index 6e78042..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- drupal-4.6.5/includes/locale.inc   2005-07-29 22:01:17.000000000 +0300
-+++ /tmp/locale.inc    2006-01-03 11:05:40.000000000 +0200
-@@ -122,6 +122,7 @@
-   // If not in 'safe mode', increase the maximum execution time:
-   if (!ini_get('safe_mode')) {
-     set_time_limit(240);
-+    ini_set('memory_limit', '128M');
-   }
-   // Check if we have the language already in the database
diff --git a/drupal-replication.patch b/drupal-replication.patch
deleted file mode 100644 (file)
index 6b19e9a..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-Replication patch from
-http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/crackerjm/replication/
-
---- /dev/null  2005-02-16 21:06:48.000000000 +0200
-+++ ./README.replication       2005-08-15 16:08:52.000000000 +0300
-@@ -0,0 +1,34 @@
-+
-+This README.txt and patch are for Mysql Replication. This assumes that you have
-+a master replication server and slave server(s) up and running already. If 
-+you don't, then there is no purpose for reading this.  If you need help for
-+replication, please read this link.  
-+      http://dev.mysql.com/doc/mysql/en/Replication.html
-+
-+NOTE: This is meant for drupal 4.6.0
-+
-+Now, in includes/conf.php you have a line that looks simalar to this
-+    $db_url = "mysql://username:password@localhost/database";
-+Comment at the line so that it looks like this
-+    //$db_url = "mysql://username:password@localhost/database";
-+
-+Add the following lines below it to look like this:
-+     $db_url = array();
-+     $db_url['default'] = "mysql://username:password@localhost/database";
-+     $db_url['slave1'] = "mysql://username:password@host/database";
-+     //$db_url['slave2'] = "mysql://username:password@host/database";
-+
-+The 'default' is your MASTER server, the slaves are just that.  make 
-+sure that you have added the appropriate users to the servers so that
-+if you are using round robin DNS or something to that effect, that 
-+way you don't end up with permission denied. 
-+
-+patch your code with replication.patch and there ya go
-+
-+***********
-+NEW: This revision of code supports the dead slave servers!
-+  caveat though, if ALL of your slaves are dead, then you will
-+  end up in a infinitely recursive loop searching for slave servers.
-+  Hopefully in the next revision of this, I will try to come up with
-+  a way to stop this recursion without the use of flags.
-+***********
-diff -urN drupal-4.6.0/includes/database.inc drupal-test/includes/database.inc
---- drupal-4.6.0/includes/database.inc 2005-04-08 09:24:10.000000000 -0500
-+++ drupal-test/includes/database.inc  2005-05-29 09:30:18.710563836 -0500
-@@ -119,11 +119,98 @@
-       die('Unsupported database type');
-     }
--    $db_conns[$name] = db_connect($connect_url);
--
-+    if($name == 'default') {
-+      // die on failure
-+      $db_conns[$name] = db_connect($connect_url, true);
-+    }
-+    else {
-+      $db_conns[$name] = db_connect($connect_url);
-+    }
-+      
-   }
-   // Set the active connection.
--  $active_db = $db_conns[$name];
-+  if($name != 'default' && $db_conns[$name] === false){
-+    print "Bad slave, killing $name\n";
-+    db_find_slave(true); // kill bad slave
-+    db_set_active(db_find_slave());
-+  }
-+  else {
-+    $active_db = $db_conns[$name];
-+  }
-+}
-+
-+function _is_commit($query) {
-+  $commits = array('insert', 'alter', 'update', 'delete', 'flush', 'lock');
-+  foreach($commits as $type) {
-+    if(preg_match("/^$type/i", $query)) {
-+      return true;
-+    }
-+  }
-+  return false;
-+}
-+
-+function db_find_slave($killslave = false) {
-+  global $db_url;
-+  static $slave ;
-+
-+  if(!_replication_ready())
-+    return 'default';
-+  
-+  if(!is_array($slave)){
-+    $slave = array();
-+    // initialize a local copy
-+    foreach($db_url as $key=>$value) {
-+      if(stristr($key, 'slave')) {
-+        $slave[] = $key;
-+      }
-+    }  
-+    /**
-+     * Since this is the first iteration of the loop, we reset the array to 
-+     * ensure we return the first element.
-+     */
-+    return reset($slave);
-+  }
-+
-+  if(empty($slave)) {
-+    return 'default';
-+  }
-+
-+  // Failed to connect, remove from the list
-+  if($killslave){
-+    array_shift($slave);
-+  }
-+
-+  $url = next($slave);
-+
-+  if($url === false){
-+    // walked past of the end of the array, start over at first element
-+    $url = reset($slave);
-+  }
-+
-+  return $url;
-+}
-+
-+function _replication_ready() {
-+  global $db_url;
-+  static $ready;
-+
-+  if(isset($ready)) {
-+    return $ready;
-+  }
-+  
-+  if(is_array($db_url)) {
-+    foreach($db_url as $key=>$value) {
-+      if(stristr($key, 'slave')) {
-+        // Found at least ONE element with the word slave in it
-+        // break the search to save on cycles
-+        $ready = true;
-+        return true;
-+      }
-+    }
-+  }
-+  
-+  $ready = false;
-+  return false;
- }
- /**
-diff -urN drupal-4.6.0/includes/database.mysql.inc drupal-test/includes/database.mysql.inc
---- drupal-4.6.5/includes/database.mysql.inc   2005-04-14 13:50:23.000000000 -0500
-+++ drupal-test/includes/database.mysql.inc    2005-05-29 09:28:22.490546558 -0500
-@@ -20,7 +20,7 @@
-  * performance, however, when the overhead to connect to your database is high
-  * (e.g. your database and web server live on different machines).
-  */
--function db_connect($url) {
-+function db_connect($url, $critical = false) {
-   $url = parse_url($url);
-   // Allow for non-standard MySQL port.
-@@ -28,10 +28,16 @@
-      $url['host'] = $url['host'] .':'. $url['port'];
-   }
--  $connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE) or die(mysql_error());
--  mysql_select_db(substr($url['path'], 1), $connection) or die('unable to select database');
-+  // For replication setups, we will assume that dieing is bad 
-+  $connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE);
-+  if (!is_resource($connection) && $critical) {
-+    die(mysql_error());
-+  }
-+  // We die on bad slaves.  These should be taken care of
-+  // maybe hook this somehow or something
-+  mysql_select_db(substr($url['path'], 1), $connection) or die(mysql_error());
--  return $connection;
-+  return ($connection) ? $connection : false;
- }
- /**
-@@ -40,14 +46,38 @@
- function _db_query($query, $debug = 0) {
-   global $active_db;
-   global $queries;
-+  global $db_url;
-   if (variable_get('dev_query', 0)) {
-     list($usec, $sec) = explode(' ', microtime());
-     $timer = (float)$usec + (float)$sec;
-   }
-+  /**
-+   * If the db_url isn't an array, then we can assume that this server is not
-+   * ready for a replication setup.  This outer if is purely for a speed as
-+   * calling PHP's builtin functions are way faster than user functions.
-+   * So, if its an array and has more than one element, we shall atleast check
-+   * to see if it's possibly ready for a replication enviorment.  However, 
-+   * if no [slave#] elements are found, then we assume normal operations.
-+   */
-+  if(is_array($db_url) && sizeof($db_url) > 1 && _replication_ready() )
-+  {
-+    if (_is_commit($query) === true){
-+      db_set_active('default');
-+    }
-+    else
-+    {
-+      // no checks as _replication_ready() verifies 
-+      // that there is atleast one slave
-+      db_set_active(db_find_slave());
-+    }
-+  }
-+
-+
-   $result = mysql_query($query, $active_db);
-+
-   if (variable_get('dev_query', 0)) {
-     list($usec, $sec) = explode(' ', microtime());
-     $stop = (float)$usec + (float)$sec;
---- ./sites/default/settings.php~      2005-08-15 16:41:07.000000000 +0300
-+++ ./sites/default/settings.php       2005-08-15 16:42:47.000000000 +0300
-@@ -77,8 +77,15 @@
-  * Database URL format:
-  * $db_url = 'mysql://username:password@localhost/database';
-  * $db_url = 'pgsql://username:password@localhost/database';
-+ *
-+ * Database URL format with MySQL replication:
-+ * $db_url = array();
-+ * $db_url['default'] = "mysql://username:password@localhost/database";
-+ * $db_url['slave1'] = "mysql://username:password@host/database";
-  */
--$db_url = 'mysql://username:password@localhost/database';
-+$db_url = array();
-+$db_url['default'] = 'mysql://mysql:@localhost/drupal';
-+#$db_url['slave1'] = "mysql://mysql:@mysql-slave/drupal";
- $db_prefix = '';
- /**
index c0ebc8ab33c49cfd462493551ebcd004fe9ccfdb..9a34b664175a68bd06944d31163d2c7b6af570b3 100644 (file)
@@ -1,12 +1,12 @@
-diff -ur ./includes/bootstrap.inc ../drupal1/includes/bootstrap.inc
---- ./includes/bootstrap.inc   2005-04-05 22:00:24.000000000 +0300
-+++ ./drupal1/includes/bootstrap.inc   2005-05-19 18:20:06.845355509 +0300
-@@ -48,7 +48,7 @@
+diff -uNdr drupal-5.7.old1/includes/bootstrap.inc drupal-5.7/includes/bootstrap.inc
+--- drupal-5.7.old1/includes/bootstrap.inc     2008-02-16 16:02:23.000000000 +0100
++++ drupal-5.7/includes/bootstrap.inc  2008-02-16 16:06:30.000000000 +0100
+@@ -199,7 +199,7 @@
      return $conf;
    }
  
 -  $confdir = 'sites';
 +  $confdir = '/etc/webapps/drupal/sites';
-   $uri = explode('/', $_SERVER['PHP_SELF']);
-   $server = explode('.', rtrim($_SERVER['HTTP_HOST'], '.'));
+   $uri = explode('/', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
+   $server = explode('.', implode('.', array_reverse(explode(':', rtrim(@$_SERVER['HTTP_HOST'], '.')))));
    for ($i = count($uri) - 1; $i > 0; $i--) {
index ca02b1b8fda5327e299ef05379fa25d89593427d..d9c6f8e73090c1b310ae04329eea9d4670c0f78c 100644 (file)
@@ -1,11 +1,10 @@
---- ../includes/theme.inc      2005-05-20 16:55:04.000000000 +0300
-+++ /tmp/theme.inc     2005-05-21 15:10:45.000000000 +0300
-@@ -74,7 +74,7 @@
-   else {
+--- drupal-5.0/includes/theme.inc~     2007-01-26 13:09:14.801730081 +0200
++++ drupal-5.0/includes/theme.inc      2007-01-26 13:09:52.242575644 +0200
+@@ -65,6 +65,6 @@
      // File is a template/theme
      // Load its CSS, if it exists
 -    if (file_exists($stylesheet = dirname($themes[$theme]->filename) .'/style.css')) {
 +    if (file_exists('htdocs/' . ($stylesheet = dirname($themes[$theme]->filename) .'/style.css'))) {
-       theme_add_style($stylesheet);
+       drupal_add_css($stylesheet, 'theme');
      }
    }
index fd0a50b0f913fafb7c5885bdf1ee2b65f9a2b926..b14dd20a6c5cf3565dee475333311722561f6877 100644 (file)
@@ -1,20 +1,30 @@
---- ./index.php~       2004-08-21 09:42:34.000000000 +0300
-+++ ./index.php        2005-05-20 14:10:24.260339523 +0300
+--- drupal-5.0/index.php~      2007-01-26 13:07:22.769199912 +0200
++++ drupal-5.0/index.php       2007-01-26 13:07:59.610031940 +0200
 @@ -9,6 +9,7 @@
   * prints the appropriate page.
   */
  
 +chdir('..');
include_once 'includes/bootstrap.inc';
- drupal_page_header();
- include_once 'includes/common.inc';
---- drupal-4.6.2/xmlrpc.php~   2004-08-21 09:42:34.000000000 +0300
-+++ drupal-4.6.2/xmlrpc.php    2005-07-06 18:44:26.000000000 +0300
require_once './includes/bootstrap.inc';
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+--- drupal-5.0/xmlrpc.php~     2007-01-26 13:08:33.010786268 +0200
++++ drupal-5.0/xmlrpc.php      2007-01-26 13:08:53.461248124 +0200
 @@ -6,6 +6,7 @@
   * PHP page for handling incoming XML-RPC requests from clients.
   */
  
 +chdir('..');
- include_once 'includes/bootstrap.inc';
- include_once 'includes/common.inc';
- include_once 'includes/xmlrpc.inc';
+ include_once './includes/bootstrap.inc';
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ include_once './includes/xmlrpc.inc';
+--- drupal-5.7/update.php.old  2007-04-08 02:54:04.000000000 +0200
++++ drupal-5.7/update.php      2008-02-17 21:15:36.000000000 +0100
+@@ -765,6 +765,7 @@
+ // Our custom error handler is not yet installed, so we just suppress them.
+ ini_set('display_errors', FALSE);
++chdir('..');
+ include_once './includes/bootstrap.inc';
+ update_fix_system_table();
diff --git a/drupal-update-cli.patch b/drupal-update-cli.patch
deleted file mode 100644 (file)
index 910ad1c..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
---- drupal-4.6.5/update.php    2005-12-20 17:30:16.000000000 +0200
-+++ drupal-4.6.5/update.php    2005-12-20 18:26:23.000000000 +0200
-@@ -206,6 +206,65 @@
-   print update_page_footer();
- }
-+if (php_sapi_name() == 'cli') {
-+      $_SERVER['REMOTE_ADDR'] = '0.0.0.0';
-+
-+      include_once "includes/bootstrap.inc";
-+      include_once "includes/common.inc";
-+
-+      function get_update_index($date) {
-+              global $sql_updates;
-+
-+              $hash = array_flip(array_keys($sql_updates));
-+              if (!isset($hash[$date])) {
-+                      return null;
-+              }
-+              return $hash[$date];
-+      }
-+
-+      if (isset($argv[2])) {
-+              # user specified the date
-+              $start = get_update_index($argv[2]);
-+              if (is_null($start)) {
-+                      die("Can't find requested update: $argv[2]\n");
-+              }
-+
-+      } else {
-+              # lookup update date from database
-+              $date = variable_get("update_start", 0);
-+
-+              $start = get_update_index($date);
-+              if (is_null($start)) {
-+                      die("No updates available\n");
-+              }
-+              # but we need next entry instead
-+              $start++;
-+      }
-+
-+      # "0" reserved for "All"
-+      $start++;
-+
-+      $_POST['op'] = $argv[1];
-+      $_POST['edit'] = array(
-+              'start' => $start,
-+      );
-+
-+      ob_start();
-+      update_page();
-+      $page = ob_get_contents();
-+      ob_end_clean();
-+
-+      # primitive html renderer ;)
-+      if (preg_match('#<body>(.+)</body>#s', $page, $m)) {
-+              $page = $m[1];
-+              $page = preg_replace('#<div id="logo">(.*?)</div>#s', '', $page);
-+              $page = preg_replace('#<div id="update">(.*?)</div>#s', '', $page);
-+      }
-+
-+      echo strip_tags($page), "\n";
-+      exit;
-+}
-+
- if (isset($_GET["op"])) {
-   include_once "includes/bootstrap.inc";
-   include_once "includes/common.inc";
---- drupal-4.6.5/update.php~   2006-01-11 21:39:09.000000000 +0200
-+++ drupal-4.6.5/update.php    2006-01-11 21:39:11.000000000 +0200
-@@ -12,6 +12,13 @@
-  * check statement below. Change the TRUE into a FALSE to disable the access
-  * check. After finishing the upgrade, be sure to open this file and change the
-  * FALSE back into a TRUE!
-+ *
-+ * PLD Linux notes:
-+ * You will need to copy this file to htdocs dir to run it from web and add
-+ * chdir('..'); before first include_once statement.
-+ *
-+ * You can also run this script from CLI (which is preffered way in PLD Linux):
-+ * # php update.php
-  */
- // Disable access checking?
index 25a85634a1ea0cbbda4ef8efdb1ae5a098754415..8d06f07a2d8ec821aadf940edaabf3857cdcc810 100644 (file)
@@ -9,8 +9,10 @@
 <Directory /usr/share/drupal/htdocs>
     Options FollowSymLinks
     AllowOverride None
-    Order allow,deny
-    Allow from all
+    <IfModule mod_access.c>
+        order allow,deny
+        allow from all
+    </IfModule>
 
     # Set the default handler.
     <IfModule mod_dir.c>
 #</Location>
 
 <Directory /var/lib/drupal>
-    Allow from all
-    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
-    Options None
-    <IfModule mod_rewrite.c>
-        RewriteEngine off
-    </IfModule>
+    allow from all
 </Directory>
 
 <VirtualHost *:80>
         Alias /files /var/lib/drupal
     </IfModule>
 </VirtualHost>
+
+# vim: filetype=apache ts=4 sw=4 et
index b2d81f819d13ac991570ea2034d076f0e103caca..8e78cef6c0e321e4ae74e7748d1035d6082329f0 100644 (file)
@@ -2,6 +2,6 @@
 # bounce messages back to root
 MAILTO=root
 
-0 * * * * http /usr/share/drupal/cron.php
+0 * * * * http cd /usr/share/drupal && /usr/bin/php cron.php
 
 # vim:syn=crontab
index 03d984cd38c8c12546d745d374131b5111936629..1a3d42be06a0d9f7e5a954ecef1a2bda9abaed38 100644 (file)
@@ -1,53 +1,39 @@
-#
-# Conditional build:
-%bcond_with    ugly_patch              # enable ugly patch. don't use it ;)
-#
-%define                _ver            4.6
-%define                _patchlevel     11
-%define                _rel    4
+# TODO
+# - why not drupal 6.0?
 Summary:       Open source content management platform
-Summary(pl.UTF-8):     Platforma do zarządzania treścią o otwartych źródłach
+Summary(pl.UTF-8):   Platforma do zarządzania treścią o otwartych źródłach
 Name:          drupal
-Version:       %{_ver}.%{_patchlevel}
-Release:       %{_rel}%{?with_ugly_patch:p}
+Version:       5.7
+Release:       0.4
 License:       GPL
 Group:         Applications/WWW
-Source0:       http://drupal.org/files/projects/%{name}-%{version}.tar.gz
-# Source0-md5: cfa5777fb6a612addcee75dad132909e
+Source0:       http://ftp.osuosl.org/pub/drupal/files/projects/%{name}-%{version}.tar.gz
+# Source0-md5: c7d9911ad1001c790bbdfe6fd4cdfc89
 Source1:       %{name}.conf
 Source2:       %{name}.cron
 Source3:       %{name}.PLD
-Patch0:                %{name}-replication.patch
+Source4:       %{name}-apache1.conf
+Patch0:                %{name}-cron.patch
 Patch1:                %{name}-sitesdir.patch
 Patch2:                %{name}-topdir.patch
 Patch3:                %{name}-themedir2.patch
-Patch4:                %{name}-emptypass.patch
-Patch5:                %{name}-cron.patch
-Patch6:                %{name}-19298-cache.patch
-Patch7:                %{name}-update-cli.patch
-Patch8:                %{name}-locale-memory.patch
-Patch9:                %{name}-comment.patch
-Patch10:       %{name}-disabled_fields.patch
-Patch11:       %{name}-http-reject.patch
+#Patchx:       %{name}-replication.patch
+#Patchx:       %{name}-emptypass.patch
 URL:           http://drupal.org/
 BuildRequires: rpmbuild(macros) >= 1.264
 BuildRequires: sed >= 4.0
 Requires:      %{name}(DB_Driver) = %{version}-%{release}
-Requires:      %{name}(theme) = %{_ver}
-Requires:      /usr/bin/php
 Requires:      apache(mod_access)
 Requires:      apache(mod_alias)
 Requires:      apache(mod_dir)
 Requires:      apache(mod_expires)
 Requires:      apache(mod_rewrite)
-Requires:      php(mysql)
+Requires:      php(mbstring)
 Requires:      php(pcre)
 Requires:      php(xml)
 Requires:      webapps
 Requires:      webserver = apache
 Requires:      webserver(php) >= 4.3.3
-Provides:      %{name} = %{_ver}
-Obsoletes:     drupal-update
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -104,10 +90,11 @@ i wiele więcej.
 
 %package cron
 Summary:       Drupal cron
-Summary(pl.UTF-8):     Usługa cron dla Drupala
+Summary(pl.UTF-8):   Usługa cron dla Drupala
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
 Requires:      crondaemon
+Requires:      php-cli >= 3:4.3.3
 
 %description cron
 This package contains script which invokes cron hooks for Drupal.
@@ -117,7 +104,7 @@ Ten pakiet zawiera skrypt wywołujący uchwyty crona dla Drupala.
 
 %package db-mysql
 Summary:       Drupal DB Driver for MySQL
-Summary(pl.UTF-8):     Sterownik bazy danych MySQL dla Drupala
+Summary(pl.UTF-8):   Sterownik bazy danych MySQL dla Drupala
 Group:         Applications/WWW
 Requires:      php(mysql)
 Provides:      %{name}(DB_Driver) = %{version}-%{release}
@@ -130,7 +117,7 @@ Ten wirtualny pakiet dostarcza backend bazy danych MySQL dla Drupala.
 
 %package db-pgsql
 Summary:       Drupal DB Driver for PostgreSQL
-Summary(pl.UTF-8):     Sterownik bazy danych PostgreSQL dla Drupala
+Summary(pl.UTF-8):   Sterownik bazy danych PostgreSQL dla Drupala
 Group:         Applications/WWW
 Requires:      php(pgsql)
 Provides:      %{name}(DB_Driver) = %{version}-%{release}
@@ -149,22 +136,17 @@ UWAGA: Ten sterownik nie był testowany w PLD i nie wszystkie moduły
 mają schematy bazy danych dla PostgreSQL-a. Można go używać na własne
 ryzyko.
 
-%package themes
-Summary:       Themes distributed with Drupal
-Summary(pl.UTF-8):     Motywy rozprowadzane z Drupalem
+%package update
+Summary:       Package to perform Drupal database updates
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
-Provides:      drupal(theme) = %{_ver}
-
-%description themes
-This package contains themes distributed with Drupal.
 
-%description themes -l pl.UTF-8
-Ten pakiet zawiera motywy rozprowadzane z Drupalem.
+%description update
+This package contains scripts needed to do database updates via web.
 
 %package xmlrpc
 Summary:       XMLRPC server for Drupal
-Summary(pl.UTF-8):     Serwer XMLRPC dla Drupala
+Summary(pl.UTF-8):   Serwer XMLRPC dla Drupala
 Group:         Applications/WWW
 Requires:      %{name} = %{version}-%{release}
 
@@ -179,61 +161,48 @@ danymi uwierzytelniającymi użytkownika danego Drupala - jest to
 nazywane rozproszonym uwierzytelnianiem.
 
 %prep
-%setup -q
+%setup -q %{?_rc:-n %{name}-%{version}-%{_rc}}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p0
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%{?with_ugly_patch:%patch10 -p1}
-%{?with_ugly_patch:%patch11 -p1}
 
+# cleanup backups after patching
+find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 cp -p %{SOURCE3} README.PLD
 
-# remove backups from patching as we use globs to package files to buildroot
-find '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.d,/var/{cache,lib}/%{name}} \
-       $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules}
+       $RPM_BUILD_ROOT%{_appdir}/{po,database,modules/po,htdocs/modules,themes}
 
-cp -a *.ico index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -a index.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 cp -a misc $RPM_BUILD_ROOT%{_appdir}/htdocs
-cp -a xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
-cp -a database/updates.inc $RPM_BUILD_ROOT%{_appdir}/database
+cp -a install.php update.php xmlrpc.php $RPM_BUILD_ROOT%{_appdir}/htdocs
 
-cp -a update.php $RPM_BUILD_ROOT%{_appdir}
-install cron.php $RPM_BUILD_ROOT%{_appdir}
-cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
+cp -a cron.php $RPM_BUILD_ROOT%{_appdir}
 cp -a includes scripts $RPM_BUILD_ROOT%{_appdir}
 cp -a sites $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a modules/* $RPM_BUILD_ROOT%{_appdir}/modules
+cp -a themes/* $RPM_BUILD_ROOT%{_appdir}/themes
+cp -Rl $RPM_BUILD_ROOT%{_appdir}/modules $RPM_BUILD_ROOT%{_appdir}/htdocs
+cp -Rl $RPM_BUILD_ROOT%{_appdir}/themes $RPM_BUILD_ROOT%{_appdir}/htdocs
+
+find $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/ $RPM_BUILD_ROOT%{_appdir}/htdocs/modules/ \
+  -type f -regextype posix-awk \
+  -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
+  -print0 | xargs -0 -r -l512 rm -f
+find $RPM_BUILD_ROOT%{_appdir}/themes/ $RPM_BUILD_ROOT%{_appdir}/modules/ \
+  -type f -regextype posix-awk \
+  ! -regex '.*\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|php|xtmpl)$|.*/(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$' \
+  -print0 | xargs -0 -r -l512 rm -f
+
+# avoid pulling perl dep
+chmod -x $RPM_BUILD_ROOT%{_appdir}/scripts/*
 
 ln -s /var/lib/%{name} $RPM_BUILD_ROOT%{_appdir}/files
-# needed for node.module for syndication icon
-ln -s htdocs/misc $RPM_BUILD_ROOT%{_appdir}
-
-# install themes
-cp -a themes $RPM_BUILD_ROOT%{_appdir}/htdocs
-# move .xtmpl/.theme out of htdocs
-(cd $RPM_BUILD_ROOT%{_appdir}/htdocs && tar cf - --remove-files themes/*/*.{xtmpl,theme}) | tar -xf - -C $RPM_BUILD_ROOT%{_appdir}
-mv $RPM_BUILD_ROOT%{_appdir}/{htdocs/,}themes/engines
-# make screenshot.png available in appdir
-for a in $RPM_BUILD_ROOT%{_appdir}/htdocs/themes/*; do
-       t=$(basename $a)
-       ln -s ../../htdocs/themes/$t/screenshot.png $RPM_BUILD_ROOT%{_appdir}/themes/$t
-done
-
-# a hack
-s=themes/chameleon/marvin
-ln -s ../../htdocs/$s $RPM_BUILD_ROOT%{_appdir}/$s
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
 
@@ -241,19 +210,22 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
 rm -rf $RPM_BUILD_ROOT
 
 %post
-# Perform database updates
-echo 'Performing Drupal database updates'
-cd %{_appdir} && %{_bindir}/php update.php Update
-echo 'Done'
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<'EOF'
+If this is your first install of Drupal, You need at least configure
+$db_url and $base_url in %{_sysconfdir}/sites/default/settings.php
+
+EOF
+fi
 
 %post db-mysql
 if [ "$1" = 1 ]; then
-%banner -e %{name}-db-mysql <<EOF
+%banner -e %{name}-db-mysql <<'EOF'
 If this is your first install of Drupal, you need to create Drupal database:
 
 mysqladmin create drupal
 zcat %{_docdir}/%{name}-db-mysql-%{version}/database.mysql.gz | mysql drupal
-mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'PASSWORD'"
+mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'password'"
 mysql -e "GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'drupal'@'localhost'"
 
 EOF
@@ -261,7 +233,7 @@ fi
 
 %post db-pgsql
 if [ "$1" = 1 ]; then
-%banner -e %{name}-db-pgsql <<EOF
+%banner -e %{name}-db-pgsql <<'EOF'
 If this is your first install of Drupal, you need to create Drupal database:
 
 and import initial schema from
@@ -270,16 +242,16 @@ and import initial schema from
 EOF
 fi
 
-%triggerin -- apache1 < 1.3.37-3, apache1-base
+%triggerin -- apache1
 %webapp_register apache %{_webapp}
 
-%triggerun -- apache1 < 1.3.37-3, apache1-base
+%triggerun -- apache1
 %webapp_unregister apache %{_webapp}
 
-%triggerin -- apache < 2.2.0, apache-base
+%triggerin -- apache >= 2.0.0
 %webapp_register httpd %{_webapp}
 
-%triggerun -- apache < 2.2.0, apache-base
+%triggerun -- apache >= 2.0.0
 %webapp_unregister httpd %{_webapp}
 
 %files
@@ -293,27 +265,23 @@ fi
 %attr(750,root,http) %dir %{_sysconfdir}/sites
 %attr(750,root,http) %dir %{_sysconfdir}/sites/default
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/default/*
+%attr(750,root,http) %dir %{_sysconfdir}/sites/all
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites/all/*
 
 %dir %{_appdir}
-%{_appdir}/database
 %{_appdir}/includes
-%exclude %{_appdir}/includes/database.mysql.inc
-%exclude %{_appdir}/includes/database.pgsql.inc
 %{_appdir}/modules
 %{_appdir}/scripts
-%dir %{_appdir}/themes
-%dir %{_appdir}/themes/engines
+%{_appdir}/themes
 %{_appdir}/po
-%{_appdir}/update.php
-# symlinks
+# symlink
 %{_appdir}/files
-%{_appdir}/misc
 
 %dir %{_appdir}/htdocs
-%{_appdir}/htdocs/*.ico
 %{_appdir}/htdocs/index.php
+%{_appdir}/htdocs/install.php
 %{_appdir}/htdocs/misc
-%dir %{_appdir}/htdocs/themes
+%{_appdir}/htdocs/themes
 %{_appdir}/htdocs/modules
 
 %dir %attr(775,root,http) /var/lib/%{name}
@@ -322,24 +290,19 @@ fi
 %files cron
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
-%attr(755,root,root) %{_appdir}/cron.php
+%attr(775,root,root) %{_appdir}/cron.php
 
 %files db-mysql
 %defattr(644,root,root,755)
-%doc database/*.mysql
-%doc README.replication
-%{_appdir}/includes/database.mysql.inc
+#%doc README.replication
 
 %files db-pgsql
 %defattr(644,root,root,755)
-%doc database/*.pgsql
-%{_appdir}/includes/database.pgsql.inc
 
-%files themes
+%files update
 %defattr(644,root,root,755)
-%{_appdir}/themes/[!e]*
-%{_appdir}/themes/engines/*
-%{_appdir}/htdocs/themes/*
+%{_appdir}/htdocs/update.php
+%{_appdir}/database
 
 %files xmlrpc
 %defattr(644,root,root,755)
This page took 0.105884 seconds and 4 git commands to generate.