aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-01-15 00:09:14 +0000
committerrub <rub@piwigo.org>2007-01-15 00:09:14 +0000
commit9362801a48c6e88fcc9bd56e69ba044f718c6b74 (patch)
tree5c05741cb7262fc51d6c6ad6b6b2bd8c44e0353f /include/functions.inc.php
parent3cef1e6895ed3daeb398980b22cab1c1edefa3c3 (diff)
There are no filter enabled if filter configuration is empty (no icon, no functions, ...)
New system for the filter page configuration View mode flat_recent_cat becomes flat_cat (recent period is removed because global filter is sufficient) Recent period of global filter must be defined "after" start parameter (default value is $user['recent_period']). git-svn-id: http://piwigo.org/svn/trunk@1722 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index de69a252c..177ab651c 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1104,4 +1104,32 @@ function script_basename()
return basename(strtolower($file_name), '.php');
}
+/**
+ * Return value for the current page define on $conf['filter_pages']
+ * Îf value is not defined, default value are returned
+ *
+ * @param value name
+ *
+ * @return filter page value
+ */
+function get_filter_page_value($value_name)
+{
+ global $conf;
+
+ $page_name = script_basename();
+
+ if (isset($conf['filter_pages'][$page_name][$value_name]))
+ {
+ return $conf['filter_pages'][$page_name][$value_name];
+ }
+ else if (isset($conf['filter_pages']['default'][$value_name]))
+ {
+ return $conf['filter_pages']['default'][$value_name];
+ }
+ else
+ {
+ return null;
+ }
+}
+
?>