53     public function init($aColumns = null)
 
   55         if (!is_null($aColumns)) {
 
   77         $this->_aColumns = $aColumns;
 
   92         foreach ($aColumns as $iPos => $aCol) {
 
   93             if (isset($aCol[4]) && $aCol[4] == 1 && $sId == $aCol[1] . 
'.' . $aCol[0]) {
 
  106         $this->_sContainer = $sName;
 
  140         return 'select count( * ) ' . $sQ;
 
  174         $iCol = $iCol ? (( int ) str_replace(
'_', 
'', $iCol)) : 0;
 
  175         $iCol = (!isset($aVisibleNames[$iCol])) ? 0 : $iCol;
 
  195         if ($sId && isset($this->_aColumns[$sId])) {
 
  196             return $this->_aColumns[$sId];
 
  212         foreach ($aColNames as $iKey => $aCol) {
 
  215                 $aCols[$iKey] = $aCol;
 
  231         $aVisibleCols = array();
 
  234         if (is_array($aUserCols)) {
 
  235             foreach ($aUserCols as $iKey => $sCol) {
 
  236                 $iCol = ( int ) str_replace(
'_', 
'', $sCol);
 
  237                 if (isset($aColNames[$iCol]) && !$aColNames[$iCol][4]) {
 
  238                     $aVisibleCols[$iCol] = $aColNames[$iCol];
 
  244         if (!count($aVisibleCols)) {
 
  245             foreach ($aColNames as $sName => $aCol) {
 
  247                 if ($aCol[1] && !$aColNames[$sName][4]) {
 
  248                     $aVisibleCols[$sName] = $aCol;
 
  253         return $aVisibleCols;
 
  281         foreach ($aIdentCols as $iCnt => $aCol) {
 
  290                 $sQ .= $sViewTable . 
'.' . $aCol[0] . 
' as _' . $iCnt;
 
  309         if ($this->_blAllowExtColumns && $blVariantsSelectionParameter && $sColumn == 
'oxtitle') {
 
  329         $sVarSelect = 
"$sViewTable.oxvarselect";
 
  331         $sSql = 
" IF( {$sViewTable}.{$sColumn} != '', {$sViewTable}.{$sColumn}, CONCAT((select oxart.{$sColumn} " .
 
  332                 "from {$sViewTable} as oxart " .
 
  333                 "where oxart.oxid = {$sViewTable}.oxparentid),', ',{$sVarSelect})) as _{$iCnt}";
 
  360         return " limit $iStart, $iLimit ";
 
  372         $aFilter = $oConfig->getRequestParameter(
'aFilter');
 
  373         if (is_array($aFilter) && count($aFilter)) {
 
  379             $blIsUtf = $oConfig->isUtf();
 
  380             $sCharset = $oLang->translateString(
"charset");
 
  382             foreach ($aFilter as $sCol => $sValue) {
 
  385                 if ($sValue === 
'') {
 
  389                 $iCol = (int) str_replace(
'_', 
'', $sCol);
 
  390                 if (isset($aCols[$iCol])) {
 
  396                         $sValue = iconv(
'UTF-8', $sCharset, $sValue);
 
  400                     $sValue = str_replace(array(
'%', 
'_'), array(
'\%', 
'\_'), $sValue);
 
  403                     $sValue = $oStr->preg_replace(
'/^\*/', 
'%', $sValue);
 
  405                     $sQ .= $this->
_getViewName($aCols[$iCol][1]) . 
'.' . $aCols[$iCol][0];
 
  406                     $sQ .= 
' like ' . $oDb->Quote($sValue . 
'%') . 
' ';
 
  424         if ($sQ && ($sFilter = $this->
_getFilter())) {
 
  425             $sQ .= ((stristr($sQ, 
'where') === 
false) ? 
'where' : 
' and ') . $sFilter;
 
  442         if ($rs != 
false && $rs->recordCount() > 0) {
 
  444                 $aReturn[] = $rs->fields[0];
 
  460         if (!in_array($sDir, $this->_aPosDir)) {
 
  461             $sDir = $this->_aPosDir[0];
 
  492         return (
int) 
oxDb::getDb()->getOne($sQ, 
false, 
false);
 
  504         return oxDb::getDb(oxDB::FETCH_MODE_ASSOC)->getArray($sQ, 
false, 
false);
 
  516             if (is_array($aData[
'records']) && ($iRecSize = count($aData[
'records']))) {
 
  517                 $aKeys = array_keys(current($aData[
'records']));
 
  518                 $iKeySize = count($aKeys);
 
  520                 for ($i = 0; $i < $iRecSize; $i++) {
 
  521                     for ($c = 0; $c < $iKeySize; $c++) {
 
  522                         $aData[
'records'][$i][$aKeys[$c]] =
 
  523                                                         iconv($sCharset, 
"UTF-8", $aData[
'records'][$i][$aKeys[$c]]);
 
  529         $this->
_output(json_encode($aData));
 
  571         $iDebug = $this->
getConfig()->getConfigParam(
'iDebug');
 
  573             $aResponse[
'countsql'] = $sCountQ;
 
  576         $aResponse[
'records'] = array();
 
  584                 $aResponse[
'datasql'] = $sQ;
 
  590         $aResponse[
'totalRecords'] = $iTotal;
 
  605         if (empty($aArtIds)) {
 
  609         if (!is_array($aArtIds)) {
 
  610             $aArtIds = array($aArtIds);
 
  613         $sShopId = $this->
getConfig()->getShopId();
 
  614         foreach ($aArtIds as $sArtId) {
 
  616             oxRegistry::get(
"oxSeoEncoder")->markAsExpired($sArtId, $sShopId, 1, null, 
"oxtype='oxarticle'");
 
  625         $blDeleteCacheOnLogout = $this->
getConfig()->getConfigParam(
'blClearCacheOnLogout');
 
  627         if (!$blDeleteCacheOnLogout) {
 
  642         $blDeleteCacheOnLogout = $this->
getConfig()->getConfigParam(
'blClearCacheOnLogout');
 
  644         if (!$blDeleteCacheOnLogout) {
 
  646             switch ($sCounterType) {
 
  647                 case 'priceCatArticle':
 
  648                     $myUtilsCount->resetPriceCatArticleCount($sValue);
 
  651                     $myUtilsCount->resetCatArticleCount($sValue);
 
  653                 case 'vendorArticle':
 
  654                     $myUtilsCount->resetVendorArticleCount($sValue);
 
  656                 case 'manufacturerArticle':
 
  657                     $myUtilsCount->resetManufacturerArticleCount($sValue);