Alex Trofimov 4 лет назад
Родитель
Сommit
efb5d1b9b2
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      inc/classes/BxDolGrid.php
  2. 1 1
      template/scripts/BxBaseGrid.php

+ 1 - 1
inc/classes/BxDolGrid.php

@@ -207,7 +207,7 @@
  *     foreach ($aIds as $mixedId) {
  *     foreach ($aIds as $mixedId) {
  *         if (!$this->_approve($mixedId))
  *         if (!$this->_approve($mixedId))
  *             continue;
  *             continue;
- *         $aIdsAffected[] = $mixedId;
+ *         $aIdsAffected[] = (int)$mixedId;
  *         $iAffected++;
  *         $iAffected++;
  *     }
  *     }
  *
  *

+ 1 - 1
template/scripts/BxBaseGrid.php

@@ -99,7 +99,7 @@ class BxBaseGrid extends BxDolGrid
         $aAffectedIds = array ();
         $aAffectedIds = array ();
         foreach ($aIds as $mixedId)
         foreach ($aIds as $mixedId)
             if ($this->_enable($mixedId, $iChecked))
             if ($this->_enable($mixedId, $iChecked))
-                $aAffectedIds[] = $mixedId;
+                $aAffectedIds[] = preg_match("/^[\d\w]+$/", $mixedId) ? $mixedId : (int)$mixedId;
 
 
         $sAction = $iChecked ? 'enable' : 'disable';
         $sAction = $iChecked ? 'enable' : 'disable';
         echo echoJson(array($sAction => $aAffectedIds));
         echo echoJson(array($sAction => $aAffectedIds));