Added per page support for inhibiting editsection links via the __NOEDITSECTION__...
authorBogdan Stancescu <b_stancescu@users.mediawiki.org>
Sun, 5 Oct 2003 09:44:20 +0000 (09:44 +0000)
committerBogdan Stancescu <b_stancescu@users.mediawiki.org>
Sun, 5 Oct 2003 09:44:20 +0000 (09:44 +0000)
includes/OutputPage.php
languages/Language.php

index 284d155..18fefbb 100644 (file)
@@ -1378,6 +1378,13 @@ $t[] = "</table>" ;
                        $esr=$wgUser->getID() && $wgUser->getOption( "editsectiononrightclick" );
                }
 
+               # Inhibit editsection links if requested in the page
+               if ($es) {
+                       $esw=& MagicWord::get(MAG_NOEDITSECTION);
+                       if ($esw->matchAndRemove( $text )) {
+                               $es=0;
+                       }
+               }
                # if the string __NOTOC__ (not case-sensitive) occurs in the HTML, 
                # do not add TOC
                $mw =& MagicWord::get( MAG_NOTOC );
index 05e78ea..a5d6454 100644 (file)
@@ -283,6 +283,7 @@ this</a> (alternative: like this<a href=\"\" class=\"internal\">?</a>).",
 #   ID                                 CASE  SYNONYMS
     MAG_REDIRECT             => array( 0,    "#redirect"              ),
     MAG_NOTOC                => array( 0,    "__NOTOC__"              ),
+    MAG_NOEDITSECTION        => array( 0,    "__NOEDITSECTION__"      ),
     MAG_START                => array( 0,    "__START__"              ),
     MAG_CURRENTMONTH         => array( 1,    "{{CURRENTMONTH}}"       ),
     MAG_CURRENTMONTHNAME     => array( 1,    "{{CURRENTMONTHNAME}}"   ),