Forráskód Böngészése

Fix missing $username when rg=0

Thijs Kinkhorst 23 éve
szülő
commit
3f2f1ab879
2 módosított fájl, 4 hozzáadás és 1 törlés
  1. 1 1
      include/load_prefs.php
  2. 3 0
      include/options/index.php

+ 1 - 1
include/load_prefs.php

@@ -18,7 +18,7 @@ require_once(SM_PATH . 'functions/prefs.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/constants.php');
 
-$username = ( !isset($username) ? '' : $username );
+$username = ( !isset($_SESSION['username']) ? '' : $_SESSION['username'] );
 
 $custom_css = getPref($data_dir, $username, 'custom_css', 'none' );
 

+ 3 - 0
include/options/index.php

@@ -0,0 +1,3 @@
+<?php
+header('Location: ../index.php');
+?>