diff options
| author | michael pereira | 2011-04-26 18:14:42 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-26 18:14:42 +0200 |
| commit | c1d24fe8a4d36225d8aab3cfa568622db649d76a (patch) | |
| tree | 73ce5b6d584897237d498912fa932985ed5b279d | |
| parent | config fix (diff) | |
| parent | Filterfix (diff) | |
| download | pbs2-c1d24fe8a4d36225d8aab3cfa568622db649d76a.tar.gz pbs2-c1d24fe8a4d36225d8aab3cfa568622db649d76a.tar.xz pbs2-c1d24fe8a4d36225d8aab3cfa568622db649d76a.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
| -rw-r--r-- | application/modules/fbgui/controllers/IndexController.php | 6 | ||||
| -rw-r--r-- | library/Pbs/Filter.php | 6 | ||||
| -rw-r--r-- | setup/pbs.sql | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php index 1860297..1401be3 100644 --- a/application/modules/fbgui/controllers/IndexController.php +++ b/application/modules/fbgui/controllers/IndexController.php @@ -47,8 +47,8 @@ class Fbgui_IndexController extends Zend_Controller_Action $this->view->notification = $pbsNotifier->notify('You have no membership, therefore you have no own BootMenu','info'); } - // $d = new Pbs_Debug(); - // $d->debug(array('FBGuiIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$mySession->postdata))); + $d = new Pbs_Debug(); + $d->debug(array('FBGuiIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$mySession->postdata))); if(isset($mySession->postdata['bootisoID']) || isset($mySession->postdata['serialnumber'])){ // Create a session @@ -63,7 +63,7 @@ class Fbgui_IndexController extends Zend_Controller_Action elseif(isset($mySession->postdata['serialnumber'])){ $results = $bootisomapper->findBy(array('serialnumber' => $mySession->postdata['serialnumber']),true); if(count($results) == 0){ - $this->_redirect('/fbgui/index/error/serialresult/noserial'); + $this->_redirect('/fbgui/index/error/serialresult/noserial2'); } $bootiso->setOptions($results[0]); $bootiso->setID($results[0]['bootisoID']); diff --git a/library/Pbs/Filter.php b/library/Pbs/Filter.php index 1d1051a..9cbd0ba 100644 --- a/library/Pbs/Filter.php +++ b/library/Pbs/Filter.php @@ -223,11 +223,11 @@ class Pbs_Filter{ if($this->membership->getID() != null){ if(!$testFilter){ // get membership from the session - //TODO: GET GROUP from SESSION $membergroupID = $this->membership->getGroupID(); } - } - if(isset($groupID)){ + } + + if(isset($membergroupID)){ try{ $stmt = $db->query("SELECT * FROM pbs_filterentries fe, pbs_filter f WHERE fe.filtertypeID = ".$filtertypID." AND diff --git a/setup/pbs.sql b/setup/pbs.sql index 6d5dbb3..0ddf900 100644 --- a/setup/pbs.sql +++ b/setup/pbs.sql @@ -269,7 +269,7 @@ CREATE TABLE IF NOT EXISTS `pbs_client` ( PRIMARY KEY (`clientID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; ALTER TABLE `pbs_client` ADD `groupID` INT NOT NULL AFTER `clientID` ; -ALTER TABLE `pbs_client` ADD UNIQUE (`macadress`); +ALTER TABLE `pbs_client` ADD UNIQUE (`groupID` ,`macadress`); ALTER TABLE `pbs_client` ADD CONSTRAINT `pbs_client_ibfk_1` FOREIGN KEY (`groupID`) REFERENCES `pbs_group` (`groupID`) ON DELETE CASCADE; |
