/** * Creates a link documentation help link for a given menu section. If * section has no help assigned or section is null link to main help is * returned. * * @param OA_Admin_Menu_Section $menuSection menu section to find help for * @return string url to documentation page */ function getHelpLink($menuSection) { if ($menuSection != null) { $relativeHelpPath = $menuSection->getHelpLink(); } else { $relativeHelpPath = ""; } // The link is not relative, we directly link to it if (strpos($relativeHelpPath, '://') !== false) { return $relativeHelpPath; } // Convert original help links to new Revive Adserver format if (strpos($relativeHelpPath, 'settings') !== false) { if (strpos($relativeHelpPath, '/') !== 0) { $relativeHelpPath = '/admin/' . $relativeHelpPath; } else { $relativeHelpPath = '/admin' . $relativeHelpPath; } } else { if (strpos($relativeHelpPath, '/') !== 0) { $relativeHelpPath = '/user/' . $relativeHelpPath; } else { $relativeHelpPath = '/user' . $relativeHelpPath; } } return OA_Admin_Help::buildHelpLink($relativeHelpPath); }
/** * Creates a link documentation help link for a given menu section. If section has no help assigned or section is null * link to main help is returned * * @param OA_Admin_Menu_Section $menuSection menu section to find help for * @return string url to documentation page */ function getHelpLink($menuSection) { if ($menuSection != null) { $relativeHelpPath = $menuSection->getHelpLink(); } else { $relativeHelpPath = ""; } return OA_Admin_Help::buildHelpLink($relativeHelpPath); }
function _assignUserAccountInfo($oCurrentSection) { global $session; // Show currently logged on user and IP if (OA_Auth::isLoggedIn() || defined('phpAds_installing')) { $this->oTpl->assign('helpLink', OA_Admin_Help::getHelpLink($oCurrentSection)); if (!defined('phpAds_installing')) { $this->oTpl->assign('infoUser', OA_Permission::getUsername()); $this->oTpl->assign('buttonLogout', true); $this->oTpl->assign('buttonReportBugs', true); // Account switcher OA_Admin_UI_AccountSwitch::assignModel($this->oTpl); $this->oTpl->assign('strWorkingAs', $GLOBALS['strWorkingAs_Key']); $this->oTpl->assign('keyWorkingAs', $GLOBALS['keyWorkingAs']); $this->oTpl->assign('accountId', OA_Permission::getAccountId()); $this->oTpl->assign('accountName', OA_Permission::getAccountName()); $this->oTpl->assign('accountSearchUrl', MAX::constructURL(MAX_URL_ADMIN, 'account-switch-search.php')); $this->oTpl->assign('productUpdatesCheck', OA_Permission::isAccount(OA_ACCOUNT_ADMIN) && $GLOBALS['_MAX']['CONF']['sync']['checkForUpdates'] && !isset($session['maint_update_js'])); if (OA_Permission::isUserLinkedToAdmin()) { $this->oTpl->assign('maintenanceAlert', OA_Dal_Maintenance_UI::alertNeeded()); } } else { $this->oTpl->assign('buttonStartOver', true); } } }