當前位置: 首頁>>代碼示例>>PHP>>正文


PHP common_node::findHardLinks方法代碼示例

本文整理匯總了PHP中common_node::findHardLinks方法的典型用法代碼示例。如果您正苦於以下問題:PHP common_node::findHardLinks方法的具體用法?PHP common_node::findHardLinks怎麽用?PHP common_node::findHardLinks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在common_node的用法示例。


在下文中一共展示了common_node::findHardLinks方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     set_time_limit(0);
     require_once 'models/common/common_file.php';
     $File = new common_file();
     $tool = $this->GET['tool'];
     switch ($tool) {
         case 'uri':
             require_once 'models/common/common_uri_mapping.php';
             $CommonURIMapping = new common_uri_mapping();
             $CommonURIMapping->generateAndSaveURITable();
             msg("Nice URLs has been completely generated");
             break;
         case 'flush_thumb':
             if ($File->rm(ONXSHOP_PROJECT_DIR . "var/thumbnails/*")) {
                 msg("All image thumbnails have been deleted");
             } else {
                 "Flushing thumbnails failed";
             }
             break;
         case 'flush_tmp':
             if ($File->rm(ONXSHOP_PROJECT_DIR . "var/tmp/*")) {
                 msg("Temp directory has been cleaned");
             } else {
                 "Flushing temp dir failed";
             }
             break;
         case 'flush_cache':
             if (onxshop_flush_cache()) {
                 msg("Cache has been refreshed");
             } else {
                 msg("Flushing cache failed");
             }
             break;
         case 'flush_api_cache':
             if (is_numeric($GLOBALS['onxshop_conf']['common_configuration']['api_data_version'])) {
                 $current_api_data_version = $GLOBALS['onxshop_conf']['common_configuration']['api_data_version'];
             } else {
                 $current_api_data_version = 1;
             }
             $api_data_version = $current_api_data_version + 1;
             $Configuration = new common_configuration();
             if ($Configuration->saveConfig('common_configuration', 'api_data_version', $api_data_version)) {
                 msg("Data version of API has increased to {$api_data_version}");
                 if (onxshop_flush_cache()) {
                     msg("Cache has been refreshed");
                 } else {
                     msg("Flushing cache failed");
                 }
             }
             break;
         case 'find_hard_links':
             require_once 'models/common/common_node.php';
             $Node = new common_node();
             $hard_links = $Node->findHardLinks();
             foreach ($hard_links as $hard_link) {
                 $this->tpl->assign('ITEM', $hard_link);
                 $this->tpl->parse('content.hard_links.item');
             }
             $this->tpl->parse('content.hard_links');
             break;
         case 'delete_orphaned_baskets':
             require_once 'models/ecommerce/ecommerce_basket.php';
             $Basket = new ecommerce_basket();
             if ($Basket->deleteOrphanedAnonymouseBaskets()) {
                 msg('Deleted orphaned baskets older than two weeks');
             }
             break;
         case 'backup':
             $_Onxshop = new Onxshop_Request("bo/component/backup");
             $this->tpl->assign('SUB_CONTENT', $_Onxshop->getContent());
             break;
         default:
             $this->tpl->parse('content.menu');
             break;
     }
     return true;
 }
開發者ID:AppChecker,項目名稱:onxshop,代碼行數:81,代碼來源:tools.php


注:本文中的common_node::findHardLinks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。