r62518 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62517‎ | r62518 | r62519 >
Date:14:25, 15 February 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Added permission group and sql for storyboard table creation (which probably doesn't work yet).
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.php (modified) (history)
  • /trunk/extensions/Storyboard/Storyboard.sql (added) (history)
  • /trunk/extensions/Storyboard/specials/StoryReview_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/specials/StoryReview_body.php
@@ -22,5 +22,6 @@
2323
2424 function execute( $language ) {
2525 global $wgOut;
 26+ $wgOut->includeJQuery();
2627 }
2728 }
Index: trunk/extensions/Storyboard/Storyboard.sql
@@ -0,0 +1,13 @@
 2+-- MySQL version of the database schema for the Storyboard extension.
 3+
 4+CREATE TABLE `/*$wgDBprefix*/storyboard` (
 5+ story_id INT(8) unsigned NOT NULL auto_increment,
 6+ story_author_id INT unsigned NULL,
 7+ story_author_name VARCHAR(255) NULL,
 8+ story_hit_count INT(8) unsigned NOT NULL,
 9+ story_title VARCHAR(255) NOT NULL,
 10+ story_text MEDIUMBLOB NULL,
 11+ story_modified CHAR(14) binary NOT NULL default '',
 12+ story_created CHAR(14) binary NOT NULL default '',
 13+ PRIMARY KEY (`story_id`)
 14+);
\ No newline at end of file
Property changes on: trunk/extensions/Storyboard/Storyboard.sql
___________________________________________________________________
Name: svn:eol-style
115 + native
Index: trunk/extensions/Storyboard/Storyboard.php
@@ -55,7 +55,23 @@
5656 $wgExtensionFunctions[] = 'efStoryboardStorysubmissionSetup';
5757 }
5858
 59+// Hook for db updates.
 60+$wgHooks['LoadExtensionSchemaUpdates'][] = 'efStoryboardSchemaUpdate';
 61+
5962 /**
 63+ * The 'storyboard' permission key can be given out to users
 64+ * to enable them to review, edit, publish, and hide stories.
 65+ *
 66+ * By default, only sysops will be able to do this.
 67+ */
 68+$wgGroupPermissions['*' ]['storyboard'] = false;
 69+$wgGroupPermissions['user' ]['storyboard'] = false;
 70+$wgGroupPermissions['autoconfirmed']['storyboard'] = false;
 71+$wgGroupPermissions['bot' ]['storyboard'] = false;
 72+$wgGroupPermissions['sysop' ]['storyboard'] = true;
 73+$wgAvailableRights[] = 'storyboard';
 74+
 75+/**
6076 * Initialization function for the Storyboard extension.
6177 */
6278 function efStoryboardSetup() {
@@ -74,6 +90,15 @@
7591 );
7692 }
7793
 94+function efStoryboardSchemaUpdate() {
 95+ global $wgExtNewTables, $egStoryboardDir;
 96+
 97+ $wgExtNewTables[] = array(
 98+ 'storyboard',
 99+ $egStoryboardDir . 'Storyboard.sql'
 100+ );
 101+}
 102+
78103 function efStoryboardStoryboardSetup() {
79104 global $wgParser;
80105 $wgParser->setHook( 'storyboard', array('TagStoryboard', 'render') );

Follow-up revisions

RevisionCommit summaryAuthorDate
r62521Follow-up r62518: Add a descriptive message for the new user right.raymond14:50, 15 February 2010

Status & tagging log