r65075 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65074‎ | r65075 | r65076 >
Date:18:44, 15 April 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Rename 'setup' file to have the same name as the parent directory.
Modified paths:
  • /trunk/extensions/AdvancedSearch/AdvancedSearch.php (added) (history)
  • /trunk/extensions/AdvancedSearch/AdvancedSearch.setup.php (deleted) (history)

Diff [purge]

Index: trunk/extensions/AdvancedSearch/AdvancedSearch.setup.php
@@ -1,61 +0,0 @@
2 -<?php
3 -/**
4 - * This program is free software; you can redistribute it and/or modify
5 - * it under the terms of the GNU General Public License as published by
6 - * the Free Software Foundation; either version 3 of the License, or
7 - * (at your option) any later version.
8 - *
9 - * @author Roan Kattouw <roan.kattouw@home.nl>
10 - * @copyright Copyright (C) 2008 Roan Kattouw
11 - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
12 - *
13 - * An extension that allows for searching inside categories
14 - * Written for MixesDB <http://mixesdb.com> by Roan Kattouw <roan.kattouw@home.nl>
15 - * For information how to install and use this extension, see the README file.
16 - *
17 - */
18 -# Alert the user that this is not a valid entry point to MediaWiki if they try to access the extension file directly.
19 -if ( !defined( 'MEDIAWIKI' ) ) {
20 - echo <<<EOT
21 -To install the AdvancedSearch extension, put the following line in LocalSettings.php:
22 -require_once( "\$IP/extensions/AdvancedSearch/AdvancedSearch.setup.php" );
23 -EOT;
24 - exit( 1 );
25 -}
26 -
27 -$wgExtensionCredits['specialpage'][] = array(
28 - 'path' => __FILE__,
29 - 'name' => 'AdvancedSearch',
30 - 'author' => 'Roan Kattouw',
31 - 'url' => 'http://www.mediawiki.org/wiki/Extension:AdvancedSearch',
32 - 'version' => '1.0',
33 - 'descriptionmsg' => 'advancedsearch-desc',
34 -);
35 -
36 -$dir = dirname( __FILE__ ) . '/';
37 -$wgExtensionMessagesFiles['AdvancedSearch'] = $dir . 'AdvancedSearch.i18n.php';
38 -$wgAutoloadClasses['AdvancedSearch'] = $dir . 'AdvancedSearch.body.php';
39 -$wgAutoloadClasses['AdvancedSearchPager'] = $dir . 'AdvancedSearchPager.php';
40 -$wgAutoloadClasses['AdvancedSearchCategoryIntersector'] = $dir . 'AdvancedSearchCategoryIntersector.php';
41 -
42 -$wgSpecialPages['AdvancedSearch'] = 'AdvancedSearch';
43 -$wgHooks['LanguageGetSpecialPageAliases'][] = 'AdvancedSearchLocalizedPageName';
44 -$wgHooks['LoadExtensionSchemaUpdates'][] = 'AdvancedSearchSchemaUpdate';
45 -$wgHooks['LinksUpdate'][] = 'AdvancedSearchCategoryIntersector::LinksUpdate';
46 -$wgHooks['ArticleDeleteComplete'][] = 'AdvancedSearchCategoryIntersector::ArticleDeleteComplete';
47 -
48 -function AdvancedSearchLocalizedPageName( &$specialPageArray, $code ) {
49 - wfLoadExtensionMessages( 'AdvancedSearch' );
50 - $text = wfMsg( 'advancedsearch-pagename' );
51 -
52 - $title = Title::newFromText( $text );
53 - $specialPageArray['AdvancedSearch'][] = $title->getDBkey();
54 - return true;
55 -}
56 -
57 -function AdvancedSearchSchemaUpdate() {
58 - global $wgExtNewTables;
59 - $dir = dirname( __FILE__ ) . '/';
60 - $wgExtNewTables[] = array( 'categorysearch', $dir . 'categorysearch.sql' );
61 - return true;
62 -}
Index: trunk/extensions/AdvancedSearch/AdvancedSearch.php
@@ -0,0 +1,61 @@
 2+<?php
 3+/**
 4+ * This program is free software; you can redistribute it and/or modify
 5+ * it under the terms of the GNU General Public License as published by
 6+ * the Free Software Foundation; either version 3 of the License, or
 7+ * (at your option) any later version.
 8+ *
 9+ * @author Roan Kattouw <roan.kattouw@home.nl>
 10+ * @copyright Copyright (C) 2008 Roan Kattouw
 11+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
 12+ *
 13+ * An extension that allows for searching inside categories
 14+ * Written for MixesDB <http://mixesdb.com> by Roan Kattouw <roan.kattouw@home.nl>
 15+ * For information how to install and use this extension, see the README file.
 16+ *
 17+ */
 18+# Alert the user that this is not a valid entry point to MediaWiki if they try to access the extension file directly.
 19+if ( !defined( 'MEDIAWIKI' ) ) {
 20+ echo <<<EOT
 21+To install the AdvancedSearch extension, put the following line in LocalSettings.php:
 22+require_once( "\$IP/extensions/AdvancedSearch/AdvancedSearch.setup.php" );
 23+EOT;
 24+ exit( 1 );
 25+}
 26+
 27+$wgExtensionCredits['specialpage'][] = array(
 28+ 'path' => __FILE__,
 29+ 'name' => 'AdvancedSearch',
 30+ 'author' => 'Roan Kattouw',
 31+ 'url' => 'http://www.mediawiki.org/wiki/Extension:AdvancedSearch',
 32+ 'version' => '1.0',
 33+ 'descriptionmsg' => 'advancedsearch-desc',
 34+);
 35+
 36+$dir = dirname( __FILE__ ) . '/';
 37+$wgExtensionMessagesFiles['AdvancedSearch'] = $dir . 'AdvancedSearch.i18n.php';
 38+$wgAutoloadClasses['AdvancedSearch'] = $dir . 'AdvancedSearch.body.php';
 39+$wgAutoloadClasses['AdvancedSearchPager'] = $dir . 'AdvancedSearchPager.php';
 40+$wgAutoloadClasses['AdvancedSearchCategoryIntersector'] = $dir . 'AdvancedSearchCategoryIntersector.php';
 41+
 42+$wgSpecialPages['AdvancedSearch'] = 'AdvancedSearch';
 43+$wgHooks['LanguageGetSpecialPageAliases'][] = 'AdvancedSearchLocalizedPageName';
 44+$wgHooks['LoadExtensionSchemaUpdates'][] = 'AdvancedSearchSchemaUpdate';
 45+$wgHooks['LinksUpdate'][] = 'AdvancedSearchCategoryIntersector::LinksUpdate';
 46+$wgHooks['ArticleDeleteComplete'][] = 'AdvancedSearchCategoryIntersector::ArticleDeleteComplete';
 47+
 48+function AdvancedSearchLocalizedPageName( &$specialPageArray, $code ) {
 49+ wfLoadExtensionMessages( 'AdvancedSearch' );
 50+ $text = wfMsg( 'advancedsearch-pagename' );
 51+
 52+ $title = Title::newFromText( $text );
 53+ $specialPageArray['AdvancedSearch'][] = $title->getDBkey();
 54+ return true;
 55+}
 56+
 57+function AdvancedSearchSchemaUpdate() {
 58+ global $wgExtNewTables;
 59+ $dir = dirname( __FILE__ ) . '/';
 60+ $wgExtNewTables[] = array( 'categorysearch', $dir . 'categorysearch.sql' );
 61+ return true;
 62+}
Property changes on: trunk/extensions/AdvancedSearch/AdvancedSearch.php
___________________________________________________________________
Name: svn:eol-style
163 + native

Status & tagging log