Commit 277ceae5 authored by Dries's avatar Dries

- New menu houskeeping.  Prototyped by Zbynek.

  The following modules need updating:
    * glossary module
    * feed module (Breyten's version)
    * mailhandler module
    * notify module
    * project module
    * smileys module
    * admin module
    * style module
    * taxonomy_dhtml module

  To avoid unexpected problems menu_add() is deprecated (it will print an
  error message when used) and menu() should be used instead.
parent 53deeb18
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
# automatically become the default language. You can add a language # automatically become the default language. You can add a language
# but make sure your SQL table, called locales is updated # but make sure your SQL table, called locales is updated
# appropriately. # appropriately.
$languages = array("en" => "English"); $languages = array("en" => "english");
# #
# Custom navigation links: # Custom navigation links:
......
<?php <?php
// $Id$
function menu_trail() { function menu_add() {
trigger_error(t("the 'menu_add()' function is depricated"), E_USER_ERROR);
global $QUERY_STRING;
static $trail = NULL;
/*
** Retrieve the currently active link.
*/
if (empty($trail)) {
$path = array();
$item = db_fetch_object(db_query("SELECT * FROM menu WHERE link LIKE '%%%s'", $QUERY_STRING));
/*
** Compile an array of menu objects that represent the path to
** the root link.
*/
if ($item) {
$path[] = $item;
while ($item->parent) {
$result = db_query("SELECT * FROM menu WHERE name = '%s' ORDER BY weight, name", $item->parent);
if ($item = db_fetch_object($result)) {
$path[] = $item;
}
}
}
$trail = array_reverse($path);
}
return $trail;
} }
function menu_in_trail($item) { function menu($path, $title, $callback = NULL, $help = NULL, $weight = 0, $hidden = 0) {
$trail = menu_trail(); global $_gmenu;
foreach ($trail as $menu) { if (isset($_gmenu[$path])) {
if ($menu->link == $item->link) { if (empty($_gmenu[$path]["callback"])) { // dummy item -> fill in
return 1; $_gmenu[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden, "children" => $_gmenu[$path]["children"]);
return true;
}
else { // real item found
trigger_error(t("While trying to add '%path' to menu, item already exists.", array("%path" => $path)), E_USER_ERROR);
return false;
} }
} }
return 0; // if this is reached we need to create a new item
} $_gmenu[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden, "children" => array());
// does the item have an existing parent?
$parent = substr($path, 0, strrpos($path, "/"));
while (!isset($_gmenu[$parent])) {
$_gmenu[$parent] = array("children" => array($path));
$path = $parent;
$parent = substr($parent, 0, strrpos($parent, "/"));
}
$_gmenu[$parent]["children"][] = $path;
function menu_item($item) { return true;
}
function menu_item($in_path) {
global $_gmenu;
/* /*
** If you want to theme your links, or if you want to replace them ** If you want to theme your links, or if you want to replace them
** by an image, this would be the function to customize. ** by an image, this would be the function to customize.
*/ */
$trail = menu_trail();
if (end($trail) == $in_path)
return t($_gmenu[$in_path]["title"]);
else
return "<a href=\"".url($in_path)."\">". t($_gmenu[$in_path]["title"]) ."</a>";
}
if (stristr(request_uri(), $item->link) == $item->link) { function query_string() {
return t($item->name); return $GLOBALS["q"];
}
else if ($item->title) {
return "<a href=\"$item->link\" title=\"". t($item->title) ."\">". t($item->name) ."</a>";
}
else {
return "<a href=\"$item->link\">". t($item->name) ."</a>";
}
} }
function menu_path() { function menu_trail() {
global $_gmenu;
static $_gmenu_trail; // cache
$path = menu_trail(); if (!isset($_gmenu_trail)) {
$_gmenu_trail = array();
$cuqs = query_string();
$links = array(); while (!empty($cuqs) && !isset($_gmenu[$cuqs])) {
$cuqs = substr($cuqs, 0, strrpos($cuqs, "/"));
}
foreach ($path as $item) { if (!empty($cuqs)) {
$links[] = menu_item($item); do {
$_gmenu_trail[] = $cuqs;
$cuqs = substr($cuqs, 0, strrpos($cuqs, "/"));
} while (!empty($cuqs) && isset($_gmenu[$cuqs]));
}
$_gmenu_trail = array_reverse($_gmenu_trail);
} }
return implode(" &gt; ", $links); return $_gmenu_trail;
} }
function menu_menu_row($parent = "") { function menu_path() {
$links = array();
$result = db_query("SELECT * FROM menu WHERE parent = '%s' ORDER BY weight, name", $parent); $trail = menu_trail();
while ($menu = db_fetch_object($result)) {
$links[] = menu_item($menu);
}
return $links; $links = array();
}
function menu_menu() { foreach ($trail as $item) {
$path = menu_trail(); $links[] = menu_item($item);
if ($path) {
$item = array_pop($path);
$output = implode(" &middot; ", menu_menu_row($item->name));
} }
return $output; return implode(" &gt; ", $links);
} }
function menu_help() { function menu_help() {
global $_gmenu;
$path = menu_trail(); $path = menu_trail();
if ($path) { if ($path) {
$item = array_pop($path); $item = array_pop($path);
$output = $item->help; $output = $_gmenu[$item]["help"];
} }
return $output; return @$output;
} }
function menu_tree($parent = "", $all = 1) { function _menu_sort($a, $b) {
global $_gmenu;
if ($all) { $a = &$_gmenu[$a];
$result = db_query("SELECT * FROM menu WHERE parent = '%s' ORDER BY weight, name", $parent); $b = &$_gmenu[$b];
} return $a["weight"] < $b["weight"] ? -11 : ($a["weight"] > $b["weight"] ? 1 : ($a["name"] < $b["name"] ? -1 : 1));
}
if (db_num_rows($result)) { function menu_tree($parent = "") {
$output = "<ul>"; global $_gmenu;
while ($item = db_fetch_object($result)) {
$all = (stristr(request_uri(), $item->link) == $item->link) ? 1 : 0; if ($_gmenu[$parent]["children"]) {
$output .= "<li>"; $output = "\n<ul>\n";
$output .= menu_item($item); usort($_gmenu[$parent]["children"], "_menu_sort");
$output .= menu_tree($item->name, menu_in_trail($item)); foreach ($_gmenu[$parent]["children"] as $item) {
$output .= "</li>"; if ($_gmenu[$item]["hidden"] == 0) {
$output .= "<li>";
$output .= menu_item($item);
if (in_array($item, menu_trail($item))) {
$output .= menu_tree($item);
}
$output .= "</li>\n";
}
} }
$output .= "</ul>"; $output .= "</ul>\n";
} }
return $output; return $output;
} }
function menu_map($parent = "") { function menu_map($parent = "") {
global $_gmenu;
$result = db_query("SELECT * FROM menu WHERE parent = '%s' ORDER BY weight, name", $parent); $output = "<ul>";
usort($_gmenu[$parent]["children"], "_menu_sort");
if (db_num_rows($result)) { foreach ($_gmenu[$parent]["children"] as $item) {
$output = "<ul>"; if ($_gmenu[$item]["hidden"] == 0) {
while ($item = db_fetch_object($result)) {
$output .= "<li>"; $output .= "<li>";
$output .= menu_item($item); $output .= menu_item($item);
$output .= menu_map($item->name); $output .= menu_map($item);
$output .= "</li>"; $output .= "</li>";
} }
$output .= "</ul>";
} }
$output .= "</ul>";
return $output; return $output;
} }
function menu_execute_action() {
global $_gmenu;
$trail = menu_trail();
$selected_menu = array_pop($trail);
function menu_add($name, $link, $title = NULL, $help = NULL, $parent = NULL, $weight = 1) { if ($_gmenu[$selected_menu]["callback"]) {
if (!db_result(db_query("SELECT name FROM menu WHERE link = '%s'", $link))) { return call_user_func_array($_gmenu[$selected_menu]["callback"], explode("/", substr(query_string(), strlen($selected_menu) + 1)));
db_query("INSERT INTO menu (name, link, title, help, parent, weight) VALUES ('%s', '%s', '%s', '%s', '%s', '%d')", $name, $link, $title, $help, $parent, $weight);
} }
} }
?> ?>
\ No newline at end of file
...@@ -11,10 +11,14 @@ function status($message) { ...@@ -11,10 +11,14 @@ function status($message) {
function admin_link($type) { function admin_link($type) {
if ($type == "admin") { if ($type == "admin") {
menu_add("sitemap", url("admin/admin/sitemap"), "Sitemap", NULL, NULL, 8); menu("admin/sitemap", "sitemap", "sitemap_callback", NULL, 8);
} }
} }
function sitemap_callback() {
return menu_map('admin');
}
function admin_admin() { function admin_admin() {
print menu_map(); print menu_map();
} }
...@@ -48,7 +52,8 @@ function admin_page() { ...@@ -48,7 +52,8 @@ function admin_page() {
print "<div id=\"menu\">"; print "<div id=\"menu\">";
echo "<h1><a href=\"index.php\">". variable_get("site_name", "drupal") ."</a></h1>"; echo "<h1><a href=\"index.php\">". variable_get("site_name", "drupal") ."</a></h1>";
print menu_tree() ; //print menu_tree('admin') ;
print menu_tree('admin') ;
print "</div>"; print "</div>";
...@@ -60,7 +65,7 @@ function admin_page() { ...@@ -60,7 +65,7 @@ function admin_page() {
print "<div id=\"main\">"; print "<div id=\"main\">";
if ($path = menu_path()) { if ($path = menu_path()) {
print "<h2>". l(t("Administration"), "admin") ." &gt; $path</h2>"; print "<h2>". l(t("Administration"), "admin") ." $path</h2>";
} }
else { else {
print "<h2>". t("Administration") ."</h2>"; print "<h2>". t("Administration") ."</h2>";
...@@ -76,10 +81,11 @@ function admin_page() { ...@@ -76,10 +81,11 @@ function admin_page() {
print "<small>$help</small>"; print "<small>$help</small>";
} }
print "<hr /><br />"; print "<hr />";
if (arg(1)) { if (arg(1)) {
print module_invoke(arg(1), "admin"); //print module_invoke(arg(1), "admin");
print menu_execute_action();
} }
else { else {
print "<h2>". t("System messages") ."</h2>"; print "<h2>". t("System messages") ."</h2>";
...@@ -88,7 +94,6 @@ function admin_page() { ...@@ -88,7 +94,6 @@ function admin_page() {
print "</div>"; print "</div>";
db_query("DELETE FROM menu");
?> ?>
</body> </body>
</html> </html>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
function import_help() { function import_help() {
?> ?>
<p>In Drupal you have <i>feeds</i> and <i>bundles</i>. Feeds define news sources and bundles categoriz syndicated content by source, topic or any other heuristic. Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called "Sport".</p> <p>In Drupal you have <i>feeds</i> and <i>bundles</i>. Feeds define news sources and bundles categorize syndicated content by source, topic or any other heuristic. Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called "Sport".</p>
<p>You can have several providers of news feeds. You can add a feed by clicking the "add feed" link on the import administration pages. Give the feed a name, supply the URI and a comma-separated list of attributes that you want to associate the feed with. The update interval defines how often Drupal should go out to try and grab fresh content. The expiration time defines how long syndicated content is kept in the database. So set the update and expiration time and save your settings. You have just defined your first feed. If you have more feeds repeat as necessary.</p> <p>You can have several providers of news feeds. You can add a feed by clicking the "add feed" link on the import administration pages. Give the feed a name, supply the URI and a comma-separated list of attributes that you want to associate the feed with. The update interval defines how often Drupal should go out to try and grab fresh content. The expiration time defines how long syndicated content is kept in the database. So set the update and expiration time and save your settings. You have just defined your first feed. If you have more feeds repeat as necessary.</p>
<p>To verify whether your feed works, press "update items" at the overview page. The number of news items that have been sucessfully fetched, should then become visible in the third column of the feed overview.</p> <p>To verify whether your feed works, press "update items" at the overview page. The number of news items that have been sucessfully fetched, should then become visible in the third column of the feed overview.</p>
<p>Now you have to define some bundles. Bundles look for feeds that contain one of the keywords associated with the bundle and display those feeds together. To define a bundle you have to give it a name and a comma-separated list of keywords just like this is the case for feeds.</p> <p>Now you have to define some bundles. Bundles look for feeds that contain one of the keywords associated with the bundle and display those feeds together. To define a bundle you have to give it a name and a comma-separated list of keywords just like this is the case for feeds.</p>
...@@ -35,11 +35,14 @@ function import_link($type) { ...@@ -35,11 +35,14 @@ function import_link($type) {
} }
if ($type == "admin" && user_access("administer news feeds")) { if ($type == "admin" && user_access("administer news feeds")) {
menu_add("news aggregation", url("admin/import"), "Content syndication through RDF/RSS feeds.", NULL, NULL, 3); $help["general"] = "Several websites, especially news related sites, syndicate parts of their site content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS).";
menu_add("add new feed", url("admin/import/add/feed"), "Add new news feed.", NULL, "news aggregation", 2); $help["bundles"] = "Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>.";
menu_add("add new bundle", url("admin/import/add/bundle"), "Create a new bundle.", NULL, "news aggregation", 3); menu("admin/syndication", "content syndication", NULL, NULL, 5);
menu_add("tag news items", url("admin/import/tag"), "Assign bundle attributes to a news item.", NULL, "news aggregation", 4); menu("admin/syndication/news", "news aggregation", "import_admin", $help["general"]);
menu_add("help", url("admin/import/help"), "More information about news aggregation.", NULL, "news aggregation", 5); menu("admin/syndication/news/add feed", "add new feed", "import_admin", NULL, 2);
menu("admin/syndication/news/add bundle", "add new bundle", "import_admin", $help["bundles"], 3);
menu("admin/syndication/news/tag", "tag news items", "import_admin", NULL, 4);
menu("admin/syndication/news/help", "help", "import_help", NULL, 9);
} }
return $links ? $links : array(); return $links ? $links : array();
...@@ -405,7 +408,7 @@ function import_view() { ...@@ -405,7 +408,7 @@ function import_view() {
$header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3)); $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
unset($rows); unset($rows);
while ($feed = db_fetch_object($result)) { while ($feed = db_fetch_object($result)) {
$rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "1 item", "%count items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), l(t("edit feed"), "admin/import/edit/feed/$feed->fid"), l(t("remove items"), "admin/import/remove/$feed->fid"), l(t("update items"), "admin/import/update/$feed->fid")); $rows[] = array($feed->title, $feed->attributes, format_plural($feed->items, "1 item", "%count items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), l(t("edit feed"), "admin/syndication/news/edit/feed/$feed->fid"), l(t("remove items"), "admin/syndication/news/remove/$feed->fid"), l(t("update items"), "admin/syndication/news/update/$feed->fid"));
} }
$output .= table($header, $rows); $output .= table($header, $rows);
...@@ -416,7 +419,7 @@ function import_view() { ...@@ -416,7 +419,7 @@ function import_view() {
$header = array(t("title"), t("attributes"), t("operations")); $header = array(t("title"), t("attributes"), t("operations"));
unset($rows); unset($rows);
while ($bundle = db_fetch_object($result)) { while ($bundle = db_fetch_object($result)) {
$rows[] = array($bundle->title, $bundle->attributes, l(t("edit bundle"), "admin/import/edit/bundle/$bundle->bid")); $rows[] = array($bundle->title, $bundle->attributes, l(t("edit bundle"), "admin/syndication/news/edit/bundle/$bundle->bid"));
} }
$output .= table($header, $rows); $output .= table($header, $rows);
...@@ -429,7 +432,7 @@ function import_tag() { ...@@ -429,7 +432,7 @@ function import_tag() {
$header = array(t("date"), t("feed"), t("news item")); $header = array(t("date"), t("feed"), t("news item"));
while ($item = db_fetch_object($result)) { while ($item = db_fetch_object($result)) {
$rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => l($item->feed, "admin/import/edit/feed/$item->fid"), "valign" => "top"), "<a href=\"$item->link\">$item->title</a>". ($item->description ? "<br /><small><i>$item->description</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => l($item->feed, "admin/syndication/news/edit/feed/$item->fid"), "valign" => "top"), "<a href=\"$item->link\">$item->title</a>". ($item->description ? "<br /><small><i>$item->description</i></small>" : "") ."<br /><input type=\"text\" name=\"edit[$item->iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />");
} }
$output .= table($header, $rows); $output .= table($header, $rows);
...@@ -444,35 +447,30 @@ function import_admin() { ...@@ -444,35 +447,30 @@ function import_admin() {
if (user_access("administer news feeds")) { if (user_access("administer news feeds")) {
if (empty($op)) { if (empty($op)) {
$op = arg(2); $op = arg(3);
} }
switch ($op) { switch ($op) {
case "help": case "add feed":
print import_help(); print import_form_bundle();
break; break;
case "add": case "add bundle":
if (arg(3) == "bundle") { print import_form_feed();
print import_form_bundle();
}
else {
print import_form_feed();
}
break; break;
case "edit": case "edit":
if (arg(3) == "bundle") { if (arg(4) == "bundle") {
print import_form_bundle(import_get_bundle(arg(4))); print import_form_bundle(import_get_bundle(arg(5)));
} }
else { else {
print import_form_feed(import_get_feed(arg(4))); print import_form_feed(import_get_feed(arg(5)));
} }
break; break;
case "remove": case "remove":
print status(import_remove(import_get_feed(arg(3)))); print status(import_remove(import_get_feed(arg(4))));
print import_view(); print import_view();
break; break;
case "update": case "update":
print status(import_refresh(import_get_feed(arg(3)))); print status(import_refresh(import_get_feed(arg(4))));
print import_view(); print import_view();
break; break;
case "tag": case "tag":
...@@ -486,7 +484,7 @@ function import_admin() { ...@@ -486,7 +484,7 @@ function import_admin() {
$edit["title"] = 0; $edit["title"] = 0;
// fall through: // fall through:
case "Submit": case "Submit":
if (arg(3) == "bundle") { if (arg(3) == "add bundle") {
print status(import_save_bundle($edit)); print status(import_save_bundle($edit));
} }
else { else {
...@@ -511,7 +509,7 @@ function import_page_info() { ...@@ -511,7 +509,7 @@ function import_page_info() {
$links[] = l(t("news sources"), "import/sources", array("title" => t("View a list of all the websites we syndicate from."))); $links[] = l(t("news sources"), "import/sources", array("title" => t("View a list of all the websites we syndicate from.")));
if (user_access("administer news feeds")) { if (user_access("administer news feeds")) {
$links[] = l(t("administer news feeds"), "admin/import", array("title" => t("View the news feed administrative pages."))); $links[] = l(t("administer news feeds"), "admin/syndication/news", array("title" => t("View the news feed administrative pages.")));
} }
return "<div align=\"center\">". theme("links", $links) ."</div>"; return "<div align=\"center\">". theme("links", $links) ."</div>";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
function import_help() { function import_help() {
?> ?>
<p>In Drupal you have <i>feeds</i> and <i>bundles</i>. Feeds define news sources and bundles categoriz syndicated content by source, topic or any other heuristic. Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called "Sport".</p> <p>In Drupal you have <i>feeds</i> and <i>bundles</i>. Feeds define news sources and bundles categorize syndicated content by source, topic or any other heuristic. Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called "Sport".</p>
<p>You can have several providers of news feeds. You can add a feed by clicking the "add feed" link on the import administration pages. Give the feed a name, supply the URI and a comma-separated list of attributes that you want to associate the feed with. The update interval defines how often Drupal should go out to try and grab fresh content. The expiration time defines how long syndicated content is kept in the database. So set the update and expiration time and save your settings. You have just defined your first feed. If you have more feeds repeat as necessary.</p> <p>You can have several providers of news feeds. You can add a feed by clicking the "add feed" link on the import administration pages. Give the feed a name, supply the URI and a comma-separated list of attributes that you want to associate the feed with. The update interval defines how often Drupal should go out to try and grab fresh content. The expiration time defines how long syndicated content is kept in the database. So set the update and expiration time and save your settings. You have just defined your first feed. If you have more feeds repeat as necessary.</p>
<p>To verify whether your feed works, press "update items" at the overview page. The number of news items that have been sucessfully fetched, should then become visible in the third column of the feed overview.</p> <p>To verify whether your feed works, press "update items" at the overview page. The number of news items that have been sucessfully fetched, should then become visible in the third column of the feed overview.</p>
<p>Now you have to define some bundles. Bundles look for feeds that contain one of the keywords associated with the bundle and display those feeds together. To define a bundle you have to give it a name and a comma-separated list of keywords just like this is the case for feeds.</p> <p>Now you have to define some bundles. Bundles look for feeds that contain one of the keywords associated with the bundle and display those feeds together. To define a bundle you have to give it a name and a comma-separated list of keywords just like this is the case for feeds.</p>
...@@ -35,11 +35,14 @@ function import_link($type) { ...@@ -35,11 +35,14 @@ function import_link($type) {
} }
if ($type == "admin" && user_access("administer news feeds")) { if ($type == "admin" && user_access("administer news feeds")) {
menu_add("news aggregation", url("admin/import"), "Content syndication through RDF/RSS feeds.", NULL, NULL, 3); $help["general"] = "Several websites, especially news related sites, syndicate parts of their site content for other web sites to display. Usually, the syndicated content includes the latest headlines with a direct link to that story on the remote site. Some syndicated content also includes a description of the headline. The standard method of syndication is using the XML based Rich Site Summary (RSS).";
menu_add("add new feed", url("admin/import/add/feed"), "Add new news feed.", NULL, "news aggregation", 2); $help["bundles"] = "Bundles provide a generalized way of creating composite feeds. They allow you, for example, to combine various sport-related feeds into one bundle called <i>Sport</i>.";
menu_add("add new bundle", url("admin/import/add/bundle"), "Create a new bundle.", NULL, "news aggregation", 3); menu("admin/syndication", "content syndication", NULL, NULL, 5);
menu_add("tag news items", url("admin/import/tag"), "Assign bundle attributes to a news item.", NULL, "news aggregation", 4); menu("admin/syndication/news", "news aggregation", "import_admin", $help["general"]);
menu_add("help", url("admin/import/help"), "More information about news aggregation.", NULL, "news aggregation", 5); menu("admin/syndication/news/add feed", "add new feed", "import_admin", NULL, 2);
menu("admin/syndication/news/add bundle", "add new bundle", "import_admin", $help["bundles"], 3);
menu("admin/syndication/news/tag", "tag news items", "import_admin", NULL, 4);
menu("admin/syndication/news/help", "help", "import_help", NULL, 9);
} }
return $links ? $links : array(); return $links ? $links : array();
...@@ -405,7 +408,7 @@ function import_view() { ...@@ -405,7 +408,7 @@ function import_view() {
$header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3)); $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3));
unset($rows); unset($rows);