本文整理汇总了PHP中Maintenance类的典型用法代码示例。如果您正苦于以下问题:PHP Maintenance类的具体用法?PHP Maintenance怎么用?PHP Maintenance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Maintenance类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: loadParamsAndArgs
public function loadParamsAndArgs($self = null, $opts = null, $args = null)
{
parent::loadParamsAndArgs($self, $opts, $args);
if (!empty($this->mOptions['wiki_id'])) {
putenv("SERVER_ID={$this->mOptions['wiki_id']}");
}
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:task_runner.php
示例17: fopen
function __construct()
{
parent::__construct();
$gz = in_array('compress.zlib', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP zlib module)';
$bz2 = in_array('compress.bzip2', stream_get_wrappers()) ? 'ok' : '(disabled; requires PHP bzip2 module)';
$this->mDescription = <<<TEXT
This script reads pages from an XML file as produced from Special:Export or
dumpBackup.php, and saves them into the current wiki.
Compressed XML files may be read directly:
.gz {$gz}
.bz2 {$bz2}
.7z (if 7za executable is in PATH)
Note that for very large data sets, importDump.php may be slow; there are
alternate methods which can be much faster for full site restoration:
<https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps>
TEXT;
$this->stderr = fopen("php://stderr", "wt");
$this->addOption('report', 'Report position and speed after every n pages processed', false, true);
$this->addOption('namespaces', 'Import only the pages from namespaces belonging to the list of ' . 'pipe-separated namespace names or namespace indexes', false, true);
$this->addOption('dry-run', 'Parse dump without actually importing pages');
$this->addOption('debug', 'Output extra verbose debug information');
$this->addOption('uploads', 'Process file upload data if included (experimental)');
$this->addOption('no-updates', 'Disable link table updates. Is faster but leaves the wiki in an inconsistent state');
$this->addOption('image-base-path', 'Import files from a specified path', false, true);
$this->addArg('file', 'Dump file to import [else use stdin]', false);
}
开发者ID:xfstudio,项目名称:mediawiki,代码行数:28,代码来源:importDump.php
示例18: __construct
public function __construct()
{
parent::__construct();
$this->mDescription = 'Outputs page text to stdout';
$this->addOption('show-private', 'Show the text even if it\'s not available to the public');
$this->addArg('title', 'Page title');
}
开发者ID:rocLv,项目名称:conference,代码行数:7,代码来源:getText.php
示例19: __construct
public function __construct() {
parent::__construct();
global $wgCategoryCollation;
$this->mDescription = <<<TEXT
This script will find all rows in the categorylinks table whose collation is
out-of-date (cl_collation != '$wgCategoryCollation') and repopulate cl_sortkey
using the page title and cl_sortkey_prefix. If everything's collation is
up-to-date, it will do nothing.
TEXT;
$this->addOption( 'force', 'Run on all rows, even if the collation is ' .
'supposed to be up-to-date.' );
$this->addOption( 'previous-collation', 'Set the previous value of ' .
'$wgCategoryCollation here to speed up this script, especially if your ' .
'categorylinks table is large. This will only update rows with that ' .
'collation, though, so it may miss out-of-date rows with a different, ' .
'even older collation.', false, true );
$this->addOption( 'target-collation', 'Set this to the new collation type to ' .
'use instead of $wgCategoryCollation. Usually you should not use this, ' .
'you should just update $wgCategoryCollation in LocalSettings.php.',
false, true );
$this->addOption( 'dry-run', 'Don\'t actually change the collations, just ' .
'compile statistics.' );
$this->addOption( 'verbose-stats', 'Show more statistics.' );
}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:26,代码来源:updateCollation.php
示例20: __construct
public function __construct()
{
parent::__construct();
$this->mDescription = 'Converts extension entry points to the new JSON registration format';
$this->addArg('path', 'Location to the PHP entry point you wish to convert', true);
$this->addOption('skin', 'Whether to write to skin.json', false, false);
}
开发者ID:GoProjectOwner,项目名称:mediawiki,代码行数:7,代码来源:convertExtensionToRegistration.php
注:本文中的Maintenance类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论