Exemple #1
0
 /**
  * Handles the custom data that needs to be preloaded.
  *
  * @param array $data Data that was loaded. Unsuccessfully loaded items will have a value of null
  */
 protected function _handleCustomPreloadedData(array &$data)
 {
     if (!is_array($data['routesAdmin'])) {
         $data['routesAdmin'] = XenForo_Model::create('XenForo_Model_RoutePrefix')->rebuildRoutePrefixTypeCache('admin');
     }
     XenForo_Link::setHandlerInfoForGroup('admin', $data['routesAdmin']);
     if (!is_array($data['adminStyleProperties'])) {
         $data['adminStyleProperties'] = XenForo_Model::create('XenForo_Model_StyleProperty')->rebuildPropertyCacheInStyleAndChildren(-1);
     }
     XenForo_Application::set('adminStyleProperties', $data['adminStyleProperties']);
     if (!is_int($data['adminStyleModifiedDate'])) {
         $data['adminStyleModifiedDate'] = 0;
     }
     XenForo_Application::set('adminStyleModifiedDate', $data['adminStyleModifiedDate']);
     if (!is_array($data['adminSearchTypes'])) {
         try {
             $data['adminSearchTypes'] = XenForo_Model::create('XenForo_Model_AdminSearch')->rebuildSearchTypesCache();
         } catch (Exception $e) {
             $data['adminSearchTypes'] = array();
         }
     }
     XenForo_Application::set('adminSearchTypes', $data['adminSearchTypes']);
     XenForo_Application::$allowManualDeferred = true;
     XenForo_Application::$javaScriptUrl = 'js';
 }