aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Article.php9
-rw-r--r--includes/Defines.php2
-rw-r--r--includes/SkinTemplate.php11
3 files changed, 20 insertions, 2 deletions
diff --git a/includes/Article.php b/includes/Article.php
index 3f995d448a86..e68a8893c319 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1207,6 +1207,15 @@ class Article {
}
}
+ /**
+ * Validate function
+ */
+ function validate() {
+ global $wgOut, $wgUser;
+ $wgOut->setRobotpolicy( 'noindex,follow' );
+
+ $wgOut->addWikiText ( "Not implemented yet" ) ;
+ }
/**
* Add this page to $wgUser's watchlist
diff --git a/includes/Defines.php b/includes/Defines.php
index c93ba9594142..02d75dd59229 100644
--- a/includes/Defines.php
+++ b/includes/Defines.php
@@ -83,6 +83,6 @@ define( 'MW_MATH_MATHML', 5 );
*/
$wgAvailableRights = array('read', 'edit', 'move', 'delete', 'undelete',
'protect', 'block', 'userrights', 'grouprights', 'createaccount', 'upload',
-'asksql', 'rollback', 'patrol', 'editinterface', 'siteadmin', 'bot');
+'asksql', 'rollback', 'patrol', 'editinterface', 'siteadmin', 'bot', 'validate');
?>
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index b603f1c4aa9a..3252809a70a7 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -488,7 +488,7 @@ class SkinTemplate extends Skin {
* @access private
*/
function buildContentActionUrls () {
- global $wgContLang;
+ global $wgContLang, $wgUseValidation;
$fname = 'SkinTemplate::buildContentActionUrls';
wfProfileIn( $fname );
@@ -583,6 +583,7 @@ class SkinTemplate extends Skin {
);
}
}
+ }
} else {
//article doesn't exist or is deleted
if($wgUser->isAllowed('delete')){
@@ -611,6 +612,14 @@ class SkinTemplate extends Skin {
'href' => $this->mTitle->getLocalUrl( 'action=unwatch' )
);
}
+
+ # Validate tab. TODO: add validation to logged-in user rights
+ if($wgUseValidation){ # && $wgUser->isAllowed('validate')){
+ $content_actions['validate'] = array(
+ 'class' => ($action == 'validate') ? 'selected' : false,
+ 'text' => wfMsg('val_tab'),
+ 'href' => $this->mTitle->getLocalUrl( 'action=validate' )
+ );
}
} else {