/** Creates an array with all the active languages for the JoomFish * * @return Array of languages */ function getActiveLanguages($cacheReload = false) { if (isset($this) && $cacheReload) { $langList = $this->getLanguages(); $this->_cacheLanguages($langList); } /* if signed in as Manager or above include inactive languages too */ $user = JFactory::getUser(); if (isset($this) && $this->getCfg("frontEndPreview") && isset($user) && (strtolower($user->usertype) == "manager" || strtolower($user->usertype) == "administrator" || strtolower($user->usertype) == "super administrator")) { if (isset($this) && isset($this->allLanguagesCache)) { return $this->allLanguagesCache; } } else { if (isset($this) && isset($this->activeLanguagesCache)) { return $this->activeLanguagesCache; } } return FalangManager::getLanguages(true); }