コード例 #1
0
ファイル: manager.php プロジェクト: DarneoStudio/bitrix
 /**
  * Adds admin users notification about index rebuild.
  *
  * @param boolean $force Whenever skip iblock check.
  *
  * @return void
  */
 public static function checkAdminNotification($force = false)
 {
     if ($force) {
         $add = true;
     } else {
         $iblockList = \Bitrix\Iblock\IblockTable::getList(array('select' => array('ID'), 'filter' => array('=PROPERTY_INDEX' => 'I')));
         $add = $iblockList->fetch() ? true : false;
     }
     if ($add) {
         $notifyList = \CAdminNotify::getList(array(), array("TAG" => "iblock_property_reindex"));
         if (!$notifyList->fetch()) {
             \CAdminNotify::add(array("MESSAGE" => Loc::getMessage("IBLOCK_NOTIFY_PROPERTY_REINDEX", array("#LINK#" => "/bitrix/admin/iblock_reindex.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "iblock_property_reindex", "MODULE_ID" => "iblock", "ENABLE_CLOSE" => "Y", "PUBLIC_SECTION" => "N"));
         }
     } else {
         \CAdminNotify::deleteByTag("iblock_property_reindex");
     }
 }