Skip to content

Commit

Permalink
start the php session before loading plugins in a standard manner (re…
Browse files Browse the repository at this point in the history
…lated to bug 2835: )

git-svn-id: http://piwigo.org/svn/trunk@20599 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Feb 7, 2013
1 parent 7956ce1 commit f66a624
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
1 change: 1 addition & 0 deletions include/common.inc.php
Expand Up @@ -133,6 +133,7 @@ function sanitize_mysql_kv(&$v, $k)

ImageStdParams::load_from_db();

session_start();
load_plugins();

// users can have defined a custom order pattern, incompatible with GUI form
Expand Down
9 changes: 0 additions & 9 deletions include/functions.inc.php
Expand Up @@ -1621,10 +1621,6 @@ function get_branch_from_version($version)
*/
function get_device()
{
if (session_id() == '')
{
session_start();
}
$device = pwg_get_session_var('device');

if (is_null($device))
Expand Down Expand Up @@ -1661,11 +1657,6 @@ function mobile_theme()
return false;
}

if (session_id() == '')
{
session_start();
}

if (isset($_GET['mobile']))
{
$is_mobile_theme = get_boolean($_GET['mobile']);
Expand Down
9 changes: 0 additions & 9 deletions include/user.inc.php
Expand Up @@ -26,10 +26,6 @@

if (isset($_COOKIE[session_name()]))
{
if (session_id() == '')
{
session_start();
}
if (isset($_GET['act']) and $_GET['act'] == 'logout')
{ // logout
logout_user();
Expand All @@ -47,11 +43,6 @@
auto_login();
}

if (session_id()=="")
{
session_start();
}

// using Apache authentication override the above user search
if ($conf['apache_authentication'])
{
Expand Down

0 comments on commit f66a624

Please sign in to comment.