Commit 78def048 authored by natrak's avatar natrak

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.
parent 78bee959
......@@ -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
......@@ -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) {
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment