Commit graph

903 commits

Author SHA1 Message Date
Ilmari Karonen
6c693d99d9 reapply r21363, hopefully without stupid notices this time 2007-04-19 18:47:04 +00:00
Brion Vibber
fd7e5aac2d Revert r21363; triggers PHP notices due to failed lookups for interwiki prefixes 2007-04-19 13:40:06 +00:00
Ilmari Karonen
8bd0a93609 make ->getNsIndex() check canonical namespace names too, remove now redundant explicit check from Title.php; as far as I can tell this shouldn't break anything, and arguably it'll fix some currently broken code. introduce new function getLocalNsIndex() to provide the old functionality, should anyone actually need it. 2007-04-19 10:03:32 +00:00
Greg Sabino Mullane
21b2a0ce01 Much more elegant solution for functions that are not sending a timestamp, thanks to Brion. 2007-03-28 19:54:45 +00:00
Brion Vibber
88a11fc7f5 Revert r20558: appears to be trying to treat symptoms of misformatted data being passed to Language::timeanddate().
Instead, find the bits that are passing raw database-format timestamps in there and make them normalize their data properly through wfTimestamp()
2007-03-28 19:14:24 +00:00
Brion Vibber
4475d36182 Revert $wgDBtimezone commits: r20688, 20689, 20690, 20691.
Alters behavior of wfTimestamp() and wfTimestampNow() in clearly broken ways, such that current time would not return current time anymore.
2007-03-27 19:39:37 +00:00
Greg Sabino Mullane
8e942d3f96 Do not do timezone adjustment if tz is not set - unlogged in users thus see the "local" timezone 2007-03-26 02:05:36 +00:00
Greg Sabino Mullane
0aef616c15 Allow user timezone adjustments to work when using Postgres - fixed bug 9299 2007-03-26 01:05:06 +00:00
Greg Sabino Mullane
cdee353176 Have timeanddate() change timestamp-looking timestampts to YYYYMMDDHH24MISS integer style.
Fixes bug 8558 (Special:Imagelist) as well as other pages (i.e. Special:Unusedimages)
2007-03-19 13:43:42 +00:00
Niklas Laxström
985d93a46e * (bug 9032) Make quickbarSettings localizable through Special:Allmessages 2007-02-22 11:28:05 +00:00
Aaron Schulz
2bec48af13 * Add no-html option for block log parsing for future use 2007-02-16 20:48:33 +00:00
Nick Jenkins
baaee13afc Prevent some unnecessary lstat system calls, generated by include or require directives.
This can be done either by:
* Using explicit full paths, using the $IP global for the installation directory full path, and then working down the tree from there.
* Using explicit full paths, using the "dirname(__FILE__)" directive to get a full directory path for the includer file. 
* Occasionally removing the line altogether, and then for some files the inclusion is handled by the autoloader.

For example, if the "extensions/wikihiero/wh_main.php" file does an include or require on "wh_list.php", then PHP does the following:
* tries to open "wiki/wh_list.php", and fails.
* tries to open "wiki/includes/wh_list.php", and fails.
* tries to open "wiki/languages/wh_list.php", and fails.
* tries to open "wiki/extensions/wikihiero/wh_list.php", and succeeds.

So in this example, the first 3 calls can be prevented if PHP is told where the file is.

Testing Method: On a Linux box, run these commands to attach strace to all the apache2 processes, and log their system calls to a temporary file, then generate some activity, and then stop the strace:
-----------------------------------
rm /tmp/strace-log.txt
strace -tt -o /tmp/strace-log.txt -p `pidof apache2 | sed 's/ / -p /g'` &
php maintenance/fuzz-tester.php --keep-passed-tests --include-binary --max-runtime=3 > /tmp/strace-tests.txt
killall -9 strace
grep "No such file or directory"  /tmp/strace-log.txt | sort -u
-----------------------------------

Any failed file stats will be marked with: "-1 ENOENT (No such file or directory)".

Also:
* Strict Standards: Undefined offset:  230 in includes/normal/UtfNormal.php on line 637
* Strict Standards: iconv() [<a href='function.iconv'>function.iconv</a>]: Detected an illegal character in input string in languages/Language.php on line 776
  [Note: Partial only - despite adding "//IGNORE", it still seems to be possible with some
         messed- up binary input to cause PHP 5.1.2's iconv() function to squeal like a stuck pig].
* Update one $fname variable (method belongs to HistoryBlobStub class).
2007-02-09 05:36:56 +00:00
Niklas Laxström
983a3f1654 * Added getter for fallback 2007-01-20 15:31:32 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Nick Jenkins
0c136554ef For the "languages/" directory :
* removing unused global declarations.
* adding one or two if/else braces.
* adding one or two array declarations.
2007-01-12 07:26:32 +00:00
Leon Weber
a90933fc05 * Made the PLURAL: parser function return singular on -1 per default. 2007-01-09 20:10:44 +00:00
Antoine Musso
1f9c07cd91 method name in wfDebug 2007-01-06 18:20:58 +00:00
Greg Sabino Mullane
2e20425ffd Only do stripforsearch if we are using MySQL, per bug # 8470 2007-01-03 16:36:05 +00:00
Niklas Laxström
c3b2f94cb9 * {{PLURAL:}} now handles formatted numbers correctly 2006-12-23 18:58:44 +00:00
Antoine Musso
b5a5e77543 Makes convertPlural compatible (strict standards) 2006-12-16 22:31:08 +00:00
Antoine Musso
18673ec0e9 Makes Language::getLanguageNames static (strict standards) 2006-12-16 22:03:49 +00:00
Robert Stojnić
66999c01a4 * Enable category names to be written in variants (use single linkbatch for both link and category variants)
* introduce armourMath(), use to put -{ }- around math if needed (not needed for zh, but needed for sr, and probably kk)
2006-12-11 23:33:27 +00:00
Nick Jenkins
74ea267553 Prevent the following strict-standards warnings - i.e. when running with error_logging(E_ALL | E_STRICT); - which seems to disable the yucky "@" operator, as well as maxing out the pedantry of warnings. Nothing major found, just nice to be as explicit and as forward-compatible as possible.
* Strict Standards: Undefined index: switch in includes/Parser.php on line 3849
* Strict Standards: Undefined index: ref in includes/Parser.php on line 3818
* Strict Standards: Non-static method OutputPage::setEncodings() should not be called statically in index.php on line 11
* Strict Standards: Only variables should be assigned by reference in includes/Skin.php on line 888
* Strict Standards: Non-static method Title::newFromURL() should not be called statically in includes/SpecialContributions.php on line 178
* Strict Standards: Only variables should be assigned by reference in includes/GlobalFunctions.php on line 2054
* Strict Standards: Undefined index:  contributions-summary in languages/Language.php on line 764
* Strict Standards: Undefined index:  trackbackhtml in skins/MonoBook.php on line 86
* Strict Standards: Undefined index:  blockip in skins/MonoBook.php on line 204
* Strict Standards: Undefined index:  tagline in skins/MonoBook.php on line 261
* Strict Standards: Undefined index: uselang in includes/SkinTemplate.php on line 1159
* Strict Standards: Non-static method CoreParserFunctions::plural() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  0 in includes/SkinTemplate.php on line 196
* Strict Standards: Undefined index:  USE INDEX in includes/Database.php on line 1015
* Strict Standards: Undefined index:  image_tests in includes/Parser.php on line 3488
* Strict Standards: Undefined offset:  0 in includes/Parser.php on line 3507
* Strict Standards: Non-static method ChangesList::newFromUser() should not be called statically in includes/SpecialWatchlist.php on line 361
* Strict Standards: Non-static method RecentChange::newFromCurRow() should not be called statically in includes/SpecialWatchlist.php on line 367
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/Exception.php on line 168
* Strict Standards: Non-static method LogPage::logName() should not be called statically in includes/SpecialContributions.php on line 325
* Strict Standards: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in maintenance/commandLine.inc on line 191
* Strict Standards: Undefined index:  meatball in languages/Language.php on line 234
* Strict Standards: rmdir(/tmp/mwParser-2108164586-images/thumb): Directory not empty in maintenance/parserTests.inc on line 605
* Cleaning out some new temp files left over by parserTests (there were one or two straggler dirs/files that would persist after the test run ended, due to new tests being added over time)
* Strict Standards: Non-static method CoreParserFunctions::special() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Declaration of ListUsersPage::preprocessResults() should be compatible with that of QueryPage::preprocessResults() in includes/SpecialListusers.php on line 38
* Strict Standards: Only variables should be passed by reference in includes/SpecialBlockip.php on line 175
* Strict Standards: Skin::include_once(skins/Standard.deps.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in includes/Skin.php on line 121
* Strict Standards: Declaration of ApiMain::getResult() should be compatible with that of ApiBase::getResult() in includes/api/ApiMain.php on line 35
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/WikiError.php on line 63
* Strict Standards: Non-static method WikiError::isError() should not be called statically in includes/SpecialImport.php on line 64
* Strict Standards: Non-static method ImportStreamSource::newFromInterwiki() should not be called statically in includes/SpecialImport.php on line 58<b
* Strict Standards: Only variables should be assigned by reference in includes/SpecialUndelete.php on line 501
* Strict Standards: Non-static method Image::newFromName() should not be called statically in thumb.php on line 56
* Strict Standards: Non-static method CoreParserFunctions::numberoffiles() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Non-static method CoreParserFunctions::statisticsFunction() should not be called statically in includes/CoreParserFunctions.php on line 139
* Strict Standards: Non-static method CoreParserFunctions::isRaw() should not be called statically in includes/CoreParserFunctions.php on line 128
* Strict Standards: Non-static method CoreParserFunctions::grammar() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  1 in includes/SpecialMIMEsearch.php on line 130
* Strict Standards: Undefined index:  recentchangeslinked in skins/MonoBook.php on line 184
* Strict Standards: Declaration of DumpNotalkFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 612
* Strict Standards: Declaration of DumpNamespaceFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 665
* Strict Standards: Non-static method ImportStreamSource::newFromUpload() should not be called statically in includes/SpecialImport.php on line 46
* Strict Standards: Undefined offset:  5 in includes/Sanitizer.php on line 396
* Strict Standards: Undefined index:  wikidbUserName in includes/SpecialUserlogin.php on line 562
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 95
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 116
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryWatchlist.php on line 128
* Strict Standards: Undefined property:  stdClass::$rc_id in includes/api/ApiQueryBase.php on line 131
* Strict Standards: Undefined property:  stdClass::$rc_last_oldid in includes/api/ApiQueryBase.php on line 164
* Strict Standards: Undefined property:  stdClass::$rc_moved_to_ns in includes/api/ApiQueryBase.php on line 285
* Strict Standards: Undefined property:  stdClass::$rc_patrolled in includes/api/ApiQueryBase.php on line 176
* Strict Standards: Undefined index:  comment in includes/api/ApiFeedWatchlist.php on line 85
* Strict Standards: Undefined offset:  0 in includes/Skin.php on line 302
* Strict Standards: Non-static method User::SetupSession() should not be called statically in includes/SpecialUserlogin.php on line 15

... There are certain to be other things too, so this is not intended to be comprehensive, rather the above just stops most of the notifications I observed.
2006-11-29 05:45:03 +00:00
Rotem Liss
78cf7e6dba (bug 7972) Add a comment to clarify the code 2006-11-18 18:45:34 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Tim Starling
bf55ed0c75 minor bug fixes 2006-10-04 02:12:52 +00:00
Tim Starling
157a8106ac Restructured the languages directory, to avoid problems when people untar MW 1.8 over the top of a 1.7 installation. 2006-10-04 01:39:28 +00:00
Tim Starling
200a2652ef Added sprintfDate format characters NwzWtLaAgGhcrU and extension xt. Extended roman numeral formatting to 3000. 2006-09-25 05:59:00 +00:00
Brion Vibber
81973d965c Fix regressions in case-mapping with mbstring extension missing 2006-09-20 20:05:32 +00:00
Brion Vibber
61b04a3e95 * Updates to language variant code for Serbian et al 2006-09-20 10:22:12 +00:00
Brion Vibber
a38c8add84 reverting SerbianVariants check-in, not ready to go live yet on Wikimedia 2006-09-15 21:02:35 +00:00
Brion Vibber
1657774656 Merge from SerbianVariants branch, trunk 16500 vs SerbianVariants 16523 2006-09-15 20:08:21 +00:00
Tim Starling
7f1ea6045d A little bit of pre-cache canonicalisation for namespace names, to prevent the common error due to using spaces instead of underscores. 2006-09-05 17:06:48 +00:00
Brion Vibber
936158b588 Add a more detailed error message to aid in debugging of broken magic words 2006-08-31 10:19:12 +00:00
Tim Starling
8254f117f9 Bug 7045, Language::isMultibyte() didn't work with multi-character strings 2006-08-17 23:48:11 +00:00
Tim Starling
82a36e14e2 Pass down $disableCache when calling Language::loadLocalisation() recursively 2006-08-14 23:10:58 +00:00
Tim Starling
644131fbc6 Fixed PreferencesForm::validateDate(). 2006-08-10 08:00:53 +00:00
Rotem Liss
dd6b0fcbcb * Correctly get messages which use the form "mainpage/fr" even if they were not created in the database, but only in the language file. This allows us to specify things like {{int:mainpage/fr}} without creating MediaWiki:Mainpage/fr (as we do in {{int:mainpage}}), and to view the default content of pages like MediaWiki:Mainpage/fr without creating them (as we do in MediaWiki:Mainpage). For this, creating a new static function - Language::getMessageFor - and getting the message for the language with it. This parsing applies only for messages with the "/" symbol (there are no such messages), so it should not break things.
* Because we define the messages 'january-gen', 'february-gen', etc. as the genitive forms of months in Langauge::mMonthGenMsgs, I created them in the English file. This should fix the test of {{CURRENTMONTHNAMEGEN}} in the parser tests (currently seems to output "<january-gen>"), and should fix the wrong output of checkLanguage.php and transstat.php, which think that these messages are obsolete.
* Using the genitive forms of the months in Hebrew
* (bug 6939) Update to Indonesian localisation (id) #31
2006-08-07 12:21:06 +00:00
Rotem Liss
455799f03f Don't use global wfMsg in a language file - use Langauge::getMessageFromDB instead. 2006-08-06 18:32:12 +00:00
Rotem Liss
1576102b47 Using a new function, Language::getArrow, to check the direction, instead of hard-coding the arrows and the checks; adding direction marks in Special:DoubleRedirects; adding the real arrows (instead of =>) in Special:Disambiguations. 2006-08-06 18:08:21 +00:00
Rotem Liss
0be256bcba Changing all the last references from LanguageUtf8 to Language, and finally removing it. 2006-08-06 14:23:53 +00:00
Tim Starling
559e8c9edd put the /i modifier back in the namespace grammar thing 2006-08-03 18:04:38 +00:00
Brion Vibber
48e0c7474b * Fix regression in Korean and Japanese date formatting (day of week) 2006-08-03 04:31:02 +00:00
Tim Starling
b57f2c0bbc Smaller recursion limit for less ugly backtraces. 2006-08-02 17:31:01 +00:00
Tim Starling
82a74a2e32 Fixed {{grammar:}} tags in namespace names 2006-08-02 03:19:55 +00:00
Tim Starling
a22cb11101 Added magicWords to mergeable map keys, touched MessagesEn.php to invalidate caches 2006-07-27 10:12:59 +00:00
Brion Vibber
80249cf6cb * Fix regression in ordering of namespaces 2006-07-26 20:37:11 +00:00
Brion Vibber
b21258f223 * Fix regression in auto-set NS_PROJECT_TALK namespace 2006-07-26 20:32:37 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00