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

Revision: 90937
Author:   kaldari
Date:     2011-06-28 04:59:39 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
adding new database table for keeping track of whether or not people can figure 
out how to use images from Commons in the Make your own feature

Modified Paths:
--------------
    trunk/extensions/WikiLove/WikiLove.hooks.php

Added Paths:
-----------
    trunk/extensions/WikiLove/patches/WikiLoveImageLog.sql

Modified: trunk/extensions/WikiLove/WikiLove.hooks.php
===================================================================
--- trunk/extensions/WikiLove/WikiLove.hooks.php        2011-06-28 04:47:59 UTC 
(rev 90936)
+++ trunk/extensions/WikiLove/WikiLove.hooks.php        2011-06-28 04:59:39 UTC 
(rev 90937)
@@ -18,9 +18,12 @@
                if ( $updater === null ) {
                        global $wgExtNewTables;
                        $wgExtNewTables[] = array( 'wikilove_log', dirname( 
__FILE__ ) . '/patches/WikiLoveLog.sql' );
+                       $wgExtNewTables[] = array( 'wikilove_image_log', 
dirname( __FILE__ ) . '/patches/WikiLoveImageLog.sql' );
                } else {
                        $updater->addExtensionUpdate( array( 'addTable', 
'wikilove_log',
                                dirname( __FILE__ ) . 
'/patches/WikiLoveLog.sql', true ) );
+                       $updater->addExtensionUpdate( array( 'addTable', 
'wikilove_image_log', 
+                               dirname( __FILE__ ) . 
'/patches/WikiLoveImageLog.sql', true ) );
                }
                return true;
        }

Added: trunk/extensions/WikiLove/patches/WikiLoveImageLog.sql
===================================================================
--- trunk/extensions/WikiLove/patches/WikiLoveImageLog.sql                      
        (rev 0)
+++ trunk/extensions/WikiLove/patches/WikiLoveImageLog.sql      2011-06-28 
04:59:39 UTC (rev 90937)
@@ -0,0 +1,16 @@
+--
+-- WikiLove image logging schema
+-- Logs every time someone attempts to preview an award with a user-entered 
image title.
+-- This is mainly to see if people understand the idea of using images from 
Commons.
+--
+
+CREATE TABLE IF NOT EXISTS /*_*/wikilove_image_log (
+       wlil_id int(11) NOT NULL PRIMARY KEY auto_increment,
+       wlil_timestamp binary(14) NOT NULL,
+       wlil_user_id int(11) NOT NULL,
+       wlil_image varchar(128) NOT NULL,
+       wlil_success bool DEFAULT NULL
+) /*$wgDBTableOptions*/;
+
+CREATE INDEX /*i*/wlil_timestamp ON /*_*/wikilove_image_log (wlil_timestamp);
+CREATE INDEX /*i*/wlil_user_time ON /*_*/wikilove_image_log (wlil_user_id, 
wlil_timestamp);


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

Reply via email to