deleteorphanedrevisions.inc.php
来自「php 开发的内容管理系统」· PHP 代码 · 共 33 行
PHP
33 行
<?php/** * Support functions for the deleteOrphanedRevisions maintenance script * * @package MediaWiki * @subpackage Maintenance * @author Rob Church <robchur@gmail.com> *//** * Delete one or more revisions from the database * Do this inside a transaction * * @param $id Array of revision id values * @param $db Database class (needs to be a master) */function deleteRevisions( $id, &$dbw ) { if( !is_array( $id ) ) $id = array( $id ); $dbw->delete( 'revision', array( 'rev_id' => $id ), 'deleteRevision' );}/** * Spit out script usage information and exit */function showUsage() { echo( "Finds revisions which refer to nonexisting pages and deletes them from the database\n" ); echo( "USAGE: php deleteOrphanedRevisions.php [--report]\n\n" ); echo( " --report : Prints out a count of affected revisions but doesn't delete them\n\n" );}?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?