* Parser now dies early if called recursively, instead of producing subtle bugs.
* (bug 14323) Redirect pages, when viewed with redirect=no, no longer hide the
remaining page content.
+* (bug 52587) Maintenance script deleteBatch.php no longer follows redirects
+ in the file namespace and delete the file on the target page. It will still
+ however delete the redirect page.
=== Web API changes in 1.24 ===
* action=parse API now supports prop=modules, which provides the list of
$create: Whether or not the restoration caused the page to be created (i.e. it
didn't exist before).
$comment: The comment associated with the undeletion.
+$oldPageId: ID of page previously deleted (from archive table)
'ArticleUndeleteLogEntry': When a log entry is generated but not yet saved.
$pageArchive: the PageArchive object
/**
* Send a line giving PHP memory usage.
*
- * @param bool $exact Print exact values instead of kilobytes (default: false)
+ * @param bool $exact Print exact byte values instead of kibibytes (default: false)
*/
function wfDebugMem( $exact = false ) {
$mem = memory_get_usage();
if ( !$exact ) {
- $mem = floor( $mem / 1024 ) . ' kilobytes';
+ $mem = floor( $mem / 1024 ) . ' KiB';
} else {
- $mem .= ' bytes';
+ $mem .= ' B';
}
wfDebug( "Memory usage: $mem\n" );
}
protected $mDefaultKey;
/** @var string Compressed storage */
- protected $mCompressed;
+ public $mCompressed;
/** @var bool True if the object is locked against further writes */
protected $mFrozen = false;
}
if ( wfRunHooks( 'UnknownAction', array( $request->getVal( 'action', 'view' ), $page ) ) ) {
+ $output->setStatusCode( 404 );
$output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
}
$apiResult = $this->getResult();
if ( $params['redirect'] ) {
+ if ( $params['prependtext'] === null && $params['appendtext'] === null && $params['section'] !== 'new' ) {
+ $this->dieUsage( 'You have attempted to edit using the "redirect"-following mode, which must be used in conjuction with section=new, prependtext, or appendtext.', 'redirect-appendonly' );
+ }
if ( $titleObj->isRedirect() ) {
$oldTitle = $titleObj;
array( 'editconflict' ),
array( 'emptynewsection' ),
array( 'unknownerror', 'retval' ),
- array( 'code' => 'nosuchsection', 'info' => 'There is no section section.' ),
+ array( 'code' => 'nosuchsection', 'info' => 'There is no such section.' ),
array(
'code' => 'invalidsection',
'info' => 'The section parameter must be a valid section id or \'new\''
array(
'code' => 'appendnotsupported',
'info' => 'This type of page can not be edited by appending or prepending text.' ),
+ array(
+ 'code' => 'redirect-appendonly',
+ 'info' => 'You have attempted to edit using the "redirect"-following mode, which must be used in conjuction with section=new, prependtext, or appendtext.',
+ ),
array(
'code' => 'badformat',
'info' => 'The requested serialization format can not be applied to the page\'s content model'
$status->merge( $this->doConcatenate( $params ) );
$sec = microtime( true ) - $start_time;
if ( !$status->isOK() ) {
- wfDebugLog( 'FileOperation', get_class( $this ) . " failed to concatenate " .
- count( $params['srcs'] ) . " file(s) [$sec sec]" );
+ wfDebugLog( 'FileOperation', get_class( $this ) . "-{$this->name}" .
+ " failed to concatenate " . count( $params['srcs'] ) . " file(s) [$sec sec]" );
}
}
$subStatus->success[$i] = false;
++$subStatus->failCount;
}
+ wfDebugLog( 'FileOperation', get_class( $this ) . "-{$this->name} " .
+ " stat failure; aborted operations: " . FormatJson::encode( $ops ) );
}
// Merge errors into status fields
* @return string
*/
public function getName() {
+ if ( $this->name === false ) {
+ $this->load();
+ }
+
return $this->name;
}
"Arent",
"JurgenNL",
"Southparkfan",
- "Seb35"
+ "Seb35",
+ "Mar(c)"
]
},
"config-desc": "Het installatieprogramma voor MediaWiki",
"config-install-done": "'''Gefeliciteerd!'''\nU hebt MediaWiki met succes geïnstalleerd.\n\nHet installatieprogramma heeft het bestand <code>LocalSettings.php</code> aangemaakt.\nDit bevat al uw instellingen.\n\nU moet het bestand downloaden en in de hoofdmap van uw wiki-installatie plaatsten, in dezelfde map als index.php.\nDe download moet u automatisch zijn aangeboden.\n\nAls de download niet is aangeboden of als u de download hebt geannuleerd, dan kunt u de download opnieuw starten door op de onderstaande koppeling te klikken:\n\n$3\n\n'''Let op''': als u dit niet nu doet, dan is het bestand als u later de installatieprocedure afsluit zonder het bestand te downloaden niet meer beschikbaar.\n\nNa het plaatsen van het bestand met instellingen kunt u '''[$2 uw wiki gebruiken]'''.",
"config-download-localsettings": "<code>LocalSettings.php</code> downloaden",
"config-help": "hulp",
+ "config-help-tooltip": "klik om uit te klappen",
"config-nofile": "Het bestand \"$1\" is niet gevonden. Is het verwijderd?",
"config-extension-link": "Weet u dat u [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions uitbreidingen] kunt gebruiken voor uw wiki?\nU kunt [//www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category uitbreidingen op categorie] bekijken of ga naar de [//www.mediawiki.org/wiki/Extension_Matrix uitbreidingenmatrix] om de volledige lijst met uitbreidingen te bekijken.",
"mainpagetext": "'''De installatie van MediaWiki is geslaagd.'''",
array( 'keyname' => $key, 'exptime' => $row->exptime ),
__METHOD__ );
$db->commit( __METHOD__, 'flush' );
- $values[$key] = false;
} else { // HIT
$values[$key] = $this->unserialize( $db->decodeBlob( $row->value ) );
}
$this->handleWriteError( $e, $row->serverIndex );
}
} else { // MISS
- $values[$key] = false;
$this->debug( 'get: no matching rows' );
}
}
'img_name' => $this->msg( 'listfiles_name' )->text(),
'thumb' => $this->msg( 'listfiles_thumb' )->text(),
'img_size' => $this->msg( 'listfiles_size' )->text(),
- 'img_user_text' => $this->msg( 'listfiles_user' )->text(),
- 'img_description' => $this->msg( 'listfiles_description' )->text(),
);
+ if ( is_null( $this->mUserName ) ) {
+ // Do not show username if filtering by username
+ $this->mFieldNames['img_user_text'] = $this->msg( 'listfiles_user' )->text();
+ }
+ // img_description down here, in order so that its still after the username field.
+ $this->mFieldNames['img_description'] = $this->msg( 'listfiles_description' )->text();
+
if ( !$wgMiserMode && !$this->mShowAll ) {
$this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text();
}
"newimages-summary": "Гэтая спэцыяльная старонка паказвае нядаўна загружаныя файлы.",
"newimages-legend": "Фільтар",
"newimages-label": "Назва файла (альбо яе частка):",
+ "newimages-showbots": "Паказаць загружаныя робатамі",
"noimages": "Выявы адсутнічаюць.",
"ilsubmit": "Шукаць",
"bydate": "па даце",
"watchlistedit-clear-titles": "শিরোনামসমূহ:",
"watchlistedit-clear-done": "আপনার নজরতালিকা পরিষ্কার করা হয়েছে।",
"watchlistedit-clear-removed": "{{PLURAL:$1|১টি শিরোনাম|$1টি শিরোনাম}} সরিয়ে ফেলা হয়েছে:",
+ "watchlistedit-too-many": "এখানে প্রদর্শনের জন্য অনেক পাতা রয়েছে।",
"watchlisttools-clear": "নজরতালিকা পরিস্কার করুন",
"watchlisttools-view": "সম্পর্কিত পরিবর্তনসমূহ দেখুন",
"watchlisttools-edit": "নজর তালিকা দেখুন এবং সম্পাদনা করুন",
"version-ext-colheader-description": "বিবরণ",
"version-ext-colheader-credits": "লেখক",
"version-license-title": "$1-এর জন্য লাইসেন্স",
+ "version-license-not-found": "এই এক্সটেনশনের জন্য কোনো বিস্তারিত লাইসেন্স তথ্য পাওয়া যায়নি।",
"version-credits-title": "$1-এর জন্য কৃতিত্ব",
"version-credits-not-found": "এই এক্সটেনশনটির জন্য কোনো বিস্তারিত কৃতিত্ব তথ্য পাওয়া যায়নি।",
"version-poweredby-credits": "এইক উইকিটি পরিচালিত হচ্ছে '''[https://www.mediawiki.org/ মিডিয়াউইকি]'''-এর মাধ্যমে, কপিরাইট © ২০০১-$1 $2।",
"filerevert-submit": "Suorita palauttaminen",
"filerevert-success": "'''[[Media:$1|$1]]''' on palautettu takaisin [$4 versioon, joka luotiin $2 kello $3].",
"filerevert-badversion": "Tiedostosta ei ole luotu versiota kyseisellä ajan hetkellä.",
- "filedelete": "Tiedoston $1 poisto",
+ "filedelete": "Poistetaan tiedosto $1",
"filedelete-legend": "Tiedoston poisto",
"filedelete-intro": "Olet poistamassa tiedoston '''[[Media:$1|$1]]''' ja kaiken sen historian.",
"filedelete-intro-old": "<span class=\"plainlinks\">Olet poistamassa tiedoston '''[[Media:$1|$1]]''' [$4 päivämäärällä $2 kello $3 luotua versiota].</span>",
"movepagetalktext": "Sivuun mahdollisesti liittyvä keskustelusivu siirtyy automaattisesti mukana, '''paitsi:'''\n*jos siirron kohdesivulla on olemassa keskustelusivu, joka ei ole tyhjä, tai\n*jos otat pois rastin alla olevasta ruudusta.\n\nNäissä tapauksissa sivu täytyy siirtää tai yhdistää käsin, jos se on tarpeen.",
"movearticle": "Siirrettävä sivu:",
"moveuserpage-warning": "'''Varoitus:''' Olet siirtämässä käyttäjäsivua. Huomaa, että vain sivu siirretään ja käyttäjää ''ei'' nimetä uudelleen.",
- "movecategorypage-warning": "<strong>Varoitus:</strong> Olet siirtämässä luokkasivua. Ota huomioon, että ainoastaan luokan sivu siirretään ja tämä toiminto <em>ei</em> luokittele vanhassa luokassa olevia sivuja uuteen luokkaan.",
+ "movecategorypage-warning": "<strong>Varoitus:</strong> Olet siirtämässä luokkasivua. Ota huomioon, että ainoastaan luokan oma sivu siirretään ja että tämä toiminto <em>ei</em> luokittele tai itsestään siirrä vanhassa luokassa olevia sivuja uuteen luokkaan.",
"movenologintext": "Sinun pitää olla rekisteröitynyt käyttäjä ja [[Special:UserLogin|kirjautua sisään]], jotta voisit siirtää sivun.",
"movenotallowed": "Sinulla ei ole oikeutta siirtää sivuja.",
"movenotallowedfile": "Sinulla ei ole oikeutta siirtää tiedostoja.",
"userexists": "ನೀವು ನೀಡಿದ ಸದಸ್ಯರ ಹೆಸರು ಆಗಲೆ ಬಳಕೆಯಲ್ಲಿದೆ. ದಯವಿಟ್ಟು ಬೇರೊಂದು ಹೆಸರನ್ನು ಆಯ್ಕೆ ಮಾಡಿ.",
"loginerror": "ಲಾಗಿನ್ ದೋಷ",
"createacct-error": "ಖಾತೆ ನಿರ್ಮಾಣ ತ್ರುಟಿ",
- "createaccounterror": "ಖಾತೆ ನಿರ್ಮಾಣ ಮಾಡಲಿಕ್ಕೆ ಆಗಲಿಲ್ಲ.",
+ "createaccounterror": "$1 ಖಾತೆ ನಿರ್ಮಾಣ ಮಾಡಲಿಕ್ಕೆ ಆಗಲಿಲ್ಲ.",
"nocookiesnew": "ನಿಮ್ಮ ಬಳಕೆದಾರ ಖಾತೆಯು ಸೃಷ್ಟಿತವಾಗಿದೆ, ಆದರೆ ನೀವು ಲಾಗ್ ಇನ್ ಆಗಿಲ್ಲ.\n{{SITENAME}} ಲಾಗ್ ಇನ್ ಮಾಡಲು cookieಗಳನ್ನು ಉಪಯೋಗಿಸುತ್ತದೆ.\nನಿಮ್ಮ ಗಣಕಯಂತ್ರದಲ್ಲಿ cookieಗಳು ನಿಷಿದ್ಧವಾಗಿದೆ.\nದಯವಿಟ್ಟು ಈ ನಿಷೇಧವನ್ನು ತೆಗೆದು, ನಿಮ್ಮ ಬಳಕೆದಾರ ಹೆಸರು ಮತ್ತು ಪ್ರವೇಶಪದಗಳನ್ನು ಉಪಯೋಗಿಸಿ ಲಾಗ್ ಇನ್ ಆಗಿ.",
"nocookieslogin": "{{SITENAME}} ಬಳಕೆದಾರರನ್ನು ಲಾಗ್ ಇನ್ ಮಾಡಲು cookieಗಳನ್ನು ಉಪಯೋಗಿಸುತ್ತದೆ.\nನಿಮ್ಮ ಗಣಕಯಂತ್ರದಲ್ಲ್ cookieಗಳ ಉಪಯೋಗ ನಿಷಿದ್ಧವಾಗಿದೆ.\nದಯವಿಟ್ಟು ಆ ನಿಷೇಧವನ್ನು ತೆಗೆದು ಮತ್ತೊಮ್ಮೆ ಪ್ರಯತ್ನಿಸಿ.",
"noname": "ನೀವು ಸರಿಯಾದ ಬಳಕೆದಾರ ಹೆಸರನ್ನು ಸೂಚಿಸಿಲ್ಲ.",
"passwordtooshort": "ಪ್ರವೇಶಪದ ಕನಿಷ್ಟ {{PLURAL:$1|೧ ಅಕ್ಷರವನ್ನು|$1 ಅಕ್ಷರಗಳನ್ನು}} ಹೊಂದಿರಬೇಕು.",
"password-name-match": "ನಿಮ್ಮ ಬಳಕೆದಾರ ಹೆಸರಿನಿಂದ ಪ್ರವೇಶಪದ ವಿಭಿನ್ನವಾಗಿರಬೇಕು.",
"password-login-forbidden": "ಈ ಬಳಕೆದಾರರ ಹೆಸರು ಮತ್ತು ಪ್ರವೇಶಪದವನ್ನು ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ.",
- "mailmypassword": "ಹà³\8aಸ ಪà³\8dರವà³\87ಶ ಪದವನà³\8dನà³\81 à²\87-à²\85à²\82à²\9aà³\86 ಮà³\82ಲà²\95 à²\95ಳà³\81ಹಿಸಿ",
+ "mailmypassword": "ಪà³\8dರವà³\87ಶಪದವನà³\8dನà³\81 ಪà³\81ನà²\83ಸà³\8dಥಾಪಿಸಿ.",
"passwordremindertitle": "{{SITENAME}}ಗೆ ಹೊಸ ತಾತ್ಕಾಲಿಕ ಪ್ರವೇಶ ಪದ",
"passwordremindertext": "{{SITENAME}} ($4) ಸೈಟಿಗೆ ಹೊಸ ಪ್ರವೇಶಪದವನ್ನು $1 ಐ.ಪಿ. ವಿಳಾಸದಿಂದ ಕೋರಲಾಗಿದೆ.\nಸದಸ್ಯ \"$2\" ಅವರ ಹೊಸ ಪ್ರವೇಶಪದ ಈಗ \"$3\".\nನೀವು ಲಾಗ್ ಇನ್ ಆಗಿ ತಮ್ಮ ಪ್ರವೇಶಪದವನ್ನು ಬದಲಾಯಿಸಿ.\n\nನೀವು ಈ ಕೋರಿಕೆಯನ್ನು ಮಾಡಿಲ್ಲದಿದ್ದರೆ, ಅಥವ ನೀವು ನಿಮ್ಮ ಹಳೆಯ ಪ್ರವೇಶಪದವನ್ನು ನೆನಪಿಸಿಕೊಂಡರೆ ಈ ಮಾಹಿತಿಗೆ ಗಮನ ನೀಡದೆ ನಿಮ್ಮ ಹಳೆಯ ಪ್ರವೇಶಪದವನ್ನು ಉಪಯೋಗಿಸಲು ಮುಂದುವರೆಸಿರಿ.",
"noemail": "ಸದಸ್ಯ \"$1\" ಅವರ ಹೆಸರಿನಲ್ಲಿ ಯಾವ ಇ-ಅಂಚೆ ವಿಳಾಸವೂ ದಾಖಲಾಗಿಲ್ಲ.",
"revdelete-hide-user": "ಸಂಪಾದಕರ ಬಳಕೆಯ ಹೆಸರು/IP ಅಡಗಿಸು",
"revdelete-hide-restricted": "ಈ ನಿಬಂಧನೆಗಳನ್ನು ನಿರ್ವಾಹಕರಿಗೂ ಅನ್ವಯಿಸು ಮತ್ತು ಈ interface ಗೆ ಬೀಗ ಹಾಕು",
"revdelete-radio-same": "(ಬದಲಾಯಿಸಬೇಡಿ)",
- "revdelete-radio-set": "ಹà³\8cದà³\81",
+ "revdelete-radio-set": "à²\85ಡà²\97ಿದ",
"revdelete-radio-unset": "ಇಲ್ಲ",
"revdelete-suppress": "ನಿರ್ವಾಹಕರಿಂದ ಮತ್ತಿತರರಿಂದ ಬಂದ ಮಾಹಿತಿಯನ್ನು ಅಡಗಿಸು",
"revdelete-unsuppress": "ಪುನಃ ಸ್ಥಾಪಿಸಿದ ಬದಲಾವಣೆಗಳ ಮೇಲಿನ ನಿಬಂಧನೆಗಳನ್ನು ತೆಗೆ",
"watchlistedit-raw-titles": "ಶೀರ್ಷಿಕೆಗಳು:",
"watchlistedit-raw-added": "{{PLURAL:$1|೧ ಶೀರ್ಷಿಕೆಯನ್ನು|$1 ಶೀರ್ಷಿಕೆಗಳನ್ನು}} ಸೇರಿಸಲಾಯಿತು:",
"watchlistedit-raw-removed": "{{PLURAL:$1|೧ ಶೀರ್ಷಿಕೆಯನ್ನು|$1 ಶೀರ್ಷಿಕೆಗಳನ್ನು}} ತೆಗೆಯಲಾಯಿತು:",
+ "watchlistedit-clear-titles": "ಶೀರ್ಷಿಕೆಗಳು:",
"watchlisttools-view": "ಸೂಚಿಸಲ್ಪಟ್ಟ ಬದಲಾವಣೆಗಳನ್ನು ವೀಕ್ಷಿಸಿ",
"watchlisttools-edit": "ವೀಕ್ಷಣಾಪಟ್ಟಿಯನ್ನು ನೋಡು ಮತ್ತು ಸಂಪಾದಿಸು",
"watchlisttools-raw": "ಮೂಲ ವೀಕ್ಷಣಾಪಟ್ಟಿಯನ್ನು ಸಂಪಾದಿಸು",
"rollbacklinkcount-morethan": "méi wéi {{PLURAL:$1|Eng Ännerung|$1 Ännerungen}} zrécksetzen",
"rollbackfailed": "Zrécksetzen huet net geklappt",
"cantrollback": "Lescht Ännerung kann net zréckgesat ginn. De leschten Auteur ass deen eenzegen Auteur vun dëser Säit.",
- "alreadyrolled": "Déi lescht Ännerung vun der Säit [[:$1]] vum [[User:$2|$2]] ([[User talk:$2|talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]);; kann net zeréckgesat ginn;\neen Aneren huet dëst entweder scho gemaach oder nei Ännerungen agedroen.\n\nDéi lescht Ännerung vun der Säit ass vum [[User:$3|$3]] ([[User talk:$3|Diskussioun]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
+ "alreadyrolled": "Déi lescht Ännerung vun der Säit [[:$1]] vum [[User:$2|$2]] ([[User talk:$2|talk]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]);; kann net zréckgesat ginn;\neen Aneren huet dat entweder scho gemaach oder nei Ännerungen agedroen.\n\nDéi lescht Ännerung vun der Säit ass vum [[User:$3|$3]] ([[User talk:$3|Diskussioun]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
"editcomment": "De Resumé vun der Ännerung war: \"''$1''\".",
"revertpage": "Ännerunge vum [[Special:Contributions/$2|$2]] ([[User talk:$2|Diskussioun]]) zréckgesat op déi lescht Versioun vum [[User:$1|$1]]",
"revertpage-nouser": "Zréckgesaten Ännerungen duerch e verstoppte Benotzer op déi lescht Versioun vum {{GENDER:$1|[[User:$1|$1]]}}",
"tog-watchlisthideown": "Scont le mé mudìfiche endèi oservàcc speciài",
"tog-watchlisthidebots": "Sconda i mudifich di bot da i pagin uservaa special",
"tog-watchlisthideminor": "Scont le mudìfiche picinìne 'ndèi oservàcc speciai",
- "tog-watchlisthideliu": "Scont le mudìfiche dei ütèncc registràcc endèi oservàcc speciài",
+ "tog-watchlisthideliu": "Scont le mudìfiche dei ütèncc autenticàcc endèi oservàcc speciài",
"tog-watchlisthideanons": "Scont le mudìfiche dei ütèncc anònim endèi oservàcc speciài",
"tog-watchlisthidepatrolled": "Scont le mudìfiche verificàde endèi oservàcc speciài",
"tog-ccmeonemails": "Spedissem una copia di messagg spedii a i alter druvadur",
"tog-showhiddencats": "Fà vidè i categurij scundüü",
"tog-norollbackdiff": "Mustra mía i ''diffs'' dop che i henn staa ripristinaa cun un rollback",
"tog-useeditwarning": "Avìzem quan che so dré a nà fò de 'na pàgina sènsa ìga salvàt le mudìfiche",
- "tog-prefershttps": "Dopra sèmper 'na conesiù sigüra quan che s'è registràcc",
+ "tog-prefershttps": "Dopra sèmper 'na conesiù sigüra quan che s'è autenticàcc",
"underline-always": "Semper",
"underline-never": "Mai",
"underline-default": "Mantegn i impustazión standard del browser o de l'interfàcia",
"internalerror": "Erur in del sistema",
"internalerror_info": "Erur intern: $1",
"filecopyerror": "L'è mía staa pussibel cubià l'archivi \"$1\" in \"$2\"",
- "cannotdelete-title": "Se pöl mìa scancelà la pàgina \"$1\"",
+ "filerenameerror": "L'è mía staa pussibel rinumunà l'archivi \"$1\" in \"$2\"",
+ "filedeleteerror": "L'è mía staa pussibel scancelà l'archivi \"$1\"",
+ "directorycreateerror": "L'è mía staa pussibel creà la cartèla \"$1\"",
+ "filenotfound": "L'è mía staa pussibel trövà l'archivi \"$1\"",
+ "unexpected": "Valur inaspetaa: \"$1\"=\"$2\"",
+ "cannotdelete": "La pagina o l'archivi \"$1\" i g'ha mìa püdìt véser scancelàcc.\nPöl das che i sàpe zà stacc scancelàcc de vergü óter.",
+ "cannotdelete-title": "L'è mìa stat pusìbol scancelà la pàgina \"$1\"",
+ "delete-hook-aborted": "El scancelamènt l'è stat anulàt de l'hook.\nGh'è stat dat nesöna spiegasiù.",
"badtitle": "Títul mía bun",
"badtitletext": "El titul de la pagina ciamada a l'è vöj, sbajaa o cun carater minga acetaa, opüra al vegn d'un erur in di ligam intra sit wiki diferent o versión in lenguv diferent de l'istess sit.",
"viewsource": "Còdas surgent",
+ "viewsource-title": "Còdas surgent per $1",
+ "actionthrottled": "Asiù ritardàda",
"protectedpagetext": "Chela pagina chi l'è stata blucàda per impedinn la mudifica o altre azion.",
"viewsourcetext": "L'è pussibil vèd e cupià el codes surgent de chela pagina chí:",
"editinginterface": "'''Ocio''': Te see adree a mudifegà una pàgina che la se dröva per generà 'l test de l'interfacia del prugrama. Ogna mudìfega fada la cambierà l'interfacia de tüt i druvadur. Se te gh'hee intenzión de fà una tradüzión, per piasì cunsiderà la pussibilità de druvà [//translatewiki.net/ translatewiki.net], 'l pruget de lucalizazión de MediaWiki.",
+ "namespaceprotected": "Te g'hét mìa 'l permès nesesàre per mudificà le pàgine del namespace <strong>$1</strong>.",
+ "mypreferencesprotected": "Te g'hét mìa i permès nesesàre per mudificà le tò preferènse",
"ns-specialprotected": "I paginn special i pören mía vess mudifegaa",
"exception-nologin": "Te seet minga dent in del sistema",
- "logouttext": "'''Adess a sii descuness.'''\n\nA pudé andà inanz a druvà la {{SITENAME}} in manera anònima, o a pudé <span class='plainlinks'>[$1 cunètev anmò]</span> cun l'istess suranomm o cun un suranomm diferent.\nTegné cünt che certi paginn pödass che i seguiten a vedess tant 'me se a füdìssuv anmò cuness, fin quand che hii nò vudaa 'l ''cache'' del voster browser.",
+ "virus-scanfailed": "scansiù falìda (còdes $1)",
+ "logouttext": "'''Ades te sét scolegàt.'''\n\nOcio che 'na quach pàgina la te pödarès vègner fò compàgn che se te g'hèset mìa fat el log-out enfìna a che te snètet mìa fò la cache del tò browser.",
+ "welcomeuser": "Benvegnüü\\Benriàt, $1",
+ "welcomecreation-msg": "El to cünt l'è staa pruntaa. Desmenteghet mía de persunalizà i to [[Special:Preferences|preferenz de {{SITENAME}}]].",
"yourname": "El to suranóm:",
"userlogin-yourname": "Nom del ütènt",
"userlogin-yourname-ph": "Mèt dét el tò nòm de ütènt",
"createaccount": "Creá un cünt",
"gotaccount": "Gh'hee-t giamò un cünt? '''$1'''.",
"gotaccountlink": "Va dent in del sistema",
- "userlogin-resetlink": "Sét desmentegàt i tò dati de registrasiù?",
+ "userlogin-resetlink": "Sét desmentegàt i tò dati de autenticasiù?",
"userlogin-resetpassword-link": "Sét desmentegàt la tò password?",
- "userlogin-helplink2": "G'hét bezògn de 'na mà per registràt?",
+ "userlogin-helplink2": "G'hét bezògn de 'na mà per autenticàt?",
+ "userlogin-loggedin": "Te sét zabèla autenticàt come {{GENDER:$1|$1}}.\nDòpra el mòdulo ché sóta per turnà a autenticàt come 'n óter ütènt.",
"userlogin-createanother": "Créa 'n ótra ütènsa",
"createacct-emailrequired": "Indirìs e-mail",
"createacct-emailoptional": "Indirìs e-mail (upsiunàl)",
"createacct-realname": "Nòm véro (upsiunàl)",
"createaccountreason": "Mutìf:",
"createacct-reason": "Mutìf:",
- "createacct-reason-ph": "Perchè sét dré a creà 'n ótra ütènsa?",
+ "createacct-reason-ph": "Che fòza che sét dré a creà 'n ótra ütènsa?",
"createacct-captcha": "Contròl de sigürèsa",
"createacct-imgcaptcha-ph": "Mèt dét el tèst che te èdet ché sura",
"createacct-submit": "Créa la tò ütènsa",
"createacct-error": "Erùr endèl creà l'ütènsa",
"createaccounterror": "Se pö minga creà el cünt: $1",
"nocookiesnew": "El cünt a l'è staa creaa, ma t'hee minga pudüü andà dent in del sistema.\n{{SITENAME}} al dupra i cookies per fà andà i duvrat in del sistema.\nTì te gh'hee i cookies disabilitaa.\nPer piasè, abilita i cookies e pröa anmò a andà dent cunt el tò nom e la password.",
- "noname": "Vüü avii mía specificaa un nomm d'üsüari valévul.",
- "loginsuccesstitle": "La cunessiun l'è scumenzada cun sücess.",
- "loginsuccess": "Al é connectaa a {{SITENAME}} compagn \"$1\".",
+ "nocookieslogin": "{{SITENAME}} el dòpra i cookies per l'operasiù de log-in dei ütèncc. I tò cookies envéce i è dizativàcc. Atìvei e pröa tùrna.",
+ "nocookiesfornew": "L'ütènsa l'è mìa stàda creàda, perchè l'è mìa stat pusìbol confermà la sò fónt. Dà 'n öciàda de ìga i cookies atìf, tùrna a cargà chèsta pàgina e pröa amò m'na ólta.",
+ "noname": "Te g'hét mìa specificàt en nòm de ütènt bù.",
+ "loginsuccesstitle": "Login efetuàt.",
+ "loginsuccess": "<strong>Adès te sét cunitìt al server de {{SITENAME}} col nòm ütènt de \"$1\".</strong>",
"nosuchuser": "A gh'è nissün druvat cun 'l nom ''$1''. <br />\nI suranomm i henn sensibil a i leter majùscul.<br />\nCuntrola 'l nom che t'hee metüü denter o [[Special:UserLogin/signup|crea un cünt növ]].",
"nosuchusershort": "Ghe n'è mia d'ütent cun el nom de \"$1\". Ch'el cuntrola se l'ha scrivüü giüst.",
"nouserspecified": "Te gh'heet da specificà un nom del druvatt.",
+ "login-userblocked": "Chèsta ütènsa l'è blocàda. La conesiù l'è mìa cunsentìda.",
"wrongpassword": "La ciav che t'hee metüü denter l'è nò giüsta. Pröva turna per piasè.",
"wrongpasswordempty": "T'hee no metüü denter la parola ciav. Pröva turna per piasè.",
"password-name-match": "La tò password la g'ha de éser diferènta del tò nòm de ütènt",
"mailmypassword": "Tùrna a defenéser la password",
"passwordremindertext": "Un quajdün (prubabilment ti, cun l'indiriz IP $1) l'ha ciamaa da mandagh 'na ciav növa per andà denter int 'l sistema de {{SITENAME}} ($4).\nLa ciav per 'l druvadur \"$2\" adess l'è \"$3\".\nSariss mej andà denter int 'l sit almanch una völta prima de cambià la ciav.\nLa to ciav tempuranea la scaderà da chì a {{PLURAL:$5|un dì|$5 dì}}.\n\nSe te nò staa ti a ciamà 'sta ciav chì, o magara t'hee truaa la ciav vegia e te vör pü cambiala, te pör ignurà 'stu messagg chì e 'ndà inanz a druà la ciav vegia.",
+ "noemail": "Gh'è registràt nisü indirìs e-mail per l'ütènt \"$1\".",
"noemailcreate": "Bezògna fornéser en indirìs e-mail bù",
"passwordsent": "Una parola ciav bele növa l'è staa spedii a l'indiriz e-mail registra da l'ütent \"$1\".\nPer piasè, ve drent anmò dop che te l'ricevüü.",
"blocked-mailpassword": "'L to indirizz IP l'è blucaa, e per quela resón lì te pö mía druvà la funzion de recüper de la password.",
"emailauthenticated": "'L tò indirizz e-mail l'è staa verificaa 'l $2 ai $3.",
"emailnotauthenticated": "El tò indirìs e-mail l'è gnemò stat confermàt. Nesöna e-mail la sarà mandàda per le funsiù elencàde ché sota.",
"emailconfirmlink": "Cunferma 'l to indirizz e-mail",
- "accountcreated": "Cunt bell-e-cread",
+ "cannotchangeemail": "I indirìs e-mail i pöl mìa éser cambiàcc en chèsta wiki.",
+ "emaildisabled": "Chèsto sit el pöl mìa mandà vià le e-mail.",
+ "accountcreated": "Ütènsa creàda",
"accountcreatedtext": "Ghè stat creàt l'ütènsa per [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|msg]]).",
+ "createaccount-title": "Creasiù de 'n ütènsa a {{SITENAME}}",
+ "login-abort-generic": "La tò autenticasiù l'è falìda - Operasiù anulàda",
"loginlanguagelabel": "Lengua: $1",
"pt-login": "Va dent",
"pt-login-button": "Va dent",
"pt-createaccount": "Creá un cünt",
"pt-userlogout": "Va fö (logout)",
"changepassword": "Mudifega la paròla d'urdin",
+ "resetpass_announce": "Per completà la conesiù, te g'hét de definì 'na password nöa.",
"resetpass_header": "Càmbia la password de l'ütènsa",
- "oldpassword": "Paròla d'urdin végja:",
- "newpassword": "Paròla d'urdin növa:",
- "retypenew": "Scriv ancamò la paròla d'urdin növa:",
+ "oldpassword": "Password vècia:",
+ "newpassword": "Password nöa:",
+ "retypenew": "Tùrna a mèter dét la password nöa:",
"resetpass_submit": "Defenés la password e regìstret (fà 'l log-in)",
"changepassword-success": "La tò password l'è stàda cambiàda sènsa erùr!",
+ "changepassword-throttled": "Te g'hét fat tròp tacc tentatìf de cunitìt en poch tép, adès te g'hét de spetà $1 per püdì turnà a pröà.",
+ "resetpass_forbidden": "Te pödet mìa cambià le password",
+ "resetpass-no-info": "Te g'hét de éser cunitìt per acéder diretamènt a la pàgina",
"resetpass-submit-loggedin": "Càmbia la password",
"resetpass-submit-cancel": "Scancèla l'operasiù",
"passwordreset": "Tùrna a defenéser la password",
"blockedtitle": "Ütènsa blocàda",
"blockedtext": "'''El to nom del druvadur o el to indirizz IP l'è stat blucaa.'''\n\nEl bloch l'è stat fat da $1.\nEl mutiv per el bloch l'è: ''$2''\n\n* Principi del bloch: $8\n* Scadenza del bloch: $6\n* Blucaa: $7\n\nSe a vurii, a pudii cuntatà $1 o un olter [[{{MediaWiki:Grouppage-sysop}}|aministradur]] per discüt el bloch.\n\nFeegh a ment che la funzion 'Manda un email a quel druvadur chì' l'è mia ativa se avii mia registraa un indirizz e-mail valid ind i voster [[Special:Preferences|preferenz]] o se l'üsagg de 'sta funzion l' è stat blucaa.\n\nL'indirizz IP curent l'è $3, el nümer ID del bloch l'è #$5.\nFee el piasè d'inclüd tüt i detaj chì de sura in qualsessìa dumanda che a decidii de fà.",
"blockednoreason": "Gh'è stat dat nisü mutìf",
- "loginreqlink": "registràs (fà 'l log-in)",
+ "loginreqlink": "autenticàs (fà 'l log-in)",
"loginreqpagetext": "Per véder le otre pàgine ghe öl $1.",
"accmailtitle": "Password mandàda",
"accmailtext": "La password per [[User talk:$1|$1]] l'è stada mandada a $2. Chèsta password la pöl véser cambiàda per [[Special:ChangePassword|cambià la password]] apéna dòpo che te g'harét fat el log-in.",
"yournick": "Suranomm:",
"prefs-help-signature": "I cument ind i paginn de discüssion i gh'han de vess firmaa cun \"<nowiki>~~~~</nowiki>\" che 'l sarà pö cunvertì int la tua firma cun tacada la data e l'ura.",
"yourgender": "Géner:",
- "gender-unknown": "Mía specifegaa",
+ "gender-unknown": "Preferissi specifegaa nò",
"gender-male": "Mas'c",
"gender-female": "Femena",
"prefs-help-gender": "Upziunal: druvaa per adatà i messagg del software a segónda del gener del druvadur. Questa infurmazion chì la sarà püblica.",
"email": "Indirizz de pòsta elettrònica.",
"prefs-help-email": "L'e-mail a l'è mia obligatòri, però al permet da mandàv una ciav noeva in cas che ve la desmenteghé. A podé apó scernì da lassà entrà i alter dovrat in contat con violter senza da busogn da svelà la vosta identità.",
+ "prefs-help-email-required": "L'indirìs e-mail l'è ubligatóre",
"prefs-info": "Infurmazion de bas",
"prefs-i18n": "Internaziunalizazión",
"prefs-signature": "Fìrma",
"prefs-displaywatchlist": "Upsiù de visualizasiù",
"prefs-tokenwatchlist": "Token",
"prefs-diffs": "Diferènse",
+ "prefs-help-prefershttps": "Chèsta preferènsa la g'harà efèt la pròsima ólta che te se autèntichet.",
+ "email-address-validity-valid": "L'indirìs e-mail el par bù",
+ "email-address-validity-invalid": "Mèt dét en indirìs e-mail che funsiùna",
"userrights": "Gestión di dirit di druvadur",
"userrights-lookup-user": "Gestion di grüp di druvaduu",
"userrights-user-editname": "Butée dent un nom da dovrat",
"Wikiklaas",
"Wolf Lambert",
"לערי ריינהארט",
- "아라"
+ "아라",
+ "Mar(c)"
]
},
"tog-underline": "Koppelingen onderstrepen:",
"parser-template-recursion-depth-warning": "De recursiediepte voor sjablonen is overschreden ($1)",
"language-converter-depth-warning": "De dieptelimiet voor de taalconvertor is overschreden ($1)",
"node-count-exceeded-category": "Pagina's waar het maximaal aantal nodes is overschreden",
+ "node-count-exceeded-category-desc": "Een categorie voor pagina's waar het aantal knooppunten is overschreden.",
"node-count-exceeded-warning": "Op de pagina is het maximale aantal nodes overschreden",
"expansion-depth-exceeded-category": "Pagina's waar de expansiediepte is overschreden",
+ "expansion-depth-exceeded-category-desc": "Dit is een categorie voor pagina's waar de expansiediepte is overschreden.",
"expansion-depth-exceeded-warning": "De pagina bevat te veel sjablonen",
"parser-unstrip-loop-warning": "Er is een \"unstrip\"-lus gedetecteerd",
"parser-unstrip-recursion-limit": "De recursielimiet ($1) voor \"unstrip\" is overschreden",
"movepagetalktext": "De bijbehorende overlegpagina krijgt automatisch een andere naam, '''tenzij''':\n* De overlegpagina onder de nieuwe naam al bestaat;\n* U het onderstaande vinkje deselecteert.\n\nIn die gevallen moet u de pagina handmatig hernoemen of samenvoegen.",
"movearticle": "Te hernoemen pagina:",
"moveuserpage-warning": "'''Waarschuwing:''' u gaat een gebruikerspagina hernoemen. Houd er rekening mee dat alleen de pagina wordt hernoemd, ''niet'' de gebruiker.",
+ "movecategorypage-warning": "<strong>Waarschuwing:</strong> U staat op het punt een categoriepagina te hernoemen. Houdt u er rekening mee dat alleen de categoriepagina zelf hernoemd zal worden; pagina's in de oude categorie zullen <em>niet</em> automatisch naar de nieuwe worden verplaatst.",
"movenologintext": "U moet [[Special:UserLogin|aangemeld]] zijn om een pagina te hernoemen.",
"movenotallowed": "U hebt geen rechten om pagina's te hernoemen.",
"movenotallowedfile": "U hebt geen rechten om bestanden te hernoemen.",
"morelinkstoimage": "Preglejte [[Special:WhatLinksHere/$1|več povezav]] na to datoteko.",
"linkstoimage-redirect": "$1 (preusmeritev datoteke) $2",
"duplicatesoffile": "{{PLURAL:$1|Sledeča datoteka je dvojnik|Sledeči datoteki sta dvojnika|Sledeče $1 datoteke so dvojniki|Sledečih $1 datotek so dvojniki}} te datoteke ([[Special:FileDuplicateSearch/$2|več podrobnosti]]):",
- "sharedupload": "Datoteka je del projekta $1 in se lahko uporabi v drugih projektih.",
- "sharedupload-desc-there": "Datoteka je iz projekta $1 in se lahko uporablja v drugih projektih.\nProsimo, oglejte si [$2 opisno stran datoteke] za dodatne informacije.",
- "sharedupload-desc-here": "Datoteka je iz projekta $1 in se lahko uporablja v drugih projektih.\nPovzetek na njeni [$2 opisni strani datoteke] je prikazan spodaj.",
- "sharedupload-desc-edit": "Datoteka je z $1 in jo morda uporabljajo drugi projekti.\nMorda želite urediti njeno opisno stran na tamkajšnji [$2 opisni strani datoteke].",
- "sharedupload-desc-create": "Datoteka je z $1 in jo morda uporabljajo drugi projekti.\nMorda želite urediti njeno opisno stran na tamkajšnji [$2 opisni strani datoteke].",
+ "sharedupload": "Datoteka je s projekta $1 in se lahko uporabi v drugih projektih.",
+ "sharedupload-desc-there": "Datoteka je s projekta $1 in se lahko uporablja v drugih projektih.\nProsimo, oglejte si [$2 opisno stran datoteke] za dodatne informacije.",
+ "sharedupload-desc-here": "Datoteka je s projekta $1 in se lahko uporablja v drugih projektih.\nPovzetek na njeni [$2 opisni strani datoteke] je prikazan spodaj.",
+ "sharedupload-desc-edit": "Datoteka je s projekta $1 in jo morda uporabljajo drugi projekti.\nMorda želite urediti njeno opisno stran na tamkajšnji [$2 opisni strani datoteke].",
+ "sharedupload-desc-create": "Datoteka je s projekta $1 in jo morda uporabljajo drugi projekti.\nMorda želite urediti njeno opisno stran na tamkajšnji [$2 opisni strani datoteke].",
"filepage-nofile": "Datoteka s tem imenom ne obstaja.",
"filepage-nofile-link": "Datoteka s tem imenom ne obstaja, vendar pa jo lahko [$1 naložite].",
"uploadnewversion-linktext": "Naložite novo različico datoteke",
"rclistfrom": "Itusi isbedelada cusub oo ka bilaabaneyso $3 $2",
"rcshowhideminor": "$1 bedelada yar",
"rcshowhidebots": "$1 botyaalo",
+ "rcshowhidebots-show": "I tus",
"rcshowhideliu": "$1 isticmaalada-soo galay",
+ "rcshowhideliu-show": "I tus",
"rcshowhideanons": "$1 isticmaalada la aqoon",
+ "rcshowhideanons-show": "I tus",
"rcshowhidepatr": "$1 bedelada la waardiyeeyay",
+ "rcshowhidepatr-show": "I tus",
"rcshowhidemine": "$1 wax badalkeyga",
+ "rcshowhidemine-show": "I tus",
"rclinks": "Itusi isbadeladii $1 ee ugu danbeeyay oo dhacay wixii ka danbeeyay $2 maalmood<br />$3",
"diff": "duwanaan",
"hist": "taariikh",
"randompage": "Ku nasiibso bog",
"brokenredirects-edit": "wax ka bedel",
"brokenredirects-delete": "tirtir",
+ "withoutinterwiki-submit": "I tus",
"nbytes": "$1 {{PLURAL:$1|bayt|bayt}}",
"nmembers": " $1 {{PLURAL:$1|ka mid ah|ka mid ah}}",
"lonelypages": "Boggaga agoonta ah",
"watchlistedit-raw-done": "Ваш списак надгледања је ажуриран.",
"watchlistedit-raw-added": "{{PLURAL:$1|Додат је један наслов|Додата су $1 наслова|Додато је $1 наслова}}:",
"watchlistedit-raw-removed": "{{PLURAL:$1|1 наслов је уклоњен|Уклоњена су $1 наслова|Уклоњено је $1 наслова}}:",
+ "watchlistedit-clear-title": "Пражњење списка надгледања",
+ "watchlistedit-clear-legend": "Испразни списак надгледања",
+ "watchlistedit-clear-explain": "Сви наслови ће бити уклоњени из вашег списка надгледања.",
"watchlistedit-clear-titles": "Наслови:",
+ "watchlistedit-clear-submit": "Испразни списак надгледања (Ово је трајно!)",
+ "watchlisttools-clear": "испразни списак ндгледања",
"watchlisttools-view": "прикажи сродне измене",
"watchlisttools-edit": "прикажи и уреди списак надгледања",
"watchlisttools-raw": "измени сиров списак надгледања",
"protect-locked-blocked": "頁面被封鎖,無法更改保護層級。\n以下為頁面 <strong>$1</strong> 目前的設定:",
"protect-locked-dblock": "資料庫被鎖定,無法更改保護層級。\n以下為頁面 <strong>$1</strong> 目前的設定:",
"protect-locked-access": "您的帳號沒有權限更改保護層級。\n以下為頁面 <strong>$1</strong> 目前的設定:",
- "protect-cascadeon": "此頁面目前受保護,因此頁面被下列啟動連鎖保護的 $1 個頁面引用。\n更改此頁面的保護層級不會影響連鎖保護的作用。",
+ "protect-cascadeon": "此頁面目前受保護,因頁面被下列啟動連鎖保護的 $1 個頁面引用。\n更改此頁面的保護層級不會影響連鎖保護的作用。",
"protect-default": "允許所有使用者",
"protect-fallback": "僅允許有 \"$1\" 權限的使用者",
"protect-level-autoconfirmed": "僅允許已自動確認的使用者",
$this->output( $title->getPrefixedText() );
$dbw->begin( __METHOD__ );
if ( $title->getNamespace() == NS_FILE ) {
- $img = wfFindFile( $title );
+ $img = wfFindFile( $title, array( 'ignoreRedirect' => true ) );
if ( $img && $img->isLocal() && !$img->delete( $reason ) ) {
$this->output( " FAILED to delete associated file... " );
}
== Things To Do ==
-* Most of the tests are named poorly; naming should describe a use case in story-like language, not simply identify the
-unit under test. An example would be the difference between testCalculate and testAddingIntegersTogetherWorks.
-* Many of the tests make multiple assertions, and are thus not unitary tests. By using data-providers and more use-case
-oriented test selection nearly all of these cases can be easily resolved.
-* Some of the test files are either incorrectly named or in the wrong folder. Tests should be organized in a mirrored
-structure to the source they are testing, and named the same, with the exception of the word "Test" at the end.
-* Shared set-up code or base classes are present, but usually named improperly or appear to be poorly factored. Support
-code should share as much of the same naming as the code it's supporting, and test and test-case depenencies should be
-considered to resolve other shared needs.
+
+* Most of the tests are named poorly;
+ naming should describe a use case in story-like language,
+ not simply identify the unit under test.
+ An example would be the difference between "testCalculate"
+ and "testAddingIntegersTogetherWorks".
+
+* Many of the tests make multiple assertions, and are thus not unitary tests.
+ By using data-providers and more use-case oriented test selection
+ nearly all of these cases can be easily resolved.
+
+* Some of the test files are either incorrectly named or in the wrong folder.
+ Tests should be organized in a mirrored structure to the source they are testing,
+ and named the same, with the exception of the word "Test" at the end.
+
+* Shared set-up code or base classes are present,
+ but usually named improperly or appear to be poorly factored.
+ Support code should share as much of the same naming as the code it's supporting,
+ and test and test-case depenencies should be considered to resolve other shared needs.
$this->assertEquals( "== header ==\n\ntest\n\n== header ==\n\ntest", $text );
}
+ /**
+ * Ensure we can edit through a redirect, if adding a section
+ */
+ public function testEdit_redirect() {
+ static $count = 0;
+ $count++;
+
+ // assume NS_HELP defaults to wikitext
+ $name = "Help:ApiEditPageTest_testEdit_redirect_$count";
+ $title = Title::newFromText( $name );
+ $page = WikiPage::factory( $title );
+
+ $rname = "Help:ApiEditPageTest_testEdit_redirect_r$count";
+ $rtitle = Title::newFromText( $rname );
+ $rpage = WikiPage::factory( $rtitle );
+
+ // base edit for content
+ $page->doEditContent( new WikitextContent( "Foo" ),
+ "testing 1", EDIT_NEW, false, self::$users['sysop']->user );
+ $this->forceRevisionDate( $page, '20120101000000' );
+ $baseTime = $page->getRevision()->getTimestamp();
+
+ // base edit for redirect
+ $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]" ),
+ "testing 1", EDIT_NEW, false, self::$users['sysop']->user );
+ $this->forceRevisionDate( $rpage, '20120101000000' );
+
+ // conflicting edit to redirect
+ $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]\n\n[[Category:Test]]" ),
+ "testing 2", EDIT_UPDATE, $page->getLatest(), self::$users['uploader']->user );
+ $this->forceRevisionDate( $rpage, '20120101020202' );
+
+ // try to save edit, following the redirect
+ list( $re, , ) = $this->doApiRequestWithToken( array(
+ 'action' => 'edit',
+ 'title' => $rname,
+ 'text' => 'nix bar!',
+ 'basetimestamp' => $baseTime,
+ 'section' => 'new',
+ 'redirect' => true,
+ ), null, self::$users['sysop']->user );
+
+ $this->assertEquals( 'Success', $re['edit']['result'],
+ "no problems expected when following redirect" );
+ }
+
+ /**
+ * Ensure we cannot edit through a redirect, if attempting to overwrite content
+ */
+ public function testEdit_redirectText() {
+ static $count = 0;
+ $count++;
+
+ // assume NS_HELP defaults to wikitext
+ $name = "Help:ApiEditPageTest_testEdit_redirectText_$count";
+ $title = Title::newFromText( $name );
+ $page = WikiPage::factory( $title );
+
+ $rname = "Help:ApiEditPageTest_testEdit_redirectText_r$count";
+ $rtitle = Title::newFromText( $rname );
+ $rpage = WikiPage::factory( $rtitle );
+
+ // base edit for content
+ $page->doEditContent( new WikitextContent( "Foo" ),
+ "testing 1", EDIT_NEW, false, self::$users['sysop']->user );
+ $this->forceRevisionDate( $page, '20120101000000' );
+ $baseTime = $page->getRevision()->getTimestamp();
+
+ // base edit for redirect
+ $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]" ),
+ "testing 1", EDIT_NEW, false, self::$users['sysop']->user );
+ $this->forceRevisionDate( $rpage, '20120101000000' );
+
+ // conflicting edit to redirect
+ $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]\n\n[[Category:Test]]" ),
+ "testing 2", EDIT_UPDATE, $page->getLatest(), self::$users['uploader']->user );
+ $this->forceRevisionDate( $rpage, '20120101020202' );
+
+ // try to save edit, following the redirect but without creating a section
+ try {
+ $this->doApiRequestWithToken( array(
+ 'action' => 'edit',
+ 'title' => $rname,
+ 'text' => 'nix bar!',
+ 'basetimestamp' => $baseTime,
+ 'redirect' => true,
+ ), null, self::$users['sysop']->user );
+
+ $this->fail( 'redirect-appendonly error expected' );
+ } catch ( UsageException $ex ) {
+ $this->assertEquals( 'redirect-appendonly', $ex->getCodeString() );
+ }
+ }
+
public function testEditConflict() {
static $count = 0;
$count++;
}
}
- public function testEditConflict_redirect() {
+ /**
+ * Ensure that editing using section=new will prevent simple conflicts
+ */
+ public function testEditConflict_newSection() {
static $count = 0;
$count++;
// assume NS_HELP defaults to wikitext
- $name = "Help:ApiEditPageTest_testEditConflict_redirect_$count";
+ $name = "Help:ApiEditPageTest_testEditConflict_newSection_$count";
$title = Title::newFromText( $name );
- $page = WikiPage::factory( $title );
- $rname = "Help:ApiEditPageTest_testEditConflict_redirect_r$count";
- $rtitle = Title::newFromText( $rname );
- $rpage = WikiPage::factory( $rtitle );
+ $page = WikiPage::factory( $title );
- // base edit for content
+ // base edit
$page->doEditContent( new WikitextContent( "Foo" ),
"testing 1", EDIT_NEW, false, self::$users['sysop']->user );
$this->forceRevisionDate( $page, '20120101000000' );
$baseTime = $page->getRevision()->getTimestamp();
- // base edit for redirect
- $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]" ),
- "testing 1", EDIT_NEW, false, self::$users['sysop']->user );
- $this->forceRevisionDate( $rpage, '20120101000000' );
-
- // conflicting edit to redirect
- $rpage->doEditContent( new WikitextContent( "#REDIRECT [[$name]]\n\n[[Category:Test]]" ),
+ // conflicting edit
+ $page->doEditContent( new WikitextContent( "Foo bar" ),
"testing 2", EDIT_UPDATE, $page->getLatest(), self::$users['uploader']->user );
- $this->forceRevisionDate( $rpage, '20120101020202' );
+ $this->forceRevisionDate( $page, '20120101020202' );
- // try to save edit; should work, because we follow the redirect
+ // try to save edit, expect no conflict
list( $re, , ) = $this->doApiRequestWithToken( array(
'action' => 'edit',
- 'title' => $rname,
+ 'title' => $name,
'text' => 'nix bar!',
'basetimestamp' => $baseTime,
- 'redirect' => true,
+ 'section' => 'new',
), null, self::$users['sysop']->user );
$this->assertEquals( 'Success', $re['edit']['result'],
- "no edit conflict expected when following redirect" );
-
- // try again, without following the redirect. Should fail.
- try {
- $this->doApiRequestWithToken( array(
- 'action' => 'edit',
- 'title' => $rname,
- 'text' => 'nix bar!',
- 'basetimestamp' => $baseTime,
- ), null, self::$users['sysop']->user );
-
- $this->fail( 'edit conflict expected' );
- } catch ( UsageException $ex ) {
- $this->assertEquals( 'editconflict', $ex->getCodeString() );
- }
+ "no edit conflict expected here" );
}
public function testEditConflict_bug41990() {
'action' => 'edit',
'title' => $rname,
'text' => 'nix bar!',
+ 'section' => 'new',
'redirect' => true,
), null, self::$users['sysop']->user );