Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -907,4 +907,19 @@ |
908 | 908 | function guid() { |
909 | 909 | return $this->guid = strftime( '%Y%m%d', time() ) . '-' . substr( strtoupper( uniqid('', true) ), -5 ); |
910 | 910 | } |
| 911 | + |
| 912 | + |
| 913 | + /** |
| 914 | + * Create DB table for caching queries |
| 915 | + */ |
| 916 | + function createCacheTable() { |
| 917 | + $dbw = wfGetDB( DB_MASTER ); |
| 918 | + $tbl = $dbw->tableName( 'recordadmin_querycache' ); |
| 919 | + if ( !$dbw->tableExists( $tbl ) ) { |
| 920 | + $query = "CREATE TABLE $tbl (raqc_id INT(32) NOT NULL, raqc_type TINYTEXT, raqc_content TEXT, raqc_state TINYTEXT, PRIMARY KEY (raqc_id));"; |
| 921 | + $result = $dbw->query( $query ); |
| 922 | + $dbw->freeResult( $result ); |
| 923 | + } |
| 924 | + } |
| 925 | + |
911 | 926 | } |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * @author Siebrand Mazeland |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | | -define( 'RECORDADMIN_VERSION', '1.0.0, 2010-09-18' ); |
| 14 | +define( 'RECORDADMIN_VERSION', '1.0.1, 2010-09-20' ); |
15 | 15 | |
16 | 16 | $dir = dirname( __FILE__ ) . '/'; |
17 | 17 | $wgExtensionMessagesFiles['RecordAdmin'] = $dir . 'RecordAdmin.i18n.php'; |