[Pkg-drupal-commits] r1797 - in /branches/drupal-5.0: ./ debian/ includes/ misc/ misc/farbtastic/ modules/aggregator/ modules/block/ modules/blog/ modules/blogapi/ modules/book/ modules/color/ modules/comment/ modules/contact/ modules/drupal/ modules/filter/ modules/forum/ modules/help/ modules/legacy/ modules/locale/ modules/menu/ modules/node/ modules/path/ modules/ping/ modules/poll/ modules/profile/ modules/search/ modules/statistics/ modules/system/ modules/taxonomy/ modules/throttle/ modules/tracker/ modules/upload/ modules/user/ modules/watchdog/ profiles/default/ sites/default/ themes/chameleon/ themes/engines/phptemplate/ themes/garland/ themes/garland/minnelli/
luigi at users.alioth.debian.org
luigi at users.alioth.debian.org
Thu Jul 26 23:49:44 UTC 2007
Author: luigi
Date: Thu Jul 26 23:49:44 2007
New Revision: 1797
URL: http://svn.debian.org/wsvn/pkg-drupal/?sc=1&rev=1797
Log:
New upstream release
Modified:
branches/drupal-5.0/.htaccess
branches/drupal-5.0/CHANGELOG.txt
branches/drupal-5.0/INSTALL.txt
branches/drupal-5.0/debian/changelog
branches/drupal-5.0/includes/bootstrap.inc
branches/drupal-5.0/includes/cache.inc
branches/drupal-5.0/includes/common.inc
branches/drupal-5.0/includes/database.inc
branches/drupal-5.0/includes/file.inc
branches/drupal-5.0/includes/form.inc
branches/drupal-5.0/includes/install.inc
branches/drupal-5.0/includes/locale.inc
branches/drupal-5.0/includes/menu.inc
branches/drupal-5.0/includes/module.inc
branches/drupal-5.0/includes/session.inc
branches/drupal-5.0/includes/tablesort.inc
branches/drupal-5.0/includes/theme.inc
branches/drupal-5.0/includes/unicode.inc
branches/drupal-5.0/includes/xmlrpc.inc
branches/drupal-5.0/install.php
branches/drupal-5.0/misc/drupal.js
branches/drupal-5.0/misc/farbtastic/farbtastic.css
branches/drupal-5.0/misc/textarea.js
branches/drupal-5.0/modules/aggregator/aggregator.info
branches/drupal-5.0/modules/aggregator/aggregator.module
branches/drupal-5.0/modules/block/block.info
branches/drupal-5.0/modules/block/block.module
branches/drupal-5.0/modules/blog/blog.info
branches/drupal-5.0/modules/blog/blog.module
branches/drupal-5.0/modules/blogapi/blogapi.info
branches/drupal-5.0/modules/blogapi/blogapi.module
branches/drupal-5.0/modules/book/book.info
branches/drupal-5.0/modules/book/book.module
branches/drupal-5.0/modules/color/color.css
branches/drupal-5.0/modules/color/color.info
branches/drupal-5.0/modules/color/color.js
branches/drupal-5.0/modules/color/color.module
branches/drupal-5.0/modules/comment/comment.css
branches/drupal-5.0/modules/comment/comment.info
branches/drupal-5.0/modules/comment/comment.install
branches/drupal-5.0/modules/comment/comment.module
branches/drupal-5.0/modules/contact/contact.info
branches/drupal-5.0/modules/contact/contact.module
branches/drupal-5.0/modules/drupal/drupal.info
branches/drupal-5.0/modules/filter/filter.info
branches/drupal-5.0/modules/filter/filter.module
branches/drupal-5.0/modules/forum/forum.info
branches/drupal-5.0/modules/forum/forum.module
branches/drupal-5.0/modules/help/help.info
branches/drupal-5.0/modules/legacy/legacy.info
branches/drupal-5.0/modules/locale/locale.info
branches/drupal-5.0/modules/menu/menu.info
branches/drupal-5.0/modules/menu/menu.module
branches/drupal-5.0/modules/node/content_types.inc
branches/drupal-5.0/modules/node/node.css
branches/drupal-5.0/modules/node/node.info
branches/drupal-5.0/modules/node/node.module
branches/drupal-5.0/modules/path/path.info
branches/drupal-5.0/modules/path/path.module
branches/drupal-5.0/modules/ping/ping.info
branches/drupal-5.0/modules/poll/poll.info
branches/drupal-5.0/modules/poll/poll.module
branches/drupal-5.0/modules/profile/profile.info
branches/drupal-5.0/modules/profile/profile.module
branches/drupal-5.0/modules/search/search.info
branches/drupal-5.0/modules/search/search.module
branches/drupal-5.0/modules/statistics/statistics.info
branches/drupal-5.0/modules/system/system.info
branches/drupal-5.0/modules/system/system.install
branches/drupal-5.0/modules/system/system.module
branches/drupal-5.0/modules/taxonomy/taxonomy.info
branches/drupal-5.0/modules/taxonomy/taxonomy.module
branches/drupal-5.0/modules/throttle/throttle.info
branches/drupal-5.0/modules/tracker/tracker.info
branches/drupal-5.0/modules/tracker/tracker.module
branches/drupal-5.0/modules/upload/upload.info
branches/drupal-5.0/modules/upload/upload.module
branches/drupal-5.0/modules/user/user.info
branches/drupal-5.0/modules/user/user.module
branches/drupal-5.0/modules/watchdog/watchdog.info
branches/drupal-5.0/profiles/default/default.profile
branches/drupal-5.0/robots.txt
branches/drupal-5.0/sites/default/settings.php
branches/drupal-5.0/themes/chameleon/chameleon.theme
branches/drupal-5.0/themes/engines/phptemplate/phptemplate.engine
branches/drupal-5.0/themes/garland/fix-ie.css
branches/drupal-5.0/themes/garland/minnelli/style.css
branches/drupal-5.0/themes/garland/print.css
branches/drupal-5.0/themes/garland/style.css
branches/drupal-5.0/themes/garland/template.php
branches/drupal-5.0/update.php
Modified: branches/drupal-5.0/.htaccess
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/.htaccess?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/.htaccess (original)
+++ branches/drupal-5.0/.htaccess Thu Jul 26 23:49:44 2007
@@ -27,6 +27,9 @@
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 4, Apache 2.
@@ -34,6 +37,9 @@
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.
@@ -41,6 +47,9 @@
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>
# Requires mod_expires to be enabled.
@@ -57,18 +66,21 @@
<IfModule mod_rewrite.c>
RewriteEngine on
- # If your site can be accessed both with and without the prefix www. you
- # can use one of the following settings to force user to use only one option:
+ # If your site can be accessed both with and without the 'www.' prefix, you
+ # can use one of the following settings to redirect users to your preferred
+ # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
- # If you want the site to be accessed WITH the www. only, adapt and
- # uncomment the following:
+ # To redirect all users to access the site WITH the 'www.' prefix,
+ # (http://example.com/... will be redirected to http://www.example.com/...)
+ # adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
- # RewriteRule .* http://www.example.com/ [L,R=301]
+ # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
- # If you want the site to be accessed only WITHOUT the www. prefix, adapt
- # and uncomment the following:
+ # To redirect all users to access the site WITHOUT the 'www.' prefix,
+ # (http://www.example.com/... will be redirected to http://example.com/...)
+ # adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
- # RewriteRule .* http://example.com/ [L,R=301]
+ # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
@@ -92,4 +104,4 @@
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
-# $Id: .htaccess,v 1.81 2007/01/09 09:27:10 dries Exp $
+# $Id: .htaccess,v 1.81.2.2 2007/05/21 01:34:59 drumm Exp $
Modified: branches/drupal-5.0/CHANGELOG.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/CHANGELOG.txt?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/CHANGELOG.txt (original)
+++ branches/drupal-5.0/CHANGELOG.txt Thu Jul 26 23:49:44 2007
@@ -1,10 +1,16 @@
-// $Id: CHANGELOG.txt,v 1.173.2.3 2007/01/29 21:51:53 drumm Exp $
+// $Id: CHANGELOG.txt,v 1.173.2.8 2007/07/26 19:16:45 drumm Exp $
+
+Drupal 5.2, 2007-07-26
+----------------------
+- changed hook_link() $teaser argument to match documentation.
+- fixed a variety of small bugs.
+- fixed a security issue (cross-site request forgery), see SA-2007-017
+- fixed a security issue (cross-site scripting), see SA-2007-018
Drupal 5.1, 2007-01-29
----------------------
- fixed security issue (code execution), see SA-2007-005
- fixed a variety of small bugs.
-
Drupal 5.0, 2007-01-15
------------------------
@@ -83,6 +89,14 @@
* added nested lists generation.
* added a self-clearing block class.
+Drupal 4.7.7, 2007-07-26
+------------------------
+- fixed security issue (XSS), see SA-2007-018
+
+Drupal 4.7.6, 2007-01-29
+------------------------
+- fixed security issue (code execution), see SA-2007-005
+
Drupal 4.7.5, 2007-01-05
------------------------
- fixed security issue (XSS), see SA-2007-001
Modified: branches/drupal-5.0/INSTALL.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/INSTALL.txt?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/INSTALL.txt (original)
+++ branches/drupal-5.0/INSTALL.txt Thu Jul 26 23:49:44 2007
@@ -1,4 +1,4 @@
-// $Id: INSTALL.txt,v 1.39 2007/01/08 11:59:16 dries Exp $
+// $Id: INSTALL.txt,v 1.39.2.2 2007/07/26 05:29:58 drumm Exp $
CONTENTS OF THIS FILE
---------------------
@@ -120,7 +120,7 @@
following example crontab line will activate the cron tasks automatically on
the hour:
- 0 * * * * wget -O - -q http://www.example.com/cron.php
+ 0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php
More information about the cron scripts are available in the admin help pages
and in the Drupal handbook at drupal.org. Example scripts can be found in the
@@ -134,10 +134,10 @@
Use your administration panel to enable and configure services. For example:
-General Settings administer > site configuration > site information
-Enable Modules administer > site configuration > modules
-Set User Permissions administer > users management > access control
-Configure Themes administer > site building > themes
+General Settings Administer > Site configuration > Site information
+Enable Modules Administer > Site building > Modules
+Set User Permissions Administer > User management > Access control
+Configure Themes Administer > Site building > Themes
For more information on configuration options, read the instructions which
accompany the different configuration settings and consult the various help
Modified: branches/drupal-5.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/debian/changelog?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/debian/changelog (original)
+++ branches/drupal-5.0/debian/changelog Thu Jul 26 23:49:44 2007
@@ -1,3 +1,11 @@
+drupal5 (5.2-1) UNRELEASED; urgency=low
+
+ * (NOT RELEASED YET)
+
+ * New upstream release
+
+ -- Luigi Gangitano <luigi at debian.org> Fri, 27 Jul 2007 01:48:04 +0200
+
drupal5 (5.1-4) UNRELEASED; urgency=low
* NOT RELEASED YET
Modified: branches/drupal-5.0/includes/bootstrap.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/bootstrap.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/bootstrap.inc (original)
+++ branches/drupal-5.0/includes/bootstrap.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: bootstrap.inc,v 1.145 2007/01/15 11:52:02 unconed Exp $
+// $Id: bootstrap.inc,v 1.145.2.6 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -200,7 +200,7 @@
}
$confdir = 'sites';
- $uri = explode('/', $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']);
+ $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--) {
for ($j = count($server); $j > 0; $j--) {
@@ -230,11 +230,16 @@
}
/**
- * Loads the configuration and sets the base URL correctly.
+ * Loads the configuration and sets the base URL, cookie domain, and
+ * session name correctly.
*/
function conf_init() {
- global $db_url, $db_prefix, $base_url, $base_path, $base_root, $conf, $installed_profile;
+ global $base_url, $base_path, $base_root;
+
+ // Export the following settings.php variables to the global namespace
+ global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile;
$conf = array();
+
include_once './'. conf_path() .'/settings.php';
if (isset($base_url)) {
@@ -250,8 +255,14 @@
else {
// Create base URL
$base_root = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
- $base_url = $base_root .= '://'. $_SERVER['HTTP_HOST'];
- if ($dir = trim(dirname($_SERVER['PHP_SELF']), '\,/')) {
+
+ // 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']);
+
+ // $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not
+ // be modified by a visitor.
+ if ($dir = trim(dirname($_SERVER['SCRIPT_NAME']), '\,/')) {
$base_path = "/$dir";
$base_url .= $base_path;
$base_path .= '/';
@@ -260,6 +271,38 @@
$base_path = '/';
}
}
+
+ if (!$cookie_domain) {
+ // If the $cookie_domain is empty, try to use the session.cookie_domain.
+ $cookie_domain = ini_get('session.cookie_domain');
+ }
+ if ($cookie_domain) {
+ // If the user specifies the cookie domain, also use it for session name.
+ $session_name = $cookie_domain;
+ }
+ else {
+ // Otherwise use $base_url as session name, without the protocol
+ // to use the same session identifiers across http and https.
+ list( , $session_name) = explode('://', $base_url, 2);
+ // We try to set the cookie domain to the hostname.
+ // We escape the hostname because it can be modified by a visitor.
+ if (!empty($_SERVER['HTTP_HOST'])) {
+ $cookie_domain = check_plain($_SERVER['HTTP_HOST']);
+ }
+ }
+ // Strip leading periods, www., and port numbers from cookie domain.
+ $cookie_domain = ltrim($cookie_domain, '.');
+ if (strpos($cookie_domain, 'www.') === 0) {
+ $cookie_domain = substr($cookie_domain, 4);
+ }
+ $cookie_domain = explode(':', $cookie_domain);
+ $cookie_domain = '.'. $cookie_domain[0];
+ // Per RFC 2109, cookie domains must contain at least one dot other than the
+ // first. For hosts such as 'localhost' or IP Addresses we don't set a cookie domain.
+ if (count(explode('.', $cookie_domain)) > 2 && !is_numeric(str_replace('.', '', $cookie_domain))) {
+ ini_set('session.cookie_domain', $cookie_domain);
+ }
+ session_name('SESS'. md5($session_name));
}
/**
@@ -487,7 +530,7 @@
function drupal_page_header() {
header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
}
@@ -599,10 +642,10 @@
}
else {
if (isset($_SERVER['argv'])) {
- $uri = $_SERVER['PHP_SELF'] .'?'. $_SERVER['argv'][0];
+ $uri = $_SERVER['SCRIPT_NAME'] .'?'. $_SERVER['argv'][0];
}
else {
- $uri = $_SERVER['PHP_SELF'] .'?'. $_SERVER['QUERY_STRING'];
+ $uri = $_SERVER['SCRIPT_NAME'] .'?'. $_SERVER['QUERY_STRING'];
}
}
@@ -677,6 +720,11 @@
* (optional) Only return messages of this type.
* @param $clear_queue
* (optional) Set to FALSE if you do not want to clear the messages queue
+ * @return
+ * An associative array, the key is the message type, the value an array
+ * of messages. If the $type parameter is passed, you get only that type,
+ * or an empty array if there are no such messages. If $type is not passed,
+ * all message types are returned, or an empty array if none exist.
*/
function drupal_get_messages($type = NULL, $clear_queue = TRUE) {
if ($messages = drupal_set_message()) {
@@ -684,7 +732,9 @@
if ($clear_queue) {
unset($_SESSION['messages'][$type]);
}
- return array($type => $messages[$type]);
+ if (isset($messages[$type])) {
+ return array($type => $messages[$type]);
+ }
}
else {
if ($clear_queue) {
@@ -742,6 +792,7 @@
$user->roles = array();
$user->roles[DRUPAL_ANONYMOUS_RID] = 'anonymous user';
$user->session = $session;
+ $user->cache = 0;
return $user;
}
Modified: branches/drupal-5.0/includes/cache.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/cache.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/cache.inc (original)
+++ branches/drupal-5.0/includes/cache.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: cache.inc,v 1.5 2006/11/10 07:26:27 drumm Exp $
+// $Id: cache.inc,v 1.5.2.4 2007/06/27 03:35:48 drumm Exp $
/**
* Return data from the persistent cache.
@@ -17,11 +17,11 @@
$cache_flush = variable_get('cache_flush', 0);
if ($cache_flush && ($cache_flush + variable_get('cache_lifetime', 0) <= time())) {
// Time to flush old cache data
- db_query("DELETE FROM {%s} WHERE expire != %d AND expire <= %d", $table, CACHE_PERMANENT, $cache_flush);
+ db_query("DELETE FROM {". $table ."} 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 {%s} WHERE cid = '%s'", $table, $key));
+ $cache = db_fetch_object(db_query("SELECT data, created, headers, expire FROM {". $table ."} WHERE cid = '%s'", $key));
if (isset($cache->data)) {
// If the data is permanent or we're not enforcing a minimum cache lifetime
// always return the cached data.
@@ -92,9 +92,9 @@
*/
function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_lock_table($table);
- db_query("UPDATE {%s} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $table, $data, time(), $expire, $headers, $cid);
+ db_query("UPDATE {". $table. "} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid);
if (!db_affected_rows()) {
- @db_query("INSERT INTO {%s} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $table, $cid, $data, time(), $expire, $headers);
+ @db_query("INSERT INTO {". $table. "} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, $data, time(), $expire, $headers);
}
db_unlock_tables();
}
@@ -141,26 +141,26 @@
else if (time() > ($cache_flush + variable_get('cache_lifetime', 0))) {
// Clear the cache for everyone, cache_flush_delay seconds have
// passed since the first request to clear the cache.
- db_query("DELETE FROM {%s} WHERE expire != %d AND expire < %d", $table, CACHE_PERMANENT, time());
+ db_query("DELETE FROM {". $table. "} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, time());
variable_set('cache_flush', 0);
}
}
else {
// No minimum cache lifetime, flush all temporary cache entries now.
- db_query("DELETE FROM {%s} WHERE expire != %d AND expire < %d", $table, CACHE_PERMANENT, time());
+ db_query("DELETE FROM {". $table. "} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, time());
}
}
else {
if ($wildcard) {
if ($cid == '*') {
- db_query("TRUNCATE TABLE {%s}", $table);
+ db_query("DELETE FROM {". $table. "}");
}
else {
- db_query("DELETE FROM {%s} WHERE cid LIKE '%s%%'", $table, $cid);
+ db_query("DELETE FROM {". $table. "} WHERE cid LIKE '%s%%'", $cid);
}
}
else {
- db_query("DELETE FROM {%s} WHERE cid = '%s'", $table, $cid);
+ db_query("DELETE FROM {". $table. "} WHERE cid = '%s'", $cid);
}
}
}
Modified: branches/drupal-5.0/includes/common.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/common.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/common.inc (original)
+++ branches/drupal-5.0/includes/common.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: common.inc,v 1.611 2007/01/10 23:30:07 unconed Exp $
+// $Id: common.inc,v 1.611.2.9 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -197,8 +197,6 @@
* The array to be processed e.g. $_GET
* @param $exclude
* The array filled with keys to be excluded. Use parent[child] to exclude nested items.
- * @param $urlencode
- * If TRUE, the keys and values are both urlencoded.
* @param $parent
* Should not be passed, only used in recursive calls
* @return
@@ -411,6 +409,7 @@
// Parse the URL, and make sure we can handle the schema.
$uri = parse_url($url);
+
switch ($uri['scheme']) {
case 'http':
$port = isset($uri['port']) ? $uri['port'] : 80;
@@ -431,6 +430,7 @@
// Make sure the socket opened properly.
if (!$fp) {
$result->error = trim($errno .' '. $errstr);
+ $result->code = -$errno;
return $result;
}
@@ -548,7 +548,7 @@
$entry = $types[$errno] .': '. $message .' in '. $filename .' on line '. $line .'.';
// Force display of error messages in update.php
- if (variable_get('error_level', 1) == 1 || strstr($_SERVER['PHP_SELF'], 'update.php')) {
+ if (variable_get('error_level', 1) == 1 || strstr($_SERVER['SCRIPT_NAME'], 'update.php')) {
drupal_set_message($entry, 'error');
}
@@ -1164,7 +1164,7 @@
static $script;
static $clean_url;
- if (empty($script)) {
+ if (!isset($script)) {
// On some web servers, such as IIS, we can't omit "index.php". So, we
// generate "index.php?q=foo" instead of "?q=foo" on anything that is not
// Apache.
@@ -1699,14 +1699,17 @@
array('\r', '\n', '\x3c', '\x3e', '\x26'),
addslashes($var)) .'"';
case 'array':
- if (array_keys($var) === range(0, sizeof($var) - 1)) {
+ // Arrays in JSON can't be associative. If the array is empty or if it
+ // has sequential whole number keys starting with 0, it's not associative
+ // so we can go ahead and convert it as an array.
+ if (empty ($var) || array_keys($var) === range(0, sizeof($var) - 1)) {
$output = array();
foreach ($var as $v) {
$output[] = drupal_to_js($v);
}
return '[ '. implode(', ', $output) .' ]';
}
- // Fall through
+ // Otherwise, fall through to convert the array as an object.
case 'object':
$output = array();
foreach ($var as $k => $v) {
@@ -1728,17 +1731,19 @@
* Notes:
* - For esthetic reasons, we do not escape slashes. This also avoids a 'feature'
* in Apache where it 404s on any path containing '%2F'.
- * - mod_rewrite's unescapes %-encoded ampersands and hashes when clean URLs
- * are used, which are interpreted as delimiters by PHP. These characters are
- * double escaped so PHP will still see the encoded version.
+ * - mod_rewrite unescapes %-encoded ampersands, hashes, and slashes when clean
+ * URLs are used, which are interpreted as delimiters by PHP. These
+ * characters are double escaped so PHP will still see the encoded version.
+ * - With clean URLs, Apache changes '//' to '/', so every second slash is
+ * double escaped.
*
* @param $text
* String to encode
*/
function drupal_urlencode($text) {
if (variable_get('clean_url', '0')) {
- return str_replace(array('%2F', '%26', '%23'),
- array('/', '%2526', '%2523'),
+ return str_replace(array('%2F', '%26', '%23', '//'),
+ array('/', '%2526', '%2523', '/%252F'),
urlencode($text));
}
else {
@@ -1891,8 +1896,7 @@
/**
* Send an e-mail message, using Drupal variables and default settings.
- * More information in the <a href="http://php.net/manual/en/function.mail.php">
- * PHP function reference for mail()</a>
+ * More information in the PHP function reference for mail()
* @param $mailkey
* A key to identify the mail sent, for altering.
* @param $to
@@ -1923,8 +1927,15 @@
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
- if (isset($from)) {
- $defaults['From'] = $defaults['Reply-To'] = $defaults['Return-Path'] = $defaults['Errors-To'] = $from;
+ // To prevent e-mail from looking like spam, the addresses in the Sender and
+ // Return-Path headers should have a domain authorized to use the originating
+ // SMTP server. Errors-To is redundant, but shouldn't hurt.
+ $default_from = variable_get('site_mail', ini_get('sendmail_from'));
+ if ($default_from) {
+ $defaults['From'] = $defaults['Reply-To'] = $defaults['Sender'] = $defaults['Return-Path'] = $defaults['Errors-To'] = $default_from;
+ }
+ if ($from) {
+ $defaults['From'] = $defaults['Reply-To'] = $from;
}
$headers = array_merge($defaults, $headers);
// Custom hook traversal to allow pass by reference
@@ -1938,26 +1949,24 @@
return drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers);
}
else {
- /*
- ** Note: if you are having problems with sending mail, or mails look wrong
- ** when they are received you may have to modify the str_replace to suit
- ** your systems.
- ** - \r\n will work under dos and windows.
- ** - \n will work for linux, unix and BSDs.
- ** - \r will work for macs.
- **
- ** According to RFC 2646, it's quite rude to not wrap your e-mails:
- **
- ** "The Text/Plain media type is the lowest common denominator of
- ** Internet e-mail, with lines of no more than 997 characters (by
- ** convention usually no more than 80), and where the CRLF sequence
- ** represents a line break [MIME-IMT]."
- **
- ** CRLF === \r\n
- **
- ** http://www.rfc-editor.org/rfc/rfc2646.txt
- **
- */
+ // Note: if you are having problems with sending mail, or mails look wrong
+ // when they are received you may have to modify the str_replace to suit
+ // your systems.
+ // - \r\n will work under dos and windows.
+ // - \n will work for linux, unix and BSDs.
+ // - \r will work for macs.
+ //
+ // According to RFC 2646, it's quite rude to not wrap your e-mails:
+ //
+ // "The Text/Plain media type is the lowest common denominator of
+ // Internet e-mail, with lines of no more than 997 characters (by
+ // convention usually no more than 80), and where the CRLF sequence
+ // represents a line break [MIME-IMT]."
+ //
+ // CRLF === \r\n
+ //
+ // http://www.rfc-editor.org/rfc/rfc2646.txt
+
$mimeheaders = array();
foreach ($headers as $name => $value) {
$mimeheaders[] = $name .': '. mime_header_encode($value);
Modified: branches/drupal-5.0/includes/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/database.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/database.inc (original)
+++ branches/drupal-5.0/includes/database.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: database.inc,v 1.62 2007/01/03 10:59:02 dries Exp $
+// $Id: database.inc,v 1.62.2.4 2007/07/12 06:25:47 drumm Exp $
/**
* @file
@@ -177,7 +177,7 @@
* A variable number of arguments which are substituted into the query
* using printf() syntax. Instead of a variable number of query arguments,
* you may also pass a single array containing the query arguments.
-
+ *
* Valid %-modifiers are: %s, %d, %f, %b (binary data, do not enclose
* in '') and %%.
*
@@ -203,7 +203,7 @@
/**
* Helper function for db_rewrite_sql.
*
- * Collects JOIN and WHERE statements via hook_sql.
+ * Collects JOIN and WHERE statements via hook_db_rewrite_sql().
* Decides whether to select primary_key or DISTINCT(primary_key)
*
* @param $query
@@ -282,6 +282,9 @@
if (strpos($query, 'GROUP')) {
$replace = 'GROUP';
}
+ elseif (strpos($query, 'HAVING')) {
+ $replace = 'HAVING';
+ }
elseif (strpos($query, 'ORDER')) {
$replace = 'ORDER';
}
Modified: branches/drupal-5.0/includes/file.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/file.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/file.inc (original)
+++ branches/drupal-5.0/includes/file.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: file.inc,v 1.90 2007/01/05 05:32:22 unconed Exp $
+// $Id: file.inc,v 1.90.2.1 2007/05/31 05:48:58 drumm Exp $
/**
* @file
@@ -553,7 +553,7 @@
// not followed by a space or a tab.
// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
$header = preg_replace('/\r?\n(?!\t| )/', '', $header);
- header($header);
+ drupal_set_header($header);
}
$source = file_create_path($source);
Modified: branches/drupal-5.0/includes/form.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/form.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/form.inc (original)
+++ branches/drupal-5.0/includes/form.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: form.inc,v 1.174.2.3 2007/01/29 21:51:53 drumm Exp $
+// $Id: form.inc,v 1.174.2.11 2007/07/26 19:16:45 drumm Exp $
/**
* @defgroup form Form generation
@@ -21,10 +21,9 @@
*
*
* For information on the format of the structured arrays used to define forms,
- * and more detailed explanations of the Form API workflow, see the reference at
- * http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference.html
- * and the quickstart guide at
- * http://api.drupal.org/api/HEAD/file/developer/topics/forms_api.html
+ * and more detailed explanations of the Form API workflow, see the
+ * @link http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference.html reference @endlink
+ * and the @link http://api.drupal.org/api/HEAD/file/developer/topics/forms_api.html quickstart guide. @endlink
*/
/**
@@ -249,7 +248,7 @@
$form_button_counter = array(0, 0);
drupal_prepare_form($form_id, $form);
- if (($form['#programmed']) || (!empty($_POST) && (($_POST['form_id'] == $form_id) || ($_POST['form_id'] == $form['#base'])))) {
+ if (($form['#programmed']) || (!empty($_POST) && (($_POST['form_id'] == $form_id)))) {
drupal_validate_form($form_id, $form);
// IE does not send a button value when there is only one submit button (and no non-submit buttons)
// and you submit by pressing enter.
@@ -418,6 +417,8 @@
function drupal_submit_form($form_id, $form) {
global $form_values;
$default_args = array($form_id, &$form_values);
+ $submitted = FALSE;
+ $goto = NULL;
if (isset($form['#submit'])) {
foreach ($form['#submit'] as $function => $args) {
@@ -426,12 +427,14 @@
// Since we can only redirect to one page, only the last redirect
// will work.
$redirect = call_user_func_array($function, $args);
+ $submitted = TRUE;
if (isset($redirect)) {
$goto = $redirect;
}
}
}
}
+
return $goto;
}
@@ -953,7 +956,7 @@
}
else {
$key = (string)$key;
- if ($value_valid && ((string)$element['#value'] === $key || ($value_is_array && in_array($key, $element['#value'])))) {
+ if ($value_valid && (!$value_is_array && (string)$element['#value'] === $key || ($value_is_array && in_array($key, $element['#value'])))) {
$selected = ' selected="selected"';
}
else {
@@ -1110,11 +1113,13 @@
'#type' => 'password',
'#title' => t('Password'),
'#value' => $element['#value']['pass1'],
+ '#required' => $element['#required'],
);
$element['pass2'] = array(
'#type' => 'password',
'#title' => t('Confirm password'),
'#value' => $element['#value']['pass2'],
+ '#required' => $element['#required'],
);
$element['#validate'] = array('password_confirm_validate' => array());
$element['#tree'] = TRUE;
@@ -1168,7 +1173,7 @@
*/
function expand_date($element) {
// Default to current date
- if (!isset($element['#value'])) {
+ if (empty($element['#value'])) {
$element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
'month' => format_date(time(), 'custom', 'n'),
'year' => format_date(time(), 'custom', 'Y'));
Modified: branches/drupal-5.0/includes/install.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/install.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/install.inc (original)
+++ branches/drupal-5.0/includes/install.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: install.inc,v 1.31 2007/01/02 05:05:38 drumm Exp $
+// $Id: install.inc,v 1.31.2.1 2007/02/06 08:20:17 drumm Exp $
define('SCHEMA_UNINSTALLED', -1);
define('SCHEMA_INSTALLED', 0);
@@ -62,10 +62,10 @@
* The currently installed schema version.
*/
function drupal_get_installed_schema_version($module, $reset = FALSE) {
- static $versions;
+ static $versions = array();
if ($reset) {
- unset($versions);
+ $versions = array();
}
if (!$versions) {
Modified: branches/drupal-5.0/includes/locale.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/locale.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/locale.inc (original)
+++ branches/drupal-5.0/includes/locale.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: locale.inc,v 1.105 2007/01/05 05:32:22 unconed Exp $
+// $Id: locale.inc,v 1.105.2.4 2007/05/21 00:20:02 drumm Exp $
/**
* @file
@@ -534,7 +534,7 @@
$current["#"][] = substr($line, 1);
}
elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
$current = array();
$current["#"][] = substr($line, 1);
$context = "COMMENT";
@@ -560,7 +560,7 @@
}
elseif (!strncmp("msgid", $line, 5)) {
if ($context == "MSGSTR") { // End current entry, start a new one
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
$current = array();
}
elseif ($context == "MSGID") { // Already in this context? Parse error
@@ -634,7 +634,7 @@
// End of PO file, flush last entry
if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) {
- _locale_import_one_string($op, $current, $mode, $lang);
+ _locale_import_one_string($op, $current, $mode, $lang, $file);
}
elseif ($context != "COMMENT") {
_locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
@@ -673,8 +673,10 @@
* Should existing translations be replaced ('overwrite' or 'keep')
* @param $lang
* Language to store the string in
- */
-function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL) {
+ * @param $file
+ * Object representation of file being imported, only required when op is 'db-store'
+ */
+function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL, $file = NULL) {
static $additions = 0;
static $updates = 0;
static $headerdone = FALSE;
@@ -729,7 +731,7 @@
$plid = 0;
}
$loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english[$key]));
- if ($loc->lid) { // a string exists
+ if (!empty($loc->lid)) { // a string exists
$lid = $loc->lid;
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE lid = %d", $comments, $lid);
@@ -766,7 +768,7 @@
$english = $value['msgid'];
$translation = $value['msgstr'];
$loc = db_fetch_object(db_query("SELECT lid FROM {locales_source} WHERE source = '%s'", $english));
- if ($loc->lid) { // a string exists
+ if (!empty($loc->lid)) { // a string exists
$lid = $loc->lid;
// update location field
db_query("UPDATE {locales_source} SET location = '%s' WHERE source = '%s'", $comments, $english);
@@ -806,8 +808,10 @@
/**
* Parses a Gettext Portable Object file header
*
- * @param $header A string containing the complete header
- * @return An associative array of key-value pairs
+ * @param $header
+ * A string containing the complete header
+ * @return
+ * An associative array of key-value pairs
*/
function _locale_import_parse_header($header) {
$hdr = array();
@@ -873,8 +877,10 @@
* While parsing, we ensure, that the operators have the right
* precedence and associativity.
*
- * @param $string A string containing the arithmetic formula
- * @return The PHP version of the formula
+ * @param $string
+ * A string containing the arithmetic formula
+ * @return
+ * The PHP version of the formula
*/
function _locale_import_parse_arithmetic($string) {
// Operator precedence table
@@ -908,7 +914,7 @@
$topop = array_pop($opstk);
}
}
- elseif ($prec[$ctok]) {
+ elseif (!empty($prec[$ctok])) {
// If it's an operator, then pop from $oparr into $elarr until the
// precedence in $oparr is less than current, then push into $oparr
$topop = array_pop($opstk);
@@ -968,8 +974,10 @@
/**
* Backward compatible implementation of token_get_all() for formula parsing
*
- * @param $string A string containing the arithmetic formula
- * @return The PHP version of the formula
+ * @param $string
+ * A string containing the arithmetic formula
+ * @return
+ * The PHP version of the formula
*/
function _locale_import_tokenize_formula($formula) {
$formula = str_replace(" ", "", $formula);
@@ -1032,8 +1040,10 @@
*
* This is a callback function used via array_map()
*
- * @param $entry An array element
- * @param $key Index of the array element
+ * @param $entry
+ * An array element
+ * @param $key
+ * Index of the array element
*/
function _locale_import_append_plural($entry, $key) {
// No modifications for 0, 1
@@ -1049,8 +1059,10 @@
/**
* Generate a short, one string version of the passed comment array
*
- * @param $comment An array of strings containing a comment
- * @return Short one string version of the comment
+ * @param $comment
+ * An array of strings containing a comment
+ * @return
+ * Short one string version of the comment
*/
function _locale_import_shorten_comments($comment) {
$comm = '';
@@ -1069,8 +1081,10 @@
/**
* Parses a string in quotes
*
- * @param $string A string specified with enclosing quotes
- * @return The string parsed from inside the quotes
+ * @param $string
+ * A string specified with enclosing quotes
+ * @return
+ * The string parsed from inside the quotes
*/
function _locale_import_parse_quoted($string) {
if (substr($string, 0, 1) != substr($string, -1, 1)) {
@@ -1544,7 +1558,8 @@
"ne" => array("Nepali"),
"ng" => array("Ndonga"),
"nl" => array("Dutch", "Nederlands"),
- "no" => array("Norwegian", "Norsk"),
+ "nb" => array("Norwegian Bokmål", "Bokmål"),
+ "nn" => array("Norwegian Nynorsk", "Nynorsk"),
"nr" => array("South Ndebele"),
"nv" => array("Navajo"),
"ny" => array("Chichewa"),
Modified: branches/drupal-5.0/includes/menu.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/menu.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/menu.inc (original)
+++ branches/drupal-5.0/includes/menu.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: menu.inc,v 1.146 2007/01/14 01:37:48 unconed Exp $
+// $Id: menu.inc,v 1.146.2.1 2007/06/17 01:50:50 drumm Exp $
/**
* @file
@@ -396,7 +396,7 @@
$path = substr($path, 0, strrpos($path, '/'));
}
- if (!isset($menu['callbacks'][$path])) {
+ if ($path === '' || !isset($menu['callbacks'][$path])) {
return MENU_NOT_FOUND;
}
Modified: branches/drupal-5.0/includes/module.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/module.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/module.inc (original)
+++ branches/drupal-5.0/includes/module.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: module.inc,v 1.93 2006/12/07 17:03:34 dries Exp $
+// $Id: module.inc,v 1.93.2.2 2007/07/21 00:54:18 drumm Exp $
/**
* @file
@@ -58,10 +58,10 @@
}
else {
if ($bootstrap) {
- $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC");
+ $result = db_query("SELECT name, filename, throttle FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC");
}
else {
- $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC");
+ $result = db_query("SELECT name, filename, throttle FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC");
}
while ($module = db_fetch_object($result)) {
if (file_exists($module->filename)) {
@@ -239,7 +239,7 @@
function module_enable($module_list) {
$invoke_modules = array();
foreach ($module_list as $module) {
- $existing = db_fetch_object(db_query("SELECT name, status FROM {system} WHERE type = 'module' AND name = '%s'", $module));
+ $existing = db_fetch_object(db_query("SELECT status FROM {system} WHERE type = 'module' AND name = '%s'", $module));
if ($existing->status === '0') {
module_load_install($module);
db_query("UPDATE {system} SET status = 1, throttle = 0 WHERE type = 'module' AND name = '%s'", $module);
@@ -342,7 +342,7 @@
static $implementations;
if ($refresh) {
- unset($implementations);
+ $implementations = array();
return;
}
Modified: branches/drupal-5.0/includes/session.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/session.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/session.inc (original)
+++ branches/drupal-5.0/includes/session.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: session.inc,v 1.37 2006/12/04 10:41:19 dries Exp $
+// $Id: session.inc,v 1.37.2.2 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -56,8 +56,9 @@
function sess_write($key, $value) {
global $user;
- // If the client doesn't have a session, and one isn't being created ($value), do nothing.
- if (empty($_COOKIE[session_name()]) && empty($value)) {
+ // If saving of session data is disabled or if the client doesn't have a session,
+ // and one isn't being created ($value), do nothing.
+ if (!session_save_session() || (empty($_COOKIE[session_name()]) && empty($value))) {
return TRUE;
}
@@ -65,10 +66,9 @@
if (!db_num_rows($result)) {
// Only save session data when when the browser sends a cookie. This keeps
- // crawlers out of session table. This improves speed up queries, reduces
- // memory, and gives more useful statistics. We can't eliminate anonymous
- // session table rows without breaking throttle module and "Who's Online"
- // block.
+ // crawlers out of session table. This reduces memory and server load,
+ // and gives more useful statistics. We can't eliminate anonymous session
+ // table rows without breaking throttle module and "Who's Online" block.
if ($user->uid || $value || count($_COOKIE)) {
db_query("INSERT INTO {sessions} (sid, uid, cache, hostname, session, timestamp) VALUES ('%s', %d, %d, '%s', '%s', %d)", $key, $user->uid, $user->cache, $_SERVER["REMOTE_ADDR"], $value, time());
}
@@ -153,3 +153,23 @@
return TRUE;
}
+
+/**
+ * Determine whether to save session data of the current request.
+ *
+ * This function allows the caller to temporarily disable writing of session data,
+ * should the request end while performing potentially dangerous operations, such as
+ * manipulating the global $user object.
+ *
+ * @param $status
+ * Disables writing of session data when FALSE, (re-)enables writing when TRUE.
+ *
+ * @return FALSE if writing session data has been disabled. Otherwise, TRUE.
+ */
+function session_save_session($status = NULL) {
+ static $save_session = TRUE;
+ if (isset($status)) {
+ $save_session = $status;
+ }
+ return ($save_session);
+}
Modified: branches/drupal-5.0/includes/tablesort.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/tablesort.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/tablesort.inc (original)
+++ branches/drupal-5.0/includes/tablesort.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: tablesort.inc,v 1.43 2006/12/01 08:50:33 dries Exp $
+// $Id: tablesort.inc,v 1.43.2.1 2007/06/16 22:29:25 drumm Exp $
/**
* @file
@@ -148,11 +148,11 @@
$order = isset($_GET['order']) ? $_GET['order'] : '';
foreach ($headers as $header) {
if (isset($header['data']) && $order == $header['data']) {
- return array('name' => $header['data'], 'sql' => $header['field']);
+ return array('name' => $header['data'], 'sql' => isset($header['field']) ? $header['field'] : '');
}
if (isset($header['sort']) && ($header['sort'] == 'asc' || $header['sort'] == 'desc')) {
- $default = array('name' => $header['data'], 'sql' => $header['field']);
+ $default = array('name' => $header['data'], 'sql' => isset($header['field']) ? $header['field'] : '');
}
}
Modified: branches/drupal-5.0/includes/theme.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/theme.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/theme.inc (original)
+++ branches/drupal-5.0/includes/theme.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: theme.inc,v 1.337 2007/01/11 03:36:06 unconed Exp $
+// $Id: theme.inc,v 1.337.2.2 2007/05/31 05:52:42 drumm Exp $
/**
* @file
@@ -341,6 +341,9 @@
elseif ($settings['favicon_path']) {
$settings['favicon'] = base_path() . $settings['favicon_path'];
}
+ else {
+ $settings['toggle_favicon'] = FALSE;
+ }
}
}
@@ -773,6 +776,8 @@
// Format the table rows:
$output .= "<tbody>\n";
if (count($rows)) {
+ $flip = array('even' => 'odd', 'odd' => 'even');
+ $class = 'even';
foreach ($rows as $number => $row) {
$attributes = array();
@@ -792,7 +797,7 @@
}
// Add odd/even class
- $class = ($number % 2 == 1) ? 'even': 'odd';
+ $class = $flip[$class];
if (isset($attributes['class'])) {
$attributes['class'] .= ' '. $class;
}
Modified: branches/drupal-5.0/includes/unicode.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/unicode.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/unicode.inc (original)
+++ branches/drupal-5.0/includes/unicode.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: unicode.inc,v 1.23 2006/12/06 16:15:52 dries Exp $
+// $Id: unicode.inc,v 1.23.2.2 2007/05/21 01:09:21 drumm Exp $
/**
* Indicates an error during check for PHP unicode support.
@@ -78,7 +78,7 @@
*/
function unicode_requirements() {
// Ensure translations don't break at install time
- $t = function_exists('install_main') ? 'st' : 't';
+ $t = get_t();
$libraries = array(
UNICODE_SINGLEBYTE => $t('Standard PHP'),
@@ -441,6 +441,7 @@
else {
$strlen = strlen($text);
// Find the starting byte offset
+ $bytes = 0;
if ($start > 0) {
// Count all the continuation bytes from the start until we have found
// $start characters
Modified: branches/drupal-5.0/includes/xmlrpc.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/includes/xmlrpc.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/includes/xmlrpc.inc (original)
+++ branches/drupal-5.0/includes/xmlrpc.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: xmlrpc.inc,v 1.38 2006/09/03 08:21:18 dries Exp $
+// $Id: xmlrpc.inc,v 1.38.2.1 2007/04/19 02:05:15 drumm Exp $
/*
Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
@@ -440,7 +440,7 @@
$xmlrpc_request = xmlrpc_request($method, $args);
$result = drupal_http_request($url, array("Content-Type" => "text/xml"), 'POST', $xmlrpc_request->xml);
if ($result->code != 200) {
- xmlrpc_error(-$result->code, $result->error);
+ xmlrpc_error($result->code, $result->error);
return FALSE;
}
$message = xmlrpc_message($result->data);
Modified: branches/drupal-5.0/install.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/install.php?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/install.php (original)
+++ branches/drupal-5.0/install.php Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: install.php,v 1.34 2007/01/10 10:15:07 unconed Exp $
+// $Id: install.php,v 1.34.2.2 2007/07/12 06:53:03 drumm Exp $
require_once './includes/install.inc';
@@ -316,8 +316,8 @@
}
// Verify the table prefix
- if (!empty($db_prefix) && is_string($db_prefix) && !preg_match('/^[A-Za-z0-9_.]+$/', $db_prefix)) {
- form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, underscores or dots.', array('%db_prefix' => $db_prefix)), 'error');
+ if (!empty($db_prefix) && is_string($db_prefix) && !preg_match('/^[A-Za-z0-9_]+$/', $db_prefix)) {
+ form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters or underscores.', array('%db_prefix' => $db_prefix)), 'error');
}
if (!empty($db_port) && !is_numeric($db_port)) {
@@ -527,6 +527,7 @@
*/
function install_complete($profile) {
global $base_url;
+ $output = '';
// Store install profile for later use.
variable_set('install_profile', $profile);
Modified: branches/drupal-5.0/misc/drupal.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/misc/drupal.js?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/misc/drupal.js (original)
+++ branches/drupal-5.0/misc/drupal.js Thu Jul 26 23:49:44 2007
@@ -1,4 +1,4 @@
-// $Id: drupal.js,v 1.29 2006/10/14 02:39:48 unconed Exp $
+// $Id: drupal.js,v 1.29.2.1 2007/07/15 23:07:06 drumm Exp $
var Drupal = Drupal || {};
@@ -196,8 +196,8 @@
*/
Drupal.encodeURIComponent = function (item, uri) {
uri = uri || location.href;
- item = encodeURIComponent(item).replace('%2F', '/');
- return uri.indexOf('?q=') ? item : item.replace('%26', '%2526').replace('%23', '%2523');
+ item = encodeURIComponent(item).replace(/%2F/g, '/');
+ return (uri.indexOf('?q=') != -1) ? item : item.replace(/%26/g, '%2526').replace(/%23/g, '%2523').replace(/\/\//g, '/%252F');
};
// Global Killswitch on the <html> element
Modified: branches/drupal-5.0/misc/farbtastic/farbtastic.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/misc/farbtastic/farbtastic.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/misc/farbtastic/farbtastic.css (original)
+++ branches/drupal-5.0/misc/farbtastic/farbtastic.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: farbtastic.css,v 1.2.2.1 2007/04/18 03:38:58 drumm Exp $ */
+
.farbtastic {
position: relative;
}
@@ -30,4 +32,3 @@
overflow: hidden;
background: url(marker.png) no-repeat;
}
-
Modified: branches/drupal-5.0/misc/textarea.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/misc/textarea.js?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/misc/textarea.js (original)
+++ branches/drupal-5.0/misc/textarea.js Thu Jul 26 23:49:44 2007
@@ -1,10 +1,12 @@
-// $Id: textarea.js,v 1.11 2006/09/07 08:05:31 dries Exp $
+// $Id: textarea.js,v 1.11.2.1 2007/04/18 02:41:19 drumm Exp $
Drupal.textareaAttach = function() {
$('textarea.resizable:not(.processed)').each(function() {
var textarea = $(this).addClass('processed'), staticOffset = null;
- $(this).wrap('<div class="resizable-textarea"></div>')
+ // When wrapping the text area, work around an IE margin bug. See:
+ // http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout
+ $(this).wrap('<div class="resizable-textarea"><span></span></div>')
.parent().append($('<div class="grippie"></div>').mousedown(startDrag));
var grippie = $('div.grippie', $(this).parent())[0];
Modified: branches/drupal-5.0/modules/aggregator/aggregator.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/aggregator/aggregator.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/aggregator/aggregator.info (original)
+++ branches/drupal-5.0/modules/aggregator/aggregator.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/aggregator/aggregator.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/aggregator/aggregator.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/aggregator/aggregator.module (original)
+++ branches/drupal-5.0/modules/aggregator/aggregator.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: aggregator.module,v 1.324 2006/12/26 10:28:12 dries Exp $
+// $Id: aggregator.module,v 1.324.2.1 2007/07/09 03:38:22 drumm Exp $
/**
* @file
@@ -950,7 +950,7 @@
function aggregator_save_item($edit) {
if ($edit['iid'] && $edit['title']) {
- db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['iid'], $edit['timestamp'], $edit['gid']);
+ db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['guid'], $edit['timestamp'], $edit['iid']);
}
else if ($edit['iid']) {
db_query('DELETE FROM {aggregator_item} WHERE iid = %d', $edit['iid']);
Modified: branches/drupal-5.0/modules/block/block.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/block/block.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/block/block.info (original)
+++ branches/drupal-5.0/modules/block/block.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/block/block.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/block/block.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/block/block.module (original)
+++ branches/drupal-5.0/modules/block/block.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: block.module,v 1.246 2007/01/11 08:54:44 dries Exp $
+// $Id: block.module,v 1.246.2.5 2007/06/14 06:06:48 drumm Exp $
/**
* @file
@@ -131,7 +131,7 @@
break;
case 'view':
- $block = db_fetch_object(db_query('SELECT * FROM {boxes} WHERE bid = %d', $delta));
+ $block = db_fetch_object(db_query('SELECT body, format FROM {boxes} WHERE bid = %d', $delta));
$data['content'] = check_markup($block->body, $block->format, FALSE);
return $data;
}
@@ -282,7 +282,7 @@
foreach ($form_values as $block) {
$block['status'] = $block['region'] != BLOCK_REGION_NONE;
$block['region'] = $block['status'] ? $block['region'] : '';
- db_query("UPDATE {blocks} SET status = %d, weight = %d, region = '%s', throttle = %d WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $block['status'], $block['weight'], $block['region'], $block['throttle'], $block['module'], $block['delta'], $block['theme']);
+ db_query("UPDATE {blocks} SET status = %d, weight = %d, region = '%s', throttle = %d WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $block['status'], $block['weight'], $block['region'], isset($block['throttle']) ? $block['throttle'] : 0, $block['module'], $block['delta'], $block['theme']);
}
drupal_set_message(t('The block settings have been updated.'));
cache_clear_all();
@@ -359,7 +359,7 @@
}
function block_box_get($bid) {
- return db_fetch_array(db_query("SELECT bx.*, title FROM {boxes} bx INNER JOIN {blocks} bl ON bx.bid = bl.delta WHERE module = 'block' AND bid = %d", $bid));
+ return db_fetch_array(db_query("SELECT bx.*, bl.title FROM {boxes} bx INNER JOIN {blocks} bl ON bx.bid = bl.delta WHERE bl.module = 'block' AND bx.bid = %d", $bid));
}
/**
Modified: branches/drupal-5.0/modules/blog/blog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/blog/blog.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/blog/blog.info (original)
+++ branches/drupal-5.0/modules/blog/blog.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/blog/blog.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/blog/blog.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/blog/blog.module (original)
+++ branches/drupal-5.0/modules/blog/blog.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: blog.module,v 1.271 2006/12/10 20:34:02 dries Exp $
+// $Id: blog.module,v 1.271.2.2 2007/04/23 17:05:11 dries Exp $
/**
* @file
@@ -48,7 +48,7 @@
*/
function blog_user($type, &$edit, &$user) {
if ($type == 'view' && user_access('edit own blog', $user)) {
- $items[] = array('title' => t('Blog'),
+ $items['blog'] = array('title' => t('Blog'),
'value' => l(t('View recent blog entries'), "blog/$user->uid", array('title' => t("Read @username's latest blog entries.", array('@username' => $user->name)))),
'class' => 'blog',
);
@@ -147,7 +147,7 @@
$output = '';
}
- $result = pager_query(db_rewrite_sql("SELECT n.nid, n.sticky, n.created FROM {node} n WHERE 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);
+ $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);
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load($node->nid), 1);
}
Modified: branches/drupal-5.0/modules/blogapi/blogapi.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/blogapi/blogapi.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/blogapi/blogapi.info (original)
+++ branches/drupal-5.0/modules/blogapi/blogapi.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/blogapi/blogapi.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/blogapi/blogapi.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/blogapi/blogapi.module (original)
+++ branches/drupal-5.0/modules/blogapi/blogapi.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: blogapi.module,v 1.100 2007/01/05 19:05:54 dries Exp $
+// $Id: blogapi.module,v 1.100.2.2 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -138,7 +138,7 @@
$types = _blogapi_get_node_types();
$structs = array();
foreach ($types as $type) {
- $structs[] = array('url' => url('blog/' . $user->uid, NULL, NULL, TRUE), 'blogid' => $type, 'blogName' => $user->name . ": " . $type);
+ $structs[] = array('url' => url('blog/'. $user->uid, NULL, NULL, TRUE), 'blogid' => $type, 'blogName' => $user->name .": ". $type);
}
return $structs;
}
@@ -161,7 +161,7 @@
'firstname' => $name[0],
'nickname' => $user->name,
'email' => $user->mail,
- 'url' => url('blog/' . $user->uid, NULL, NULL, TRUE));
+ 'url' => url('blog/'. $user->uid, NULL, NULL, TRUE));
}
else {
return blogapi_error($user);
@@ -327,7 +327,7 @@
else {
$result = db_query_range("SELECT n.nid, n.title, n.created, u.name FROM {node} n, {users} u WHERE n.uid = u.uid AND n.type = '%s' AND n.uid = %d ORDER BY n.created DESC", $type, $user->uid, 0, $number_of_posts);
}
- $blogs = array ();
+ $blogs = array();
while ($blog = db_fetch_object($result)) {
$blogs[] = _blogapi_get_post($blog, $bodies);
}
@@ -383,7 +383,7 @@
foreach ($terms as $term) {
$term_name = $term->name;
foreach (module_invoke('taxonomy', 'get_parents', $term->tid, 'tid') as $parent) {
- $term_name = $parent->name . '/' . $term_name;
+ $term_name = $parent->name .'/'. $term_name;
}
$categories[] = array('categoryName' => $term_name, 'categoryId' => $term->tid);
}
@@ -421,7 +421,7 @@
foreach ($terms as $term) {
$term_name = $term->name;
foreach (module_invoke('taxonomy', 'get_parents', $term->tid, 'tid') as $parent) {
- $term_name = $parent->name . '/' . $term_name;
+ $term_name = $parent->name .'/'. $term_name;
}
$categories[] = array('categoryName' => $term_name, 'categoryId' => $term->tid, 'isPrimary' => TRUE);
}
@@ -537,7 +537,7 @@
}
function blogapi_admin_settings() {
- $node_types = node_get_types('names');
+ $node_types = array_map('check_plain', node_get_types('names'));
$defaults = isset($node_types['blog']) ? array('blog' => 1) : array();
$form['blogapi_node_types'] = array(
'#type' => 'checkboxes',
@@ -648,7 +648,7 @@
$node->body = $struct['mt_excerpt'] .'<!--break-->'.$node->body;
}
if ($struct['mt_text_more']) {
- $node->body = $node->body . '<!--extended-->' . $struct['mt_text_more'];
+ $node->body = $node->body .'<!--extended-->'. $struct['mt_text_more'];
}
// mt_convert_breaks
@@ -667,7 +667,7 @@
}
function _blogapi_get_post($node, $bodies = TRUE) {
- $xmlrpcval = array (
+ $xmlrpcval = array(
'userid' => $node->name,
'dateCreated' => xmlrpc_date($node->created),
'title' => $node->title,
Modified: branches/drupal-5.0/modules/book/book.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/book/book.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/book/book.info (original)
+++ branches/drupal-5.0/modules/book/book.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/book/book.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/book/book.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/book/book.module (original)
+++ branches/drupal-5.0/modules/book/book.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: book.module,v 1.406 2007/01/09 08:31:22 drumm Exp $
+// $Id: book.module,v 1.406.2.1 2007/02/14 04:30:33 drumm Exp $
/**
* @file
@@ -277,7 +277,7 @@
);
$form['nid'] = array('#type' => 'value', '#value' => $nid);
- if ($node->parent) {
+ if (isset($node->parent)) {
$form['update'] = array('#type' => 'submit',
'#value' => t('Update book outline'),
);
Modified: branches/drupal-5.0/modules/color/color.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/color/color.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/color/color.css (original)
+++ branches/drupal-5.0/modules/color/color.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: color.css,v 1.2.2.1 2007/04/18 03:38:58 drumm Exp $ */
+
/* Farbtastic placement */
.color-form {
max-width: 50em;
Modified: branches/drupal-5.0/modules/color/color.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/color/color.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/color/color.info (original)
+++ branches/drupal-5.0/modules/color/color.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/color/color.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/color/color.js?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/color/color.js (original)
+++ branches/drupal-5.0/modules/color/color.js Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+// $Id: color.js,v 1.1.2.1 2007/04/18 03:38:58 drumm Exp $
+
if (Drupal.jsEnabled) {
$(document).ready(function () {
var form = $('#color_scheme_form .color-form');
Modified: branches/drupal-5.0/modules/color/color.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/color/color.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/color/color.module (original)
+++ branches/drupal-5.0/modules/color/color.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: color.module,v 1.13.2.1 2007/01/20 08:12:43 unconed Exp $
+// $Id: color.module,v 1.13.2.2 2007/07/09 05:02:32 drumm Exp $
/**
* Implementation of hook_form_alter().
@@ -228,12 +228,10 @@
// Prepare target locations for generated files
$id = $theme .'-'. substr(md5(serialize($palette) . microtime()), 0, 8);
- $paths['color'] = variable_get('file_directory_path', 'files') .'/color';
+ $paths['color'] = file_directory_path() .'/color';
$paths['target'] = $paths['color'] .'/'. $id;
foreach ($paths as $path) {
- if (!is_dir($path)) {
- mkdir($path);
- }
+ file_check_directory($path, FILE_CREATE_DIRECTORY);
}
$paths['target'] = $paths['target'] .'/';
$paths['id'] = $id;
@@ -249,7 +247,8 @@
// Copy over neutral images
foreach ($info['copy'] as $file) {
$base = basename($file);
- copy($paths['source'] . $file, $paths['target'] . $base);
+ $source = $paths['source'] . $file;
+ file_copy($source, $paths['target'] . $base);
$paths['map'][$file] = $base;
$paths['files'][] = $paths['target'] . $base;
}
@@ -339,6 +338,9 @@
fwrite($file, $output);
fclose($file);
$paths['files'][] = $paths['stylesheet'];
+
+ // Set standard file permissions for webserver-generated files
+ @chmod($paths['stylesheet'], 0664);
}
/**
@@ -401,6 +403,9 @@
imagepng($slice, $image);
imagedestroy($slice);
$paths['files'][] = $image;
+
+ // Set standard file permissions for webserver-generated files
+ @chmod(realpath($image), 0664);
// Build before/after map of image paths.
$paths['map'][$file] = $base;
Modified: branches/drupal-5.0/modules/comment/comment.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/comment/comment.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/comment/comment.css (original)
+++ branches/drupal-5.0/modules/comment/comment.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,11 @@
+/* $Id: comment.css,v 1.1.2.2 2007/07/24 18:38:58 drumm Exp $ */
+
.indented {
margin-left: 25px;
}
+.comment-unpublished {
+ background-color: #fff4f4;
+}
+.preview .comment {
+ background-color: #ffffea;
+}
Modified: branches/drupal-5.0/modules/comment/comment.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/comment/comment.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/comment/comment.info (original)
+++ branches/drupal-5.0/modules/comment/comment.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/comment/comment.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/comment/comment.install?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/comment/comment.install (original)
+++ branches/drupal-5.0/modules/comment/comment.install Thu Jul 26 23:49:44 2007
@@ -1,11 +1,26 @@
<?php
-// $Id: comment.install,v 1.2 2006/12/13 22:44:54 unconed Exp $
+// $Id: comment.install,v 1.2.2.1 2007/06/20 07:14:21 drumm Exp $
/**
* Implementation of hook_enable().
*/
function comment_enable() {
// Insert records into the node_comment_statistics for nodes that are missing.
- db_query_temporary("SELECT n.nid, n.created, n.uid FROM {node} n LEFT JOIN {node_comment_statistics} c ON n.nid = c.nid WHERE c.comment_count IS NULL", 'missing_nids');
- db_query("INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, n.created, NULL, n.uid, 0 FROM missing_nids n");
+ db_query_temporary("SELECT n.nid, n.changed, n.uid FROM {node} n LEFT JOIN {node_comment_statistics} c ON n.nid = c.nid WHERE c.comment_count IS NULL", 'missing_nids');
+ db_query("INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, n.changed, NULL, n.uid, 0 FROM missing_nids n");
}
+
+/**
+ * Changed node_comment_statistics to use node->changed to avoid future
+ * timestamps.
+ */
+function comment_update_1() {
+ // Change any future last comment timestamps to now.
+ db_query('UPDATE {node_comment_statistics} SET last_comment_timestamp = %d WHERE last_comment_timestamp > %d', time(), time());
+
+ // Unstuck node indexing timestamp if needed.
+ if (($last = variable_get('node_cron_last', FALSE)) !== FALSE) {
+ variable_set('node_cron_last', min(time(), $last));
+ }
+ return array();
+}
Modified: branches/drupal-5.0/modules/comment/comment.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/comment/comment.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/comment/comment.module (original)
+++ branches/drupal-5.0/modules/comment/comment.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: comment.module,v 1.520.2.2 2007/01/29 21:51:53 drumm Exp $
+// $Id: comment.module,v 1.520.2.6 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -249,7 +249,7 @@
// Select the $number nodes (visible to the current user) with the most
// recent comments. This is efficient due to the index on
// last_comment_timestamp.
- $result = db_query_range(db_rewrite_sql("SELECT n.nid FROM {node_comment_statistics} n WHERE n.comment_count > 0 ORDER BY n.last_comment_timestamp DESC"), 0, $number);
+ $result = db_query_range(db_rewrite_sql("SELECT nc.nid FROM {node_comment_statistics} nc WHERE nc.comment_count > 0 ORDER BY nc.last_comment_timestamp DESC", 'nc'), 0, $number);
$nids = array();
while ($row = db_fetch_object($result)) {
@@ -415,7 +415,7 @@
break;
case 'insert':
- db_query('INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) VALUES (%d, %d, NULL, %d, 0)', $node->nid, $node->created, $node->uid);
+ db_query('INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) VALUES (%d, %d, NULL, %d, 0)', $node->nid, $node->changed, $node->uid);
break;
case 'delete':
@@ -1075,23 +1075,8 @@
$output = '';
- // We'll only delete if the user has confirmed the
- // deletion using the form in our else clause below.
- if (is_object($comment) && is_numeric($comment->cid) && $_POST['confirm']) {
- drupal_set_message(t('The comment and all its replies have been deleted.'));
-
- // Delete comment and its replies.
- _comment_delete_thread($comment);
-
- _comment_update_node_statistics($comment->nid);
-
- // Clear the cache so an anonymous user sees that his comment was deleted.
- cache_clear_all();
-
- drupal_goto("node/$comment->nid");
- }
- else if (is_object($comment) && is_numeric($comment->cid)) {
- $output = drupal_get_form('comment_confirm_delete', $comment->subject, $comment->nid);
+ if (is_object($comment) && is_numeric($comment->cid)) {
+ $output = drupal_get_form('comment_confirm_delete', $comment);
}
else {
drupal_set_message(t('The comment no longer exists.'));
@@ -1100,15 +1085,37 @@
return $output;
}
-function comment_confirm_delete($subject, $nid) {
+function comment_confirm_delete($comment) {
+
+ $form = array();
+ $form['comment'] = array(
+ '#type' => 'value',
+ '#value' => $comment,
+ );
+
return confirm_form(
- array(),
- t('Are you sure you want to delete the comment %title?', array('%title' => $subject)),
- 'node/'. $nid,
+ $form,
+ t('Are you sure you want to delete the comment %title?', array('%title' => $comment->subject)),
+ 'node/'. $comment->nid,
t('Any replies to this comment will be lost. This action cannot be undone.'),
t('Delete'),
t('Cancel'));
}
+
+function comment_confirm_delete_submit($form_id, $form_values) {
+ $comment = $form_values['comment'];
+
+ // Delete comment and its replies.
+ _comment_delete_thread($comment);
+ _comment_update_node_statistics($comment->nid);
+ // Clear the cache so an anonymous user sees that his comment was deleted.
+ cache_clear_all();
+
+ drupal_set_message(t('The comment and all its replies have been deleted.'));
+
+ return "node/$comment->nid";
+}
+
/**
* Comment operations. We offer different update operations depending on
@@ -1810,10 +1817,10 @@
else {
// we cannot use drupal_get_destination() because these links sometimes appear on /node and taxo listing pages
if (variable_get('comment_form_location', COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_SEPARATE_PAGE) {
- $destination = "destination=". drupal_urlencode("comment/reply/$nid#comment_form");
+ $destination = "destination=". drupal_urlencode("comment/reply/$nid#comment-form");
}
else {
- $destination = "destination=". drupal_urlencode("node/$nid#comment_form");
+ $destination = "destination=". drupal_urlencode("node/$nid#comment-form");
}
if (variable_get('user_register', 1)) {
Modified: branches/drupal-5.0/modules/contact/contact.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/contact/contact.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/contact/contact.info (original)
+++ branches/drupal-5.0/modules/contact/contact.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/contact/contact.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/contact/contact.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/contact/contact.module (original)
+++ branches/drupal-5.0/modules/contact/contact.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: contact.module,v 1.74 2007/01/10 15:17:51 dries Exp $
+// $Id: contact.module,v 1.74.2.1 2007/06/05 07:18:05 drumm Exp $
/**
* @file
@@ -428,7 +428,7 @@
if (count($categories) > 0) {
$form['#token'] = $user->name . $user->mail;
- $form['contact_information'] = array('#value' => filter_xss_admin(variable_get('contact_form_information', t('You can leave us a message using the contact form below.'))));
+ $form['contact_information'] = array('#value' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
$form['name'] = array('#type' => 'textfield',
'#title' => t('Your name'),
'#maxlength' => 255,
Modified: branches/drupal-5.0/modules/drupal/drupal.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/drupal/drupal.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/drupal/drupal.info (original)
+++ branches/drupal-5.0/modules/drupal/drupal.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/filter/filter.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/filter/filter.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/filter/filter.info (original)
+++ branches/drupal-5.0/modules/filter/filter.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/filter/filter.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/filter/filter.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/filter/filter.module (original)
+++ branches/drupal-5.0/modules/filter/filter.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: filter.module,v 1.160 2007/01/12 07:27:21 unconed Exp $
+// $Id: filter.module,v 1.160.2.2 2007/06/05 07:29:14 drumm Exp $
/**
* @file
@@ -1207,7 +1207,7 @@
$chunk = preg_replace('!(</'. $block .'>)!', "$1\n\n", $chunk); // Space things out a little
$chunk = preg_replace("/\n\n+/", "\n\n", $chunk); // take care of duplicates
$chunk = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $chunk); // make paragraphs, including one at the end
- $chunk = preg_replace('|<p>\s*?</p>\n|', '', $chunk); // under certain strange conditions it could create a P of entirely whitespace
+ $chunk = preg_replace('|<p>\s*</p>\n|', '', $chunk); // under certain strange conditions it could create a P of entirely whitespace
$chunk = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk); // problem with nested lists
$chunk = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $chunk);
$chunk = str_replace('</blockquote></p>', '</p></blockquote>', $chunk);
@@ -1493,8 +1493,9 @@
if (preg_match('![/?#]!', $protocol)) {
break;
}
+ // Per RFC2616, section 3.2.3 (URI Comparison) scheme comparison must be case-insensitive.
// Check if this is a disallowed protocol.
- if (!isset($allowed_protocols[$protocol])) {
+ if (!isset($allowed_protocols[strtolower($protocol)])) {
$string = substr($string, $colonpos + 1);
}
}
Modified: branches/drupal-5.0/modules/forum/forum.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/forum/forum.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/forum/forum.info (original)
+++ branches/drupal-5.0/modules/forum/forum.info Thu Jul 26 23:49:44 2007
@@ -5,7 +5,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/forum/forum.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/forum/forum.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/forum/forum.module (original)
+++ branches/drupal-5.0/modules/forum/forum.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: forum.module,v 1.375.2.1 2007/01/25 21:49:20 dries Exp $
+// $Id: forum.module,v 1.375.2.5 2007/05/31 05:58:17 drumm Exp $
/**
* @file
@@ -259,7 +259,7 @@
switch ($delta) {
case 0:
$title = t('Active forum topics');
- $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND n.type = 'forum' ORDER BY l.last_comment_timestamp DESC");
+ $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count, l.last_comment_timestamp FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND n.type = 'forum' ORDER BY l.last_comment_timestamp DESC");
$result = db_query_range($sql, 0, variable_get('forum_block_num_0', '5'));
if (db_num_rows($result)) {
$content = node_title_list($result);
@@ -325,7 +325,7 @@
*/
function forum_submit(&$node) {
// Make sure all fields are set properly:
- $node->icon = $node->icon ? $node->icon : '';
+ $node->icon = !empty($node->icon) ? $node->icon : '';
if ($node->taxonomy) {
// Get the forum terms from the (cached) tree
@@ -674,7 +674,7 @@
if (!$vid) {
// Create the forum vocabulary. Assign the vocabulary a low weight so
// it will appear first in forum topic create and edit forms.
- $edit = array('name' => 'Forums', 'multiple' => 0, 'required' => 1, 'hierarchy' => 1, 'relations' => 0, 'module' => 'forum', 'weight' => -10, 'nodes' => array('forum' => 1));
+ $edit = array('name' => t('Forums'), 'multiple' => 0, 'required' => 1, 'hierarchy' => 1, 'relations' => 0, 'module' => 'forum', 'weight' => -10, 'nodes' => array('forum' => 1));
taxonomy_save_vocabulary($edit);
$vid = $edit['vid'];
}
@@ -798,7 +798,7 @@
$sql_count = db_rewrite_sql("SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid AND r.tid = %d WHERE n.status = 1 AND n.type = 'forum'");
$result = pager_query($sql, $forum_per_page, 0, $sql_count, $tid);
-
+ $topics = array();
while ($topic = db_fetch_object($result)) {
if ($user->uid) {
// folder is new if topic is new or there are new comments since last visit
@@ -847,22 +847,16 @@
* Menu callback; prints a forum listing.
*/
function forum_page($tid = 0) {
- if (module_exists('taxonomy') && module_exists('comment')) {
- $forum_per_page = variable_get('forum_per_page', 25);
- $sortby = variable_get('forum_order', 1);
-
- $forums = forum_get_forums($tid);
- $parents = taxonomy_get_parents_all($tid);
- if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
- $topics = forum_get_topics($tid, $sortby, $forum_per_page);
- }
-
- return theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
- }
- else {
- drupal_set_message(t('The forum module requires both the taxonomy module and the comment module to be enabled and configured.'), 'error');
- return ' ';
- }
+ $forum_per_page = variable_get('forum_per_page', 25);
+ $sortby = variable_get('forum_order', 1);
+
+ $forums = forum_get_forums($tid);
+ $parents = taxonomy_get_parents_all($tid);
+ if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
+ $topics = forum_get_topics($tid, $sortby, $forum_per_page);
+ }
+
+ return theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page);
}
/**
@@ -991,7 +985,7 @@
*/
function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) {
global $forum_topic_list_header;
-
+ $rows = array();
if ($topics) {
foreach ($topics as $topic) {
@@ -1092,7 +1086,7 @@
// Word break (a is an inline element)
$output .= ' ';
}
- if ($next) {
+ if (!empty($next)) {
$output .= l($next->title . t(' âº'), 'node/'. $next->nid, array('class' => 'topic-next', 'title' => t('Go to next forum topic')));
}
Modified: branches/drupal-5.0/modules/help/help.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/help/help.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/help/help.info (original)
+++ branches/drupal-5.0/modules/help/help.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/legacy/legacy.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/legacy/legacy.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/legacy/legacy.info (original)
+++ branches/drupal-5.0/modules/legacy/legacy.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/locale/locale.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/locale/locale.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/locale/locale.info (original)
+++ branches/drupal-5.0/modules/locale/locale.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/menu/menu.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/menu/menu.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/menu/menu.info (original)
+++ branches/drupal-5.0/modules/menu/menu.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/menu/menu.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/menu/menu.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/menu/menu.module (original)
+++ branches/drupal-5.0/modules/menu/menu.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: menu.module,v 1.100 2007/01/05 19:05:54 dries Exp $
+// $Id: menu.module,v 1.100.2.1 2007/07/26 19:16:45 drumm Exp $
/**
* @file
@@ -68,7 +68,8 @@
'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/build/menu/item/disable',
'title' => t('Disable menu item'),
- 'callback' => 'menu_disable_item',
+ 'callback' => 'drupal_get_form',
+ 'callback arguments' => array('menu_confirm_disable_item'),
'access' => user_access('administer menu'),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/build/menu/item/delete',
@@ -481,14 +482,24 @@
/**
* Menu callback; hide a menu item.
- */
-function menu_disable_item($mid) {
+ *
+ * Presents a confirmation form to protect against cross site request forgeries.
+ */
+function menu_confirm_disable_item($mid, $token = NULL) {
+ global $user;
$item = menu_get_item($mid);
- $type = $item['type'];
+ $form = array();
+ $form['mid'] = array('#type' => 'value', '#value' => $mid);
+ $form['item'] = array('#type' => 'value', '#value' => $item);
+ return confirm_form($form, t('Are you sure you want to disable the menu item %menu-item?', array('%menu-item' => $item['title'])), 'admin/build/menu', ' ', t('Disable'), t('Cancel'));
+}
+
+function menu_confirm_disable_item_submit($form_id, $form_values) {
+ $type = $form_values['item']['type'];
$type &= ~MENU_VISIBLE_IN_TREE;
$type &= ~MENU_VISIBLE_IN_BREADCRUMB;
$type |= MENU_MODIFIED_BY_ADMIN;
- db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $mid);
+ db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $form_values['mid']);
drupal_set_message(t('The menu item has been disabled.'));
drupal_goto('admin/build/menu');
}
Modified: branches/drupal-5.0/modules/node/content_types.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/node/content_types.inc?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/node/content_types.inc (original)
+++ branches/drupal-5.0/modules/node/content_types.inc Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: content_types.inc,v 1.24 2007/01/09 07:53:26 drumm Exp $
+// $Id: content_types.inc,v 1.24.2.2 2007/07/26 19:16:46 drumm Exp $
/**
* @file
@@ -18,7 +18,6 @@
foreach ($names as $key => $name) {
$type = $types[$key];
if (function_exists($type->module .'_form')) {
- $name = check_plain($name);
$type_url_str = str_replace('_', '-', $type->type);
// Populate the operations field.
$operations = array();
@@ -194,6 +193,7 @@
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save content type'),
+ '#weight' => 40,
);
if ($type->custom) {
@@ -201,6 +201,7 @@
$form['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete content type'),
+ '#weight' => 45,
);
}
}
@@ -208,6 +209,7 @@
$form['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset to defaults'),
+ '#weight' => 50,
);
}
Modified: branches/drupal-5.0/modules/node/node.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/node/node.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/node/node.css (original)
+++ branches/drupal-5.0/modules/node/node.css Thu Jul 26 23:49:44 2007
@@ -1,9 +1,9 @@
-/* $Id: node.css,v 1.2 2006/09/05 03:50:56 unconed Exp $ */
+/* $Id: node.css,v 1.2.2.1 2007/07/24 18:38:58 drumm Exp $ */
-.node-unpublished, .comment-unpublished {
+.node-unpublished {
background-color: #fff4f4;
}
-.preview .node, .preview .comment {
+.preview .node {
background-color: #ffffea;
}
#node-admin-filter ul {
Modified: branches/drupal-5.0/modules/node/node.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/node/node.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/node/node.info (original)
+++ branches/drupal-5.0/modules/node/node.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/node/node.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/node/node.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/node/node.module (original)
+++ branches/drupal-5.0/modules/node/node.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: node.module,v 1.776.2.1 2007/01/29 21:51:53 drumm Exp $
+// $Id: node.module,v 1.776.2.19 2007/07/26 19:16:46 drumm Exp $
/**
* @file
@@ -35,7 +35,7 @@
return '<p>'. t('To create a new content type, enter the human-readable name, the machine-readable name, and all other relevant fields that are on this page. Once created, users of your site will be able to create posts that are instances of this content type.') .'</p>';
}
- if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'revisions') {
+ if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'revisions' && arg(3) == NULL) {
return '<p>'. t('The revisions let you track differences between multiple versions of a post.') .'</p>';
}
@@ -103,7 +103,7 @@
static $history;
if (!isset($history[$nid])) {
- $history[$nid] = db_fetch_object(db_query("SELECT timestamp FROM {history} WHERE uid = '$user->uid' AND nid = %d", $nid));
+ $history[$nid] = db_fetch_object(db_query("SELECT timestamp FROM {history} WHERE uid = %d AND nid = %d", $user->uid, $nid));
}
return (isset($history[$nid]->timestamp) ? $history[$nid]->timestamp : 0);
@@ -272,6 +272,9 @@
if (!empty($info->is_new)) {
node_type_save($info);
}
+ if (!empty($info->disabled)) {
+ node_type_delete($info->type);
+ }
}
_node_types_build();
@@ -335,8 +338,10 @@
}
/**
- * Builds the list of available node types, by querying hook_node_info() in all
- * modules, and by looking for node types in the database.
+ * Builds and returns the list of available node types.
+ *
+ * The list of types is built by querying hook_node_info() in all modules, and
+ * by comparing this information with the node types in the {node_type} table.
*
*/
function _node_types_build() {
@@ -352,6 +357,12 @@
$type_result = db_query(db_rewrite_sql('SELECT nt.type, nt.* FROM {node_type} nt ORDER BY nt.type ASC', 'nt', 'type'));
while ($type_object = db_fetch_object($type_result)) {
+ // Check for node types from disabled modules and mark their types for removal.
+ // Types defined by the node module in the database (rather than by a separate
+ // module using hook_node_info) have a module value of 'node'.
+ if ($type_object->module != 'node' && empty($info_array[$type_object->type])) {
+ $type_object->disabled = TRUE;
+ }
if (!isset($_node_types[$type_object->type]) || $type_object->modified) {
$_node_types[$type_object->type] = $type_object;
$_node_names[$type_object->type] = $type_object->name;
@@ -386,6 +397,12 @@
$info['body_label'] = t('Body');
}
+ if (!isset($info['help'])) {
+ $info['help'] = '';
+ }
+ if (!isset($info['min_word_count'])) {
+ $info['min_word_count'] = 0;
+ }
if (!isset($info['custom'])) {
$info['custom'] = FALSE;
}
@@ -554,7 +571,7 @@
$node->is_new = TRUE;
$node->nid = db_next_id('{node}_nid');
- $node->vid = db_next_id('{node_revisions}_vid');;
+ $node->vid = db_next_id('{node_revisions}_vid');
}
else {
// We need to ensure that all node fields are filled.
@@ -586,7 +603,7 @@
'title' => "'%s'", 'body' => "'%s'",
'teaser' => "'%s'", 'timestamp' => '%d',
'uid' => '%d', 'format' => '%d');
- if (!empty($node->log) || $node->is_new) {
+ if (!empty($node->log) || $node->is_new || $node->revision) {
// Only store the log message if there's something to store; this prevents
// existing log messages from being unintentionally overwritten by a blank
// message. A new revision will have an empty log message (or $node->log).
@@ -672,7 +689,7 @@
$node = node_build_content($node, $teaser, $page);
if ($links) {
- $node->links = module_invoke_all('link', 'node', $node, !$page);
+ $node->links = module_invoke_all('link', 'node', $node, $teaser);
foreach (module_implements('link_alter') AS $module) {
$function = $module .'_link_alter';
@@ -1142,11 +1159,10 @@
foreach (node_get_types() as $type) {
if (function_exists($type->module .'_form')) {
- $name = check_plain($type->name);
$type_url_str = str_replace('_', '-', $type->type);
$items[] = array(
'path' => 'node/add/'. $type_url_str,
- 'title' => drupal_ucfirst($name),
+ 'title' => drupal_ucfirst($type->name),
'access' => node_access('create', $type->type),
);
}
@@ -1195,11 +1211,26 @@
'weight' => 1,
'type' => MENU_CALLBACK);
$revisions_access = ((user_access('view revisions') || user_access('administer nodes')) && node_access('view', $node) && db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d', arg(1))) > 1);
- $items[] = array('path' => 'node/'. arg(1) .'/revisions', 'title' => t('Revisions'),
+ $items[] = array(
+ 'path' => 'node/'. arg(1) .'/revisions',
+ 'title' => t('Revisions'),
'callback' => 'node_revisions',
'access' => $revisions_access,
'weight' => 2,
- 'type' => MENU_LOCAL_TASK);
+ 'type' => MENU_LOCAL_TASK,
+ );
+ if (!is_null(arg(3))) {
+ $items[] = array(
+ 'path' => 'node/'. arg(1) .'/revisions/'. arg(3) .'/delete',
+ 'callback' => 'node_revision_delete',
+ 'callback arguments' => array(arg(1), arg(3)),
+ );
+ $items[] = array(
+ 'path' => 'node/'. arg(1) .'/revisions/'. arg(3) .'/revert',
+ 'callback' => 'node_revision_revert',
+ 'callback arguments' => array(arg(1), arg(3)),
+ );
+ }
}
}
@@ -1213,7 +1244,6 @@
$type = node_get_types('type', $type_name);
if (!empty($type)) {
- $type->name = check_plain($type->name);
$type_url_str = str_replace('_', '-', $type->type);
$items[] = array(
@@ -1390,15 +1420,15 @@
$value = module_invoke('taxonomy', 'get_term', $value);
$value = $value->name;
}
- else if ($type == 'type') {
+ else {
+ $value = $filters[$type]['options'][$value];
+ }
+ $string = ($i++ ? '<em>and</em> where <strong>%a</strong> is <strong>%b</strong>' : '<strong>%a</strong> is <strong>%b</strong>');
+ $form['filters']['current'][] = array('#value' => t($string, array('%a' => $filters[$type]['title'] , '%b' => $value)));
+ if ($type == 'type') {
// Remove the type option if it is already being filtered on.
unset($filters['type']);
}
- else {
- $value = $filters[$type]['options'][$value];
- }
- $string = ($i++ ? '<em>and</em> where <strong>%a</strong> is <strong>%b</strong>' : '<strong>%a</strong> is <strong>%b</strong>');
- $form['filters']['current'][] = array('#value' => t($string, array('%a' => $filters[$type]['title'] , '%b' => $value)));
}
foreach ($filters as $key => $filter) {
@@ -1532,7 +1562,6 @@
}
function node_admin_nodes() {
- global $form_values;
$filter = node_build_filter_query();
$result = pager_query('SELECT n.*, u.name, u.uid FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] .' ORDER BY n.changed DESC', 50, 0, NULL, $filter['args']);
@@ -1553,7 +1582,7 @@
while ($node = db_fetch_object($result)) {
$nodes[$node->nid] = '';
$form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid) .' '. theme('mark', node_mark($node->nid, $node->changed)));
- $form['name'][$node->nid] = array('#value' => node_get_types('name', $node));
+ $form['name'][$node->nid] = array('#value' => check_plain(node_get_types('name', $node)));
$form['username'][$node->nid] = array('#value' => theme('username', $node));
$form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
$form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/'. $node->nid .'/edit', array(), $destination));
@@ -1666,9 +1695,8 @@
}
$rows[] = array_merge($row, $operations);
}
- $output .= theme('table', $header, $rows);
-
- return $output;
+
+ return theme('table', $header, $rows);
}
/**
@@ -1681,16 +1709,7 @@
$node = node_load($nid, $revision);
if ((user_access('revert revisions') || user_access('administer nodes')) && node_access('update', $node)) {
if ($node->vid) {
- $node->revision = 1;
- $node->log = t('Copy of the revision from %date.', array('%date' => format_date($node->revision_timestamp)));
- if (module_exists('taxonomy')) {
- $node->taxonomy = array_keys($node->taxonomy);
- }
-
- node_save($node);
-
- drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => format_date($node->revision_timestamp), '%title' => $node->title)));
- watchdog('content', t('@type: reverted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $revision)));
+ return drupal_get_form('node_revision_revert_confirm', $node);
}
else {
drupal_set_message(t('You tried to revert to an invalid revision.'), 'error');
@@ -1698,6 +1717,31 @@
drupal_goto('node/'. $nid .'/revisions');
}
drupal_access_denied();
+}
+
+/**
+ * Ask for confirmation of the reversion to prevent against CSRF attacks.
+ */
+function node_revision_revert_confirm($node) {
+ $form['node'] = array('#type' => 'value', '#value' => $node);
+ return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node->revision_timestamp))), 'node/'. $node->nid .'/revisions', '', t('Revert'), t('Cancel'));
+}
+
+function node_revision_revert_confirm_submit($form_id, $form_values) {
+ $node = $form_values['node'];
+
+ $node->revision = 1;
+ $node->log = t('Copy of the revision from %date.', array('%date' => format_date($node->revision_timestamp)));
+ if (module_exists('taxonomy')) {
+ $node->taxonomy = array_keys($node->taxonomy);
+ }
+
+ node_save($node);
+
+ drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => format_date($node->revision_timestamp), '%title' => $node->title)));
+ watchdog('content', t('@type: reverted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $revision)));
+
+ return 'node/'. $node->nid .'/revisions';
}
/**
@@ -1710,27 +1754,50 @@
if (node_access('delete', $node)) {
// Don't delete the current revision
if ($revision != $node->vid) {
- $node = node_load($nid, $revision);
-
- db_query("DELETE FROM {node_revisions} WHERE nid = %d AND vid = %d", $nid, $revision);
- node_invoke_nodeapi($node, 'delete revision');
- drupal_set_message(t('Deleted %title revision %revision.', array('%title' => $node->title, '%revision' => $revision)));
- watchdog('content', t('@type: deleted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $revision)));
- }
-
+ if ($node = node_load($nid, $revision)) {
+ return drupal_get_form('node_revision_delete_confirm', $node);
+ }
+ else {
+ drupal_set_message(t('Deletion failed. You tried to delete a non-existing revision.'));
+ }
+ }
else {
drupal_set_message(t('Deletion failed. You tried to delete the current revision.'));
}
+
if (db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d', $nid)) > 1) {
- drupal_goto("node/$nid/revisions");
+ drupal_goto('node/'. $nid .'/revisions');
}
else {
- drupal_goto("node/$nid");
+ drupal_goto('node/'. $nid);
}
}
}
drupal_access_denied();
+}
+
+/**
+ * Ask confirmation for revision deletion to prevent against CSRF attacks.
+ */
+function node_revision_delete_confirm($node) {
+ $form['node'] = array('#type' => 'value', '#value' => $node);
+ return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node->revision_timestamp))), 'node/'. $node->nid .'/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
+}
+
+function node_revision_delete_confirm_submit($form_id, $form_values) {
+ $node = $form_values['node'];
+ db_query("DELETE FROM {node_revisions} WHERE nid = %d AND vid = %d", $node->nid, $node->vid);
+ node_invoke_nodeapi($node, 'delete revision');
+ drupal_set_message(t('Deleted %title revision %revision.', array('%title' => $node->title, '%revision' => $node->vid)));
+ watchdog('content', t('@type: deleted %title revision %revision.', array('@type' => t($node->type), '%title' => $node->title, '%revision' => $node->vid)));
+
+ if (db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d', $node->nid)) > 1) {
+ return 'node/'. $node->nid .'/revisions';
+ }
+ else {
+ return 'node/'. $node->nid;
+ }
}
/**
@@ -1866,8 +1933,7 @@
$node->teaser = isset($node->body) ? node_teaser($node->body, isset($node->format) ? $node->format : NULL) : '';
}
- $access = user_access('administer nodes');
- if ($access) {
+ if (user_access('administer nodes')) {
// Populate the "authored by" field.
if ($account = user_load(array('name' => $node->name))) {
$node->uid = $account->uid;
@@ -1877,24 +1943,6 @@
}
$node->created = $node->date ? strtotime($node->date) : NULL;
- }
-
- // Process the workflow options and provide defaults. If the user
- // can not administer nodes, ignore the form and either use the
- // saved values if the node exists, or force the defaults.
- if (!$access && $node->nid) {
- $saved_node = node_load($node->nid);
- }
- else {
- $node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
- }
- foreach (array('status', 'promote', 'sticky', 'revision') as $key) {
- if (!$access && $node->nid) {
- $node->$key = $saved_node->$key;
- }
- else if (!isset($node->$key) || !$access) {
- $node->$key = in_array($key, $node_options);
- }
}
// Do node-type-specific validation checks.
@@ -1987,7 +2035,9 @@
$form['changed'] = array('#type' => 'hidden', '#default_value' => $node->changed);
// Get the node-specific bits.
- $form = array_merge_recursive($form, node_invoke($node, 'form', $form_values));
+ if ($extra = node_invoke($node, 'form', $form_values)) {
+ $form = array_merge_recursive($form, $extra);
+ }
if (!isset($form['title']['#weight'])) {
$form['title']['#weight'] = -5;
}
@@ -1995,16 +2045,15 @@
$node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
// If this is a new node, fill in the default values.
if (!isset($node->nid)) {
- foreach (array('status', 'promote', 'sticky', 'revision') as $key) {
+ foreach (array('status', 'promote', 'sticky') as $key) {
$node->$key = in_array($key, $node_options);
}
global $user;
$node->uid = $user->uid;
}
- else {
- // Nodes being edited should always be preset with the default revision setting.
- $node->revision = in_array('revision', $node_options);
- }
+ // Always use the default revision setting.
+ $node->revision = in_array('revision', $node_options);
+
$form['#node'] = $node;
// Add a log field if the "Create new revision" option is checked, or if the
@@ -2285,7 +2334,7 @@
return confirm_form($form,
t('Are you sure you want to delete %title?', array('%title' => $node->title)),
- $_GET['destination'] ? $_GET['destination'] : 'node/'. $node->nid,
+ isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
t('This action cannot be undone.'),
t('Delete'), t('Cancel'));
}
@@ -2355,12 +2404,6 @@
}
}
break;
- case 'revert':
- node_revision_revert(arg(1), arg(3));
- break;
- case 'delete':
- node_revision_delete(arg(1), arg(3));
- break;
}
}
drupal_not_found();
@@ -2369,7 +2412,11 @@
/**
* Menu callback; Generate a listing of promoted nodes.
*/
-function node_page_default() {
+function node_page_default($arg = NULL) {
+ // Prevent fallback to this page for node/*.
+ if (isset($arg)) {
+ return MENU_NOT_FOUND;
+ }
$result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
@@ -2394,8 +2441,8 @@
$default_message .= '<li>'. t('<strong>Create your administrator account</strong> To begin, <a href="@register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.', array('@register' => url('user/register'))) .'</li>';
}
$default_message .= '<li>'. t('<strong>Configure your website</strong> Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/settings'))) .'</li>';
- $default_message .= '<li>'. t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/build/modules'), '@download_modules' => 'http://drupal.org/project/modules')) .'</li>';
- $default_message .= '<li>'. t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes')) .'</li>';
+ $default_message .= '<li>'. t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/build/modules'), '@download_modules' => 'http://drupal.org/project/Modules')) .'</li>';
+ $default_message .= '<li>'. t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/Themes')) .'</li>';
$default_message .= '<li>'. t('<strong>Start posting content</strong> Finally, you can <a href="@content">create content</a> for your website. This message will disappear once you have promoted a post to the front page.', array('@content' => url('node/add'))) .'</li>';
$default_message .= '</ol>';
$default_message .= '<p>'. t('For more information, please refer to the <a href="@help">help section</a>, or the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a>, or view the wide range of <a href="@support">other support options</a> available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) .'</p>';
@@ -2535,7 +2582,7 @@
}
// Node types:
- $types = node_get_types('names');
+ $types = array_map('check_plain', node_get_types('names'));
$form['advanced']['type'] = array(
'#type' => 'checkboxes',
'#title' => t('Only of the type(s)'),
@@ -2546,7 +2593,7 @@
$form['advanced']['submit'] = array(
'#type' => 'submit',
'#value' => t('Advanced search'),
- '#prefix' => '<div class="action clear-block">',
+ '#prefix' => '<div class="action">',
'#suffix' => '</div>',
);
@@ -2907,7 +2954,12 @@
}
$result = db_query("SELECT nid FROM {node}");
while ($node = db_fetch_object($result)) {
- node_access_acquire_grants(node_load($node->nid));
+ $loaded_node = node_load($node->nid, NULL, TRUE);
+ // To preserve database integrity, only aquire grants if the node
+ // loads successfully.
+ if (!empty($loaded_node)) {
+ node_access_acquire_grants($loaded_node);
+ }
}
}
else {
Modified: branches/drupal-5.0/modules/path/path.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/path/path.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/path/path.info (original)
+++ branches/drupal-5.0/modules/path/path.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/path/path.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/path/path.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/path/path.module (original)
+++ branches/drupal-5.0/modules/path/path.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: path.module,v 1.105 2007/01/09 08:34:03 dries Exp $
+// $Id: path.module,v 1.105.2.1 2007/05/21 00:52:28 drumm Exp $
/**
* @file
@@ -97,7 +97,7 @@
$form['pid'] = array('#type' => 'value', '#value' => $pid);
$output = confirm_form($form,
t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
- $_GET['destination'] ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'),
+ isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'),
t('Delete'), t('Cancel') );
}
Modified: branches/drupal-5.0/modules/ping/ping.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/ping/ping.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/ping/ping.info (original)
+++ branches/drupal-5.0/modules/ping/ping.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/poll/poll.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/poll/poll.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/poll/poll.info (original)
+++ branches/drupal-5.0/modules/poll/poll.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/poll/poll.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/poll/poll.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/poll/poll.module (original)
+++ branches/drupal-5.0/modules/poll/poll.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: poll.module,v 1.222 2006/12/25 09:48:42 drumm Exp $
+// $Id: poll.module,v 1.222.2.1 2007/07/26 19:16:48 drumm Exp $
/**
* @file
@@ -354,7 +354,9 @@
$teaser = NULL;
if (is_array($node->choice)) {
foreach ($node->choice as $k => $choice) {
- $teaser .= '* '. $choice['chtext'] .'\n';
+ if ($choice['chtext'] != '') {
+ $teaser .= '* '. check_plain($choice['chtext']) ."\n";
+ }
}
}
return $teaser;
Modified: branches/drupal-5.0/modules/profile/profile.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/profile/profile.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/profile/profile.info (original)
+++ branches/drupal-5.0/modules/profile/profile.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/profile/profile.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/profile/profile.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/profile/profile.module (original)
+++ branches/drupal-5.0/modules/profile/profile.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: profile.module,v 1.189.2.1 2007/01/23 19:09:58 dries Exp $
+// $Id: profile.module,v 1.189.2.8 2007/07/26 19:16:48 drumm Exp $
/**
* @file
@@ -47,7 +47,7 @@
$output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@profile">Profile page</a>.', array('@profile' => 'http://drupal.org/handbook/modules/profile/')) .'</p>';
return $output;
case 'admin/user/profile':
- return '<p>'. t('Here you can define custom fields that users can fill in in their user profile (such as <em>country</em>, <em>real name</em>, <em>age</em>, ...).') .'</p>';
+ return '<p>'. t('Here you can define custom fields that users can fill in as part of their user profile (such as <em>country</em>, <em>real name</em>, <em>age</em>, ...).') .'</p>';
}
}
@@ -111,7 +111,7 @@
$fields = array();
$result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
- $fields[$record->name] = $record->title;
+ $fields[$record->name] = check_plain($record->title);
}
$fields['user_profile'] = t('Link to full user profile');
$form['profile_block_author_fields'] = array('#type' => 'checkboxes',
@@ -172,8 +172,9 @@
case 'register':
return profile_form_profile($edit, $user, $category, TRUE);
case 'update':
+ return profile_save_profile($edit, $user, $category);
case 'insert':
- return profile_save_profile($edit, $user, $category);
+ return profile_save_profile($edit, $user, $category, TRUE);
case 'view':
return profile_view_profile($user);
case 'form':
@@ -395,10 +396,10 @@
*/
function profile_admin_overview() {
- $result = db_query('SELECT * FROM {profile_fields} ORDER BY category, weight');
+ $result = db_query('SELECT title, name, type, category, fid FROM {profile_fields} ORDER BY category, weight');
$rows = array();
while ($field = db_fetch_object($result)) {
- $rows[] = array(check_plain($field->title), $field->name, _profile_field_types($field->type), $field->category, l(t('edit'), "admin/user/profile/edit/$field->fid"), l(t('delete'), "admin/user/profile/delete/$field->fid"));
+ $rows[] = array(check_plain($field->title), check_plain($field->name), _profile_field_types($field->type), check_plain($field->category), l(t('edit'), "admin/user/profile/edit/$field->fid"), l(t('delete'), "admin/user/profile/delete/$field->fid"));
}
if (count($rows) == 0) {
$rows[] = array(array('data' => t('No fields defined.'), 'colspan' => '6'));
@@ -432,8 +433,8 @@
drupal_not_found();
return;
}
- // Do not allow browsing of private fields by non-admins.
- if (!user_access('administer users') && $field->visibility == PROFILE_PRIVATE) {
+ // Do not allow browsing of private and hidden fields by non-admins.
+ if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_HIDDEN)) {
drupal_access_denied();
return;
}
@@ -510,7 +511,7 @@
$output .= '</div>';
$output .= theme('pager', NULL, 20);
- drupal_set_title(t('user list'));
+ drupal_set_title(t('User list'));
return $output;
}
}
@@ -524,8 +525,8 @@
}
}
-function profile_save_profile(&$edit, &$user, $category) {
- $result = _profile_get_fields($category);
+function profile_save_profile(&$edit, &$user, $category, $register = FALSE) {
+ $result = _profile_get_fields($category, $register);
while ($field = db_fetch_object($result)) {
if (_profile_field_serialize($field->type)) {
$edit[$field->name] = serialize($edit[$field->name]);
@@ -623,11 +624,11 @@
function profile_form_profile($edit, $user, $category, $register = FALSE) {
$result = _profile_get_fields($category, $register);
- $w = 0;
+ $w = 1;
while ($field = db_fetch_object($result)) {
$category = $field->category;
if (!isset($fields[$category])) {
- $fields[$category] = array('#type' => 'fieldset', '#title' => $category, '#weight' => $w++);
+ $fields[$category] = array('#type' => 'fieldset', '#title' => check_plain($category), '#weight' => $w++);
}
switch ($field->type) {
case 'textfield':
@@ -758,7 +759,7 @@
$output .= "<p>$field->value</p>\n";
}
else {
- $output .= "<p><strong>$field->title</strong><br />$field->value</p>\n";
+ $output .= '<p><strong>'. check_plain($field->title) ."</strong><br />$field->value</p>\n";
}
}
}
Modified: branches/drupal-5.0/modules/search/search.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/search/search.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/search/search.info (original)
+++ branches/drupal-5.0/modules/search/search.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/search/search.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/search/search.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/search/search.module (original)
+++ branches/drupal-5.0/modules/search/search.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: search.module,v 1.209.2.2 2007/01/29 23:36:39 drumm Exp $
+// $Id: search.module,v 1.209.2.5 2007/07/26 19:16:48 drumm Exp $
/**
* @file
@@ -211,7 +211,7 @@
}
}
$count = format_plural($remaining, 'There is 1 item left to index.', 'There are @count items left to index.');
- $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%';
+ $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) .'%';
$status = '<p><strong>'. t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) .' '. $count .'</strong></p>';
$form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status'));
$form['status']['status'] = array('#value' => $status);
@@ -363,7 +363,7 @@
// With the exception of the rules above, we consider all punctuation,
// marks, spacers, etc, to be a word boundary.
- $text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE . ']+/u', ' ', $text);
+ $text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE .']+/u', ' ', $text);
return $text;
}
@@ -974,6 +974,10 @@
* An HTML string containing the search form.
*/
function search_form($action = '', $keys = '', $type = NULL, $prompt = NULL) {
+
+ // Add CSS
+ drupal_add_css(drupal_get_path('module', 'search') .'/search.css', 'module', 'all', FALSE);
+
if (!$action) {
$action = url('search/'. $type);
}
@@ -1072,8 +1076,6 @@
* Perform a standard search on the given keys, and return the formatted results.
*/
function search_data($keys = NULL, $type = 'node') {
- // Add CSS
- drupal_add_css(drupal_get_path('module', 'search') .'/search.css', 'module', 'all', FALSE);
if (isset($keys)) {
if (module_hook($type, 'search')) {
@@ -1165,7 +1167,7 @@
// If we didn't find anything, return the beginning.
if (count($ranges) == 0) {
- return truncate_utf8($text, 256) . ' ...';
+ return truncate_utf8($text, 256) .' ...';
}
// Sort the text ranges by starting position.
@@ -1231,7 +1233,7 @@
$output = ' <dt class="title"><a href="'. check_url($item['link']) .'">'. check_plain($item['title']) .'</a></dt>';
$info = array();
if ($item['type']) {
- $info[] = $item['type'];
+ $info[] = check_plain($item['type']);
}
if ($item['user']) {
$info[] = $item['user'];
@@ -1242,7 +1244,7 @@
if (is_array($item['extra'])) {
$info = array_merge($info, $item['extra']);
}
- $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] . '</p>' : '') . '<p class="search-info">' . implode(' - ', $info) .'</p></dd>';
+ $output .= ' <dd>'. ($item['snippet'] ? '<p>'. $item['snippet'] .'</p>' : '') .'<p class="search-info">'. implode(' - ', $info) .'</p></dd>';
return $output;
}
Modified: branches/drupal-5.0/modules/statistics/statistics.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/statistics/statistics.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/statistics/statistics.info (original)
+++ branches/drupal-5.0/modules/statistics/statistics.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/system/system.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/system/system.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/system/system.info (original)
+++ branches/drupal-5.0/modules/system/system.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/system/system.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/system/system.install?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/system/system.install (original)
+++ branches/drupal-5.0/modules/system/system.install Thu Jul 26 23:49:44 2007
@@ -1,10 +1,9 @@
<?php
-// $Id: system.install,v 1.69 2007/01/10 23:22:34 unconed Exp $
+// $Id: system.install,v 1.69.2.4 2007/07/19 05:39:25 drumm Exp $
define('DRUPAL_MINIMUM_PHP', '4.3.3');
define('DRUPAL_MINIMUM_MYSQL', '3.23.17'); // If using MySQL
define('DRUPAL_MINIMUM_PGSQL', '7.3'); // If using PostgreSQL
-define('DRUPAL_MINIMUM_APACHE', '1.3'); // If using Apache
/**
* Test and report Drupal installation requirements.
@@ -24,34 +23,12 @@
);
}
- // Test web server
+ // Web server information.
$software = $_SERVER['SERVER_SOFTWARE'];
$requirements['webserver'] = array(
'title' => $t('Web server'),
'value' => $software,
);
- // Use server info string, if present.
- if ($software && preg_match('![0-9]!', $software)) {
- list($server, $version) = split('[ /]', $software);
- switch ($server) {
- case 'Apache':
- if (version_compare($version, DRUPAL_MINIMUM_APACHE) < 0) {
- $requirements['webserver']['description'] = $t('Your Apache server is too old. Drupal requires at least Apache %version.', array('%version' => DRUPAL_MINIMUM_APACHE));
- $requirements['webserver']['severity'] = REQUIREMENT_ERROR;
- }
- break;
-
- default:
- $requirements['webserver']['description'] = $t('The web server you\'re using has not been tested with Drupal and might not work properly.');
- $requirements['webserver']['severity'] = REQUIREMENT_WARNING;
- break;
- }
- }
- else {
- $requirements['webserver']['value'] = $software ? $software : $t('Unknown');
- $requirements['webserver']['description'] = $t('Unable to determine your web server type and version. Drupal might not work properly.');
- $requirements['webserver']['severity'] = REQUIREMENT_WARNING;
- }
// Test PHP version
$requirements['php'] = array(
@@ -551,6 +528,7 @@
data longtext,
PRIMARY KEY (uid),
UNIQUE KEY name (name),
+ KEY created (created),
KEY access (access)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
@@ -674,7 +652,6 @@
db_query("CREATE TABLE {boxes} (
bid serial,
- title varchar(64) NOT NULL default '',
body text,
info varchar(128) NOT NULL default '',
format smallint NOT NULL default '0',
@@ -1019,6 +996,7 @@
UNIQUE (name)
)");
db_query("CREATE INDEX {users}_access_idx ON {users} (access)");
+ db_query("CREATE INDEX {users}_created_idx ON {users} (created)");
db_query("CREATE TABLE {users_roles} (
uid int_unsigned NOT NULL default '0',
@@ -1075,8 +1053,8 @@
db_query("INSERT INTO {users} (uid,name,mail) VALUES(0,'','')");
- db_query("INSERT INTO {role} (name) VALUES ('anonymous user')");
- db_query("INSERT INTO {role} (name) VALUES ('authenticated user')");
+ db_query("INSERT INTO {role} (rid, name) VALUES (". DRUPAL_ANONYMOUS_RID .", 'anonymous user')");
+ db_query("INSERT INTO {role} (rid, name) VALUES (". DRUPAL_AUTHENTICATED_RID .", 'authenticated user')");
db_query("INSERT INTO {permission} VALUES (1,'access content',0)");
db_query("INSERT INTO {permission} VALUES (2,'access comments, access content, post comments, post comments without approval',0)");
@@ -3510,6 +3488,35 @@
/**
+ * @defgroup updates-5.x-extra Extra system updates for 5.x
+ * @{
+ */
+
+/**
+ * Add index on users created column.
+ */
+function system_update_1022() {
+ $ret = array();
+ switch ($GLOBALS['db_type']) {
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql('ALTER TABLE {users} ADD KEY created (created)');
+ break;
+
+ case 'pgsql':
+ $ret[] = update_sql("CREATE INDEX {users}_created_idx ON {users} (created)");
+ break;
+ }
+ // Also appears as system_update_2004(). Ensure we don't update twice.
+ variable_set('system_update_1022', TRUE);
+ return $ret;
+}
+
+/**
+ * @} End of "defgroup updates-5.x-extra"
+ */
+
+/**
* @defgroup updates-5.0-to-x.x System updates from 5.0 to x.x
* @{
* @todo Start this series of updates at 2000.
Modified: branches/drupal-5.0/modules/system/system.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/system/system.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/system/system.module (original)
+++ branches/drupal-5.0/modules/system/system.module Thu Jul 26 23:49:44 2007
@@ -1,12 +1,12 @@
<?php
-// $Id: system.module,v 1.440.2.4 2007/01/29 21:51:53 drumm Exp $
+// $Id: system.module,v 1.440.2.15 2007/07/26 19:16:48 drumm Exp $
/**
* @file
* Configuration system that lets administrators modify the workings of the site.
*/
-define('VERSION', '5.1');
+define('VERSION', '5.2');
/**
* Implementation of hook_help().
@@ -29,8 +29,8 @@
return '<p>'. t('Select which themes are available to your users and specify the default theme. To configure site-wide display settings, click the "configure" task above. Alternately, to override these settings in a specific theme, click the "configure" link for the corresponding theme. Note that different themes may have different regions available for rendering content like blocks. If you want consistency in what your users see, you may wish to enable only one theme.') .'</p>';
case 'admin/build/themes/settings':
return '<p>'. t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') .'</p>';
- case 'admin/build/themes/settings/'. arg(3):
- $reference = explode('.', arg(3), 2);
+ case 'admin/build/themes/settings/'. arg(4):
+ $reference = explode('.', arg(4), 2);
$theme = array_pop($reference);
return '<p>'. t('These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="@global">global settings</a> for this theme.', array('%template' => $theme, '@global' => url('admin/build/themes/settings'))) .'</p>';
case 'admin/build/modules':
@@ -547,7 +547,8 @@
'#type' => 'textfield',
'#title' => t('E-mail address'),
'#default_value' => variable_get('site_mail', ini_get('sendmail_from')),
- '#description' => t('A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.')
+ '#description' => t('A valid e-mail address to be used as the "From" address by the auto-mailer during registration, new password requests, notifications, etc. To lessen the likelihood of e-mail being marked as spam, this e-mail address should use the same domain as the website.'),
+ '#required' => TRUE,
);
$form['site_slogan'] = array(
'#type' => 'textfield',
@@ -697,7 +698,7 @@
$form['bandwidth_optimizations']['preprocess_css'] = array(
'#type' => 'radios',
'#title' => t('Aggregate and compress CSS files'),
- '#default_value' => variable_get('preprocess_css', FALSE) && $is_writable,
+ '#default_value' => intval(variable_get('preprocess_css', FALSE) && $is_writable),
'#disabled' => !$is_writable,
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t("Some Drupal modules include their own CSS files. When these modules are enabled, each module's CSS file adds an additional HTTP request to the page, which can increase the load time of each page. These HTTP requests can also slightly increase server load. It is recommended to only turn this option on when your site is in production, as it can interfere with theme development. This option is disabled if you have not set up your files directory, or if your download method is set to private."),
@@ -1233,7 +1234,7 @@
* Modules can be enabled or disabled and set for throttling if the throttle module is enabled.
* The list of modules gets populated by module.info files, which contain each module's name,
* description and dependencies.
- * @sa _module_parse_info_file for information on module.info descriptors.
+ * @see _module_parse_info_file for information on module.info descriptors.
*
* Dependency checking is performed to ensure that a module cannot be enabled if the module has
* disabled dependencies and also to ensure that the module cannot be disabled if the module has
@@ -1541,7 +1542,7 @@
$modules = $form['validation_modules']['#value'];
foreach ($modules as $module) {
if (!isset($module->info['package']) || !$module->info['package']) {
- $module->info['package'] = 'Other';
+ $module->info['package'] = t('Other');
}
$packages[$module->info['package']][$module->name] = $module->info;
}
@@ -2010,7 +2011,7 @@
'#suffix' => '</div>',
);
foreach ($node_types as $type => $name) {
- $form['node_info']["toggle_node_info_$type"] = array('#type' => 'checkbox', '#title' => $name, '#default_value' => $settings["toggle_node_info_$type"]);
+ $form['node_info']["toggle_node_info_$type"] = array('#type' => 'checkbox', '#title' => check_plain($name), '#default_value' => $settings["toggle_node_info_$type"]);
}
}
}
@@ -2046,8 +2047,11 @@
// Icon settings
if ((!$key) || in_array('toggle_favicon', $features)) {
- $form['favicon'] = array('#type' => 'fieldset', '#title' => t('Shortcut icon settings'));
- $form['favicon']['text'] = array('#value' => t('Your shortcut icon or \'favicon\' is displayed in the address bar and bookmarks of most browsers.'));
+ $form['favicon'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Shortcut icon settings'),
+ '#description' => t("Your shortcut icon or 'favicon' is displayed in the address bar and bookmarks of most browsers.")
+ );
$form['favicon']['default_favicon'] = array(
'#type' => 'checkbox',
'#title' => t('Use the default shortcut icon.'),
@@ -2152,6 +2156,7 @@
$cancel = l($no ? $no : t('Cancel'), $path, array(), $query, $fragment);
drupal_set_title($question);
+
$form['#attributes'] = array('class' => 'confirmation');
$form['description'] = array('#value' => $description);
$form[$name] = array('#type' => 'hidden', '#value' => 1);
Modified: branches/drupal-5.0/modules/taxonomy/taxonomy.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/taxonomy/taxonomy.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/taxonomy/taxonomy.info (original)
+++ branches/drupal-5.0/modules/taxonomy/taxonomy.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/taxonomy/taxonomy.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/taxonomy/taxonomy.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/taxonomy/taxonomy.module (original)
+++ branches/drupal-5.0/modules/taxonomy/taxonomy.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: taxonomy.module,v 1.330.2.2 2007/01/25 21:51:36 dries Exp $
+// $Id: taxonomy.module,v 1.330.2.10 2007/07/26 19:16:49 drumm Exp $
/**
* @file
@@ -152,7 +152,7 @@
$types = array();
foreach ($vocabulary->nodes as $type) {
$node_type = node_get_types('name', $type);
- $types[] = $node_type ? $node_type : $type;
+ $types[] = $node_type ? check_plain($node_type) : check_plain($type);
}
$rows[] = array('name' => check_plain($vocabulary->name),
'type' => implode(', ', $types),
@@ -188,28 +188,42 @@
$page_increment = 25; // number of tids per page
$displayed_count = 0; // number of tids shown
- $tree = taxonomy_get_tree($vocabulary->vid);
- foreach ($tree as $term) {
- $total_entries++; // we're counting all-totals, not displayed
- if (($start_from && ($start_from * $page_increment) >= $total_entries) || ($displayed_count == $page_increment)) {
- continue;
- }
- $rows[] = array(str_repeat('--', $term->depth) .' '. l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination));
- $displayed_count++; // we're counting tids displayed
- }
-
- if (!$rows) {
- $rows[] = array(array('data' => t('No terms available.'), 'colspan' => '2'));
- }
-
- $GLOBALS['pager_page_array'][] = $start_from; // FIXME
- $GLOBALS['pager_total'][] = intval($total_entries / $page_increment) + 1; // FIXME
-
- if ($total_entries >= $page_increment) {
- $rows[] = array(array('data' => theme('pager', NULL, $page_increment), 'colspan' => '2'));
- }
-
- return theme('table', $header, $rows, array('id' => 'taxonomy'));
+ if ($vocabulary->tags) {
+ // We are not calling taxonomy_get_tree because that might fail with a big
+ // number of tags in the freetagging vocabulary.
+ $results = pager_query(db_rewrite_sql('SELECT t.*, h.parent FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d ORDER BY weight, name', 't', 'tid'), $page_increment, 0, NULL, $vid);
+ while ($term = db_fetch_object($results)) {
+ $rows[] = array(
+ l($term->name, "taxonomy/term/$term->tid"),
+ l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination),
+ );
+ }
+ }
+ else {
+ $tree = taxonomy_get_tree($vocabulary->vid);
+ foreach ($tree as $term) {
+ $total_entries++; // we're counting all-totals, not displayed
+ if (($start_from && ($start_from * $page_increment) >= $total_entries) || ($displayed_count == $page_increment)) {
+ continue;
+ }
+ $rows[] = array(str_repeat('--', $term->depth) .' '. l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination));
+ $displayed_count++; // we're counting tids displayed
+ }
+
+ if (!$rows) {
+ $rows[] = array(array('data' => t('No terms available.'), 'colspan' => '2'));
+ }
+
+ $GLOBALS['pager_page_array'][] = $start_from; // FIXME
+ $GLOBALS['pager_total'][] = intval($total_entries / $page_increment) + 1; // FIXME
+ }
+
+ $output .= theme('table', $header, $rows, array('id' => 'taxonomy'));
+ if ($vocabulary->tags || $total_entries >= $page_increment) {
+ $output .= theme('pager', NULL, $page_increment);
+ }
+
+ return $output;
}
/**
@@ -230,13 +244,14 @@
);
$form['help'] = array('#type' => 'textfield',
'#title' => t('Help text'),
+ '#maxlength' => 255,
'#default_value' => $edit['help'],
'#description' => t('Instructions to present to the user when choosing a term.'),
);
$form['nodes'] = array('#type' => 'checkboxes',
'#title' => t('Types'),
'#default_value' => $edit['nodes'],
- '#options' => node_get_types('names'),
+ '#options' => array_map('check_plain', node_get_types('names')),
'#description' => t('A list of node types you want to associate with this vocabulary.'),
'#required' => TRUE,
);
@@ -290,9 +305,11 @@
switch (taxonomy_save_vocabulary($form_values)) {
case SAVED_NEW:
drupal_set_message(t('Created new vocabulary %name.', array('%name' => $form_values['name'])));
+ watchdog('taxonomy', t('Created new vocabulary %name.', array('%name' => $form_values['name'])), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_values['vid']));
break;
case SAVED_UPDATED:
drupal_set_message(t('Updated vocabulary %name.', array('%name' => $form_values['name'])));
+ watchdog('taxonomy', t('Updated vocabulary %name.', array('%name' => $form_values['name'])), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/vocabulary/'. $form_values['vid']));
break;
}
return 'admin/content/taxonomy';
@@ -371,11 +388,13 @@
function taxonomy_vocabulary_confirm_delete_submit($form_id, $form_values) {
$status = taxonomy_del_vocabulary($form_values['vid']);
drupal_set_message(t('Deleted vocabulary %name.', array('%name' => $form_values['name'])));
+ watchdog('taxonomy', t('Deleted vocabulary %name.', array('%name' => $form_values['name'])), WATCHDOG_NOTICE);
return 'admin/content/taxonomy';
}
function taxonomy_form_term($vocabulary_id, $edit = array()) {
$vocabulary = taxonomy_get_vocabulary($vocabulary_id);
+ drupal_set_title(check_plain($vocabulary->name));
$form['name'] = array(
'#type' => 'textfield',
@@ -452,9 +471,11 @@
switch (taxonomy_save_term($form_values)) {
case SAVED_NEW:
drupal_set_message(t('Created new term %term.', array('%term' => $form_values['name'])));
+ watchdog('taxonomy', t('Created new term %term.', array('%term' => $form_values['name'])), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_values['tid']));
break;
case SAVED_UPDATED:
- drupal_set_message(t('The term %term has been updated.', array('%term' => $form_values['name'])));
+ drupal_set_message(t('Updated term %term.', array('%term' => $form_values['name'])));
+ watchdog('taxonomy', t('Updated term %term.', array('%term' => $form_values['name'])), WATCHDOG_NOTICE, l(t('edit'), 'admin/content/taxonomy/edit/term/'. $form_values['tid']));
break;
}
return 'admin/content/taxonomy';
@@ -591,6 +612,7 @@
function taxonomy_term_confirm_delete_submit($form_id, $form_values) {
taxonomy_del_term($form_values['tid']);
drupal_set_message(t('Deleted term %name.', array('%name' => $form_values['name'])));
+ watchdog('taxonomy', t('Deleted term %name.', array('%name' => $form_values['name'])), WATCHDOG_NOTICE);
return 'admin/content/taxonomy';
}
@@ -619,7 +641,7 @@
foreach ($vocabularies as $vid => $vocabulary) {
if ($vocabulary->tags && !$free_tags) { continue; }
$tree = taxonomy_get_tree($vid);
- if ($tree && (count($tree) > 1)) {
+ if ($tree && (count($tree) > 0)) {
$options[$vocabulary->name] = array();
foreach ($tree as $term) {
$options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
@@ -756,14 +778,14 @@
function taxonomy_node_get_terms($nid, $key = 'tid') {
static $terms;
- if (!isset($terms[$nid])) {
+ if (!isset($terms[$nid][$key])) {
$result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $nid);
- $terms[$nid] = array();
+ $terms[$nid][$key] = array();
while ($term = db_fetch_object($result)) {
- $terms[$nid][$term->$key] = $term;
- }
- }
- return $terms[$nid];
+ $terms[$nid][$key][$term->$key] = $term;
+ }
+ }
+ return $terms[$nid][$key];
}
/**
@@ -1258,6 +1280,7 @@
* taxonomy_select_nodes(), and formats each node along with a pager.
*/
function taxonomy_render_nodes($result) {
+ $output = '';
if (db_num_rows($result) > 0) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load($node->nid), 1);
Modified: branches/drupal-5.0/modules/throttle/throttle.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/throttle/throttle.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/throttle/throttle.info (original)
+++ branches/drupal-5.0/modules/throttle/throttle.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/tracker/tracker.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/tracker/tracker.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/tracker/tracker.info (original)
+++ branches/drupal-5.0/modules/tracker/tracker.info Thu Jul 26 23:49:44 2007
@@ -1,10 +1,12 @@
-; $Id: tracker.info,v 1.3 2006/11/21 20:55:35 dries Exp $
+; $Id: tracker.info,v 1.3.2.1 2007/07/09 03:33:58 drumm Exp $
name = Tracker
description = Enables tracking of recent posts for users.
+dependencies = comment
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/tracker/tracker.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/tracker/tracker.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/tracker/tracker.module (original)
+++ branches/drupal-5.0/modules/tracker/tracker.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: tracker.module,v 1.143 2007/01/10 15:17:51 dries Exp $
+// $Id: tracker.module,v 1.143.2.2 2007/07/26 19:16:50 drumm Exp $
/**
* @file
@@ -96,7 +96,7 @@
while ($node = db_fetch_object($result)) {
// Determine the number of comments:
$comments = 0;
- if (module_exists('comment') && $node->comment_count) {
+ if ($node->comment_count) {
$comments = $node->comment_count;
if ($new = comment_num_new($node->nid)) {
@@ -106,7 +106,7 @@
}
$rows[] = array(
- node_get_types('name', $node->type),
+ check_plain(node_get_types('name', $node->type)),
l($node->title, "node/$node->nid") .' '. theme('mark', node_mark($node->nid, $node->changed)),
theme('username', $node),
array('class' => 'replies', 'data' => $comments),
Modified: branches/drupal-5.0/modules/upload/upload.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/upload/upload.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/upload/upload.info (original)
+++ branches/drupal-5.0/modules/upload/upload.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - optional
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/upload/upload.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/upload/upload.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/upload/upload.module (original)
+++ branches/drupal-5.0/modules/upload/upload.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: upload.module,v 1.148 2007/01/15 11:22:34 unconed Exp $
+// $Id: upload.module,v 1.148.2.1 2007/03/07 03:27:24 drumm Exp $
/**
* @file
@@ -582,8 +582,10 @@
$header = array(t('Attachment'), t('Size'));
$rows = array();
foreach ($files as $file) {
- if ($file->list) {
- $href = $file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path()));
+ $file = (object)$file;
+ if ($file->list && !$file->remove) {
+ // Generate valid URL for both existing attachments and preview of new attachments (these have 'upload' in fid)
+ $href = file_create_url((strpos($file->fid, 'upload') === FALSE ? $file->filepath : file_create_filename($file->filename, file_create_path())));
$text = $file->description ? $file->description : $file->filename;
$rows[] = array(l($text, $href), format_size($file->filesize));
}
@@ -771,6 +773,7 @@
$form['files']['#theme'] = 'upload_form_current';
$form['files']['#tree'] = TRUE;
foreach ($node->files as $key => $file) {
+ // Generate valid URL for both existing attachments and preview of new attachments (these have 'upload' in fid)
$description = file_create_url((strpos($file->fid, 'upload') === FALSE ? $file->filepath : file_create_filename($file->filename, file_create_path())));
$description = "<small>". check_plain($description) ."</small>";
$form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => (strlen($file->description)) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description );
Modified: branches/drupal-5.0/modules/user/user.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/user/user.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/user/user.info (original)
+++ branches/drupal-5.0/modules/user/user.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/modules/user/user.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/user/user.module?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/user/user.module (original)
+++ branches/drupal-5.0/modules/user/user.module Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: user.module,v 1.745.2.1 2007/01/29 19:08:46 dries Exp $
+// $Id: user.module,v 1.745.2.13 2007/07/26 19:16:50 drumm Exp $
/**
* @file
@@ -152,6 +152,13 @@
// Delete a blocked user's sessions to kick them if they are online.
if (isset($array['status']) && $array['status'] == 0) {
sess_destroy_uid($account->uid);
+ }
+
+ // If the password changed, delete all open sessions and recreate
+ // the current one.
+ if (isset($array['pass'])) {
+ sess_destroy_uid($account->uid);
+ sess_regenerate();
}
// Refresh user object
@@ -295,7 +302,7 @@
$form_values['picture'] = $file->filepath;
}
else {
- form_set_error('picture_upload', t("Failed to upload the picture image; the %directory directory doesn't exist.", array('%directory' => variable_get('user_picture_path', 'pictures'))));
+ form_set_error('picture_upload', t("Failed to upload the picture image; the %directory directory doesn't exist or is not writable.", array('%directory' => variable_get('user_picture_path', 'pictures'))));
}
}
}
@@ -434,7 +441,7 @@
$find = array();
// Replace wildcards with MySQL/PostgreSQL wildcards.
$keys = preg_replace('!\*+!', '%', $keys);
- $result = pager_query("SELECT * FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
+ $result = pager_query("SELECT name, uid FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
while ($account = db_fetch_object($result)) {
$find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, NULL, NULL, TRUE));
}
@@ -575,13 +582,13 @@
case 3:
if (user_access('access content')) {
- // Count users with activity in the past defined period.
+ // Count users active within the defined period.
$interval = time() - variable_get('user_block_seconds_online', 900);
// Perform database queries to gather online user lists. We use s.timestamp
- // rather than u.access because it is much faster is much faster..
+ // rather than u.access because it is much faster.
$anonymous_count = sess_count($interval);
- $authenticated_users = db_query('SELECT u.uid, u.name FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
+ $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
$authenticated_count = db_num_rows($authenticated_users);
// Format the output with proper grammar.
@@ -649,7 +656,7 @@
$output .= theme('user_picture', $account);
foreach ($fields as $category => $items) {
if (strlen($category) > 0) {
- $output .= '<h2 class="title">'. $category .'</h2>';
+ $output .= '<h2 class="title">'. check_plain($category) .'</h2>';
}
$output .= '<dl>';
foreach ($items as $item) {
@@ -919,17 +926,17 @@
if ($form_values['name']) {
if (user_is_blocked($form_values['name'])) {
// blocked in user administration
- form_set_error('login', t('The username %name has not been activated or is blocked.', array('%name' => $form_values['name'])));
+ form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_values['name'])));
}
else if (drupal_is_denied('user', $form_values['name'])) {
// denied by access controls
- form_set_error('login', t('The name %name is a reserved username.', array('%name' => $form_values['name'])));
+ form_set_error('name', t('The name %name is a reserved username.', array('%name' => $form_values['name'])));
}
else if ($form_values['pass']) {
$user = user_authenticate($form_values['name'], trim($form_values['pass']));
if (!$user->uid) {
- form_set_error('login', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password'))));
+ form_set_error('name', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password'))));
watchdog('user', t('Login attempt failed for %user.', array('%user' => $form_values['name'])));
}
}
@@ -1256,7 +1263,9 @@
$body = _user_mail_text('welcome_body', $variables);
drupal_mail('user-register-welcome', $mail, $subject, $body, $from);
user_authenticate($account->name, trim($pass));
- drupal_goto();
+ $edit = array();
+ user_module_invoke('login', $edit, $account);
+ return '';
}
else if ($account->status || $notify) {
// Create new user account, no administrator approval required.
@@ -1408,7 +1417,7 @@
$edit = $_POST['op'] ? $_POST : (array)$account;
if (arg(2) == 'delete') {
- if ($edit['confirm']) {
+ if (!empty($edit['confirm'])) {
user_delete($edit, $account->uid);
drupal_goto('admin/user/user');
}
@@ -2359,7 +2368,7 @@
return '<p>'. t('Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.') .'</p>';
case 'admin/user/user/create':
case 'admin/user/user/account/create':
- return '<p>'. t('This web page allows the administrators to register a new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.') .'</p>';
+ return '<p>'. t('This web page allows the administrators to register new users by hand. Note that you cannot have a user where either the e-mail address or the username match another user in the system.') .'</p>';
case 'admin/user/rules':
return '<p>'. t('Set up username and e-mail address access rules for new <em>and</em> existing accounts (currently logged in accounts will not be logged out). If a username or e-mail address for an account matches any deny rule, but not an allow rule, then the account will not be allowed to be created or to log in. A host rule is effective for every page view, not just registrations.') .'</p>';
case 'admin/user/access':
Modified: branches/drupal-5.0/modules/watchdog/watchdog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/modules/watchdog/watchdog.info?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/modules/watchdog/watchdog.info (original)
+++ branches/drupal-5.0/modules/watchdog/watchdog.info Thu Jul 26 23:49:44 2007
@@ -4,7 +4,8 @@
package = Core - required
version = VERSION
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.1"
+; Information added by drupal.org packaging script on 2007-07-26
+version = "5.2"
project = "drupal"
+datestamp = "1185477907"
Modified: branches/drupal-5.0/profiles/default/default.profile
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/profiles/default/default.profile?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/profiles/default/default.profile (original)
+++ branches/drupal-5.0/profiles/default/default.profile Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: default.profile,v 1.4 2007/01/13 10:21:32 unconed Exp $
+// $Id: default.profile,v 1.4.2.1 2007/03/25 22:59:33 drumm Exp $
/**
* Return an array of the modules to be enabled when this profile is installed.
@@ -33,6 +33,9 @@
*/
function default_profile_final() {
// Insert default user-defined node types into the database.
+ // For a complete list of available node type attributes, refer to the node
+ // type API documentation at:
+ // http://api.drupal.org/api/HEAD/function/hook_node_info
$types = array(
array(
'type' => 'page',
Modified: branches/drupal-5.0/robots.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/robots.txt?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/robots.txt (original)
+++ branches/drupal-5.0/robots.txt Thu Jul 26 23:49:44 2007
@@ -1,4 +1,4 @@
-# $Id: robots.txt,v 1.7 2007/01/08 12:02:18 dries Exp $
+# $Id: robots.txt,v 1.7.2.1 2007/03/23 18:57:07 drumm Exp $
#
# robots.txt
#
@@ -34,6 +34,7 @@
Disallow: /cron.php
Disallow: /update.php
Disallow: /install.php
+Disallow: /INSTALL.txt
Disallow: /INSTALL.mysql.txt
Disallow: /INSTALL.pgsql.txt
Disallow: /CHANGELOG.txt
Modified: branches/drupal-5.0/sites/default/settings.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/sites/default/settings.php?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/sites/default/settings.php (original)
+++ branches/drupal-5.0/sites/default/settings.php Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: settings.php,v 1.39 2007/01/14 02:05:15 unconed Exp $
+// $Id: settings.php,v 1.39.2.3 2007/07/09 04:28:12 drumm Exp $
/**
* @file
@@ -137,17 +137,14 @@
ini_set('url_rewriter.tags', '');
/**
- * We try to set the correct cookie domain. If you are experiencing problems
- * try commenting out the code below or specifying the cookie domain by hand.
+ * Drupal automatically generates a unique session cookie name for each site
+ * based on on its full domain name. If you have multiple domains pointing at
+ * the same Drupal site, you can either redirect them all to a single domain
+ * (see comment in .htaccess), or uncomment the line below and specify their
+ * shared base domain. Doing so assures that users remain logged in as they
+ * cross between your various domains.
*/
-if (isset($_SERVER['HTTP_HOST'])) {
- $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
- // Per RFC 2109, cookie domains must contain at least one dot other than the
- // first. For hosts such as 'localhost', we don't set a cookie domain.
- if (count(explode('.', $domain)) > 2) {
- ini_set('session.cookie_domain', $domain);
- }
-}
+# $cookie_domain = 'example.com';
/**
* Variable overrides:
Modified: branches/drupal-5.0/themes/chameleon/chameleon.theme
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/chameleon/chameleon.theme?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/chameleon/chameleon.theme (original)
+++ branches/drupal-5.0/themes/chameleon/chameleon.theme Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: chameleon.theme,v 1.56 2006/11/29 06:36:12 drumm Exp $
+// $Id: chameleon.theme,v 1.56.2.2 2007/05/31 06:13:36 drumm Exp $
/**
* @file
@@ -138,7 +138,15 @@
$output .= " </div>\n";
- $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('#title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small')))) : array();
+ if (theme_get_setting("toggle_node_info_$node->type")) {
+ $submitted['node_submitted'] = array(
+ 'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
+ 'html' => TRUE,
+ );
+ }
+ else {
+ $submitted['node_submitted'] = array();
+ }
$terms = array();
if (module_exists('taxonomy')) {
@@ -159,7 +167,10 @@
}
function chameleon_comment($comment, $links = "") {
- $submitted['comment_submitted'] = array('#title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))));
+ $submitted['comment_submitted'] = array(
+ 'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))),
+ 'html' => TRUE,
+ );
$output = "<div class=\"comment". ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') ."\">\n";
$output .= " <h3 class=\"title\">". l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") ."</h3>\n";
@@ -175,5 +186,3 @@
return '<div class="help">'. $help .'</div><hr />';
}
}
-
-?>
Modified: branches/drupal-5.0/themes/engines/phptemplate/phptemplate.engine
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/engines/phptemplate/phptemplate.engine?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/engines/phptemplate/phptemplate.engine (original)
+++ branches/drupal-5.0/themes/engines/phptemplate/phptemplate.engine Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: phptemplate.engine,v 1.54 2006/12/30 20:59:11 drumm Exp $
+// $Id: phptemplate.engine,v 1.54.2.2 2007/05/31 06:21:32 drumm Exp $
/**
* @file
@@ -159,9 +159,8 @@
drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
}
- /**
- * Populate sidebars.
- */
+ // Populate sidebars
+ $layout = 'none';
if ($show_blocks) {
global $sidebar_indicator;
/**
@@ -179,9 +178,6 @@
$layout = ($layout == 'left') ? 'both' : 'right';
}
$sidebar_indicator = NULL;
- }
- else {
- $layout = 'none';
}
// Construct page title
@@ -254,7 +250,7 @@
return _phptemplate_callback('page', $variables, $suggestions);
}
-/*
+/**
* Prepare the values passed to the theme_node function to be passed
* into a pluggable template engine.
*/
Modified: branches/drupal-5.0/themes/garland/fix-ie.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/garland/fix-ie.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/garland/fix-ie.css (original)
+++ branches/drupal-5.0/themes/garland/fix-ie.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: fix-ie.css,v 1.3.2.1 2007/04/18 03:38:59 drumm Exp $ */
+
/**
* Themetastic, for Drupal 5.0
* Stefan Nagtegaal, iStyledThis [dot] nl
Modified: branches/drupal-5.0/themes/garland/minnelli/style.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/garland/minnelli/style.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/garland/minnelli/style.css (original)
+++ branches/drupal-5.0/themes/garland/minnelli/style.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: style.css,v 1.3.2.1 2007/04/18 03:38:59 drumm Exp $ */
+
/**
* Minnelli, for Drupal 5.0
* Stefan Nagtegaal, iStyledThis [dot] nl
Modified: branches/drupal-5.0/themes/garland/print.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/garland/print.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/garland/print.css (original)
+++ branches/drupal-5.0/themes/garland/print.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: print.css,v 1.1.2.1 2007/04/18 03:38:59 drumm Exp $ */
+
/**
* Themetastic, for Drupal 5.0
* Stefan Nagtegaal, iStyledThis [dot] nl
Modified: branches/drupal-5.0/themes/garland/style.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/garland/style.css?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/garland/style.css (original)
+++ branches/drupal-5.0/themes/garland/style.css Thu Jul 26 23:49:44 2007
@@ -1,3 +1,5 @@
+/* $Id: style.css,v 1.14.2.4 2007/07/09 03:50:59 drumm Exp $ */
+
/**
* Garland, for Drupal 5.0
* Stefan Nagtegaal, iStyledThis [dot] nl
@@ -289,6 +291,11 @@
margin-bottom: 0;
}
+/* Avoid displaying content of script tags */
+#header-region script {
+ display: none;
+}
+
#header-region p, #header-region img {
margin-top: 0.5em;
}
@@ -342,7 +349,7 @@
body.sidebars {
min-width: 980px;
}
-/* With 2 columsn, require a minimum width of 800px. */
+/* With 2 columns, require a minimum width of 800px. */
body.sidebar-left, body.sidebar-right {
min-width: 780px;
}
@@ -783,6 +790,11 @@
padding: 1em;
border: 1px solid #d9eaf5;
background: #fff url(images/gradient-inner.png) repeat-x 0 0;
+}
+
+fieldset legend {
+ /* Fix disappearing legend in FFox */
+ display: block;
}
html.js fieldset.collapsed {
Modified: branches/drupal-5.0/themes/garland/template.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/themes/garland/template.php?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/themes/garland/template.php (original)
+++ branches/drupal-5.0/themes/garland/template.php Thu Jul 26 23:49:44 2007
@@ -1,4 +1,6 @@
<?php
+// $Id: template.php,v 1.4.2.1 2007/04/18 03:38:59 drumm Exp $
+
/**
* Sets the body-tag class attribute.
*
Modified: branches/drupal-5.0/update.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal-5.0/update.php?rev=1797&op=diff
==============================================================================
--- branches/drupal-5.0/update.php (original)
+++ branches/drupal-5.0/update.php Thu Jul 26 23:49:44 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: update.php,v 1.211 2006/12/25 21:22:03 drumm Exp $
+// $Id: update.php,v 1.211.2.2 2007/04/08 00:54:04 drumm Exp $
/**
* @file
@@ -391,7 +391,9 @@
}
// Keep track of total number of updates
- $_SESSION['update_total'] = count($_SESSION['update_remaining']);
+ if (isset($_SESSION['update_remaining'])) {
+ $_SESSION['update_total'] = count($_SESSION['update_remaining']);
+ }
if ($_POST['has_js']) {
return update_progress_page();
@@ -510,8 +512,8 @@
function update_finished_page($success) {
drupal_set_title('Drupal database update');
// NOTE: we can't use l() here because the URL would point to 'update.php?q=admin'.
- $links[] = '<a href="'. base_path() .'">main page</a>';
- $links[] = '<a href="'. base_path() .'?q=admin">administration pages</a>';
+ $links[] = '<a href="'. base_path() .'">Main page</a>';
+ $links[] = '<a href="'. base_path() .'?q=admin">Administration pages</a>';
// Report end result
if ($success) {
@@ -529,7 +531,7 @@
$output .= theme('item_list', $links);
// Output a list of queries executed
- if ($_SESSION['update_results']) {
+ if (!empty($_SESSION['update_results'])) {
$output .= '<div id="update-results">';
$output .= '<h2>The following queries were executed</h2>';
foreach ($_SESSION['update_results'] as $module => $updates) {
More information about the Pkg-drupal-commits
mailing list