/**
  * Initialization of ShoutBox extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('ParserFirstCallInit', 'onParserFirstCallInit');
     $this->setHook('ArticleSaveComplete');
     $this->setHook('BSWidgetBarGetDefaultWidgets');
     $this->setHook('BSWidgetListHelperInitKeyWords');
     $this->setHook('BSUserSidebarDefaultWidgets');
     $this->setHook('BSInsertMagicAjaxGetData', 'onBSInsertMagicAjaxGetData');
     $this->setHook('BSDashboardsAdminDashboardPortalConfig');
     $this->setHook('BSDashboardsAdminDashboardPortalPortlets');
     $this->setHook('BSDashboardsUserDashboardPortalConfig');
     $this->setHook('BSDashboardsUserDashboardPortalPortlets');
     BsConfig::registerVar('MW::SmartList::Count', 5, BsConfig::LEVEL_USER | BsConfig::TYPE_INT, 'bs-smartlist-pref-count', 'int');
     BsConfig::registerVar('MW::SmartList::Namespaces', array(), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-smartlist-pref-namespaces', 'multiselectex');
     BsConfig::registerVar('MW::SmartList::Categories', array(), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-smartlist-pref-categories', 'multiselectplusadd');
     // possible values: -, day, week, month
     BsConfig::registerVar('MW::SmartList::Period', '-', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-smartlist-pref-period', 'select');
     BsConfig::registerVar('MW::SmartList::ShowMinorChanges', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-smartlist-pref-showminorchanges', 'toggle');
     BsConfig::registerVar('MW::SmartList::ShowOnlyNewArticles', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-smartlist-pref-showonlynewarticles', 'toggle');
     BsConfig::registerVar('MW::SmartList::Trim', 20, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-smartlist-pref-trim', 'int');
     BsConfig::registerVar('MW::SmartList::ShowText', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-smartlist-pref-showtext', 'toggle');
     BsConfig::registerVar('MW::SmartList::TrimText', 50, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-smartlist-pref-trimtext', 'int');
     // possible values: title, time
     BsConfig::registerVar('MW::SmartList::Order', 'DESC', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-smartlist-pref-order', 'select');
     //title|time
     BsConfig::registerVar('MW::SmartList::Sort', 'time', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-smartlist-pref-sort', 'select');
     BsConfig::registerVar('MW::SmartList::ShowNamespace', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-smartlist-pref-shownamespace', 'toggle');
     BsConfig::registerVar('MW::SmartList::Comments', false, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-smartlist-pref-comments', 'check');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of BoilerPlate extension
  */
 protected function initExt()
 {
     // Bind on hook BeforePageDisplay with the method onBeforePageDisplay.
     $this->setHook('BeforePageDisplay');
     // Register system and user preferences.
     BsConfig::registerVar('MW::BoilerPlate::Mode', 1, BsConfig::LEVEL_USER | BsConfig::TYPE_INT | BsConfig::USE_PLUGIN_FOR_PREFS | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-boilerplate-pref-mode', 'radio');
 }
 /**
  * Initialization of ShoutBox extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     // Hooks
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('BeforePageDisplay');
     $this->setHook('BSInsertMagicAjaxGetData');
     $this->setHook('BSStateBarBeforeTopViewAdd', 'onStateBarBeforeTopViewAdd');
     $this->setHook('BeforeCreateEchoEvent');
     $this->setHook('EchoGetDefaultNotifiedUsers');
     // Permissions
     $this->mCore->registerPermission('readshoutbox', array(), array('type' => 'global'));
     $this->mCore->registerPermission('writeshoutbox', array(), array('type' => 'global'));
     $this->mCore->registerPermission('archiveshoutbox', array(), array('type' => 'global'));
     $this->mCore->registerBehaviorSwitch('bs_noshoutbox');
     BsConfig::registerVar('MW::ShoutBox::ShowShoutBoxByNamespace', array(0), BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_INT, 'multiselectplusadd');
     BsConfig::registerVar('MW::ShoutBox::CommitTimeInterval', 15, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-shoutbox-pref-committimeinterval', 'int');
     BsConfig::registerVar('MW::ShoutBox::NumberOfShouts', 5, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-shoutbox-pref-numberofshouts', 'int');
     BsConfig::registerVar('MW::ShoutBox::ShowAge', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-shoutbox-pref-showage', 'toggle');
     BsConfig::registerVar('MW::ShoutBox::ShowUser', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-shoutbox-pref-showuser', 'toggle');
     BsConfig::registerVar('MW::ShoutBox::Show', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-shoutbox-pref-show', 'toggle');
     BsConfig::registerVar('MW::ShoutBox::AllowArchive', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-shoutbox-pref-allowarchive', 'toggle');
     BsConfig::registerVar('MW::ShoutBox::MaxMessageLength', 255, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-shoutbox-pref-maxmessagelength', 'int');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of Review extension
  */
 protected function initExt()
 {
     // Register style in constructor in order to have it loaded on special pages
     BsConfig::registerVar('MW::Review::CheckOwner', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-review-pref-checkowner', 'toggle');
     BsConfig::registerVar('MW::Review::EmailNotifyOwner', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-review-pref-emailnotifyowner', 'toggle');
     BsConfig::registerVar('MW::Review::EmailNotifyReviewer', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-review-pref-emailnotifyreviewer', 'toggle');
     $this->setHook('SkinTemplateNavigation');
     $this->setHook('userCan', 'checkReviewPermissions');
     $this->setHook('ArticleDeleteComplete');
     $this->setHook('BSFlaggedRevsConnectorCollectFlagInfo');
     $this->setHook('BSStateBarAddSortTopVars', 'onStatebarAddSortTopVars');
     $this->setHook('BSStateBarAddSortBodyVars', 'onStatebarAddSortBodyVars');
     $this->setHook('BSStateBarBeforeTopViewAdd', 'onStateBarBeforeTopViewAdd');
     $this->setHook('BSStateBarBeforeBodyViewAdd', 'onStateBarBeforeBodyViewAdd');
     $this->setHook('BeforePageDisplay');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->mCore->registerPermission('workflowview', array('user'), array('type' => 'global'));
     $this->mCore->registerPermission('workflowedit', array(), array('type' => 'global'));
     $this->mCore->registerPermission('workflowlist', array(), array('type' => 'global'));
     global $wgLogActionsHandlers;
     $wgLogActionsHandlers['bs-review/create'] = array($this, 'logCreate');
     $wgLogActionsHandlers['bs-review/modify'] = array($this, 'logModify');
     $wgLogActionsHandlers['bs-review/delete'] = array($this, 'logDelete');
     $wgLogActionsHandlers['bs-review/approve'] = array($this, 'logApprove');
     $wgLogActionsHandlers['bs-review/deny'] = array($this, 'logDeny');
     $wgLogActionsHandlers['bs-review/finish'] = array($this, 'logFinish');
     $this->oLogger = new LogPage('bs-review', false);
 }
 /**
  * Initialization of ContextMenu extension
  */
 protected function initExt()
 {
     $this->setHook('BeforePageDisplay');
     $this->setHook('LinkEnd');
     $this->setHook('ThumbnailBeforeProduceHTML');
     BsConfig::registerVar('MW::ContextMenu::Modus', 'ctrl', BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-contextmenu-pref-modus', 'radio');
 }
 /**
  *  Initialization of UniversalExport extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     //Hooks
     $this->setHook('ParserFirstCallInit', 'onParserFirstCallInit');
     $this->setHook('BSWidgetBarGetDefaultWidgets');
     $this->setHook('BSWidgetListHelperInitKeyWords');
     $this->setHook('BSStateBarAddSortBodyVars', 'onStatebarAddSortBodyVars');
     $this->setHook('BSStateBarBeforeBodyViewAdd');
     $this->setHook('BSInsertMagicAjaxGetData', 'onBSInsertMagicAjaxGetData');
     $this->setHook('BeforePageDisplay');
     global $wgBlueSpiceExtInfo;
     //Configuration variables
     $aMetadataDefaults = array('creator' => 'Hallo Welt! Medienwerkstatt GmbH');
     $aMetadataOverrides = array('producer' => 'UniversalExport ' . $wgBlueSpiceExtInfo['version'] . ' (BlueSpice for MediaWiki)');
     BsConfig::registerVar('MW::UniversalExport::CategoryWhitelist', $this->aCategoryWhitelist, BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_STRING);
     BsConfig::registerVar('MW::UniversalExport::CategoryBlacklist', $this->aCategoryBlacklist, BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_STRING);
     BsConfig::registerVar('MW::UniversalExport::MetadataDefaults', json_encode($aMetadataDefaults), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-universalexport-pref-metadatadefaults', 'textarea');
     BsConfig::registerVar('MW::UniversalExport::MetadataOverrides', json_encode($aMetadataOverrides), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-universalexport-pref-metadataoverrides', 'textarea');
     BsConfig::registerVar('MW::UniversalExport::ParamsDefaults', $this->aParamsDefaults, BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_MIXED);
     BsConfig::registerVar('MW::UniversalExport::ParamsOverrides', $this->aParamsOverrides, BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_MIXED);
     //Permissions
     $this->mCore->registerPermission('universalexport-export', array(), array('type' => 'namespace'));
     wfProfileOut('BS::' . __METHOD__);
 }
 protected function initExt()
 {
     BsConfig::registerVar('MW::PermissionManager::Lockmode', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-permissionmanager-pref-lockmode', 'toggle');
     BsConfig::registerVar('MW::PermissionManager::SkipSystemNS', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-permissionmanager-pref-skipsysns', 'toggle');
     BsConfig::registerVar('MW::PermissionManager::RealityCheck', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-permissionmanager-pref-enablerealitycheck', 'toggle');
     $this->setHook('BSWikiAdminUserManagerBeforeUserListSend');
     $this->setHook('BSGroupManagerGroupNameChanged');
 }
 /**
  * Initialise the InsertLink extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::InsertLink::initExt');
     $this->setHook('BSExtendedEditBarBeforeEditToolbar');
     $this->setHook('VisualEditorConfig');
     BsConfig::registerVar('MW::InsertLink::EnableJava', false, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-insertlink-pref-enable-java', 'toggle');
     wfProfileOut('BS::InsertLink::initExt');
 }
 /**
  * Initialization of WatchList extension
  */
 protected function initExt()
 {
     $this->setHook('ParserFirstCallInit');
     $this->setHook('BSUserSidebarDefaultWidgets');
     $this->setHook('BSWidgetListHelperInitKeyWords');
     $this->setHook('BSInsertMagicAjaxGetData');
     BsConfig::registerVar('MW::WatchList::WidgetLimit', 10, BsConfig::LEVEL_USER | BsConfig::TYPE_INT, 'bs-watchlist-pref-widgetlimit', 'int');
     BsConfig::registerVar('MW::WatchList::WidgetSortOdr', 'time', BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-watchlist-pref-widgetsortodr', 'select');
 }
 /**
  * Initialise the InsertCategory extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('SkinTemplateNavigation');
     $this->setHook('BSExtendedEditBarBeforeEditToolbar');
     $this->setHook('BeforePageDisplay');
     $this->setHook('VisualEditorConfig');
     BsConfig::registerVar('MW::InsertCategory::WithParents', false, BsConfig::LEVEL_PUBLIC | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL, 'bs-insertcategory-pref-withparents', 'toggle');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of ExtensionTemplate extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('BeforePageDisplay');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('SkinTemplateNavigation');
     $this->mCore->registerPermission('viewreaders', array(), array('type' => 'global'));
     BsConfig::registerVar('MW::Readers::Active', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-readers-pref-active', 'toggle');
     BsConfig::registerVar('MW::Readers::NumOfReaders', 10, BsConfig::TYPE_INT | BsConfig::LEVEL_PUBLIC, 'bs-readers-pref-numofreaders', 'int');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of Avatar extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::Avatars::DefaultSize', 40, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-avatars-pref-defaultsize', 'int');
     BsConfig::registerVar('MW::Avatars::Generator', 'InstantAvatar', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-avatars-pref-generator', 'select');
     $this->setHook('BSCoreGetUserMiniProfileBeforeInit');
     $this->setHook('BsAuthorPageProfileImageAfterInitFields');
     # TODO: required rights? user->read?
     #$this->mCore->registerPermission( 'viewfiles', array( 'user' ) );
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of WidgetBar extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('BS:UserPageSettings', 'onUserPageSettings');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('userCan', 'onUserCan');
     $this->setHook('GetPreferences');
     $this->setHook('BeforePageDisplay');
     $this->setHook('EditFormPreloadText');
     BsConfig::registerVar('MW::WidgetBar::LinkToEdit', array('href' => '', 'content' => ''), BsConfig::LEVEL_USER | BsConfig::NO_DEFAULT, 'bs-widgetbar-userpagesettings-link-title', 'link');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of Dashboards extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::Dashboards::UserDashboardOnLogo', false, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-dashboards-pref-userdashboardonlogo', 'toggle');
     $this->setHook('BeforePageDisplay');
     $this->setHook('ParserFirstCallInit');
     $this->setHook('PersonalUrls');
     $this->setHook('BSDashboardsUserDashboardPortalConfig');
     $this->setHook('BSDashboardsUserDashboardPortalPortlets');
     //$this->setHook( 'BSInsertMagicAjaxGetData' );
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of PagesVisited extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('ParserFirstCallInit');
     $this->setHook('BSUserSidebarDefaultWidgets');
     $this->setHook('BSWidgetListHelperInitKeyWords');
     $this->setHook('BSInsertMagicAjaxGetData');
     BsConfig::registerVar('MW::PagesVisited::WidgetLimit', 10, BsConfig::LEVEL_USER | BsConfig::TYPE_INT, 'bs-pagesvisited-pref-widgetlimit', 'int');
     BsConfig::registerVar('MW::PagesVisited::WidgetNS', array(0), BsConfig::LEVEL_USER | BsConfig::TYPE_ARRAY_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-pagesvisited-pref-widgetns', 'multiselectex');
     BsConfig::registerVar('MW::PagesVisited::WidgetSortOdr', 'time', BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-pagesvisited-pref-widgetsortodr', 'select');
     wfProfileOut('BS::' . __METHOD__);
 }
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::BlueSpiceProjectFeedbackHelper::Active', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-bluespiceprojectfeedbackhelper-active', 'toggle');
     if (BsConfig::get('MW::BlueSpiceProjectFeedbackHelper::Active') == false) {
         wfProfileOut('BS::' . __METHOD__);
         return;
     }
     $this->setHook('BeforePageDisplay');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of CSyntaxHighlight extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     $this->setHook('OutputPageBeforeHTML');
     $this->setHook('SkinAfterBottomScripts');
     // TODO RBV (12.04.11 15:47): Provide all config possibilities of SyntaxHighlighter...
     BsConfig::registerVar('MW::CSyntaxHighlight::Theme', 'Default', BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-csyntaxhighlight-pref-theme', 'select');
     BsConfig::registerVar('MW::CSyntaxHighlight::Gutter', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-csyntaxhighlight-pref-gutter', 'toggle');
     BsConfig::registerVar('MW::CSyntaxHighlight::AutoLinks', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-csyntaxhighlight-pref-autolinks', 'toggle');
     BsConfig::registerVar('MW::CSyntaxHighlight::Toolbar', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-csyntaxhighlight-pref-toolbar', 'toggle');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of TopMenuBarCustomizer class
  */
 public function initExt()
 {
     //TODO: Add some error massages on article save (more than 5 entrys etc.)
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('BeforePageDisplay');
     $this->setHook('EditFormPreloadText');
     $this->setHook('PageContentSaveComplete', 'invalidateCacheOnArticleChange');
     $this->setHook('ArticleDeleteComplete', 'invalidateCacheOnArticleChange');
     $this->setHook('TitleMoveComplete', 'invalidateCacheOnTitleChange');
     BsConfig::registerVar('MW::TopMenuBarCustomizer::NuberOfLevels', 2, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-topmenubarcustomizer-pref-numberoflevels');
     BsConfig::registerVar('MW::TopMenuBarCustomizer::NumberOfMainEntries', 10, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-topmenubarcustomizer-pref-numberofmainentries', 'int');
     BsConfig::registerVar('MW::TopMenuBarCustomizer::NumberOfSubEntries', 25, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-topmenubarcustomizer-pref-numberofsubentries', 'int');
 }
 /**
  * Initialization of NamespaceManager extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::NamespaceManager::NsOffset', 2999, BsConfig::TYPE_INT, BsConfig::LEVEL_PRIVATE);
     $this->setHook('NamespaceManager::getMetaFields', 'onGetMetaFields', true);
     $this->setHook('NamespaceManager::getNamespaceData', 'onGetNamespaceData', true);
     $this->setHook('NamespaceManager::editNamespace', 'onEditNamespace', true);
     $this->setHook('NamespaceManager::writeNamespaceConfiguration', 'onWriteNamespaceConfiguration', true);
     //CR, RBV: This is suposed to return all constants! Not just system NS.
     //At the moment the implementation relies on an hardcoded mapping,
     //which is bad. We need to change this and make it more generic!
     $GLOBALS['bsSystemNamespaces'] = BsNamespaceHelper::getMwNamespaceConstants();
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of UserSidebar extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     global $wgAPIModules;
     $this->setHook('BS:UserPageSettings', 'onUserPageSettings');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('userCan', 'onUserCan');
     $this->setHook('GetPreferences');
     $this->setHook('EditFormPreloadText');
     $this->setHook('BeforePageDisplay');
     $this->setHook('PageContentSaveComplete');
     $wgAPIModules['sidebar'] = 'ApiSidebar';
     BsConfig::registerVar('MW::UserSidebar::LinkToEdit', array('href' => '', 'content' => ''), BsConfig::LEVEL_USER | BsConfig::NO_DEFAULT, 'bs-usersidebar-userpagesettings-link-title', 'link');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of ExtendedEditBar extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsExtensionManager::setContext('MW::SecureFileStore::Active');
     BsConfig::registerVar('MW::SecureFileStore::Active', true, BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT);
     BsConfig::registerVar('MW::SecureFileStore::DefaultDisposition', 'inline', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-securefilestore-pref-defaultdisposition', 'select');
     BsConfig::registerVar('MW::SecureFileStore::DispositionInline', array('pdf'), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-securefilestore-pref-dispositioninline', 'multiselectplusadd');
     BsConfig::registerVar('MW::SecureFileStore::DispositionAttachment', array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING, 'bs-securefilestore-pref-dispositionattachment', 'multiselectplusadd');
     BsConfig::registerVar('MW::SecureFileStore::FileExtensionWhitelist', array(), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-securefilestore-pref-fileextensionwhitelist', 'multiselectplusadd');
     $this->setHook('SkinTemplateOutputPageBeforeExec', 'secureImages');
     $this->setHook('ExtendedSearchBeforeAjaxResponse', 'secureImages');
     $this->setHook('SiteNoticeAfter', 'onSiteNoticeAfter');
     $this->mCore->registerPermission('viewfiles', array('user'), array('type' => 'global'));
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of SaferEdit extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::SaferEdit::Interval', 10, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-saferedit-pref-interval', 'int');
     BsConfig::registerVar('MW::SaferEdit::ShowNameOfEditingUser', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-saferedit-pref-shownameofeditinguser', 'toggle');
     BsConfig::registerVar('MW::SaferEdit::WarnOnLeave', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL | BsConfig::RENDER_AS_JAVASCRIPT, 'bs-saferedit-pref-warnonleave', 'toggle');
     $this->setHook('ArticleSaveComplete', 'clearSaferEdit');
     $this->setHook('EditPage::showEditForm:initial', 'setEditSection');
     $this->setHook('BSStateBarAddSortTopVars', 'onStatebarAddSortTopVars');
     $this->setHook('BSStateBarBeforeTopViewAdd', 'onStateBarBeforeTopViewAdd');
     $this->setHook('BeforeInitialize');
     $this->setHook('BeforePageDisplay');
     $this->setHook('BsAdapterAjaxPingResult');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of PageTemplates extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     //Hooks
     $this->setHook('LinkBegin');
     $this->setHook('EditPage::showEditForm:initial', 'onEditPageShowEditFormInitial');
     $this->setHook('MessagesPreLoad');
     $this->setHook('ParserFirstCallInit');
     // Do not use page template mechanism for these pages
     BsConfig::registerVar('MW::PageTemplates::ExcludeNs', array(-2, -1, 6, 7, 8, 9, 10, 11, 14, 15), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_INT | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-pagetemplates-pref-excludens', 'multiselectex');
     // Force page to be created in target namespace
     BsConfig::registerVar('MW::PageTemplates::ForceNamespace', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-pagetemplates-pref-forcenamespace', 'toggle');
     // Hide template if page is not in target namespace
     BsConfig::registerVar('MW::PageTemplates::HideIfNotInTargetNs', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-pagetemplates-pref-hideifnotintargetns', 'toggle');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of UEModulePDF extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     //Variables
     BsConfig::registerVar('MW::UEModulePDF::PdfServiceURL', 'http://localhost:8080/BShtml2PDF', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 'bs-uemodulepdf-pref-pdfserviceurl');
     BsConfig::registerVar('MW::UEModulePDF::DefaultTemplate', 'BlueSpice', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-uemodulepdf-pref-templatepath');
     BsConfig::registerVar('MW::UEModulePDF::SuppressNS', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-uemodulepdf-pref-suppressns', 'toggle');
     /* This setting is no longer needed. We do not provide the old bn2pdf.war anymore */
     BsConfig::registerVar('MW::UEModulePDF::Backend', 'BsPDFServlet', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS);
     BsConfig::registerVar('MW::UEModulePDF::TemplatePath', 'extensions/BlueSpiceExtensions/UEModulePDF/data/PDFTemplates', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 'bs-uemodulepdf-pref-templatedir');
     //Hooks
     $this->setHook('BSUniversalExportGetWidget');
     $this->setHook('BSUniversalExportSpecialPageExecute');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('BaseTemplateToolbox');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of Authors extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     // Hooks
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     $this->setHook('BeforePageDisplay');
     $this->setHook('BSInsertMagicAjaxGetData');
     $this->setHook('BS:UserPageSettings', 'onUserPageSettings');
     $this->setHook('PageContentSave');
     BsConfig::registerVar('MW::Authors::Blacklist', array('MediaWiki default'), BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_STRING);
     BsConfig::registerVar('MW::Authors::ImageHeight', 40, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-authors-pref-imageheight', 'int');
     BsConfig::registerVar('MW::Authors::ImageWidth', 40, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-authors-pref-imagewidth', 'int');
     BsConfig::registerVar('MW::Authors::Limit', 10, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-authors-pref-limit', 'int');
     BsConfig::registerVar('MW::Authors::MoreImage', 'more-users_v2.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::Authors::Show', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-authors-pref-show', 'toggle');
     $this->mCore->registerBehaviorSwitch('bs_noauthors');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of ShoutBox extension
  */
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     // Hooks
     $this->setHook('ParserFirstCallInit');
     $this->setHook('BeforeInitialize');
     $this->setHook('BeforePageDisplay');
     $this->setHook('LanguageGetMagic');
     $this->setHook('BSWidgetBarGetDefaultWidgets');
     $this->setHook('BSWidgetListHelperInitKeyWords');
     $this->setHook('BSInsertMagicAjaxGetData');
     $this->setHook('BsAdapterAjaxPingResult');
     BsConfig::registerVar('MW::WhoIsOnline::LimitCount', 7, BsConfig::LEVEL_USER | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_INT, 'bs-whoisonline-pref-limitcount', 'int');
     BsConfig::registerVar('MW::WhoIsOnline::OrderBy', 'onlinetime', BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-whoisonline-pref-orderby', 'select');
     BsConfig::registerVar('MW::WhoIsOnline::MaxIdleTime', 600, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_INT, 'bs-whoisonline-pref-maxidletime', 'int');
     BsConfig::registerVar('MW::WhoIsOnline::Interval', 10, BsConfig::LEVEL_PUBLIC | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_INT, 'bs-whoisonline-pref-interval', 'int');
     wfProfileOut('BS::' . __METHOD__);
 }
 protected function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::ResponsibleEditors::EChange', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-echange', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::EDelete', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-edelete', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::EMove', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-emove', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::ActivatedNamespaces', array(0), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-responsibleeditors-pref-activatednamespaces', 'multiselectex');
     BsConfig::registerVar('MW::ResponsibleEditors::AutoAssignOnArticleCreation', false, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-autoassignonarticlecreation', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::ResponsibleEditorMayChangeAssignment', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-responsibleeditormaychangeassignment', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::EMailNotificationOnResponsibilityChange', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-emailnotificationonresponsibilitychange', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::AddArticleToREWatchLists', true, BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-responsibleeditors-pref-responsibleeditormaychangeassignment', 'toggle');
     BsConfig::registerVar('MW::ResponsibleEditors::AutoPermissions', array('read', 'edit'), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-responsibleeditors-pref-autopermissions', 'multiselectex');
     //Hooks
     $this->setHook('BeforeInitialize');
     $this->setHook('BeforePageDisplay');
     $this->setHook('SkinTemplateNavigation');
     $this->setHook('ArticleInsertComplete');
     $this->setHook('SpecialMovepageAfterMove');
     $this->setHook('ArticleDeleteComplete');
     $this->setHook('ArticleSaveComplete');
     $this->setHook('TitleMoveComplete');
     $this->setHook('BSBookshelfManagerGetBookDataRow');
     $this->setHook('BSUEModulePDFcollectMetaData');
     $this->setHook('BSStateBarAddSortTopVars', 'onStatebarAddSortTopVars');
     $this->setHook('BSStateBarAddSortBodyVars', 'onStatebarAddSortBodyVars');
     $this->setHook('BSStateBarBeforeTopViewAdd', 'onStateBarBeforeTopViewAdd');
     $this->setHook('BSStateBarBeforeBodyViewAdd', 'onStateBarBeforeBodyViewAdd', true);
     $this->setHook('RevisionAjaxReviewBeforeParams');
     $this->setHook('BSPageAccessAddAdditionalAccessGroups', 'onPageAccessAddAdditionalAccessGroups');
     $this->setHook('BSDashboardsUserDashboardPortalConfig');
     $this->setHook('BSDashboardsUserDashboardPortalPortlets');
     // Echo extension hooks
     $this->setHook('BeforeCreateEchoEvent');
     $this->setHook('EchoGetDefaultNotifiedUsers');
     $this->setHook('SuperList::getFieldDefinitions', 'onSuperListGetFieldDefinitions');
     $this->setHook('SuperList::getColumnDefinitions', 'onSuperListGetColumnDefinitions');
     $this->setHook('SuperList::queryPagesWithFilter', 'onSuperListQueryPagesWithFilter');
     $this->setHook('SuperList::buildDataSets', 'onSuperListBuildDataSets');
     $this->mCore->registerPermission('responsibleeditors-changeresponsibility', array(), array('type' => 'global'));
     $this->mCore->registerPermission('responsibleeditors-viewspecialpage', array(), array('type' => 'global'));
     $this->mCore->registerPermission('responsibleeditors-takeresponsibility', array('user'), array('type' => 'global'));
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Constructor of VisualEditor class
  */
 public function __construct()
 {
     wfProfileIn('BS::' . __METHOD__);
     // Base settings
     $this->mExtensionFile = __FILE__;
     $this->mExtensionType = EXTTYPE::VARIABLE;
     $this->mInfo = array(EXTINFO::NAME => 'VisualEditor', EXTINFO::DESCRIPTION => 'bs-visualeditor-desc', EXTINFO::AUTHOR => 'Markus Glaser, Sebastian Ulbricht', EXTINFO::VERSION => 'default', EXTINFO::STATUS => 'default', EXTINFO::PACKAGE => 'default', EXTINFO::URL => 'http://www.hallowelt.biz', EXTINFO::DEPS => array('bluespice' => '2.22.0'));
     $this->mExtensionKey = 'MW::VisualEditor';
     BsConfig::registerVar('MW::VisualEditor::disableNS', array(NS_MEDIAWIKI), BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_ARRAY_INT | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-visualeditor-pref-disablens', 'multiselectex');
     BsConfig::registerVar('MW::VisualEditor::defaultNoContextNS', array(NS_SPECIAL, NS_MEDIA, NS_FILE), BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_ARRAY_INT);
     BsConfig::registerVar('MW::VisualEditor::SpecialTags', array(), BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::AllowedTags', array(), BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::Use', true, BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 'bs-visualeditor-pref-use', 'toggle');
     BsConfig::registerVar('MW::VisualEditor::UseLimited', false, BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::UseForceLimited', false, BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::DebugMode', false, BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::GuiMode', true, BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     BsConfig::registerVar('MW::VisualEditor::GuiSwitchable', true, BsConfig::LEVEL_PRIVATE | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_BOOL);
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of ArticleInfo extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     BsConfig::registerVar('MW::ArticleInfo::ImageLastEdited', 'bs-infobar-last-edited.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::ArticleInfo::ImageLastEditor', 'bs-infobar-author.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::ArticleInfo::ImageCategories', 'bs-infobar-category.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::ArticleInfo::ImageSubpages', 'bs-infobar-subpages.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::ArticleInfo::ImageCheckRevision', 'bs-infobar-revision.png', BsConfig::LEVEL_PRIVATE | BsConfig::TYPE_STRING);
     BsConfig::registerVar('MW::ArticleInfo::CheckRevisionInterval', 10, BsConfig::LEVEL_PUBLIC | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_INT, 'bs-articleinfo-pref-CheckRevisionInterval', 'int');
     $this->mCore->registerBehaviorSwitch('NOARTICLEINFO', array($this, 'noArticleInfoCallback'));
     $this->setHook('BSStateBarAddSortTopVars', 'onStatebarAddSortTopVars');
     $this->setHook('BSStateBarAddSortBodyVars', 'onStatebarAddSortBodyVars');
     $this->setHook('BSStateBarBeforeTopViewAdd', 'onStateBarBeforeTopViewAdd');
     $this->setHook('BSStateBarBeforeBodyViewAdd', 'onStateBarBeforeBodyViewAdd');
     $this->setHook('BsAdapterAjaxPingResult');
     $this->setHook('ArticleSaveComplete');
     $this->setHook('ArticleDeleteComplete');
     $this->setHook('BeforePageDisplay');
     $this->setHook('SkinTemplateOutputPageBeforeExec');
     wfProfileOut('BS::' . __METHOD__);
 }
 /**
  * Initialization of ArticleInfo extension
  */
 public function initExt()
 {
     wfProfileIn('BS::' . __METHOD__);
     //$this->mCore->registerPermission('flexiskinchange');
     BsConfig::registerVar('MW::Flexiskin::Active', "default", BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-flexiskin-pref-active', 'select');
     BsConfig::registerVar('MW::Flexiskin::Logo', "", BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-flexiskin-pref-logo', 'text');
     $sFlexiskin = $this->getRequest()->getVal('flexiskin', '');
     $sPreviewSkin = RequestContext::getMain()->getRequest()->getCookie("sPreviewSkin", null, false);
     $oResponse = $this->getRequest()->response();
     $oRequest = $this->getRequest();
     //this statemenet is just for setting the cookie, this is why we need to do some checks here
     //check if the request comes via index.php, flexiskin is set in query and if you are in view mode (block some ajax requests)
     if (strpos(wfGetScriptUrl(), "index.php") !== false && $sFlexiskin !== "" && $oRequest->getVal('action', 'view') === 'view') {
         $bIsTemp = (bool) $oRequest->getBool('preview', false);
         //is it in preview mode?
         //set the cookie
         if ($bIsTemp) {
             $oResponse->setcookie("sPreviewSkin", $sFlexiskin);
             $sPreviewSkin = $sFlexiskin;
             //or just unset it
         } else {
             $oResponse->setcookie("sPreviewSkin", false, 1);
             $sPreviewSkin = false;
         }
     }
     $sFlexiskin = $sFlexiskin == '' ? $sPreviewSkin : $sFlexiskin;
     if ($sFlexiskin != "" || BsConfig::get('MW::Flexiskin::Active') != '' || $sPreviewSkin) {
         $sId = $sFlexiskin != '' ? $sFlexiskin : BsConfig::get('MW::Flexiskin::Active');
         if ($sId != "default" || $sPreviewSkin !== false) {
             $this->addCssFile($sId, $sPreviewSkin !== false);
             if ($sPreviewSkin) {
                 //reset resource loader cache for preview
                 global $wgResourceLoaderMaxage;
                 $wgResourceLoaderMaxage = array('versioned' => array('server' => 1, 'client' => 1), 'unversioned' => array('server' => 1, 'client' => 1));
             }
         }
     }
     $this->mCore->registerPermission('flexiskinedit', array(), array('type' => 'global'));
     wfProfileOut('BS::' . __METHOD__);
 }