SAAS-1128: Logging in from www.airtime.pro doesn't trigger lang/timezone setup dialog

This commit is contained in:
Albert Santoni 2015-10-14 14:28:39 -04:00
parent 08344895d6
commit a90b97fb55
2 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,7 @@ define('PRODUCT_NAME' , 'Airtime');
define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org'); define('PRODUCT_SITE_URL' , 'http://airtime.sourcefabric.org');
define('SAAS_PRODUCT_BRANDING_NAME', 'Airtime Pro'); define('SAAS_PRODUCT_BRANDING_NAME', 'Airtime Pro');
define('SAAS_LOGIN_REFERRER', 'https://www.airtime.pro/');
define('COMPANY_NAME' , 'Sourcefabric'); define('COMPANY_NAME' , 'Sourcefabric');
define('COMPANY_SUFFIX' , 'z.ú.'); define('COMPANY_SUFFIX' , 'z.ú.');

View File

@ -107,10 +107,11 @@ class ShowbuilderController extends Zend_Controller_Action
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
$setupComplete = Application_Model_Preference::getLangTimezoneSetupComplete(); $setupComplete = Application_Model_Preference::getLangTimezoneSetupComplete();
$previousPage = $request->getHeader('Referer'); $previousPage = strtolower($request->getHeader('Referer'));
$userService = new Application_Service_UserService(); $userService = new Application_Service_UserService();
$currentUser = $userService->getCurrentUser(); $currentUser = $userService->getCurrentUser();
$previousPageWasLoginScreen = strpos(strtolower($previousPage), 'login') !== false; $previousPageWasLoginScreen = (strpos($previousPage, 'login') !== false) ||
($previousPage == SAAS_LOGIN_REFERRER);
// If current user is Super Admin, and they came from the login page, // If current user is Super Admin, and they came from the login page,
// and they have not seen the setup popup before // and they have not seen the setup popup before