当前位置: 首页>>代码示例>>PHP>>正文


PHP ipsRegistry::applications方法代码示例

本文整理汇总了PHP中ipsRegistry::applications方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::applications方法的具体用法?PHP ipsRegistry::applications怎么用?PHP ipsRegistry::applications使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ipsRegistry的用法示例。


在下文中一共展示了ipsRegistry::applications方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: applicationsRecache

 /**
  * Recache applications
  *
  * @return	@e void
  */
 public function applicationsRecache()
 {
     $apps = array();
     $incomingEmails = FALSE;
     /* Rebuild Applications Cache */
     $this->DB->build(array('select' => '*', 'from' => 'core_applications', 'order' => 'app_position ASC'));
     $outer = $this->DB->execute();
     while ($row = $this->DB->fetch($outer)) {
         /* Sort out tab groups */
         $row['app_tab_groups'] = IPSText::cleanPermString($row['app_tab_groups']);
         if ($row['app_tab_groups']) {
             $row['app_tab_groups'] = explode(',', $row['app_tab_groups']);
         } else {
             $row['app_tab_groups'] = array();
         }
         $apps[$row['app_directory']] = $row;
         /* Search */
         // By checking if it's installed here, we don't build the search key properly during a fresh install.
         // We should check if the app is installed at runtime instead.
         //if ( IPSLib::appIsInstalled( $row['app_directory'] ) )
         //{
         $_file = IPSLib::getAppDir($row['app_directory']) . '/extensions/search/config.php';
         if (is_file($_file)) {
             $CONFIG = array();
             require $_file;
             /*noLibHook*/
             if (is_array($CONFIG) and count($CONFIG)) {
                 $apps[$row['app_directory']]['search'] = $CONFIG;
                 unset($CONFIG);
             }
         }
         //}
         /* Fetch installed extensions */
         $apps[$row['app_directory']]['extensions'] = array('itemMarking' => false, 'comments' => false, 'like' => false, 'search' => false, 'incomingEmail' => false);
         /* Now go */
         $apps[$row['app_directory']]['extensions']['comments'] = $this->_getHasExtensionComments($row['app_directory']);
         $apps[$row['app_directory']]['extensions']['itemMarking'] = $this->_getHasExtensionItemMarking($row['app_directory']);
         $apps[$row['app_directory']]['extensions']['incomingEmail'] = $this->_getHasExtensionIncomingEmail($row['app_directory']);
         $apps[$row['app_directory']]['extensions']['like'] = $this->_getHasExtensionLike($row['app_directory']);
         $apps[$row['app_directory']]['extensions']['search'] = $this->_getHasExtensionSearch($row['app_directory']);
         $apps[$row['app_directory']]['extensions']['groupOptions'] = $this->_getGroupExtensions($row['app_directory']);
         /* incomingEmails? */
         if ($apps[$row['app_directory']]['extensions']['incomingEmail']) {
             $incomingEmails = TRUE;
         }
         /* Has custom header? */
         $apps[$row['app_directory']]['hasCustomHeader'] = method_exists($this->registry->output->getTemplate($row['app_directory'] . '_global'), 'overwriteHeader') ? 1 : 0;
     }
     $this->cache->setCache('app_cache', $apps, array('array' => 1));
     ipsRegistry::$applications = $apps;
     /* Do we have an incomingEmails extension anywhere? */
     $systemvars = $this->cache->getCache('systemvars');
     $systemvars['incomingEmails'] = $incomingEmails;
     $this->cache->setCache('systemvars', $systemvars, array('array' => 1));
     /* Rebuild navigation tabs too */
     $tabs = array();
     foreach ($apps as $dir => $data) {
         # app_hide_tab is already checked in the output class
         #if ( ! $data['app_hide_tab'] )
         #{
         $tabs[] = array('app' => $dir, 'groups' => $data['app_tab_groups'], 'module' => '', 'title' => $this->lang->words[$data['app_public_title']] ? $this->lang->words[$data['app_public_title']] : $data['app_public_title']);
         #}
         if (is_file(IPSLib::getAppDir($dir) . '/extensions/coreVariables.php')) {
             $extraTabs = array();
             require_once IPSLib::getAppDir($dir) . '/extensions/coreVariables.php';
             /*noLibHook*/
             if (is_array($extraTabs) && count($extraTabs)) {
                 $this->registry->class_localization->loadLanguageFile(array('admin_' . $dir), $dir);
                 $_extraTabs = array();
                 foreach ($extraTabs as $t) {
                     $t['title'] = $this->lang->words[$t['title']];
                     $_extraTabs[] = $t;
                 }
                 $tabs = array_merge($tabs, $_extraTabs);
             }
             unset($extraTabs);
         }
     }
     $this->cache->setCache('navigation_tabs', $tabs, array('array' => 1));
     $this->cache->rebuildCache('rss_output_cache', 'global');
 }
开发者ID:ConnorChristie,项目名称:GrabViews-Live,代码行数:86,代码来源:applications.php


注:本文中的ipsRegistry::applications方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。