- 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.
3-00
natrak 2001-04-23 11:06:17 +00:00
parent 78bee959d1
commit 78def0485b
3 changed files with 3 additions and 4 deletions

View File

@ -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);
}
?>

View File

@ -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) {

View File

@ -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;
}