User:Leucosticte/Sandbox

<?php
 * 1) This file was automatically generated by the MediaWiki installer.
 * 2) If you make manual changes, please keep track in case you need to
 * 3) recreate them later.
 * 4) See includes/DefaultSettings.php for all configurable settings
 * 5) and their default values, but don't forget to make changes in _this_
 * 6) file, not there.
 * 7) Further documentation for configuration settings may be found at:
 * 8) http://www.mediawiki.org/wiki/Manual:Configuration_settings
 * 1) Further documentation for configuration settings may be found at:
 * 2) http://www.mediawiki.org/wiki/Manual:Configuration_settings

if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); } $path = array( $IP, "$IP/includes", "$IP/languages" ); set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path ); require_once( "$IP/includes/DefaultSettings.php" ); if ( $wgCommandLineMode ) { if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { die( "This script must be run from the command line\n" ); } }
 * 1) If you customize your file layout, set $IP to the directory that contains
 * 2) the other MediaWiki files. It will be used as a base to locate files.
 * 1) Uncomment this to disable output compression
 * 2) $wgDisableOutputCompression = true;

$wgSitename        = "Mises Wiki"; $wgMetaNamespace   = "MisesWiki"; $wgScriptPath      = "/mediawiki"; $wgScriptExtension = ".php"; $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true; $wgStylePath       = "$wgScriptPath/skins"; $wgLogo            = "$wgStylePath/misesskin/images/shield.png";
 * 1) The URL base path to the directory containing the wiki;
 * 2) defaults for all runtime URL paths are based off of this.
 * 3) For more information on customizing the URLs please see:
 * 4) http://www.mediawiki.org/wiki/Manual:Short_URL
 * 1) shortURL rewrite settings
 * 1) The relative URL path to the skins directory
 * 1) The relative URL path to the logo.  Make sure you change this from the default,
 * 2) or else you'll overwrite your logo when you upgrade!
 * 1) $wgLogo            = "$wgStylePath/misesskin/images/globe.png";


 * 1) UPO means: this is also a user preference option

$wgEnableEmail     = true; $wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "webmaster@mises.org"; $wgPasswordSender = "webmaster@mises.org"; $wgEnotifUserTalk = true; # UPO $wgEnotifWatchlist = true; # UPO $wgEmailAuthentication = true; $wgDBtype          = "mysql"; // For security reasons, the database passwords are stored outside webroot. // See https://www.mediawiki.org/wiki/Manual:Securing_database_passwords require_once("/home/web/wiki_passwords/wiki_passwords.php"); $wgDBprefix        = "mw_"; $wgDBTableOptions  = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; $wgDBmysql5 = true; $wgMainCacheType = CACHE_ACCEL; $wgMemCachedServers = array; $wgEnableUploads	= true; $wgUseImageMagick	= true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgMaxShellMemory = 524288; $wgShellLocale = "en_US.utf8";
 * 1) Database settings
 * 1) MySQL specific settings
 * 1) MySQL table options to use during installation or update
 * 1) Experimental charset support for MySQL 4.1/5.0.
 * 1) Shared memory settings
 * 1) $wgMainCacheType = CACHE_NONE;
 * 1) To enable image uploads, make sure the 'images' directory
 * 2) is writable, then set this to true:
 * 1) If you use ImageMagick (or any other shell command) on a
 * 2) Linux server, this will need to be set to the name of an
 * 3) available UTF-8 locale
 * 1) If you want to use image uploads under safe mode,
 * 2) create the directories images/archive, images/thumb and
 * 3) images/temp, and make them all writable. Then uncomment
 * 4) this, if it's not already uncommented:
 * 5) $wgHashedUploadDirectory = false;

$wgUseTeX          = false;
 * 1) If you have the appropriate support software installed
 * 2) you can enable inline LaTeX equations:
 * 1) Set $wgCacheDirectory to a writable directory on the web server
 * 2) to make your wiki go slightly faster. The directory should not
 * 3) be publically accessible from the web.
 * 4) $wgCacheDirectory = "$IP/cache";

$wgLocalInterwiki  = strtolower( $wgSitename ); $wgLanguageCode = "en"; $wgDefaultSkin = 'misesskin'; $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = "http://creativecommons.org/licenses/by/3.0/"; $wgRightsText = "Creative Commons Attribution 3.0 Unported"; $wgRightsIcon = "{$wgStylePath}/common/images/cc-by.png";
 * 1) Default skin: you can change the default skin. Use the internal symbolic
 * 2) names, ie 'vector', 'monobook':
 * 1) For attaching licensing metadata to pages, and displaying an
 * 2) appropriate copyright notice / icon. GNU Free Documentation
 * 3) License and Creative Commons licenses are supported so far.
 * 4) $wgEnableCreativeCommonsRdf = true;
 * 1) $wgRightsCode = ""; # Not yet used

$wgDiff3 = "/usr/bin/diff3"; $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); require_once("$IP/extensions/Cite/Cite.php"); $wgHiddenPrefs[] = 'skin'; require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" ); $wgAllowCopyUploads = true; $wgGroupPermissions['user']['upload'] = false; $wgGroupPermissions['autoconfirmed']['upload'] = true; $wgUseAjax = true; require_once("{$IP}/extensions/CategoryTree/CategoryTree.php"); $wgCategoryTreeDefaultMode = CT_MODE_ALL; require_once("$IP/extensions/CharInsert/CharInsert.php"); $wgFavicon = "$wgScriptPath/favicon.png"; $wgAppleTouchIcon = "$wgScriptPath/touch_icon.png"; // hook bottomscripts to add analytics javascript function mises_analytic_scripts($skin, &$text='') { $text = <<<HTML
 * 1) When you make changes to this configuration file, this will make
 * 2) sure that cached pages are cleared.
 * 1) cite extension
 * 1) remove user ability to change skins
 * 1) parserFunctions
 * 1) allow a user to directly upload files from a URL, instead of from a file
 * 1) To prevent normal users from uploading files
 * 1) allow "autoconfirmed" (non-newbie) users to upload files:
 * 1) category tree extension
 * 1) charinsert extension
 * 1) favicon
 * 1) $wgHooks['SkinAfterBottomScripts'][] = 'mises_analytic_scripts';

 _qoptions={qacct:"p-254YVY27hwGSg"};  

 var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-293348-1']); _gaq.push(['_trackPageview']); (function {			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);		});

HTML; return true; } //require_once( "$IP/extensions/recaptcha/ReCaptcha.php" ); // Sign up for these at https://www.google.com/recaptcha/admin/create // Keys removed to the wiki_passwords.php file require_once("$IP/extensions/Collection/Collection.php"); //require_once("$IP/extensions/ProofreadPage/ProofreadPage.php"); require_once ( 'extensions/LabeledSectionTransclusion/lst.php' ); require_once ( 'extensions/LabeledSectionTransclusion/lsth.php' ); $wgNamespaceAliases = array ( 	'Mises_Wiki' => NS_PROJECT,	'Mises_Wiki_talk' => NS_PROJECT_TALK, ); $wgExtraNamespaces[400] = "Index"; $wgExtraNamespaces[401] = "Index_talk"; $wgExtraNamespaces[402] = "Page"; $wgExtraNamespaces[403] = "Page_talk"; $wgExtraNamespaces[404] = "Argumentation"; $wgExtraNamespaces[405] = "Argumentation_talk"; $wgExtraNamespaces[406] = "Essay"; $wgExtraNamespaces[407] = "Essay_talk"; $wgExtraNamespaces[408] = "Book"; $wgExtraNamespaces[409] = "Book_talk"; $wgExtraNamespaces[410] = "Debate"; $wgExtraNamespaces[411] = "Debate_talk"; $wgExtraNamespaces[412] = "Fun"; $wgExtraNamespaces[413] = "Fun_talk"; require_once("$IP/extensions/PdfHandler/PdfHandler.php"); $wgFileExtensions[] = 'pdf'; $wgMimeDetectorCommand = "file -bi"; require_once("$IP/extensions/CheckUser/CheckUser.php"); // $wgReadOnly = 'MIGRATING TO NEW SERVER TODAY...'; // enabling subpages for Template and MediaWiki namespaces
 * 1) reCAPTCHA anti-spam
 * 1) collection extension (pdf, odf, and book printing)
 * 1) more extensions
 * 1) Aliases for project and project talk namespaces
 * 1) custom namespaces
 * 1) pdfhandler and pdf file uploading settings
 * 1) checkuser
 * 1) $wgNamespacesWithSubpages[NS_TEMPLATE] = true;
 * 2) $wgNamespacesWithSubpages[NS_PROJECT] = true;

$wgNamespacesWithSubpages = array_fill(1, 500, true); $wgContentNamespaces[] = 0; $wgContentNamespaces[] = 404; // Argumentation $wgContentNamespaces[] = 406; // Essay $wgContentNamespaces[] = 408; // Book $wgContentNamespaces[] = 410; // Debate $wgContentNamespaces[] = 412; // Fun // spam blocking require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" ); require_once( "$IP/extensions/bannedips.php" ); // enable wikipedia instant commons
 * 1) Enable subpages in all namespaces except mainspace
 * 1) $wgUseInstantCommons = true;

// might as well use enwiki instead of commons; get more images that way $wgForeignFileRepos[] = array(  'class'                   => 'ForeignAPIRepo',   'name'                    => 'shared',   'apibase'                 => 'http://en.wikipedia.org/w/api.php',   'fetchDescription'        => true, // Optional   'descriptionCacheExpiry'  => 86400, // 24 hours, optional (values are seconds)   'apiThumbCacheExpiry'     => 86400, // 24 hours, optional, but required for local thumb caching ); // rename user extension require_once( "$IP/extensions/Renameuser/Renameuser.php" ); //$wgReadOnly = 'Maintenance is underway. Website is on read-only mode'; // RandomSelection extension require_once( "$IP/extensions/RandomSelection/RandomSelection.php" ); // Asirra extension require_once("$IP/extensions/Asirra/Asirra.php"); // InterWiki extension require_once("$IP/extensions/Interwiki/Interwiki.php"); // To grant sysops permissions to edit interwiki data $wgGroupPermissions['sysop']['interwiki'] = true; // To create a new user group that may edit interwiki data // (bureaucrats can add users to this group) $wgGroupPermissions['developer']['interwiki'] = true; $wgEnableScaryTranscluding = true; $wgInterwikiMagic = true; $wgHideInterlanguageLinks = false; // E.g. for book titles $wgRestrictDisplayTitle = false; // Red exclamation points are mostly just an annoyance $wgUseNPPatrol = false; $wgUseRCPatrol = false; //rss extension require_once("$IP/extensions/RSS/RSS.php"); //Disallow anonymous user editing
 * 1) $wgGroupPermissions['*']['edit'] = false;

// new settings per http://wiki.mises.org/wiki/MisesWiki:Configuration $wgAutoConfirmAge = 3600 * 24; // one day $wgAutoConfirmCount = 1; // 1 edit (pointless to set it higher) // Cause autopromotion at 24 hours from first edit, rather than from // account creation. This gives an opportunity to review that first // edit and make sure it's not spammy, before he gets exempted from // CAPTCHAs. $wgAutopromote = array(       "autoconfirmed" => array( "&", array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ), array( APCOND_AGE_FROM_EDIT, &$wgAutoConfirmAge ), ), ); $wgGroupPermissions['user'        ]['skipcaptcha'] = false; $wgGroupPermissions['bot'         ]['skipcaptcha'] = true; // registered bots $wgGroupPermissions['sysop'       ]['skipcaptcha'] = true; $wgGroupPermissions['*'           ]['skipcaptcha'] = false; $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true; $wgCaptchaTriggers['edit']         = false; $wgCaptchaTriggers['create']       = true; $wgCaptchaTriggers['addurl']       = true; $wgCaptchaTriggers['createaccount'] = true; $wgCaptchaTriggers['badlogin']     = true; // Limit IPs and newbies to editing 6 times per minute; regrettably, // given the small number of pages on Mises Wiki, and the lack of // 24-hour supervision, this would not prevent an overnight attack // vandalizing essentially everything in a few hours
 * 1) Fix the default captcha behaviour
 * 1) $wgRateLimits['edit']['ip'] = array( 6, 60 );
 * 2) $wgRateLimits['edit']['newbie'] = array( 6, 60 );

// Syntax highlight extension require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"); require_once("$IP/extensions/SyntaxHighlight_GeSHi/geshi/geshi.php"); $wgSyntaxHighlightDefaultLang = "php"; // Purge extension require_once("$IP/extensions/Purge/Purge.php"); // Vector extension require_once( "$IP/extensions/Vector/Vector.php" ); // ViewFiles extension require_once( "$IP/extensions/ViewFiles/ViewFiles.php" ); $wgViewFilesIntro = "\n"; $wgViewFilesFilePathList = array(	'LocalSettings.php' => 'LocalSettings.php',	'./skins/Vector.php' => './skins/Vector.php',	'../.htaccess' => '../.htaccess',	'../../.htaccess' => '../../.htaccess', ); $wgViewFilesFileLangList = array (       '../.htaccess' => 'apache',	'../../.htaccess' => 'apache', ); // SacredText extension require_once("$IP/extensions/SacredText/SacredText.php"); $wgSacredUseBibleTag = true; $wgSacredUpdateTable = false; // RecentPages extension require_once("$IP/extensions/RecentPages/RecentPages.php"); // MisesQuote extension require_once("$IP/extensions/MisesQuote/MisesQuote.php"); // Keep this at the bottom of LocalSettings.php $wgShowExceptionDetails = true;

<?php /** * Vector - Modern version of MonoBook with fresh look and many usability * improvements. * * @todo document * @file * @ingroup Skins */ if( !defined( 'MEDIAWIKI' ) ) { die( -1 ); } // This code is necessary to get it to produce a printable version that // doesn't have the Mises.org header taking up half the first page. if ( isset ( $_REQUEST[ 'printable' ] ) ) { // Vector.printable.php is simply the Vector.php from MW v1.19.2. require_once ( "Vector.printable.php" ); } else {

Aaron: Would you consider it a bug or a feature that:
 * When a page is deleted and then restored, it gets a new page ID;
 * When a page is deleted and then recreated (i.e. a new page with the same page title is created), the new page has a new page ID (rather than the same page ID as the deleted page); and
 * When a page is deleted, and then a new page is created with the same page title, the two revision histories have different page IDs (in rev_page and ar_page_id)?

It sounds like the way the deleted_page table option is described, if page "foo" gets created (page_id 1), then deleted, then recreated (page_id 2), then deleted, then recreated (page_id 3), the delete_page table would have two different rows for the two deleted revision histories.

How will this be integrated with the existing revision deletion system? Suppose now one revision from the new "foo" page (page_id 3) is deleted. Will a new row (dp_id 3) be added to the delete_page table, or does that only happen when the entire page is deleted?

The way this "new field" proposal would work, from the time a page is created till eternity, any new pages created under that page title will have the same page ID as the first one, unless the page is moved. If a page is deleted and restored, the status quo ante is restored.

It seems to me that as a general principle

Correction to comment #8. I accidentally posed the same question in both (2) and (3). The first paragraph should read instead:

... (3) When a page "foo" (page_id 1) is deleted, and then a new page with the same page title "foo" (page_id 2) is created and then deleted, and then a new page with the same page title "foo" (page_id 3) is created, these three revision histories have different page IDs (in rev_page and ar_page_id)? ...