| Index: trunk/extensions/SocialProfile/SocialProfile.php |
| — | — | @@ -21,6 +21,7 @@ |
| 22 | 22 | $wgExtensionMessagesFiles['SocialProfileUserStats'] = $dir . 'UserStats/UserStats.i18n.php'; |
| 23 | 23 | $wgExtensionMessagesFiles['SocialProfileUserStatus'] = $dir . 'UserStatus/UserStatus.i18n.php'; |
| 24 | 24 | |
| | 25 | +$wgExtensionMessagesFiles['SocialProfileNamespaces'] = $dir . 'SocialProfile.namespaces.php'; |
| 25 | 26 | $wgExtensionAliasesFiles['SocialProfile'] = $dir . 'SocialProfile.alias.php'; |
| 26 | 27 | |
| 27 | 28 | // Classes to be autoloaded |
| — | — | @@ -222,8 +223,8 @@ |
| 223 | 224 | |
| 224 | 225 | function efSocialProfileSchemaUpdates( $updater = null ) { |
| 225 | 226 | $dir = dirname( __FILE__ ); |
| 226 | | - $dbExt = ""; |
| 227 | | - global $wgExtNewTables, $wgDBtype; |
| | 227 | + $dbExt = ''; |
| | 228 | + global $wgDBtype; |
| 228 | 229 | |
| 229 | 230 | if ( $wgDBtype == 'postgres' ) { |
| 230 | 231 | $dbExt = '.postgres'; |
| — | — | @@ -287,4 +288,36 @@ |
| 288 | 289 | $renameUserSQL->tables['user_system_messages'] = array( 'um_user_name', 'um_user_id' ); |
| 289 | 290 | return true; |
| 290 | 291 | } |
| 291 | | -*/ |
| \ No newline at end of file |
| | 292 | +*/ |
| | 293 | + |
| | 294 | +if( !defined( 'NS_USER_WIKI' ) ) { |
| | 295 | + define( 'NS_USER_WIKI', 200 ); |
| | 296 | +} |
| | 297 | + |
| | 298 | +if( !defined( 'NS_USER_WIKI_TALK' ) ) { |
| | 299 | + define( 'NS_USER_WIKI_TALK', 201 ); |
| | 300 | +} |
| | 301 | + |
| | 302 | +if( !defined( 'NS_USER_PROFILE' ) ) { |
| | 303 | + define( 'NS_USER_PROFILE', 202 ); |
| | 304 | +} |
| | 305 | + |
| | 306 | +if( !defined( 'NS_USER_PROFILE_TALK' ) ) { |
| | 307 | + define( 'NS_USER_PROFILE_TALK', 203 ); |
| | 308 | +} |
| | 309 | + |
| | 310 | +$wgHooks['CanonicalNamespaces'][] = 'wfSocialProfileRegisterCanonicalNamespaces'; |
| | 311 | +/** |
| | 312 | + * Register the canonical names for our custom namespaces and their talkspaces. |
| | 313 | + * |
| | 314 | + * @param $list Array: array of namespace numbers with corresponding |
| | 315 | + * canonical names |
| | 316 | + * @return Boolean: true |
| | 317 | + */ |
| | 318 | +function wfSocialProfileRegisterCanonicalNamespaces( &$list ) { |
| | 319 | + $list[NS_USER_WIKI] = 'UserWiki'; |
| | 320 | + $list[NS_USER_WIKI_TALK] = 'UserWiki_talk'; |
| | 321 | + $list[NS_USER_PROFILE] = 'User_profile'; |
| | 322 | + $list[NS_USER_PROFILE_TALK] = 'User_profile_talk'; |
| | 323 | + return true; |
| | 324 | +} |
| \ No newline at end of file |
| Index: trunk/extensions/SocialProfile/SocialProfile.namespaces.php |
| — | — | @@ -0,0 +1,41 @@ |
| | 2 | +<?php |
| | 3 | +/** |
| | 4 | + * Translations of the namespaces introduced by SocialProfile. |
| | 5 | + * |
| | 6 | + * @file |
| | 7 | + */ |
| | 8 | + |
| | 9 | +$namespaceNames = array(); |
| | 10 | + |
| | 11 | +// For wikis where the SocialProfile extension is not installed. |
| | 12 | +if( !defined( 'NS_USER_WIKI' ) ) { |
| | 13 | + define( 'NS_USER_WIKI', 200 ); |
| | 14 | +} |
| | 15 | + |
| | 16 | +if( !defined( 'NS_USER_WIKI_TALK' ) ) { |
| | 17 | + define( 'NS_USER_WIKI_TALK', 201 ); |
| | 18 | +} |
| | 19 | + |
| | 20 | +if( !defined( 'NS_USER_PROFILE' ) ) { |
| | 21 | + define( 'NS_USER_PROFILE', 202 ); |
| | 22 | +} |
| | 23 | + |
| | 24 | +if( !defined( 'NS_USER_PROFILE_TALK' ) ) { |
| | 25 | + define( 'NS_USER_PROFILE_TALK', 203 ); |
| | 26 | +} |
| | 27 | + |
| | 28 | +/** English */ |
| | 29 | +$namespaceNames['en'] = array( |
| | 30 | + NS_USER_WIKI => 'UserWiki', |
| | 31 | + NS_USER_WIKI_TALK => 'UserWiki_talk', |
| | 32 | + NS_USER_PROFILE => 'User_profile', |
| | 33 | + NS_USER_PROFILE_TALK => 'User_profile_talk', |
| | 34 | +); |
| | 35 | + |
| | 36 | +/** Finnish (Suomi) */ |
| | 37 | +$namespaceNames['fi'] = array( |
| | 38 | + NS_USER_WIKI => 'Käyttäjäwiki', |
| | 39 | + NS_USER_WIKI_TALK => 'Keskustelu_käyttäjäwikistä', |
| | 40 | + NS_USER_PROFILE => 'Käyttäjäprofiili', |
| | 41 | + NS_USER_PROFILE_TALK => 'Keskustelu_käyttäjäprofiilista', |
| | 42 | +); |
| \ No newline at end of file |
| Property changes on: trunk/extensions/SocialProfile/SocialProfile.namespaces.php |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| 1 | 43 | + native |