aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index cbf47b50d..8a7c7285c 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -32,6 +32,18 @@ include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
//----------------------------------------------------------- generic functions
+function get_extra_fiels($order_by_fields)
+{
+ $fields = str_ireplace(array(' order by ', ' desc', ' asc'),
+ array('', '', ''),
+ $order_by_fields
+ );
+ if (!empty($fields))
+ {
+ $fields = ','.$fields;
+ }
+ return $fields;
+}
// The function get_moment returns a float value coresponding to the number
// of seconds since the unix epoch (1st January 1970) and the microseconds