X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=maintenance%2FcleanupDupes.inc;h=ce1ffc6ea0016ecbbcba10ab800f97a555e67d63;hb=f88c771756c580442fe7ca2f84bcbb8067b77f57;hp=237a8a923fa62d082ab3c4849e65376fe53e914d;hpb=a26d5a49d755ff4b8039b11d1f26abb5d7bc7e8c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupDupes.inc b/maintenance/cleanupDupes.inc index 237a8a923f..ce1ffc6ea0 100644 --- a/maintenance/cleanupDupes.inc +++ b/maintenance/cleanupDupes.inc @@ -14,19 +14,18 @@ # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # http://www.gnu.org/copyleft/gpl.html /** * If on the old non-unique indexes, check the cur table for duplicate * entries and remove them... * - * @package MediaWiki - * @subpackage Maintenance + * @addtogroup Maintenance */ function fixDupes( $fixthem = false) { - $dbw =& wfGetDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER ); $cur = $dbw->tableName( 'cur' ); $old = $dbw->tableName( 'old' ); $dbw->query( "LOCK TABLES $cur WRITE, $old WRITE" ); @@ -113,19 +112,18 @@ END } function checkDupes( $fixthem = false, $indexonly = false ) { - global $wgDBname; - $dbw =& wfGetDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER ); if( $dbw->indexExists( 'cur', 'name_title' ) && $dbw->indexUnique( 'cur', 'name_title' ) ) { - echo "$wgDBname: cur table has the current unique index; no duplicate entries.\n"; + echo wfWikiID().": cur table has the current unique index; no duplicate entries.\n"; } elseif( $dbw->indexExists( 'cur', 'name_title_dup_prevention' ) ) { - echo "$wgDBname: cur table has a temporary name_title_dup_prevention unique index; no duplicate entries.\n"; + echo wfWikiID().": cur table has a temporary name_title_dup_prevention unique index; no duplicate entries.\n"; } else { - echo "$wgDBname: cur table has the old non-unique index and may have duplicate entries.\n"; + echo wfWikiID().": cur table has the old non-unique index and may have duplicate entries.\n"; if( !$indexonly ) { fixDupes( $fixthem ); } } } -?> \ No newline at end of file +?>