|
|
@@ -107,9 +107,20 @@ class Schema_UserUrlActionStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
}
|
|
|
|
|
|
public function _parseSqlWhere($params = []) {
|
|
|
- $sqlWhereAnd = "";
|
|
|
+ $sqlWhereAnd = [];
|
|
|
// TODO: parse where/ogc, etc.
|
|
|
- return $sqlWhereAnd;
|
|
|
+ if (!empty($params)) DBG::log($params, 'array', "\$params");
|
|
|
+ if (!empty($params['f_link'])) {
|
|
|
+ if (is_string($params['f_link'])) {
|
|
|
+ if ('=' === substr($params['f_link'], 0, 1)) {
|
|
|
+ $sqlWhereAnd[] = "t.link = " . DB::getPDO()->quote(substr($params['f_link'], 1));
|
|
|
+ } else {
|
|
|
+ $sqlWhereAnd[] = "t.link like " . DB::getPDO()->quote("%{$params['f_link']}%");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!empty($params)) DBG::log($sqlWhereAnd, 'array', "\$sqlWhereAnd");
|
|
|
+ return (!empty($sqlWhereAnd)) ? "where " . implode(" and ", $sqlWhereAnd) : "";
|
|
|
}
|
|
|
|
|
|
public function getItems($params = []) {
|
|
|
@@ -178,8 +189,7 @@ class Schema_UserUrlActionStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
where c.ID_USER = {$this->idUser}
|
|
|
{$sqlWhereAndIdProces}
|
|
|
) as t
|
|
|
- where 1=1
|
|
|
- {$sqlWhereAnd}
|
|
|
+ {$sqlWhereAnd}
|
|
|
{$sqlOrderBy}
|
|
|
{$sqlLimitOffset}
|
|
|
", 'ID_URL');
|