Page MenuHomePhabricator

redlink.diff

Authored By
bzimport
Nov 21 2014, 8:28 PM
Size
1 KB
Referenced Files
None
Subscribers
None

redlink.diff

--- /usr/share/webapps/mediawiki/1.4.4/htdocs/includes/DefaultSettings.php 2005-05-06 21:39:36.000000000 -0700
+++ includes/DefaultSettings.php 2005-05-10 23:11:29.000000000 -0700
@@ -736,6 +736,9 @@
# Go button goes straight to the edit screen if the article doesn't exist
$wgGoToEdit = false;
+# Links go straight to the edit screen if the article doesn't exist
+$wgRedLinkEdit = true;
+
# Allow limited user-specified HTML in wiki pages?
# It will be run through a whitelist for security.
# Set this to false if you want wiki pages to consist only of wiki
--- /usr/share/webapps/mediawiki/1.4.4/htdocs/includes/Skin.php 2005-05-06 21:39:36.000000000 -0700
+++ includes/Skin.php 2005-05-10 23:15:05.000000000 -0700
@@ -1543,6 +1543,8 @@
* Pass a title object, not a title string
*/
function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ global $wgRedLinkEdit;
+
# Fail gracefully
if ( ! isset($nt) ) {
# wfDebugDieBacktrace();
@@ -1552,10 +1554,15 @@
$fname = 'Skin::makeBrokenLinkObj';
wfProfileIn( $fname );
- if ( '' == $query ) {
- $q = 'action=edit';
- } else {
- $q = 'action=edit&'.$query;
+ if($wgRedLinkEdit) {
+ $q = 'action=edit';
+ }
+
+ if ( $query != '') {
+ if($q) {
+ $q .= '&';
+ }
+ $q .= $query;
}
$u = $nt->escapeLocalURL( $q );

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1592
Default Alt Text
redlink.diff (1 KB)

Event Timeline