MediaWiki
REL1_22
|
Import one or more images from the local file system into the wiki without using the web-based interface. More...
Go to the source code of this file.
Functions | |
showUsage ($reason=false) | |
Variables | |
$comment = 'Importing file' | |
if(isset($options['comment-file'])) elseif(isset($options['comment'])) | $commentExt = isset( $options['comment-ext'] ) ? $options['comment-ext'] : false |
$count = count( $files ) | |
if(count($args)==0) | $dir = $args[0] |
$extensions | |
$files = findFiles( $dir, $extensions, isset( $options['search-recursively'] ) ) | |
$license = isset( $options['license'] ) ? $options['license'] : '' | |
if($sleep) | $limit = @$options['limit'] |
$optionsWithArgs | |
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0 | |
$sleep = @$options['sleep'] | |
$summary = isset( $options['summary'] ) ? $options['summary'] : '' | |
if($limit) | $timestamp = isset( $options['timestamp'] ) ? $options['timestamp'] : false |
$user | |
if(isset($options['protect'])&&isset($options['unprotect'])) if(isset($options['protect'])&&$options['protect']==1) global | $wgFileExtensions |
if(!$user instanceof User) | $wgUser = $user |
Import one or more images from the local file system into the wiki without using the web-based interface.
"Smart import" additions:
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
Definition in file importImages.php.
$comment = 'Importing file' |
Definition at line 107 of file importImages.php.
Referenced by BackupDumperLoggerTest\addLogEntry(), RecentChangeTest\assertIRCComment(), BackupDumperLoggerTest\assertLogItem(), Orphans\checkOrphans(), Linker\commentBlock(), ApiFeedWatchlist\createFeedItem(), ApiTestCaseUpload\deleteFileByTitle(), UserCache\doQuery(), GenderCache\doQuery(), ApiImageRotate\execute(), ApiQueryRevisions\extractRowInfo(), Linker\formatAutocomments(), Linker\formatAutocommentsCallback(), Linker\formatComment(), FeedUtils\formatDiffRow(), Linker\formatLinksInComment(), Linker\formatLinksInCommentCallback(), SpecialMergeHistory\formatRevisionRow(), UploadBase\getFilenamePrefixBlacklist(), RevDel_RevisionItem\getHTML(), RevisionItem\getHTML(), RevDel_LogItem\getHTML(), ApiQueryImageInfo\getInfo(), IRCColourfulRCFeedFormatter\getLine(), GIFMetadataExtractor\getMetadata(), UploadFromUrl\insertJob(), SearchEngineTest\insertPage(), SpecialMergeHistory\merge(), Title\moveTo(), Title\moveToInternal(), RevertFileAction\onSubmit(), UploadFromChunks\performUpload(), UploadFromStash\performUpload(), UploadFromUrl\performUpload(), UploadBase\performUpload(), OldLocalFile\recordOldUpload(), ImportReporter\reportPage(), RevDel_List\setVisibility(), SpecialRevisionDelete\submit(), LanguageTest\testGetParentLanguage(), LanguageTest\testIsSupportedLanguage(), CLDRPluralRuleEvaluatorTest\testValidRules(), and OldLocalFile\uploadOld().
if (isset($options['comment-file'])) elseif (isset($options['comment'])) $commentExt = isset( $options['comment-ext'] ) ? $options['comment-ext'] : false |
Definition at line 118 of file importImages.php.
$count = count( $files ) |
Definition at line 126 of file importImages.php.
if (count($args)==0) $dir = $args[0] |
Definition at line 49 of file importImages.php.
Referenced by IndexPager\__construct(), CheckSyntax\addDirectoryContent(), lessc\addImportDir(), ApiQueryBase\addTimestampWhereRange(), ApiQueryBase\addWhereRange(), EnhancedChangesList\arrow(), FileCacheBase\cachePath(), UploadFromUrlTestSuite\deleteDirs(), CliInstaller\dirIsExecutable(), SwiftFileBackend\doDirectoryExists(), TestFileOpPerformance\doPerfTest(), CountMessages\execute(), ApiQueryDeletedrevs\execute(), SpecialExport\execute(), ApiQueryFilearchive\execute(), PruneFileCache\execute(), UploadStashCleanup\execute(), ApiQueryAllUsers\execute(), FindHooks\execute(), Exif\exifGPStoNumber(), findFiles(), lessc\findImport(), SwiftFileBackend\getDirectoryListInternal(), SwiftFileBackend\getFileListInternal(), SpecialVersion\getGitHeadSha1(), SpecialRandomInCategory\getQueryInfo(), RandomImageGenerator\getRandomFilenames(), SpecialVersion\getSvnInfo(), SpecialVersion\getSvnRevision(), ForeignAPIFile\getThumbnails(), NewParserTest\getUploadDir(), lessc_parser\parseChunk(), ImageCleanup\pokeFile(), PruneFileCache\prune_directory(), ForeignAPIFile\purgeThumbnails(), ResourceLoaderFileModule\readStyleFile(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryAllPages\run(), WikiImporter\setImageBasePath(), UploadFromUrlTestSuite\setupUploadDir(), ParserTest\setupUploadDir(), EnhancedChangesList\sideArrow(), CdbTest\testCdb(), lessc\tryImport(), wfMkdirParents(), wfRecursiveRemoveDir(), RandomImageGenerator\writeImages(), and MessageWriter\writeMessagesArray().
isset( $options['extensions'] ) ? explode( ',', strtolower( $options['extensions'] ) ) : $wgFileExtensions
Definition at line 62 of file importImages.php.
Referenced by MimeMagic\__construct(), ApiQuerySiteinfo\appendExtensions(), UploadBase\checkWarnings(), WebInstaller_Options\execute(), SpecialVersion\getExtensionCredits(), and MediaHandler\getThumbType().
$files = findFiles( $dir, $extensions, isset( $options['search-recursively'] ) ) |
Definition at line 67 of file importImages.php.
Referenced by ExtensionsTestSuite\__construct(), CheckSyntax\buildFileList(), AutoLoaderTest\checkAutoLoadConf(), TextPassDumperTest\checkpointHelper(), Sqlite\checkSqlSyntax(), SqliteMaintenance\checkSyntax(), UploadFromUrlTestSuite\deleteFiles(), NewParserTest\deleteFiles(), JSParseHelper\execute(), PatchSql\execute(), findFiles(), LocalRepo\findFilesByPrefix(), ResourceLoaderFileModule\getAllStyleFiles(), MWDebug\getFilesIncluded(), CSSMin\getLocalFileReferences(), ResourceLoaderFileModule\getModifiedTime(), ResourceLoaderFileModule\getScript(), ResourceLoaderFileModule\getScriptFiles(), ForeignAPIFile\getThumbnails(), MWCryptRand\initialRandomState(), ResourcesTest\provideResourceFiles(), ForeignAPIFile\purgeThumbnails(), ResourceLoaderFileModule\readStyleFiles(), LocalFileMoveBatch\removeNonexistentFiles(), ApiQueryDuplicateFiles\run(), SpecialUploadStash\showUploads(), and NewParserTest\testFuzzTests().
Definition at line 123 of file importImages.php.
Referenced by RdfMetaData\getKnownLicenses().
Definition at line 99 of file importImages.php.
Referenced by ImageListPager\combineResult(), Title\countAuthorsBetween(), PrefixSearch\defaultSearchBackend(), SpecialRecentchangeslinked\doMainQuery(), SpecialRecentChanges\doMainQuery(), Installer\envCheckCache(), ApiQueryDeletedrevs\execute(), SpecialExport\execute(), ApiQueryFilearchive\execute(), CleanupRemovedModules\execute(), UpdateSpecialPages\execute(), ApiQueryContributions\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiOpenSearch\execute(), ApiQueryAllUsers\execute(), ApiQueryRevisions\execute(), HistoryAction\feed(), HistoryAction\fetchRevisions(), WikiDiff3\find_middle_snake(), LocalRepo\findFilesByPrefix(), WikiDiff3\findMostProgress(), FileJournal\getChangeEntries(), IndexPager\getLimitLinks(), Title\getSubpages(), DatabaseMssql\limitResult(), PurgeChangedPages\pageableSortedRows(), DatabasePostgres\pg_array_parse(), ApiQueryRandom\prepareQuery(), ImageListPager\reallyDoQuery(), MagicWord\replace(), ApiQueryExtLinksUsage\run(), ApiQueryCategoryMembers\run(), ApiQueryPagesWithProp\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), PrefixSearch\searchBackend(), ApiResult\setParsedLimit(), PrefixSearch\specialSearch(), SyncFileBackend\syncBackends(), PrefixSearch\titleSearch(), ApiBase\truncateArray(), Title\updateTitleProtection(), SpecialRecentChanges\webOutput(), wfDebugBacktrace(), wfGetAllCallers(), wfShowingResults(), and wfViewPrevNext().
$optionsWithArgs |
array( 'extensions', 'comment', 'comment-file', 'comment-ext', 'summary', 'user', 'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp', )
Definition at line 34 of file importImages.php.
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0 |
Definition at line 40 of file importImages.php.
Referenced by SearchUpdateTest\testBug32712().
$sleep = @$options['sleep'] |
Definition at line 93 of file importImages.php.
Referenced by DeleteImageCache\execute(), and BagOStuff\lock().
Definition at line 120 of file importImages.php.
Referenced by ApiRollback\execute(), SpecialJavaScriptTest\execute(), RollbackEdits\execute(), EditCLI\execute(), SpecialJavaScriptTest\initQUnitTesting(), and EditPageTest\testSectionEdit().
Definition at line 104 of file importImages.php.
Referenced by Block\__construct(), ParserOutput\addImage(), ImageBuilder\addMissingImage(), ProtectionForm\buildForm(), FileCacheBase\cacheTimestamp(), RevisionDeleter\checkRevisionExistence(), ApiFeedWatchlist\createFeedItem(), RdfMetaData\date(), Xml\dateMenu(), Block\doAutoblock(), RevDel_FileList\doPostCommitUpdates(), RevDel_FileList\doQuery(), ApiSetNotificationTimestamp\execute(), SpecialWatchlist\execute(), FixUserRegistration\execute(), FixTimestamps\execute(), ApiQueryAllUsers\execute(), nextJobDB\executeReadyPeriodicTasks(), EditPageTest\forceRevisionDate(), ApiEditPageTest\forceRevisionDate(), FeedUtils\formatDiff(), FeedUtils\formatDiffRow(), CreditsAction\getAuthor(), Block\getAutoblockExpiry(), NewUsersLogFormatter\getComment(), ReverseChronologicalPager\getDateCond(), RevertFileAction\getFormFields(), ResourceLoaderModule\getHashMtime(), FSFile\getTimestamp(), Preferences\getTimezoneOptions(), ImageHistoryList\imageHistoryLine(), FileCacheBase\isCacheGood(), Block\isExpired(), Skin\lastModified(), BagOStuff\lock(), MediaWiki\main(), SpecialLockdb\onSubmit(), RevertFileAction\onSuccess(), SpecialRecentChanges\optionsPanel(), IPTC\parse(), Parser\pstPass2(), ZipDirectoryReader\readCentralDirectory(), ApiQueryRecentChanges\run(), User\setEmailAuthenticationTimestamp(), ParserOutput\setTimestamp(), TimestampTest\testInvalidOutput(), TimestampTest\testValidOutput(), TimestampTest\testValidParse(), and wfTimestamp().
$user |
isset( $options['user'] ) ? User::newFromName( $options['user'] ) : User::newFromName( 'Maintenance script' )
Definition at line 70 of file importImages.php.
if (isset($options['protect'])&&isset($options['unprotect'])) if (isset($options['protect'])&&$options['protect']==1) global $wgFileExtensions |
Definition at line 56 of file importImages.php.