summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-06-27 13:48:09 +0000
committerDries Buytaert <dries@buytaert.net>2006-06-27 13:48:09 +0000
commit824e7d4d192a0c2a908b0d7e0df2fb95015a1d3f (patch)
tree7847c9403043f1498b978bc99be6448ef3b1af40 /modules
parent15b40d7ea5c686a5bcc9c7c6a45d75ab78033abc (diff)
downloadbrdo-824e7d4d192a0c2a908b0d7e0df2fb95015a1d3f.tar.gz
brdo-824e7d4d192a0c2a908b0d7e0df2fb95015a1d3f.tar.bz2
- Patch #44920 by Crell et al: added support for a sites/all directory.
Diffstat (limited to 'modules')
-rw-r--r--modules/poll.module4
-rw-r--r--modules/poll/poll.module4
-rw-r--r--modules/system.module17
-rw-r--r--modules/system/system.module17
4 files changed, 24 insertions, 18 deletions
diff --git a/modules/poll.module b/modules/poll.module
index d9c4f6f90..0f587280f 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -544,9 +544,9 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
$node->body = $node->teaser = '';
$links = module_invoke_all('link', 'node', $node, 1);
- $links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
+ $links[] = array('#title' => t('older polls'), '#href' => 'poll', '#attributes' => array('title' => t('View the list of polls on this site.')));
if ($node->allowvotes && $block) {
- $links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
+ $links[] = array('#title' => t('results'), '#href' => 'node/'. $node->nid .'/results', '#attributes' => array('title' => t('View the current poll results.')));
}
$node->links = $links;
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index d9c4f6f90..0f587280f 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -544,9 +544,9 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
$node->body = $node->teaser = '';
$links = module_invoke_all('link', 'node', $node, 1);
- $links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
+ $links[] = array('#title' => t('older polls'), '#href' => 'poll', '#attributes' => array('title' => t('View the list of polls on this site.')));
if ($node->allowvotes && $block) {
- $links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
+ $links[] = array('#title' => t('results'), '#href' => 'node/'. $node->nid .'/results', '#attributes' => array('title' => t('View the current poll results.')));
}
$node->links = $links;
diff --git a/modules/system.module b/modules/system.module
index b7871d8a8..7a4c71588 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -673,13 +673,14 @@ function system_default_region($theme) {
}
/**
- * Returns an array of files objects of the given type from both the
- * site-wide directory (i.e. modules/) and site-specific directory
- * (i.e. sites/somesite/modules/). The returned array will be keyed
- * using the key specified (name, basename, filename). Using name or
- * basename will cause site-specific files to shadow files in the
- * default directories. That is, if a file with the same name appears
- * in both location, only the site-specific version will be included.
+ * Returns an array of files objects of the given type from the site-wide
+ * directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/)
+ * and site-specific directory (i. e. sites/somesite/modules/). The returned
+ * array will be keyed using the key specified (name, basename, filename). Using
+ * name or basename will cause site- specific files to shadow files in the
+ * default directories. That is, if a file with the same name appears in both
+ * the site-wide directory and site-specific directory, only the site-specific
+ * version will be included.
*
* @param $mask
* The regular expression of the files to find.
@@ -700,6 +701,8 @@ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
$searchdir = array($directory);
$files = array();
+ // Always search sites/all/* as well as the global directories
+ $searchdir[] = 'sites/all';
if (file_exists("$config/$directory")) {
$searchdir[] = "$config/$directory";
}
diff --git a/modules/system/system.module b/modules/system/system.module
index b7871d8a8..7a4c71588 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -673,13 +673,14 @@ function system_default_region($theme) {
}
/**
- * Returns an array of files objects of the given type from both the
- * site-wide directory (i.e. modules/) and site-specific directory
- * (i.e. sites/somesite/modules/). The returned array will be keyed
- * using the key specified (name, basename, filename). Using name or
- * basename will cause site-specific files to shadow files in the
- * default directories. That is, if a file with the same name appears
- * in both location, only the site-specific version will be included.
+ * Returns an array of files objects of the given type from the site-wide
+ * directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/)
+ * and site-specific directory (i. e. sites/somesite/modules/). The returned
+ * array will be keyed using the key specified (name, basename, filename). Using
+ * name or basename will cause site- specific files to shadow files in the
+ * default directories. That is, if a file with the same name appears in both
+ * the site-wide directory and site-specific directory, only the site-specific
+ * version will be included.
*
* @param $mask
* The regular expression of the files to find.
@@ -700,6 +701,8 @@ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
$searchdir = array($directory);
$files = array();
+ // Always search sites/all/* as well as the global directories
+ $searchdir[] = 'sites/all';
if (file_exists("$config/$directory")) {
$searchdir[] = "$config/$directory";
}