Skip to content
Browse files

Fix sid function

  • Loading branch information...
1 parent 29d7d6c commit 876af58944b3cf09e08976bb426236a2dd7ae53b @vrana committed Dec 29, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 adminer/include/functions.inc.php
View
6 adminer/include/functions.inc.php
@@ -165,7 +165,11 @@ function ini_bool($ini) {
* @return bool
*/
function sid() {
- return (SID && !($_COOKIE && ini_bool("session.use_cookies"))); // $_COOKIE - don't pass SID with permanent login
+ static $return;
+ if (!isset($return)) { // restart_session() defines SID
+ $return = (SID && !($_COOKIE && ini_bool("session.use_cookies"))); // $_COOKIE - don't pass SID with permanent login
+ }
+ return $return;
}
/** Shortcut for $connection->quote($string)

0 comments on commit 876af58

Please sign in to comment.
Something went wrong with that request. Please try again.