15         array(
'oxtitle', 
'oxattribute', 1, 1, 0),
 
   16         array(
'oxsort', 
'oxcategory2attribute', 1, 0, 0),
 
   17         array(
'oxid', 
'oxcategory2attribute', 0, 0, 1)
 
   31         $sQAdd = 
" from $sSelTable left join oxcategory2attribute on oxcategory2attribute.oxattrid = $sSelTable.oxid " .
 
   32                  "where oxobjectid = " . 
oxDb::getDb()->quote($sArtId) . 
" ";
 
   44         return 'order by oxcategory2attribute.oxsort ';
 
   53         $sSelect = 
"select * from oxcategory2attribute where oxobjectid= " . 
oxDb::getDb()->quote($sSelId) . 
" order by oxsort";
 
   55         $oList = 
oxNew(
"oxlist");
 
   56         $oList->init(
"oxbase", 
"oxcategory2attribute");
 
   57         $oList->selectString($sSelect);
 
   62         foreach ($oList as $sKey => $oSel) {
 
   63             if ($oSel->oxcategory2attribute__oxsort->value != $iSelCnt) {
 
   64                 $oSel->oxcategory2attribute__oxsort->setValue($iSelCnt);
 
   68             $aIdx2Id[$iSelCnt] = $sKey;
 
   72         if (($iKey = array_search(
oxRegistry::getConfig()->getRequestParameter(
'sortoxid'), $aIdx2Id)) !== 
false) {
 
   73             $iDir = (
oxRegistry::getConfig()->getRequestParameter(
'direction') == 
'up') ? ($iKey - 1) : ($iKey + 1);
 
   74             if (isset($aIdx2Id[$iDir])) {
 
   76                 $oDir1 = $oList->offsetGet($aIdx2Id[$iDir]);
 
   77                 $oDir2 = $oList->offsetGet($aIdx2Id[$iKey]);
 
   79                 $iCopy = $oDir1->oxcategory2attribute__oxsort->value;
 
   80                 $oDir1->oxcategory2attribute__oxsort->setValue($oDir2->oxcategory2attribute__oxsort->value);
 
   81                 $oDir2->oxcategory2attribute__oxsort->setValue($iCopy);
 
   90         $sCountQ = 
'select count( * ) ' . $sQAdd;