aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/index.php b/index.php
index d3369a2d..01122ebf 100644
--- a/index.php
+++ b/index.php
@@ -1276,11 +1276,15 @@ function renderPage()
1276 { 1276 {
1277 if (!empty($_POST['title']) ) 1277 if (!empty($_POST['title']) )
1278 { 1278 {
1279 if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! 1279 if (!tokenOk($_POST['token'])) {
1280 die('Wrong token.'); // Go away!
1281 }
1280 $tz = 'UTC'; 1282 $tz = 'UTC';
1281 if (!empty($_POST['continent']) && !empty($_POST['city'])) 1283 if (!empty($_POST['continent']) && !empty($_POST['city'])
1282 if (isTimeZoneValid($_POST['continent'],$_POST['city'])) 1284 && isTimeZoneValid($_POST['continent'], $_POST['city'])
1283 $tz = $_POST['continent'].'/'.$_POST['city']; 1285 ) {
1286 $tz = $_POST['continent'] . '/' . $_POST['city'];
1287 }
1284 $GLOBALS['timezone'] = $tz; 1288 $GLOBALS['timezone'] = $tz;
1285 $GLOBALS['title']=$_POST['title']; 1289 $GLOBALS['title']=$_POST['title'];
1286 $GLOBALS['titleLink']=$_POST['titleLink']; 1290 $GLOBALS['titleLink']=$_POST['titleLink'];
@@ -2113,10 +2117,10 @@ function install()
2113 if (!empty($_POST['setlogin']) && !empty($_POST['setpassword'])) 2117 if (!empty($_POST['setlogin']) && !empty($_POST['setpassword']))
2114 { 2118 {
2115 $tz = 'UTC'; 2119 $tz = 'UTC';
2116 if (!empty($_POST['continent']) && !empty($_POST['city'])) { 2120 if (!empty($_POST['continent']) && !empty($_POST['city'])
2117 if (isTimeZoneValid($_POST['continent'], $_POST['city'])) { 2121 && isTimeZoneValid($_POST['continent'], $_POST['city'])
2118 $tz = $_POST['continent'].'/'.$_POST['city']; 2122 ) {
2119 } 2123 $tz = $_POST['continent'].'/'.$_POST['city'];
2120 } 2124 }
2121 $GLOBALS['timezone'] = $tz; 2125 $GLOBALS['timezone'] = $tz;
2122 // Everything is ok, let's create config file. 2126 // Everything is ok, let's create config file.