* Optional parameters for [[Special:Listusers]]
* (bug 2832) [[Special:Listadmins]] redirects to [[Special:Listusers/sysop]]
* (bug 785) Parser did not get out of <pre> with list elements
+* Some shared upload fixes
=== Caveats ===
$wgSharedUploadDirectory = "/var/www/wiki3/images";
/** DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki. */
$wgSharedUploadDBname = false;
+/** Optional table prefix used in database. */
+$wgSharedUploadDBprefix = '';
/** Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain */
$wgCacheSharedUploads = true;
* Load image metadata from the DB
*/
function loadFromDB() {
- global $wgUseSharedUploads, $wgSharedUploadDBname, $wgLang;
+ global $wgUseSharedUploads, $wgSharedUploadDBname, $wgSharedUploadDBprefix, $wgLang;
$fname = 'Image::loadFromDB';
wfProfileIn( $fname );
# looking it up in the shared repository.
$name = $wgLang->ucfirst($this->name);
- $row = $dbr->selectRow( "`$wgSharedUploadDBname`.image",
+ $row = $dbr->selectRow( "`$wgSharedUploadDBname`.{$wgSharedUploadDBprefix}image",
array(
'img_size', 'img_width', 'img_height', 'img_bits',
'img_media_type', 'img_major_mime', 'img_minor_mime', 'img_metadata' ),
$wgOut->addWikiText($sharedtext);
if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) {
+ require_once("HttpFunctions.php");
$ur = ini_set('allow_url_fopen', true);
$text = wfGetHTTP($url . '?action=render');
ini_set('allow_url_fopen', $ur);