From 83f5d82876e6b2102c2b5839b430f1d5f9a23ec1 Mon Sep 17 00:00:00 2001
From: Dries Buytaert
Date: Sat, 15 Feb 2003 11:39:56 +0000
Subject: - Everything is using theme("function") now instead of
$theme->function().
---
modules/aggregator/aggregator.module | 72 ++++++++++++++++++------------------
1 file changed, 36 insertions(+), 36 deletions(-)
(limited to 'modules/aggregator/aggregator.module')
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 56b8f08e6..038ec1b26 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -60,10 +60,10 @@ function import_update() {
}
function import_format_item($item, $feed = 0) {
- global $theme, $user;
+ global $user;
if ($user->uid && user_access("maintain personal blog")) {
- $output .= l("
image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
+ $output .= l("
", "node/add/blog&iid=$item->iid", array("title" => t("Comment on this news item in your personal blog.")));
}
// external link
@@ -503,7 +503,7 @@ function import_admin() {
}
function import_page_info() {
- global $theme;
+
$links[] = l(t("latest news"), "import", array("title" => t("Read the latest news from syndicated websites.")));
$links[] = l(t("news by source"), "import/feeds", array("title" => t("View the latest headlines sorted by source.")));
@@ -514,11 +514,11 @@ function import_page_info() {
$links[] = l(t("administer news feeds"), "admin/import", array("title" => t("View the news feed administrative pages.")));
}
- return "". $theme->links($links) ."
";
+ return "". theme("links", $links) ."
";
}
function import_page_last() {
- global $theme;
+
$result = db_query("SELECT i.*, f.title AS ftitle, f.link AS flink FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT ". variable_get("import_page_limit", 75));
@@ -530,7 +530,7 @@ function import_page_last() {
$links[] = l(t("feed"), "import/feed/$item->fid", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
- $output .= "link\">$item->title · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ." | ". $theme->links($links) ." |
\n";
+ $output .= "link\">$item->title · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ." | ". theme("links", $links) ." |
\n";
}
if ($item->description) {
@@ -541,20 +541,20 @@ function import_page_last() {
}
$output .= "\n";
- $theme->header();
- $theme->box(t("News feeds"), import_page_info());
- $theme->box(t("Latest news"), $output);
- $theme->footer();
+ theme("header");
+ theme("box", t("News feeds"), import_page_info());
+ theme("box", t("Latest news"), $output);
+ theme("footer");
}
function import_page_feed($fid) {
- global $theme;
+
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
$header .= "". t("Website") .":
";
$header .= "". t("Description") .":
$feed->description
";
- $header .= "". t("Last update") .":
\n";
+ $header .= "". t("Last update") .":
". format_interval(time() - $feed->timestamp) ." ". t("ago") ."
url\">
\n";
$result = db_query("SELECT * FROM item WHERE fid = '%s' ORDER BY iid DESC LIMIT ". variable_get("import_page_limit", 75), $fid);
@@ -566,7 +566,7 @@ function import_page_feed($fid) {
$links[] = "link\">". t("visit") ."";
if ($item->link) {
- $output .= "link\">$item->title | ". $theme->links($links) ." |
\n";
+ $output .= "link\">$item->title | ". theme("links", $links) ." |
\n";
}
if ($item->description) {
$output .= "$item->description
|
";
@@ -576,15 +576,15 @@ function import_page_feed($fid) {
}
$output .= "\n";
- $theme->header();
- $theme->box(t("News feeds"), import_page_info());
- $theme->box($feed->title, $header);
- $theme->box(t("Latest news"), $output);
- $theme->footer();
+ theme("header");
+ theme("box", t("News feeds"), import_page_info());
+ theme("box", $feed->title, $header);
+ theme("box", t("Latest news"), $output);
+ theme("footer");
}
function import_page_bundle($bid) {
- global $theme;
+
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
@@ -604,7 +604,7 @@ function import_page_bundle($bid) {
$links[] = "link\">". t("visit") ."";
if ($item->link) {
- $output .= "link\">$item->title · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ." | ". $theme->links($links) ." |
\n";
+ $output .= "link\">$item->title · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ." | ". theme("links", $links) ." |
\n";
}
if ($item->description) {
@@ -615,16 +615,16 @@ function import_page_bundle($bid) {
}
$output .= "\n";
- $theme->header();
- $theme->box(t("News feeds"), import_page_info());
- $theme->box($bundle->title, $header);
- $theme->box(t("Latest news"), $output);
- $theme->footer();
+ theme("header");
+ theme("box", t("News feeds"), import_page_info());
+ theme("box", $bundle->title, $header);
+ theme("box", t("Latest news"), $output);
+ theme("footer");
}
function import_page_sources() {
- global $theme;
+
$result = db_query("SELECT * FROM feed ORDER BY title");
@@ -633,12 +633,12 @@ function import_page_sources() {
$output .= "$feed->description
";
}
- $output .= l("
image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", "import/fd", array("title" => t("View the list of syndicated websites in XML format."))) ."
";
+ $output .= l("
", "import/fd", array("title" => t("View the list of syndicated websites in XML format."))) ."
";
- $theme->header();
- $theme->box(t("News feeds"), import_page_info());
- $theme->box(t("News sources"), $output);
- $theme->footer();
+ theme("header");
+ theme("box", t("News feeds"), import_page_info());
+ theme("box", t("News sources"), $output);
+ theme("footer");
}
function import_page_fd() {
@@ -671,10 +671,10 @@ function import_page_feeds() {
}
function import_page_blocks($blocks) {
- global $theme;
- $theme->header();
- $theme->box(t("News feeds"), import_page_info());
+
+ theme("header");
+ theme("box", t("News feeds"), import_page_info());
print "\n";
print " \n";
@@ -682,7 +682,7 @@ function import_page_blocks($blocks) {
$i = 1;
print " \n";
while ($block = each($blocks)) {
- $theme->box($block["value"]["subject"], $block["value"]["content"]);
+ theme("box", $block["value"]["subject"], $block["value"]["content"]);
if ($i == ceil(count($blocks) / 3)) {
break;
}
@@ -693,7 +693,7 @@ function import_page_blocks($blocks) {
print " |
\n";
print "
\n";
- $theme->footer();
+ theme("footer");
}
function import_page() {
--
cgit v1.2.3