diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 1 | ||||
-rw-r--r-- | includes/droplet.inc | 22 | ||||
-rw-r--r-- | includes/theme.inc | 14 |
3 files changed, 11 insertions, 26 deletions
diff --git a/includes/common.inc b/includes/common.inc index 7886b9b65..f077658ee 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -4,7 +4,6 @@ include_once "includes/". getenv("HTTP_HOST") .".conf"; include_once "includes/database.inc"; include_once "includes/watchdog.inc"; include_once "includes/function.inc"; -include_once "includes/droplet.inc"; include_once "includes/module.inc"; include_once "includes/theme.inc"; include_once "includes/user.inc"; diff --git a/includes/droplet.inc b/includes/droplet.inc deleted file mode 100644 index 3f1f3b209..000000000 --- a/includes/droplet.inc +++ /dev/null @@ -1,22 +0,0 @@ -<? - -function droplet_get($name) { - $result = db_query("SELECT * FROM droplets WHERE name = '$name'"); - - if ($droplet = db_fetch_object($result)) { - return eval($droplet->code); - } - else { - watchdog("error", "droplet '$name' does not exist"); - } -} - -function droplet_add($name, $help, $code, $message = "") { - $result = db_query("INSERT INTO droplets (name, help, code) VALUES ('". check_input($name) ."', '". check_input($help) ."', '". check_code($code) ."')"); -} - -function droplet_delete($id) { - $result = db_query("DELETE FROM droplets WHERE id = $id"); -} - -?> diff --git a/includes/theme.inc b/includes/theme.inc index fd842e68a..7c93ec775 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -45,7 +45,7 @@ function theme_account($theme) { function theme_main_blocks($theme) { - global $PHP_SELF, $user, $id; + global $id, $PHP_SELF, $user; switch (strtok($PHP_SELF, ".")) { case "/discussion": @@ -53,6 +53,14 @@ function theme_main_blocks($theme) { if ($story->status == 1) theme_moderation_results($theme, $story); else theme_new_headlines($theme); break; + case "/index": + theme_account($theme); + $result = db_query("SELECT * FROM blocks WHERE status = 2"); + while ($block = db_fetch_object($result)) { + $blocks = module_execute($block->module, "block"); + $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); + } + break; default: theme_account($theme); } @@ -63,8 +71,8 @@ function theme_user_blocks($theme) { if ($user->id && strstr($PHP_SELF, "index.php")) { $result = db_query("SELECT * FROM layout l LEFT JOIN blocks b ON l.block = b.name WHERE l.user = '$user->id' AND l.weight > 0 AND b.status = '1' ORDER BY weight"); while ($block = db_fetch_object($result)) { - $blocks = module_execute($block->module, "block"); - $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); + $blocks = module_execute($block->module, "block"); + $theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]); } } } |