diff -urN modulesold\devel\devel.module modules\devel\devel.module
--- modulesold\devel\devel.module Mon Sep 05 10:00:10 2005
+++ modules\devel\devel.module Fri Sep 09 21:56:11 2005
@@ -21,6 +21,19 @@
}
/**
+ * Implementation of timer_read for versions not having it.
+ * @return float Time elapsed
+ */
+if (!function_exists('timer_read'))
+ {
+ function timer_read() {
+ global $timer;
+ list($usec, $sec) = explode(' ', microtime());
+ return (float)$usec + (float)$sec - $timer ;
+ }
+ }
+
+/**
* Implementation of hook_menu().
*/
function devel_menu($may_cache) {
@@ -78,16 +91,17 @@
}
}
- if (function_exists('drupal_get_headers') && strstr(drupal_get_headers(), 'xml')) {
- $is_xml = TRUE;
- };
- if (user_access('access devel information') && !$is_xml) { // try not to break the xml pages
+ $is_xml = function_exists('drupal_get_headers') && strstr(drupal_get_headers(), 'xml') ;
+
+ if (user_access('access devel information') && !$is_xml) { // try not to break the xml pages
// Query log off, timer on
if (!variable_get('dev_query', 0) && variable_get('dev_timer', 0)) {
$output = '
'. devel_timer() .'
';
}
// Query log on
+ $sum = 0 ;
+ if (!isset ($output)) $output = '' ;
if (variable_get('dev_query', 0)) {
foreach ($queries as $query) {
$text[] = $query[0];
diff -urN modulesold\filter.module modules\filter.module
--- modulesold\filter.module Fri Sep 09 21:35:14 2005
+++ modules\filter.module Fri Sep 09 21:39:39 2005
@@ -626,7 +626,7 @@
function filter_list_format($format) {
static $filters = array();
- if (!is_array($filters[$format]))
+ if ((!isset ($filters[$format])) || (!is_array($filters[$format])))
{
$filters[$format] = array();
$result = db_query("SELECT * FROM {filters} WHERE format = %d ORDER BY weight ASC", $format);
diff -urN modulesold\node.module modules\node.module
--- modulesold\node.module Fri Sep 09 21:36:39 2005
+++ modules\node.module Fri Sep 09 21:39:58 2005
@@ -1644,8 +1644,8 @@
* Menu callback; dispatches control to the appropriate operation handler.
*/
function node_page() {
- $op = $_POST['op'] ? $_POST['op'] : arg(1);
- $edit = $_POST['edit'];
+ $op = isset($_POST['op']) ? $_POST['op'] : arg(1);
+ $edit = isset($_POST['edit']) ? $_POST['edit'] : '' ;
if (is_numeric($op)) {
$op = (arg(2) && !is_numeric(arg(2))) ? arg(2) : 'view';
@@ -1964,7 +1964,7 @@
}
}
$sql .= implode(',', $grants) .') AND grant_view = 1';
- $result = db_query($sql, $node->nid);
+ $result = db_query($sql);
$access = db_result($result);
}
diff -urN modulesold\user.module modules\user.module
--- modulesold\user.module Fri Sep 09 21:37:32 2005
+++ modules\user.module Fri Sep 09 21:40:18 2005
@@ -327,6 +327,7 @@
// To reduce the number of SQL queries, we cache the user's permissions
// in a static variable.
if (!isset($perm[$account->uid])) {
+ $perm[$account->uid] = '' ;
$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);
while ($row = db_fetch_object($result)) {
@@ -1215,8 +1216,8 @@
function user_page() {
global $user;
- $edit = $_POST['edit'];
- $op = $_POST['op'];
+ $edit = isset ($_POST['edit']) ? $_POST['edit'] : '' ;
+ $op = isset ($_POST['op']) ? $_POST['op'] : '' ;
if (empty($op)) {
$op = arg(2) ? arg(2) : arg(1);
diff -urN modulesold\watchdog.module modules\watchdog.module
--- modulesold\watchdog.module Fri Sep 09 21:37:54 2005
+++ modules\watchdog.module Fri Sep 09 21:40:26 2005
@@ -77,7 +77,7 @@
$_SESSION['watchdog_overview_filter'] = 'all';
}
- $op = $_POST['op'];
+ $op = isset($_POST['op']) ? $_POST['op'] : '' ;
if ($op == t('Filter') && isset($_POST['edit']['filter'])) {
$_SESSION['watchdog_overview_filter'] = $_POST['edit']['filter'];
}