Skip to content

Commit

Permalink
Fixes mescon#157
Browse files Browse the repository at this point in the history
  • Loading branch information
Savage committed Aug 14, 2017
1 parent 18ecfb7 commit f878ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php
error_reporting (E_ALL ^ E_NOTICE); /* Turn off notice errors */
require 'muximux.php';
if (is_session_started()) session_destroy();
session_start();
if (!is_session_started()) session_start();
defined("CONFIG") ? null : define('CONFIG', 'settings.ini.php');
defined("CONFIGEXAMPLE") ? null : define('CONFIGEXAMPLE', 'settings.ini.php-example');
defined("SECRET") ? null : define('SECRET', 'secret.txt');
Expand Down
3 changes: 2 additions & 1 deletion muximux.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/*
* DO NOT CHANGE THIS FILE!
*/
session_start();
defined("CONFIG") ? null : define('CONFIG', 'settings.ini.php');
defined("CONFIGEXAMPLE") ? null : define('CONFIGEXAMPLE', 'settings.ini.php-example');
defined("SECRET") ? null : define('SECRET', 'secret.txt');
Expand All @@ -25,7 +26,7 @@

// First what we're gonna do - save or read
if (sizeof($_POST) > 0) {
if(!isset($_POST['username'])){
if(isset($_SESSION['username'])){
write_ini();
}
}
Expand Down

0 comments on commit f878ad2

Please sign in to comment.