|
|
@@ -16,12 +16,14 @@ class BxDolStudioModulesQuery extends BxDolModuleQuery
|
|
|
parent::__construct();
|
|
|
}
|
|
|
|
|
|
- public function updateModule($aParamsSet, $aParamsWhere)
|
|
|
+ public function updateModule($aParamsSet, $aParamsWhere = array())
|
|
|
{
|
|
|
- if(empty($aParamsSet) || empty($aParamsWhere))
|
|
|
+ if(empty($aParamsSet))
|
|
|
return false;
|
|
|
|
|
|
- $sSql = "UPDATE `sys_modules` SET " . $this->arrayToSQL($aParamsSet) . " WHERE " . $this->arrayToSQL($aParamsWhere, " AND ");
|
|
|
+ $sWhereClause = !empty($aParamsWhere) ? $this->arrayToSQL($aParamsWhere, " AND ") : "1";
|
|
|
+
|
|
|
+ $sSql = "UPDATE `sys_modules` SET " . $this->arrayToSQL($aParamsSet) . " WHERE " . $sWhereClause;
|
|
|
return $this->query($sSql);
|
|
|
}
|
|
|
}
|