Fix the indentation and login redirect issue

This commit is contained in:
Mark Crane 2014-07-27 08:00:16 +00:00
parent 023176f775
commit 9140870915
2 changed files with 24 additions and 17 deletions

View File

@ -1,6 +1,6 @@
<context name="{v_context}">
<extension name="do-not-disturb" number="*78,*79" continue="false" app_uuid="df32d982-e39e-4ae5-a46d-aed1893873f2" enabled="true">
<condition field="destination_number" expression="^\*78$" break="on-true">
<condition field="destination_number" expression="^\*78$|\*363$" break="on-true">
<action application="set" data="enabled=true"/>
<action application="lua" data="do_not_disturb.lua"/>
</condition>

View File

@ -56,8 +56,14 @@ if (strlen($_SESSION["username"]) == 0) {
// if logged in, redirect to login destination
if (strlen($_SESSION["username"]) > 0) {
if (strlen($_SESSION['login']['destination']['url']) > 0) {
header("Location: ".$_SESSION['login']['destination']['url']);
}
else {
require_once "resources/header.php";
require_once "resources/header.php";
}
}
else {
//use custom index, if present, otherwise use custom login, if present, otherwise use default login
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/index.php")) {
@ -70,4 +76,5 @@ else {
require_once "resources/login.php";
}
}
?>