small fixes
This commit is contained in:
parent
5b8860c126
commit
3cef9b0d6c
1 changed files with 9 additions and 7 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.7 $
|
Version : $Revision: 1.8 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/DataEngine.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/DataEngine.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -80,8 +80,8 @@ class DataEngine{
|
||||||
$this->dbc =& $gb->dbc;
|
$this->dbc =& $gb->dbc;
|
||||||
$this->mdataTable = $gb->mdataTable;
|
$this->mdataTable = $gb->mdataTable;
|
||||||
$this->filesTable = $gb->filesTable;
|
$this->filesTable = $gb->filesTable;
|
||||||
$this->filetypes =
|
$this->filetypes = array(
|
||||||
array('audioclip'=>'audioclip', 'playlist'=>'playlist');
|
'all'=>NULL, 'audioclip'=>'audioclip', 'playlist'=>'playlist');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -93,8 +93,9 @@ class DataEngine{
|
||||||
*/
|
*/
|
||||||
function _makeWhereArr($conditions)
|
function _makeWhereArr($conditions)
|
||||||
{
|
{
|
||||||
$ops = array('full'=>"='%s'", 'partial'=>"like '%%%s%%'", 'prefix'=>"like '%s%%'",
|
$ops = array('full'=>"='%s'", 'partial'=>"like '%%%s%%'",
|
||||||
'<'=>"< '%s'", '='=>"= '%s'", '>'=>"> '%s'", '<='=>"<= '%s'", '>='=>">= '%s'"
|
'prefix'=>"like '%s%%'", '<'=>"< '%s'", '='=>"= '%s'",
|
||||||
|
'>'=>"> '%s'", '<='=>"<= '%s'", '>='=>">= '%s'"
|
||||||
);
|
);
|
||||||
$whereArr = array();
|
$whereArr = array();
|
||||||
if(is_array($conditions)){
|
if(is_array($conditions)){
|
||||||
|
@ -275,9 +276,10 @@ class DataEngine{
|
||||||
{
|
{
|
||||||
$filetype = $this->filetypes[strtolower($criteria['filetype'])];
|
$filetype = $this->filetypes[strtolower($criteria['filetype'])];
|
||||||
$operator = strtolower($criteria['operator']);
|
$operator = strtolower($criteria['operator']);
|
||||||
$desc = $criteria['desc'];
|
$desc = (isset($criteria['desc']) ? $criteria['desc'] : NULL);
|
||||||
$whereArr = $this->_makeWhereArr($criteria['conditions']);
|
$whereArr = $this->_makeWhereArr($criteria['conditions']);
|
||||||
$orderbyQn = strtolower($criteria['orderby']);
|
$orderbyQn = (isset($criteria['orderby']) ?
|
||||||
|
strtolower($criteria['orderby']) : NULL);
|
||||||
$obSplitQn = XML_Util::splitQualifiedName($orderbyQn);
|
$obSplitQn = XML_Util::splitQualifiedName($orderbyQn);
|
||||||
$obNs = $obSplitQn['namespace'];
|
$obNs = $obSplitQn['namespace'];
|
||||||
$orderby = $obSplitQn['localPart'];
|
$orderby = $obSplitQn['localPart'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue