mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user