Feature_1255:

- bug fix : function pwg_db_get_recent_period_expression
- add extra fields for select based on "order by"

git-svn-id: http://piwigo.org/svn/trunk@4387 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
nikrou
2009-11-29 14:06:16 +00:00
parent c96097529e
commit ad796f152f
4 changed files with 24 additions and 27 deletions
+12
View File
@@ -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