diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-04-23 11:06:18 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-04-23 11:06:18 +0000 |
commit | bd8952ebb2caf92236491d9ce21857e1dfb56133 (patch) | |
tree | ffd5ad1060e30833e6b134e2bd76badc547b0177 /includes/theme.inc | |
parent | 78def0485b8acc2e4297b2d60e70c0fb7e8f109f (diff) | |
download | brdo-bd8952ebb2caf92236491d9ce21857e1dfb56133.tar.gz brdo-bd8952ebb2caf92236491d9ce21857e1dfb56133.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.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 51f42850c..dbeb5fab8 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -13,12 +13,15 @@ function theme_init() { } function theme_link($separator = " | ") { + global $repository; $links = array("<A HREF=\"index.php\">". t("home") ."</A>", "<A HREF=\"search.php\">". t("search") ."</A>", - "<A HREF=\"submit.php\">". t("submit") ."</A>", - "<A HREF=\"module.php?mod=diary\">". t("diary") ."</A>", - "<A HREF=\"account.php\">". t("account") ."</A>", - "<A HREF=\"module.php?mod=book\">". t("handbook") ."</A>"); + "<A HREF=\"submit.php\">". t("submit") ."</A>"); + if (is_array($repository[diary])) + $links[] = "<A HREF=\"module.php?mod=diary\">". t("diary") ."</A>"; + $links[] = "<A HREF=\"account.php\">". t("account") ."</A>"; + if (is_array($repository[diary])) + $links[] = "<A HREF=\"module.php?mod=book\">". t("handbook") ."</A>"; return implode($separator, $links); } |