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


PHP Maintenance类代码示例

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


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

示例1: checkAnnouncements

 /**
  * Displays an announcement at the top of the screen
  *
  * @param string $announcement - optional 
  * @return array
  */
 public function checkAnnouncements($h, $announcement = '')
 {
     $announcements = array();
     if (SITE_OPEN == "false") {
         array_push($announcements, $h->lang['main_announcement_site_closed']);
     }
     // "All plugins are currently disabled."
     if (!$h->numActivePlugins()) {
         array_push($announcements, $h->lang['main_announcement_plugins_disabled']);
     }
     // if using the announcement parameter, then add to non-admin pages only:
     if ($announcement && !$h->isAdmin) {
         array_push($announcements, $announcement);
     }
     // get the announcement set in the Admin Maintenance page:
     require_once LIBS . 'Maintenance.php';
     $maintenance = new Maintenance();
     $maintenance->getSiteAnnouncement($h);
     if ($h->vars['admin_announcement_enabled']) {
         array_push($announcements, urldecode($h->vars['admin_announcement']));
     }
     // Plugins can add announcements with this:
     $h->vars['hotaru_announcements'] = $announcements;
     $h->pluginHook('hotaru_announcements');
     $announcements = $h->vars['hotaru_announcements'];
     if (!is_array($announcements)) {
         return false;
     } else {
         return $announcements;
     }
 }
开发者ID:shibuya246,项目名称:Hotaru-Plugins,代码行数:37,代码来源:Announcements.php

示例2: getDump

 /**
  * @return void
  */
 public function getDump()
 {
     $xoops = Xoops::getInstance();
     $maintenance = new Maintenance();
     parent::__construct('', "form_dump", "dump.php", 'post', true);
     $dump_tray = new Xoops\Form\ElementTray(_AM_MAINTENANCE_DUMP_TABLES_OR_MODULES, '');
     $select_tables1 = new Xoops\Form\Select('', "dump_tables", '', 7, true);
     $select_tables1->addOptionArray($maintenance->displayTables(true));
     $dump_tray->addElement($select_tables1, false);
     $ele = new Xoops\Form\Select('     ' . _AM_MAINTENANCE_OR . '     ', 'dump_modules', '', 7, true);
     $module_list = XoopsLists::getModulesList();
     $module_handler = $xoops->getHandlerModule();
     foreach ($module_list as $file) {
         if (XoopsLoad::fileExists(\XoopsBaseConfig::get('root-path') . '/modules/' . $file . '/xoops_version.php')) {
             clearstatcache();
             $file = trim($file);
             $module = $module_handler->create();
             $module->loadInfo($file);
             if ($module->getInfo('tables') && $xoops->isActiveModule($file)) {
                 $ele->addOption($module->getInfo('dirname'), $module->getInfo('name'));
             }
             unset($module);
         }
     }
     $dump_tray->addElement($ele);
     $this->addElement($dump_tray);
     $this->addElement(new Xoops\Form\RadioYesNo(_AM_MAINTENANCE_DUMP_DROP, 'drop', 1));
     $this->addElement(new Xoops\Form\Hidden("op", "dump_save"));
     $this->addElement(new Xoops\Form\Button("", "dump_save", XoopsLocale::A_SUBMIT, "submit"));
 }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:33,代码来源:maintenance.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addDescription('Parse random pages and compare output to cache.');
     $this->addOption('namespace', 'Page namespace number', true, true);
     $this->addOption('maxpages', 'Number of pages to try', true, true);
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:7,代码来源:compareParserCache.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addOption('list', 'List special page names');
     $this->addOption('only', 'Only update "page"; case sensitive, ' . 'check correct case by calling this script with --list or on ' . 'includes/QueryPage.php. Ex: --only=BrokenRedirects', false, true);
     $this->addOption('override', 'Also update pages that have updates disabled');
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:7,代码来源:updateSpecialPages.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Delete old (non-current) revisions from the database";
     $this->addOption('delete', 'Actually perform the deletion');
     $this->addOption('page_id', 'List of page ids to work on', false);
 }
开发者ID:kolzchut,项目名称:mediawiki-molsa-new,代码行数:7,代码来源:deleteOldRevisions.php

示例6:

 function __construct()
 {
     parent::__construct();
     $this->mDescription = 'Script to fix bug 20757 assuming that blob_tracking is intact';
     $this->addOption('dry-run', 'Report only');
     $this->addOption('start', 'old_id to start at', false, true);
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:7,代码来源:fixBug20757.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Count of the number of articles and update the site statistics table";
     $this->addOption('update', 'Update the site_stats table with the new count');
     $this->addOption('use-master', 'Count using the master database');
 }
开发者ID:kolzchut,项目名称:mediawiki-molsa-new,代码行数:7,代码来源:updateArticleCount.php

示例8: __construct

 /**
  * Set script options
  */
 public function __construct()
 {
     parent::__construct();
     $this->addOption('debug', 'Show a lot of debugging stuff.');
     $this->addOption('local', 'Read files from local file system (uses: /raid/images/by_id/).');
     $this->mDescription = 'Calculate md5 checksums for images';
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:10,代码来源:calculateImagesMd5.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Build file cache for content pages";
     $this->addOption('agedays', 'How many days old files must be in order to delete', true, true);
     $this->addOption('subdir', 'Prune one $wgFileCacheDirectory subdirectory name', false, true);
 }
开发者ID:mangowi,项目名称:mediawiki,代码行数:7,代码来源:pruneFileCache.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addOption('outfile', 'File for output. Only a single file may be specified for input.', false, true);
     $this->addOption('outdir', "Directory for output. If this is not specified, and neither is --outfile, then the\n" . "output files will be sent to the same directories as the input files.", false, true);
     $this->mDescription = "Minify a file or set of files.\n\n" . "If --outfile is not specified, then the output file names will have a .min extension\n" . "added, e.g. jquery.js -> jquery.min.js.";
 }
开发者ID:rocLv,项目名称:conference,代码行数:7,代码来源:minify.php

示例11:

 function __construct()
 {
     parent::__construct();
     $this->addDescription("Remove old objects from the parser cache. " . "This only works when the parser cache is in an SQL database.");
     $this->addOption('expiredate', 'Delete objects expiring before this date.', false, true);
     $this->addOption('age', 'Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime ' . 'has been consistent.', false, true);
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:7,代码来源:purgeParserCache.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addDescription('Remove a page record from the database');
     $this->addOption('delete', "Actually delete the page");
     $this->addArg('title', 'Title to delete');
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:7,代码来源:nukePage.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addOption('start-page', 'page_id of the page to start with');
     $this->addOption('start-image', 'il_to of the image to start with');
     $this->addOption('maxlag', 'Maximum replication lag', false, true);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:refreshGlobalimagelinks.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->mDescription = "Review all pages in reviewable namespaces. " . "A user ID must be given to specifiy the \"reviewer\" who accepted the pages.";
     $this->addOption('username', 'The user name of the existing user to use as the "reviewer"', true, true);
     $this->setBatchSize(100);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:7,代码来源:reviewAllPages.php

示例15:

 function __construct()
 {
     parent::__construct();
     $this->addArg('path', 'The file name to format', false);
     $this->addOption('outfile', 'The output file name', false, true);
     $this->addOption('html', 'Use HTML output format. By default, wikitext is used.');
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:7,代码来源:formatInstallDoc.php


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