public function executeIndex()
 {
     wfProfileIn(__METHOD__);
     global $wgLang, $wgOut;
     $themeSettings = new ThemeSettings();
     // current settings
     $this->themeSettings = $themeSettings->getSettings();
     // application theme settings (not user settable)
     $this->applicationThemeSettings = SassUtil::getApplicationThemeSettings();
     // recent versions
     $themeHistory = array_reverse($themeSettings->getHistory());
     // format time (for edits older than 30 days - show timestamp)
     foreach ($themeHistory as &$entry) {
         $diff = time() - strtotime($entry['timestamp']);
         if ($diff < 30 * 86400) {
             $entry['timeago'] = wfTimeFormatAgo($entry['timestamp']);
         } else {
             $entry['timeago'] = $wgLang->date($entry['timestamp']);
         }
     }
     $this->themeHistory = $themeHistory;
     // URL user should be redirected to when settings are saved
     if (isset($_SERVER['HTTP_REFERER'])) {
         $this->returnTo = $_SERVER['HTTP_REFERER'];
     } else {
         $this->returnTo = $this->wg->Script;
     }
     // load Google Analytics code
     $this->analytics = AnalyticsEngine::track('GA_Urchin', AnalyticsEngine::EVENT_PAGEVIEW);
     $wgOut->getResourceLoader()->getModule('mediawiki');
     $ret = implode("\n", array($wgOut->getHeadLinks(null, true), $wgOut->buildCssLinks(), $wgOut->getHeadScripts(), $wgOut->getHeadItems()));
     $this->globalVariablesScript = $ret;
     wfProfileOut(__METHOD__);
 }