http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90058

Revision: 90058
Author:   krinkle
Date:     2011-06-14 17:22:46 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
restructure directory

Modified Paths:
--------------
    trunk/extensions/MoodBar/MoodBar.php

Added Paths:
-----------
    trunk/extensions/MoodBar/MoodBar.hooks.php
    trunk/extensions/MoodBar/modules/
    trunk/extensions/MoodBar/modules/ext.moodBar/
    trunk/extensions/MoodBar/sql/
    trunk/extensions/MoodBar/sql/MoodBar.sql

Removed Paths:
-------------
    trunk/extensions/MoodBar/Hooks.php
    trunk/extensions/MoodBar/moodbar.sql

Deleted: trunk/extensions/MoodBar/Hooks.php
===================================================================
--- trunk/extensions/MoodBar/Hooks.php  2011-06-14 17:15:54 UTC (rev 90057)
+++ trunk/extensions/MoodBar/Hooks.php  2011-06-14 17:22:46 UTC (rev 90058)
@@ -1,31 +0,0 @@
-<?php
-
-class MoodBarHooks {
-       /**
-        * Adds MoodBar JS to the output if appropriate.
-        */
-       public static function onPageDisplay( &$output, &$skin ) {
-               if ( self::shouldShowMoodbar() ) {
-                       $output->addModules( array('ext.moodbar') );
-               }
-               
-               return true;
-       }
-       
-       /**
-        * Determines whether or not we should show the MoodBar.
-        */
-       public static function shouldShowMoodbar() {
-               return true;
-       }
-       
-       /**
-        * Runs MoodBar schema updates
-        */
-       public static function onLoadExtensionSchemaUpdates( $updater = null ) {
-               $updater->addExtensionUpdate( array( 'addTable', 
'moodbar_feedback',
-                       dirname(__FILE__).'/moodbar.sql' ) );
-                       
-               return true;
-       }
-}

Copied: trunk/extensions/MoodBar/MoodBar.hooks.php (from rev 90057, 
trunk/extensions/MoodBar/Hooks.php)
===================================================================
--- trunk/extensions/MoodBar/MoodBar.hooks.php                          (rev 0)
+++ trunk/extensions/MoodBar/MoodBar.hooks.php  2011-06-14 17:22:46 UTC (rev 
90058)
@@ -0,0 +1,31 @@
+<?php
+
+class MoodBarHooks {
+       /**
+        * Adds MoodBar JS to the output if appropriate.
+        */
+       public static function onPageDisplay( &$output, &$skin ) {
+               if ( self::shouldShowMoodbar() ) {
+                       $output->addModules( array('ext.moodbar') );
+               }
+               
+               return true;
+       }
+       
+       /**
+        * Determines whether or not we should show the MoodBar.
+        */
+       public static function shouldShowMoodbar() {
+               return true;
+       }
+       
+       /**
+        * Runs MoodBar schema updates
+        */
+       public static function onLoadExtensionSchemaUpdates( $updater = null ) {
+               $updater->addExtensionUpdate( array( 'addTable', 
'moodbar_feedback',
+                       dirname(__FILE__).'/moodbar.sql' ) );
+                       
+               return true;
+       }
+}

Modified: trunk/extensions/MoodBar/MoodBar.php
===================================================================
--- trunk/extensions/MoodBar/MoodBar.php        2011-06-14 17:15:54 UTC (rev 
90057)
+++ trunk/extensions/MoodBar/MoodBar.php        2011-06-14 17:22:46 UTC (rev 
90058)
@@ -21,7 +21,7 @@
 $wgAPIModules['moodbar'] = 'ApiMoodBar';
 
 // Hooks
-$wgAutoloadClasses['MoodBarHooks'] = dirname(__FILE__).'/Hooks.php';
+$wgAutoloadClasses['MoodBarHooks'] = dirname(__FILE__).'/MoodBar.hooks.php';
 $wgHooks['BeforePageDisplay'][] = 'MoodBarHooks::onPageDisplay';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MoodBarHooks::onLoadExtensionSchemaUpdates';
 

Deleted: trunk/extensions/MoodBar/moodbar.sql
===================================================================
--- trunk/extensions/MoodBar/moodbar.sql        2011-06-14 17:15:54 UTC (rev 
90057)
+++ trunk/extensions/MoodBar/moodbar.sql        2011-06-14 17:22:46 UTC (rev 
90058)
@@ -1,30 +0,0 @@
-CREATE TABLE /*_*/moodbar_feedback (
-       mbf_id int unsigned NOT NULL PRIMARY KEY auto_increment, -- Primary key
-       mbf_type varchar(32) binary NOT NULL, -- Type of feedback
-       
-       -- User who provided the feedback
-       mbf_user_id int unsigned NOT NULL, -- User ID, or zero
-       mbf_user_ip varchar(255) binary NULL, -- If anonymous, user's IP address
-       
-       -- Page where the feedback was received
-       -- Nullable.
-       mbf_namespace int,
-       mbf_title varchar(255) binary,
-       
-       -- The feedback itself
-       mbf_comment varchar(255) binary,
-       
-       -- Options and context
-       mbf_anonymous tinyint unsigned not null default 0, -- Anonymity
-       mbf_timestamp varchar(14) binary not null, -- When feedback was received
-       mbf_system_type varchar(64) binary null, -- Operating System
-       mbf_user_agent varchar(255) binary null, -- User-Agent header
-       mbf_locale varchar(32) binary null, -- The locale of the user's browser
-       mbf_editing tinyint unsigned not null, -- Whether or not the user was 
editing
-       mbf_bucket varchar(128) binary null -- Bucket, for A/B testing
-) /*$wgDBtableOptions*/;
-
--- A little overboard with the indexes perhaps, but we want to be able to dice 
this data a lot!
-CREATE INDEX /*i*/type_timestamp ON /*_*/moodbar_feedback 
(mbf_type,mbf_timestamp);
-CREATE INDEX /*i*/user_timestamp ON /*_*/moodbar_feedback 
(mbf_user_id,mbf_user_ip,mbf_timestamp);
-CREATE INDEX /*i*/title_type ON /*_*/moodbar_feedback 
(mbf_namespace,mbf_title,mbf_type,mbf_timestamp);

Copied: trunk/extensions/MoodBar/sql/MoodBar.sql (from rev 90057, 
trunk/extensions/MoodBar/moodbar.sql)
===================================================================
--- trunk/extensions/MoodBar/sql/MoodBar.sql                            (rev 0)
+++ trunk/extensions/MoodBar/sql/MoodBar.sql    2011-06-14 17:22:46 UTC (rev 
90058)
@@ -0,0 +1,30 @@
+CREATE TABLE /*_*/moodbar_feedback (
+       mbf_id int unsigned NOT NULL PRIMARY KEY auto_increment, -- Primary key
+       mbf_type varchar(32) binary NOT NULL, -- Type of feedback
+       
+       -- User who provided the feedback
+       mbf_user_id int unsigned NOT NULL, -- User ID, or zero
+       mbf_user_ip varchar(255) binary NULL, -- If anonymous, user's IP address
+       
+       -- Page where the feedback was received
+       -- Nullable.
+       mbf_namespace int,
+       mbf_title varchar(255) binary,
+       
+       -- The feedback itself
+       mbf_comment varchar(255) binary,
+       
+       -- Options and context
+       mbf_anonymous tinyint unsigned not null default 0, -- Anonymity
+       mbf_timestamp varchar(14) binary not null, -- When feedback was received
+       mbf_system_type varchar(64) binary null, -- Operating System
+       mbf_user_agent varchar(255) binary null, -- User-Agent header
+       mbf_locale varchar(32) binary null, -- The locale of the user's browser
+       mbf_editing tinyint unsigned not null, -- Whether or not the user was 
editing
+       mbf_bucket varchar(128) binary null -- Bucket, for A/B testing
+) /*$wgDBtableOptions*/;
+
+-- A little overboard with the indexes perhaps, but we want to be able to dice 
this data a lot!
+CREATE INDEX /*i*/type_timestamp ON /*_*/moodbar_feedback 
(mbf_type,mbf_timestamp);
+CREATE INDEX /*i*/user_timestamp ON /*_*/moodbar_feedback 
(mbf_user_id,mbf_user_ip,mbf_timestamp);
+CREATE INDEX /*i*/title_type ON /*_*/moodbar_feedback 
(mbf_namespace,mbf_title,mbf_type,mbf_timestamp);


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to