summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-08-20 05:57:41 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-08-20 05:57:41 +0000
commit55eec8f66f909fd105074142d99e22e02b489991 (patch)
tree246f2e41d47fd55b83dfcb690919e65e17e62e96
parente14c3aa6c0707c18005146f5311f0db0d5a1af3f (diff)
downloadbrdo-55eec8f66f909fd105074142d99e22e02b489991.tar.gz
brdo-55eec8f66f909fd105074142d99e22e02b489991.tar.bz2
#79601: module_exist() -> module_exists()
-rw-r--r--includes/menu.inc6
-rw-r--r--includes/module.inc4
-rw-r--r--includes/theme.inc6
-rw-r--r--modules/aggregator/aggregator.module2
-rw-r--r--modules/block/block.module4
-rw-r--r--modules/contact/contact.module2
-rw-r--r--modules/forum/forum.module4
-rw-r--r--modules/node/node.module10
-rw-r--r--modules/system/system.module8
-rw-r--r--modules/taxonomy/taxonomy.module2
-rw-r--r--modules/tracker/tracker.module2
-rw-r--r--modules/user/user.module2
-rw-r--r--themes/chameleon/chameleon.theme2
-rw-r--r--themes/engines/phptemplate/phptemplate.engine2
14 files changed, 28 insertions, 28 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index f21eb94d1..e56698176 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -591,7 +591,7 @@ function menu_rebuild() {
_menu_build();
- if (module_exist('menu')) {
+ if (module_exists('menu')) {
$menu = menu_get_menu();
// Fill a queue of new menu items which are modifiable.
@@ -828,7 +828,7 @@ function theme_menu_local_task($mid, $active, $primary) {
* -active is appended if this element is in the active trail.
*/
function menu_primary_links($start_level = 1, $pid = 0) {
- if (!module_exist('menu')) {
+ if (!module_exists('menu')) {
return NULL;
}
if (!$pid) {
@@ -1081,7 +1081,7 @@ function _menu_build() {
}
// Now fetch items from the DB, reassigning menu IDs as needed.
- if (module_exist('menu')) {
+ if (module_exists('menu')) {
$result = db_query(db_rewrite_sql('SELECT m.mid, m.* FROM {menu} m ORDER BY m.mid ASC', 'm', 'mid'));
while ($item = db_fetch_object($result)) {
// Handle URL aliases if entered in menu administration.
diff --git a/includes/module.inc b/includes/module.inc
index 25beb7172..f25331730 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -136,7 +136,7 @@ function module_rebuild_cache() {
* @return
* TRUE if the module is both installed and enabled.
*/
-function module_exist($module) {
+function module_exists($module) {
$list = module_list();
return array_key_exists($module, $list);
}
@@ -181,7 +181,7 @@ function module_enable($module) {
* The name of the module (without the .module extension).
*/
function module_disable($module) {
- if (module_exist($module)) {
+ if (module_exists($module)) {
module_load_install($module);
module_invoke($module, 'disable');
db_query("UPDATE {system} SET status = 0, throttle = 0 WHERE type = 'module' AND name = '%s'", $module);
diff --git a/includes/theme.inc b/includes/theme.inc
index e9bd3f3f6..54ee5af03 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -244,7 +244,7 @@ function theme_get_settings($key = NULL) {
'toggle_comment_user_picture' => 0,
);
- if (module_exist('node')) {
+ if (module_exists('node')) {
foreach (node_get_types() as $type => $name) {
$defaults['toggle_node_info_' . $type] = 1;
}
@@ -256,7 +256,7 @@ function theme_get_settings($key = NULL) {
}
// Only offer search box if search.module is enabled.
- if (!module_exist('search') || !user_access('search content')) {
+ if (!module_exists('search') || !user_access('search content')) {
$settings['toggle_search'] = 0;
}
@@ -600,7 +600,7 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) {
$output = '<div class="node-unpublished">';
}
- if (module_exist('taxonomy')) {
+ if (module_exists('taxonomy')) {
$terms = taxonomy_link('taxonomy terms', $node);
}
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 095d24ace..bcd08b8ef 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -1325,7 +1325,7 @@ function theme_aggregator_feed($feed) {
function theme_aggregator_block_item($item, $feed = 0) {
global $user;
- if ($user->uid && module_exist('blog') && user_access('edit own blog')) {
+ if ($user->uid && module_exists('blog') && user_access('edit own blog')) {
if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog it'))) {
$output .= '<div class="icon">'. l($image, 'node/add/blog', array('title' => t('Comment on this news item in your personal blog.'), 'class' => 'blog-it'), "iid=$item->iid", NULL, FALSE, TRUE) .'</div>';
}
diff --git a/modules/block/block.module b/modules/block/block.module
index c8b9b599d..07718dc1d 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -221,7 +221,7 @@ function block_admin_display($theme = NULL) {
$blocks = _block_rehash();
usort($blocks, '_block_compare');
- $throttle = module_exist('throttle');
+ $throttle = module_exists('throttle');
$block_regions = system_region_list($theme_key);
// Build form tree
@@ -295,7 +295,7 @@ function block_admin_display_submit($form_id, $form_values) {
function theme_block_admin_display($form) {
global $theme_key;
- $throttle = module_exist('throttle');
+ $throttle = module_exists('throttle');
$block_regions = system_region_list($theme_key);
// Highlight regions on page to provide visual reference.
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index 61d0aa743..a0176995a 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -27,7 +27,7 @@ function contact_help($section) {
return t('Enables the use of both personal and site-wide contact forms.');
case 'admin/build/contact':
$output = t('This page lets you setup <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/build/contact/settings'), '@form' => url('contact')));
- if (!module_exist('menu')) {
+ if (!module_exists('menu')) {
$menu_note = t('The menu item can be customized and configured only once the menu module has been <a href="@modules-page">enabled</a>.', array('@modules-page' => url('admin/settings/modules')));
}
else {
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 9909bfdf7..71cf6c960 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -851,7 +851,7 @@ function _forum_new($tid) {
* Menu callback; prints a forum listing.
*/
function forum_page($tid = 0) {
- if (module_exist('taxonomy') && module_exist('comment')) {
+ if (module_exists('taxonomy') && module_exists('comment')) {
$forum_per_page = variable_get('forum_per_page', 25);
$sortby = variable_get('forum_order', 1);
@@ -908,7 +908,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p
$output = '<div id="forum">';
$output .= '<ul>';
- if (module_exist('tracker')) {
+ if (module_exists('tracker')) {
if ($user->uid) {
$output .= ' <li>'. l(t('My discussions.'), "tracker/$user->uid") .'</li>';
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 1457cfdc1..b8eb22d4c 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -785,10 +785,10 @@ function node_search($op = 'search', $keys = NULL) {
$ranking = array('node_rank_relevance' => t('Keyword relevance'),
'node_rank_recent' => t('Recently posted'));
- if (module_exist('comment')) {
+ if (module_exists('comment')) {
$ranking['node_rank_comments'] = t('Number of comments');
}
- if (module_exist('statistics') && variable_get('statistics_count_content_views', 0)) {
+ if (module_exists('statistics') && variable_get('statistics_count_content_views', 0)) {
$ranking['node_rank_views'] = t('Number of views');
}
@@ -846,7 +846,7 @@ function node_search($op = 'search', $keys = NULL) {
$join2 .= ' INNER JOIN {node} n ON n.nid = i.sid LEFT JOIN {node_comment_statistics} c ON c.nid = i.sid';
$stats_join = TRUE;
}
- if (module_exist('comment') && $weight = (int)variable_get('node_rank_comments', 5)) {
+ if (module_exists('comment') && $weight = (int)variable_get('node_rank_comments', 5)) {
// Inverse law that maps the highest reply count on the site to 1 and 0 to 0.
$scale = variable_get('node_cron_comments_scale', 0.0);
$ranking[] = '%d * (2.0 - 2.0 / (1.0 + c.comment_count * %f))';
@@ -856,7 +856,7 @@ function node_search($op = 'search', $keys = NULL) {
$join2 .= ' LEFT JOIN {node_comment_statistics} c ON c.nid = i.sid';
}
}
- if (module_exist('statistics') && variable_get('statistics_count_content_views', 0) &&
+ if (module_exists('statistics') && variable_get('statistics_count_content_views', 0) &&
$weight = (int)variable_get('node_rank_views', 5)) {
// Inverse law that maps the highest view count on the site to 1 and 0 to 0.
$scale = variable_get('node_cron_views_scale', 0.0);
@@ -1011,7 +1011,7 @@ function node_menu($may_cache) {
$items[] = array('path' => 'admin/content/node/overview', 'title' => t('list'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
- if (module_exist('search')) {
+ if (module_exists('search')) {
$items[] = array('path' => 'admin/content/search', 'title' => t('search posts'),
'description' => t('Search posts by keyword.'),
'callback' => 'node_admin_search',
diff --git a/modules/system/system.module b/modules/system/system.module
index 4b302109b..746fdb103 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1233,7 +1233,7 @@ function system_modules() {
/**
* Handle throttle checkboxes, including overriding the generated checkboxes for required modules.
*/
- if (module_exist('throttle')) {
+ if (module_exists('throttle')) {
$form['throttle'] = array('#type' => 'checkboxes', '#default_value' => $throttle, '#options' => $options);
$throttle_required = array_merge($required, array('throttle'));
foreach ($throttle_required as $require) {
@@ -1253,14 +1253,14 @@ function theme_system_modules($form) {
$row[] = drupal_render($form['description'][$key]);
$row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
- if (module_exist('throttle')) {
+ if (module_exists('throttle')) {
$row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
}
$rows[] = $row;
}
$header = array(t('Name'), t('Description'), t('Enabled'));
- if (module_exist('throttle')) {
+ if (module_exists('throttle')) {
$header[] = t('Throttle');
}
@@ -1399,7 +1399,7 @@ function system_theme_settings($key = '') {
$disabled['toggle_node_user_picture'] = TRUE;
$disabled['toggle_comment_user_picture'] = TRUE;
}
- if (!module_exist('search')) {
+ if (!module_exists('search')) {
$disabled['toggle_search'] = TRUE;
}
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 814a1a11b..6d93a43fc 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -20,7 +20,7 @@ function taxonomy_perm() {
* print lists of terms associated with a node. Themes can print taxonomy
* links with:
*
- * if (module_exist('taxonomy')) {
+ * if (module_exists('taxonomy')) {
* $this->links(taxonomy_link('taxonomy terms', $node));
* }
*/
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index f323d644e..a22b630f4 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -104,7 +104,7 @@ function tracker_page($uid = 0) {
while ($node = db_fetch_object($result)) {
// Determine the number of comments:
$comments = 0;
- if (module_exist('comment') && $node->comment_count) {
+ if (module_exists('comment') && $node->comment_count) {
$comments = $node->comment_count;
if ($new = comment_num_new($node->nid)) {
diff --git a/modules/user/user.module b/modules/user/user.module
index 5f74ca43c..eacf6eb45 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -743,7 +743,7 @@ function user_menu($may_cache) {
'callback' => 'drupal_get_form', 'callback arguments' => array('user_admin_access_delete_confirm'),
'access' => $access_access, 'type' => MENU_CALLBACK);
- if (module_exist('search')) {
+ if (module_exists('search')) {
$items[] = array('path' => 'admin/user/search', 'title' => t('search users'),
'description' => t('Search users by name.'),
'callback' => 'user_admin', 'callback arguments' => array('search'), 'access' => $admin_access,
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme
index 295321eb7..fd1580d52 100644
--- a/themes/chameleon/chameleon.theme
+++ b/themes/chameleon/chameleon.theme
@@ -135,7 +135,7 @@ function chameleon_node($node, $teaser = 0, $page = 0) {
$submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array('#title' => t("By %author at %date", array('%author' => theme('username', $node), '%date' => format_date($node->created, 'small')))) : array();
$terms = array();
- if (module_exist('taxonomy')) {
+ if (module_exists('taxonomy')) {
$terms = taxonomy_link("taxonomy terms", $node);
}
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine
index 939ef1328..79f0f989a 100644
--- a/themes/engines/phptemplate/phptemplate.engine
+++ b/themes/engines/phptemplate/phptemplate.engine
@@ -253,7 +253,7 @@ function phptemplate_page($content) {
* into a pluggable template engine.
*/
function phptemplate_node($node, $teaser = 0, $page = 0) {
- if (module_exist('taxonomy')) {
+ if (module_exists('taxonomy')) {
$taxonomy = taxonomy_link('taxonomy terms', $node);
}
else {