<exclude-pattern>*/includes/specials/forms/PreferencesFormLegacy\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialListusers\.php</exclude-pattern>
<exclude-pattern>*/includes/specials/SpecialMyRedirectPages\.php</exclude-pattern>
- <exclude-pattern>*/includes/specials/SpecialUploadStash\.php</exclude-pattern>
<exclude-pattern>*/includes/StubObject\.php</exclude-pattern>
- <exclude-pattern>*/includes/upload/UploadFromChunks\.php</exclude-pattern>
<exclude-pattern>*/includes/upload/UploadStash\.php</exclude-pattern>
<exclude-pattern>*/includes/utils/AutoloadGenerator\.php</exclude-pattern>
<exclude-pattern>*/includes/WebResponse\.php</exclude-pattern>
'SpecialUnlockdb' => __DIR__ . '/includes/specials/SpecialUnlockdb.php',
'SpecialUpload' => __DIR__ . '/includes/specials/SpecialUpload.php',
'SpecialUploadStash' => __DIR__ . '/includes/specials/SpecialUploadStash.php',
- 'SpecialUploadStashTooLargeException' => __DIR__ . '/includes/specials/SpecialUploadStash.php',
+ 'SpecialUploadStashTooLargeException' => __DIR__ . '/includes/specials/exception/SpecialUploadStashTooLargeException.php',
'SpecialUserLogin' => __DIR__ . '/includes/specials/SpecialUserLogin.php',
'SpecialUserLogout' => __DIR__ . '/includes/specials/SpecialUserLogout.php',
'SpecialVersion' => __DIR__ . '/includes/specials/SpecialVersion.php',
'UpdateSearchIndex' => __DIR__ . '/maintenance/updateSearchIndex.php',
'UpdateSpecialPages' => __DIR__ . '/maintenance/updateSpecialPages.php',
'UploadBase' => __DIR__ . '/includes/upload/UploadBase.php',
- 'UploadChunkFileException' => __DIR__ . '/includes/upload/UploadFromChunks.php',
- 'UploadChunkVerificationException' => __DIR__ . '/includes/upload/UploadFromChunks.php',
- 'UploadChunkZeroLengthFileException' => __DIR__ . '/includes/upload/UploadFromChunks.php',
+ 'UploadChunkFileException' => __DIR__ . '/includes/upload/exception/UploadChunkFileException.php',
+ 'UploadChunkVerificationException' => __DIR__ . '/includes/upload/exception/UploadChunkVerificationException.php',
+ 'UploadChunkZeroLengthFileException' => __DIR__ . '/includes/upload/exception/UploadChunkZeroLengthFileException.php',
'UploadForm' => __DIR__ . '/includes/specials/forms/UploadForm.php',
'UploadFromChunks' => __DIR__ . '/includes/upload/UploadFromChunks.php',
'UploadFromFile' => __DIR__ . '/includes/upload/UploadFromFile.php',
'UploadSourceAdapter' => __DIR__ . '/includes/import/UploadSourceAdapter.php',
'UploadSourceField' => __DIR__ . '/includes/specials/formfields/UploadSourceField.php',
'UploadStash' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashBadPathException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashException' => __DIR__ . '/includes/upload/UploadStash.php',
+ 'UploadStashBadPathException' => __DIR__ . '/includes/upload/exception/UploadStashBadPathException.php',
+ 'UploadStashException' => __DIR__ . '/includes/upload/exception/UploadStashException.php',
'UploadStashFile' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashFileException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashFileNotFoundException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashNoSuchKeyException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashNotLoggedInException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashWrongOwnerException' => __DIR__ . '/includes/upload/UploadStash.php',
- 'UploadStashZeroLengthFileException' => __DIR__ . '/includes/upload/UploadStash.php',
+ 'UploadStashFileException' => __DIR__ . '/includes/upload/exception/UploadStashFileException.php',
+ 'UploadStashFileNotFoundException' => __DIR__ . '/includes/upload/exception/UploadStashFileNotFoundException.php',
+ 'UploadStashNoSuchKeyException' => __DIR__ . '/includes/upload/exception/UploadStashNoSuchKeyException.php',
+ 'UploadStashNotLoggedInException' => __DIR__ . '/includes/upload/exception/UploadStashNotLoggedInException.php',
+ 'UploadStashWrongOwnerException' => __DIR__ . '/includes/upload/exception/UploadStashWrongOwnerException.php',
+ 'UploadStashZeroLengthFileException' => __DIR__ . '/includes/upload/exception/UploadStashZeroLengthFileException.php',
'UppercaseCollation' => __DIR__ . '/includes/collation/UppercaseCollation.php',
'User' => __DIR__ . '/includes/user/User.php',
'UserArray' => __DIR__ . '/includes/user/UserArray.php',
return true;
}
}
-
-/**
- * @ingroup SpecialPage
- * @ingroup Upload
- */
-class SpecialUploadStashTooLargeException extends UploadStashException {
-}
--- /dev/null
+<?php
+/**
+ * Implements SpecialUploadStashTooLargeException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup SpecialPage
+ * @ingroup Upload
+ */
+class SpecialUploadStashTooLargeException extends UploadStashException {
+}
}
}
}
-
-class UploadChunkZeroLengthFileException extends MWException {
-}
-
-class UploadChunkFileException extends MWException {
-}
-
-class UploadChunkVerificationException extends MWException {
- public $msg;
- public function __construct( array $res ) {
- $this->msg = wfMessage( ...$res );
- parent::__construct( wfMessage( ...$res )
- ->inLanguage( 'en' )->useDatabase( false )->text() );
- }
-}
return $this->repo->fileExists( $this->path );
}
}
-
-/**
- * @ingroup Upload
- */
-class UploadStashException extends MWException implements ILocalizedException {
- /** @var string|array|MessageSpecifier */
- protected $messageSpec;
-
- /**
- * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier
- * @param int $code Exception code
- * @param Exception|Throwable|null $previous The previous exception used for the exception
- * chaining.
- */
- public function __construct( $messageSpec, $code = 0, $previous = null ) {
- $this->messageSpec = $messageSpec;
-
- $msg = $this->getMessageObject()->text();
- $msg = preg_replace( '!</?(var|kbd|samp|code)>!', '"', $msg );
- $msg = Sanitizer::stripAllTags( $msg );
- parent::__construct( $msg, $code, $previous );
- }
-
- public function getMessageObject() {
- return Message::newFromSpecifier( $this->messageSpec );
- }
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashFileNotFoundException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashBadPathException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashFileException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashZeroLengthFileException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashNotLoggedInException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashWrongOwnerException extends UploadStashException {
-}
-
-/**
- * @ingroup Upload
- */
-class UploadStashNoSuchKeyException extends UploadStashException {
-}
--- /dev/null
+<?php
+/**
+ * Implements UploadChunkFileException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Upload
+ */
+
+class UploadChunkFileException extends MWException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadChunkVerificationException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Upload
+ */
+
+class UploadChunkVerificationException extends MWException {
+ public $msg;
+ public function __construct( array $res ) {
+ $this->msg = wfMessage( ...$res );
+ parent::__construct( wfMessage( ...$res )
+ ->inLanguage( 'en' )->useDatabase( false )->text() );
+ }
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadChunkZeroLengthFileException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Upload
+ */
+
+class UploadChunkZeroLengthFileException extends MWException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashBadPathException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashBadPathException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashException extends MWException implements ILocalizedException {
+ /** @var string|array|MessageSpecifier */
+ protected $messageSpec;
+
+ /**
+ * @param string|array|MessageSpecifier $messageSpec See Message::newFromSpecifier
+ * @param int $code Exception code
+ * @param Exception|Throwable|null $previous The previous exception used for the exception
+ * chaining.
+ */
+ public function __construct( $messageSpec, $code = 0, $previous = null ) {
+ $this->messageSpec = $messageSpec;
+
+ $msg = $this->getMessageObject()->text();
+ $msg = preg_replace( '!</?(var|kbd|samp|code)>!', '"', $msg );
+ $msg = Sanitizer::stripAllTags( $msg );
+ parent::__construct( $msg, $code, $previous );
+ }
+
+ public function getMessageObject() {
+ return Message::newFromSpecifier( $this->messageSpec );
+ }
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashFileException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashFileException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashFileNotFoundException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashFileNotFoundException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashNoSuchKeyException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashNoSuchKeyException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashNotLoggedInException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashNotLoggedInException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashWrongOwnerException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashWrongOwnerException extends UploadStashException {
+}
--- /dev/null
+<?php
+/**
+ * Implements UploadStashZeroLengthFileException
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Upload
+ */
+class UploadStashZeroLengthFileException extends UploadStashException {
+}