Skip to content

Commit

Permalink
ref pufferpanel#95 actually closes the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed May 2, 2014
1 parent 3a9f4b2 commit 426429d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions panel/core/framework/framework.server.php
Expand Up @@ -28,9 +28,8 @@ class server extends user {

public function __construct($hash, $userid, $isroot){

$this->mysql = self::connect();
if($userid !== false && !empty($hash)){

$this->mysql = self::connect();

$this->_data = array();
$this->_s = true;
Expand Down Expand Up @@ -141,11 +140,8 @@ public function nodeData($id) {

}

public function nodeRedirect($hash, $rootAdmin) {

//@TODO: Solve this bug
$this->mysql = self::connect();

public function nodeRedirect($hash, $userid, $rootAdmin) {

if($rootAdmin == 1){

$query = $this->mysql->prepare("SELECT * FROM `servers` WHERE `hash` = ? AND `active` = '1'");
Expand All @@ -157,7 +153,7 @@ public function nodeRedirect($hash, $rootAdmin) {

$query = $this->mysql->prepare("SELECT * FROM `servers` WHERE `owner_id` = :ownerid AND `hash` = :hash AND `active` = '1'");
$query->execute(array(
':ownerid' => $this->_data['user.id'],
':ownerid' => $userid,
':hash' => $hash
));

Expand All @@ -181,4 +177,4 @@ public function nodeRedirect($hash, $rootAdmin) {

}

?>
?>

0 comments on commit 426429d

Please sign in to comment.