Index: trunk/extensions/SMWAutoRefresh/SMWAutoRefresh.i18n.php |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Internationalization file for the Include SMWAutoRefresh. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file SMWAutoRefresh.i18n.php |
| 10 | + * @ingroup SMWAutoRefresh |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | + |
| 16 | +$messages = array(); |
| 17 | + |
| 18 | +/** English |
| 19 | + * @author Jeroen De Dauw |
| 20 | + */ |
| 21 | +$messages['en'] = array( |
| 22 | + 'smwautorefresh-desc' => 'SMWAutoRefresh is a small hack to automatically invalidate the cache of pages that stored new semantic data.', |
| 23 | +); |
Property changes on: trunk/extensions/SMWAutoRefresh/SMWAutoRefresh.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 24 | + native |
Index: trunk/extensions/SMWAutoRefresh/SMWAutoRefresh.php |
— | — | @@ -0,0 +1,49 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Initialization file for the SMWAutoRefresh extension. |
| 6 | + * |
| 7 | + * Documentation: http://www.mediawiki.org/wiki/Extension:SMWAutoRefresh |
| 8 | + * Support http://www.mediawiki.org/wiki/Extension_talk:SMWAutoRefresh |
| 9 | + * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SMWAutoRefresh |
| 10 | + * |
| 11 | + * @file SMWAutoRefresh.php |
| 12 | + * @ingroup SMWAutoRefresh |
| 13 | + * |
| 14 | + * @licence GNU GPL v3 |
| 15 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 16 | + */ |
| 17 | + |
| 18 | +/** |
| 19 | + * This documenation group collects source code files belonging to SMWAutoRefresh. |
| 20 | + * |
| 21 | + * @defgroup SMWAutoRefresh SMWAutoRefresh |
| 22 | + */ |
| 23 | + |
| 24 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 25 | + die( 'Not an entry point.' ); |
| 26 | +} |
| 27 | + |
| 28 | +if ( !defined( 'SMWAutoRefresh_VERSION' ) ) { |
| 29 | + define( 'SMWAutoRefresh_VERSION', '0.1 rc' ); |
| 30 | + |
| 31 | + $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array( |
| 32 | + 'path' => __FILE__, |
| 33 | + 'name' => 'SMWAutoRefresh', |
| 34 | + 'version' => SMWAutoRefresh_VERSION, |
| 35 | + 'author' => array( |
| 36 | + '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 37 | + ), |
| 38 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:SMWAutoRefresh', |
| 39 | + 'descriptionmsg' => 'smwautorefresh-desc' |
| 40 | + ); |
| 41 | + |
| 42 | + $wgExtensionMessagesFiles['SMWAutoRefresh'] = dirname( __FILE__ ) . '/SMWAutoRefresh.i18n.php'; |
| 43 | + |
| 44 | + $wgHooks['SMWSQLStore2::updateDataAfter'][] = 'smwAutoRefresh'; |
| 45 | + |
| 46 | + function smwAutoRefresh( SMWStore $store, SMWSemanticData $data ) { |
| 47 | + $data->getSubject()->getTitle()->invalidateCache(); |
| 48 | + return true; |
| 49 | + } |
| 50 | +} |
Property changes on: trunk/extensions/SMWAutoRefresh/SMWAutoRefresh.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 51 | + native |