summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornatrak <>2001-04-23 11:06:17 +0000
committernatrak <>2001-04-23 11:06:17 +0000
commit78def0485b8acc2e4297b2d60e70c0fb7e8f109f (patch)
tree824cc11c0556a7a2b03cf65f7518ce4784e4d0c0
parent78bee959d1bb0536fab8345b2485d12db6f50d3f (diff)
downloadbrdo-78def0485b8acc2e4297b2d60e70c0fb7e8f109f.tar.gz
brdo-78def0485b8acc2e4297b2d60e70c0fb7e8f109f.tar.bz2
Changes
- Fixed an error in module_rehash_blocks() that didn't handle '-symbols. - Removed some module depencies. Drupal will now run (sorta) even if there are no modules installed. - Changed theme_link() to check if certain modules are installed before offering a link to them. Todo - Check all SQL queries to make sure they are addslashes'ed correctly. - Check the effects of changing the PHP magic_quotes setting. - Make the theme_link() function to be customizable either via the admin page and/or in the module itself.
-rw-r--r--includes/locale.inc2
-rw-r--r--includes/node.inc2
-rw-r--r--modules/box.module3
3 files changed, 3 insertions, 4 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 4fd927c56..8f4622a3f 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -7,7 +7,7 @@ function locale_init() {
function t($string) {
global $languages;
- return ($languages ? locale($string) : $string);
+ return ($languages && function_exists("locale") ? locale($string) : $string);
}
?> \ No newline at end of file
diff --git a/includes/node.inc b/includes/node.inc
index 37e46f0b5..374732ae6 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -147,7 +147,7 @@ function node_save($node) {
function node_invoke($node, $name, $arg = 0) {
if ($node[type]) $function = $node[type] ."_$name";
if ($node->type) $function = $node->type ."_$name";
- if ($function) return ($arg ? $function($node, $arg) : $function($node));
+ if (function_exists($function)) return ($arg ? $function($node, $arg) : $function($node));
}
function node_view($node, $main = 0) {
diff --git a/modules/box.module b/modules/box.module
index bfd8b3d3c..789185cc5 100644
--- a/modules/box.module
+++ b/modules/box.module
@@ -35,7 +35,7 @@ function box_help() {
}
function box_block() {
- $result = db_query("SELECT * FROM boxes");
+ $result = db_query("SELECT * FROM boxes ORDER BY subject");
$i = 0;
while ($block = db_fetch_object($result)) {
$blocks[$i]["subject"] = check_output($block->subject);
@@ -44,7 +44,6 @@ function box_block() {
$blocks[$i]["link"] = check_output($block->link);
$i++;
}
-
return $blocks;
}