From e30767a8f83df955fec83d2a2e459a5a8f18193f Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Fri, 8 Apr 2011 10:25:29 +0200 Subject: Eigener Menüpunkt für Person- und Grouplist --- .../modules/user/controllers/PersonController.php | 2 - application/modules/user/layouts/user.phtml | 14 ++++-- .../modules/user/views/scripts/group/show.phtml | 55 ++++++++++------------ .../modules/user/views/scripts/person/index.phtml | 48 ++++++++----------- .../modules/user/views/scripts/person/show.phtml | 3 -- 5 files changed, 53 insertions(+), 69 deletions(-) (limited to 'application') diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index c1e76d3..ff5517c 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -63,7 +63,6 @@ class user_PersonController extends Zend_Controller_Action $this->view->groupRequestRight = Pbs_Acl::checkRight('grm'); $this->view->editRight = Pbs_Acl::checkRight('peoa'); $this->view->leaveRight = Pbs_Acl::checkRight('gl'); - $this->view->overviewRight = Pbs_Acl::checkRight('pso'); $this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); } @@ -340,7 +339,6 @@ class user_PersonController extends Zend_Controller_Action $this->view->personID = $personID; $this->view->editRight = Pbs_Acl::checkRight('peoa'); $this->view->deleteRight = Pbs_Acl::checkRight('pd'); - $this->view->overviewRight = Pbs_Acl::checkRight('pso'); $this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs'); } else { $this->_helper->redirector('', 'person'); diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml index 2fbdabf..edbe209 100644 --- a/application/modules/user/layouts/user.phtml +++ b/application/modules/user/layouts/user.phtml @@ -25,17 +25,21 @@ echo $this->headScript()."\n";
Register Date: person->getRegisterdate()) . ' Uhr'; ?>
overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array( - 'onclick' => 'self.location="/user/person/showall/"', - 'class' => 'rightbutton')); if(isset($this->groups)) { ?>

Member in the following Groups:

-
- groups)==0) - echo "You are in no group." ?> - groups as $group): ?> - userIDsNamespace['membershipID']) - $class= 'highlight checked'; - ?> -
- +
- pagination; - if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional +
+ pagination; + if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional Groups', array( 'onclick' => 'self.location="/user/person/request/"', 'class' => 'addbutton')); diff --git a/application/modules/user/views/scripts/person/show.phtml b/application/modules/user/views/scripts/person/show.phtml index be973b9..8ebb371 100644 --- a/application/modules/user/views/scripts/person/show.phtml +++ b/application/modules/user/views/scripts/person/show.phtml @@ -18,9 +18,6 @@
Last Login Date: person->getLogindate()) echo date ('d. F Y - H:i', $this->person->getLogindate()) . " Uhr"; ?>
Register Date: person->getRegisterdate()) . ' Uhr'; ?>
overviewRight === true) echo $this->formButton('showallperson', 'Show Personlist', array( - 'onclick' => 'self.location="/user/person/showall/"', - 'class' => 'rightbutton')); if(isset($this->groups)) { ?>
-- cgit v1.2.3-55-g7522 From bee335eb70759624049596eb60a8ffe3869ba6cc Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 12:06:50 +0200 Subject: highlight in Bootmenu gefixt und das default-Bootmenu bekomtm kein Link zum setzen als StandardBootmenu --- .../user/views/scripts/bootmenu/index.phtml | 24 +++++++++++----------- public/media/css/user.css | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'application') diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index 2e04618..1ed7807 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -24,20 +24,20 @@
escape($bootmenu->getID()); ?>
-
- +
getDefaultbootmenu() == true): ?> - Checked as default + Checked as default + Not checked as default $rightlist, 'roleID' => $roleID)); + $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist)); } else { - $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist, 'roleID' => $roleID), $_POST); + $linkForm = new user_Form_LinkRight(array('rightlist' => $rightlist, $_POST)); if ($linkForm->isValid($_POST)) { - $rightroles = new Application_Model_RightRoles(); - $rightroles->setRightID($_POST['rightID']); - $rightroles->setRoleID($roleID); - try { - $this->rightRolesMapper->save($rightroles); - } catch(Zend_Exception $e) - { - echo "Caught exception: " . get_class($e) . "
"; - echo "Message: " . $e->getMessage() . "
"; - return; + foreach($_POST['rights'] as $rightID => $bool) { + if($bool == 1) { + $rightroles = new Application_Model_RightRoles(); + $rightroles->setRightID($rightID); + $rightroles->setRoleID($roleID); + try { + $this->rightRolesMapper->save($rightroles); + } catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "
"; + echo "Message: " . $e->getMessage() . "
"; + return; + } + } } $this->_redirect('/user/role/show/roleID/' . $roleID); return; diff --git a/application/modules/user/forms/LinkRight.php b/application/modules/user/forms/LinkRight.php index 54aacd6..80cfb1d 100644 --- a/application/modules/user/forms/LinkRight.php +++ b/application/modules/user/forms/LinkRight.php @@ -3,29 +3,54 @@ class user_Form_LinkRight extends Zend_Form { private $rightlist; - private $roleID; public function setRightlist($rightlist){ $this->rightlist = $rightlist; } - public function setRoleID($roleID){ - $this->roleID = $roleID; - } - public function init() { - $this->setName("LinkRight"); + $this->setName("LinkRights"); $this->setMethod('post'); - $rightfield = $this->createElement('select','rightID',array('label'=> 'Right: ','required' => true,'multioptions'=> $this->rightlist)); - $rightfield->setRegisterInArrayValidator(false); - $this->addElement($rightfield); + $sform = new Zend_Form_SubForm(array('legend' => 'Rights:')); + + $sform->addElement('button', 'checkAll', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Check All', + 'class' => 'leftbutton', + 'onclick' => "checkAllCheckBoxes();", + )); + + $sform->addElement('button', 'uncheckAll', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Uncheck All', + 'onclick' => "uncheckAllCheckBoxes();", + )); + + if(count($this->rightlist) > 0) { + foreach($this->rightlist as $rightcategory => $rights) { + foreach($rights as $rightID => $rightTitle) { + $element = $this->createElement('checkbox', "$rightID", array( + 'label' => $rightTitle . ':', + 'belongsTo' => 'rights', + )); + $elements[] = $rightID; + $sform->addElement($element); + } + $sform->addDisplayGroup($elements, "$rightcategory", array("legend" => $rightcategory . ":")); + unset($elements); + } + } + + $this->addSubForm($sform, 'rights'); $this->addElement('submit', 'link', array( 'required' => false, 'ignore' => true, - 'label' => 'Add', + 'label' => 'Add Rights', )); $this->addElement('button', 'cancel', array( diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 5968b47..d165701 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -32,6 +32,21 @@ class user_Form_RoleAdd extends Zend_Form )); $sform = new Zend_Form_SubForm(array('legend' => 'Rights:')); + + $sform->addElement('button', 'checkAll', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Check All', + 'class' => 'leftbutton', + 'onclick' => "checkAllCheckBoxes(new Array('inheritance'));", + )); + + $sform->addElement('button', 'uncheckAll', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Uncheck All', + 'onclick' => "uncheckAllCheckBoxes(new Array('inheritance'));", + )); if(count($this->rightlist) > 0) { foreach($this->rightlist as $rightcategory => $rights) { foreach($rights as $rightID => $rightTitle) { @@ -46,6 +61,7 @@ class user_Form_RoleAdd extends Zend_Form unset($elements); } } + $this->addSubForm($sform, 'rights'); $this->addElement('checkbox', 'inheritance', array( diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml index edbe209..b27b747 100644 --- a/application/modules/user/layouts/user.phtml +++ b/application/modules/user/layouts/user.phtml @@ -29,60 +29,52 @@ echo $this->headScript()."\n";
  • @@ -97,11 +89,11 @@ echo $this->headScript()."\n";
    -
    hasIdentity()){ echo 'Angemeldet als '; $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); - + if(isset($userIDsNamespace['membershipID'])){ $membershipMapper = new Application_Model_MembershipMapper(); $membership = new Application_Model_Membership(); @@ -122,8 +114,7 @@ if(Zend_Auth::getInstance()->hasIdentity()){ echo "".$role->getTitle().""; } } -?> -
    +?>
    getControllerName()) . " > " . ucwords($request->getActionName()); ?>
    diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml index 6769336..8194353 100644 --- a/application/modules/user/views/scripts/role/show.phtml +++ b/application/modules/user/views/scripts/role/show.phtml @@ -33,7 +33,7 @@ if($this->roleID) {

    Rights:

    rightsAvailable === true) { - echo $this->formButton('linkright', 'Add Right', array( + echo $this->formButton('linkright', 'Add Rights', array( 'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"', 'class' => 'addbutton'))?>
    diff --git a/public/media/css/style.css b/public/media/css/style.css index 5b6497b..54e929f 100644 --- a/public/media/css/style.css +++ b/public/media/css/style.css @@ -335,6 +335,10 @@ div.dsf{ float: right; } +.leftbutton { + float: left; +} + .personDiv { border: 1px solid #CCC; margin-bottom: 10px; diff --git a/public/media/css/user.css b/public/media/css/user.css index 416f10f..204d20b 100644 --- a/public/media/css/user.css +++ b/public/media/css/user.css @@ -67,90 +67,112 @@ tr.selectedEntry td { /* */ .listelement { - clear:both; - padding-top:10px; - margin:10px 0px; + clear: both; + padding-top: 10px; + margin: 10px 0px; } + .listelement .element { - border:1px solid black; - margin:5px 0px; - padding:5px; + border: 1px solid black; + margin: 5px 0px; + padding: 5px; -moz-border-radius: 3px; border-radius: 3px; - background-color:white; + background-color: white; } + .listelement .element:nth-child(even) { - background-color:#F0F8FF; + background-color: #F0F8FF; } -.listelement .element:hover { - background-color:#97BDE7; - border-color:#214687; + +.listelement .element:hover { + background-color: #97BDE7; + border-color: #214687; } -.listelement .element .number{ - font-size:28px; - float:left; - padding:0px 5px 0px 0px; - width:40px; - text-align:center; - color:#CCC; - font-style:italic; - font-weight:bold; + +.listelement .element .number { + font-size: 28px; + float: left; + padding: 0px 5px 0px 0px; + width: 40px; + text-align: center; + color: #CCC; + font-style: italic; + font-weight: bold; } -.listelement .element .content{ - margin-left:50px; + +.listelement .element .content { + margin-left: 50px; } -.listelement .element .content .title{ - font-weight:bold; - font-size:1.2em; + +.listelement .element .content .title { + font-weight: bold; + font-size: 1.2em; } -.listelement .element .content .subtitle{ - font-style:italic; + +.listelement .element .content .subtitle { + font-style: italic; } -.listelement .element .actions{ - float:right; - padding-right:5px; + +.listelement .element .actions { + float: right; + padding-right: 5px; } -.listelement .element .actions a{ - line-height:14px; - padding-right:4px; + +.listelement .element .actions a { + line-height: 14px; + padding-right: 4px; } + .listelement .element .details { - margin:0px 20px 0px 10px; + margin: 0px 20px 0px 10px; } + .listelement .element .dispnone { - display:none; + display: none; } -.listelement .element .details label{ - float:left; - font-style:italic; - font-weight:bold; - width:110px; + +.listelement .element .details label { + float: left; + font-style: italic; + font-weight: bold; + width: 110px; } -.listelement .element .details div.item{ - display:block; + +.listelement .element .details div.item { + display: block; } + .listelement .highlight { - background-color:#FFF5CC !important; + background-color: #FFF5CC !important; } + .listelement .checked { - background-image:url('/media/img/checked.png'); - background-repeat:no-repeat; + background-image: url('/media/img/checked.png'); + background-repeat: no-repeat; background-position: 15px center; -} -.searchvars{ - border:1px solid #000; - background-color:#FFFFBB; - display:none; - padding:6px; - clear:both; +} + +.searchvars { + border: 1px solid #000; + background-color: #FFFFBB; + display: none; + padding: 6px; + clear: both; -moz-border-radius: 3px; border-radius: 3px; } -.searchvars div.head{ - font-weight:bold; + +.searchvars div.head { + font-weight: bold; } -.searchvars div.code{ - margin-left:10px; - display:inline; - color:#666; + +.searchvars div.code { + margin-left: 10px; + display: inline; + color: #666; } + +#uncheckAll-label { + width: 5px; +} \ No newline at end of file diff --git a/public/media/js/user.js b/public/media/js/user.js index 488ab45..01c4721 100644 --- a/public/media/js/user.js +++ b/public/media/js/user.js @@ -17,3 +17,91 @@ $(document).ready(function(){ }); } }); + +function checkAllCheckBoxes(exceptions) { + var elements = document.getElementsByTagName('input'); + if(!elements) { + return; + } + var countElements = elements.length; + var countExceptions; + if(exceptions) { + countExceptions = exceptions.length; + } else { + countExceptions = 0; + } + var foundException = false; + if(!countElements) { + if(elements.getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements.getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements.checked = true; + } + foundException = false; + } + } else { + for(var i = 0; i < countElements; i++) { + if(elements[i].getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements[i].getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements[i].checked = true; + } + foundException = false; + } + } + } +} + +function uncheckAllCheckBoxes(exceptions) { + var elements = document.getElementsByTagName('input'); + if(!elements) { + return; + } + var countElements = elements.length; + var countExceptions; + if(exceptions) { + countExceptions = exceptions.length; + } else { + countExceptions = 0; + } + var foundException = false; + if(!countElements) { + if(elements.getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements.getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements.checked = false; + } + foundException = false; + } + } else { + for(var i = 0; i < countElements; i++) { + if(elements[i].getAttribute('type') == 'checkbox') { + for(var j = 0; j < countExceptions; j++) { + if(elements[i].getAttribute('name') == exceptions[j]) { + foundException = true + break; + } + } + if(!foundException) { + elements[i].checked = false; + } + foundException = false; + } + } + } +} \ No newline at end of file -- cgit v1.2.3-55-g7522 From b8c98e142e9fc23058a51b603a8536df62f2930f Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 14:28:58 +0200 Subject: Endlosschleifen bei falschen Einträgen gefixt --- application/models/GroupGroupsMapper.php | 14 ++++++++++---- application/modules/user/views/scripts/bootiso/index.phtml | 4 ++-- library/Pbs/Graph.php | 7 +++++++ library/Pbs/Pagination.php | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) (limited to 'application') diff --git a/application/models/GroupGroupsMapper.php b/application/models/GroupGroupsMapper.php index a1329fe..535c380 100644 --- a/application/models/GroupGroupsMapper.php +++ b/application/models/GroupGroupsMapper.php @@ -113,11 +113,14 @@ class Application_Model_GroupGroupsMapper } return $entries; } + private $crawledNodes; // Gets All groupIDs of the parent groups begins with the public function getParentGroups($groupID, &$data=null, $level=0) { - - $data[$level][] = $groupID; + if($this->crawledNodes['parent'][$groupID] == 1) + return; + $this->crawledNodes['parent'][$groupID] = 1; + $data[$level][] = $groupID; $db = Zend_Db_Table::getDefaultAdapter(); $query = 'SELECT parentID FROM pbs_groupgroups WHERE groupID="'.$groupID.'"'; $stmt = $db->query($query); @@ -127,10 +130,13 @@ class Application_Model_GroupGroupsMapper $data = $this->getParentGroups($row['parentID'], $data, $level+1); } return $data; - } - + } // Gets all childs-groups from a given group public function getChildGroups($groupID, &$data=null, $level=0) { + if($this->crawledNodes['child'][$groupID] == 1) + return; + $this->crawledNodes['child'][$groupID] = 1; + $data[$level][] = $groupID; $db = Zend_Db_Table::getDefaultAdapter(); $query = 'SELECT groupID FROM pbs_groupgroups WHERE parentID="'.$groupID.'"'; diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml index 4af8c0e..1c0c5fe 100644 --- a/application/modules/user/views/scripts/bootiso/index.phtml +++ b/application/modules/user/views/scripts/bootiso/index.phtml @@ -19,9 +19,9 @@
    bootisolist)==0) echo "There are no BootISO entries to display." ?> - bootisolist as $bootiso): ?> + bootisolist as $k => $bootiso): ?>
    -
    escape($bootiso->getID()); ?>
    +
    query($query); @@ -58,6 +62,9 @@ class Pbs_Graph{ // Gets all childs-groups from a given group private function getChildGroups($groupID, $level=1) { + if($this->crawledNodes['child'][$groupID] == 1) + return; + $this->crawledNodes['child'][$groupID] = 1; $db = Zend_Db_Table::getDefaultAdapter(); $query = 'SELECT groupID FROM pbs_groupgroups WHERE parentID="'.$groupID.'"'; $stmt = $db->query($query); diff --git a/library/Pbs/Pagination.php b/library/Pbs/Pagination.php index c31dacf..0be192c 100644 --- a/library/Pbs/Pagination.php +++ b/library/Pbs/Pagination.php @@ -74,7 +74,7 @@ class Pbs_Pagination{ return $this->requestpage * $this->perpage; } public function getElements(){ - return array_slice($this->element,$this->getStartItem(),$this->getPerPage()); + return array_slice($this->element,$this->getStartItem(),$this->getPerPage(),true); } public function setPageUrl($url){ $this->pageUrl = $url; -- cgit v1.2.3-55-g7522 From c4be5c8868516d64126847223e421e51359551c3 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 15:03:58 +0200 Subject: Notifier in Bootmenu richitg gesetzt --- application/controllers/ResourceController.php | 19 +++++++++++-------- .../modules/user/views/scripts/bootmenu/index.phtml | 11 ++++++++++- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'application') diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php index f72a5ae..a9b2fb3 100644 --- a/application/controllers/ResourceController.php +++ b/application/controllers/ResourceController.php @@ -165,7 +165,8 @@ class ResourceController extends Zend_Controller_Action // so getkclAction, getkernelAction, getconfigAction and getinitramfsAction // can be called with session-identifier - + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); $return_val = array( @@ -176,13 +177,15 @@ class ResourceController extends Zend_Controller_Action 'config' => $this->thisSession->getAlphasessionID() ); - $ser = serialize($return_val); - $this->_forward('index','bootmenu','user', array( - 'page' => $this->page, - 'json' => $ser - )); - - + $result = $return_val; + $result2 = ""; + $result2 .= ""; + $result2 .= ""; + $result2 .= ""; + $result2 .= ""; + $result2 .= ""; + $result2 .= "
    info: ".$result['info']."
    kernel: ".$result['kernel']."
    initramfs: ".$result['initramfs']."
    kcl: ".$result['kcl']."
    config: ".$result['config']."
    "; + echo $result2; } private function generateURL($action, $varname, $varvalue, $filename){ diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index 1ed7807..5d298a5 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -1,5 +1,6 @@

    BootMenu

    notification != ''){echo $this->notification;} ?> + searchform; ?> formButton('createbootmenu', 'Create BootMenu', array( 'onclick' => 'self.location="/user/bootmenu/createbootmenu/page/'.$this->page.'"', @@ -80,7 +81,7 @@
    escape($bootmenuentry->getID()); ?>
    - url( array( 'controller' => 'resource', 'action' => 'getbootmenuentry', @@ -135,3 +136,11 @@ pagination; ?> + -- cgit v1.2.3-55-g7522 From 4a8cb9a0fedbd61c087b2ffc6e480693997746f8 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 8 Apr 2011 15:09:04 +0200 Subject: Notifies im Log verbessert --- application/modules/user/controllers/BootmenuController.php | 3 +-- library/Pbs/Graph.php | 4 ++-- library/Pbs/Search.php | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'application') diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index a79a770..adcf08f 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -106,9 +106,8 @@ class user_BootmenuController extends Zend_Controller_Action $pagination->setElement($bootmenu); $pagination->setRequestPage($this->_request->getParam('page')); $pagination->setPageUrl('/user/bootmenu/index'.((isset($this->view->search))?'/search/'.$this->view->search:'')); - $bootmenu = $pagination->getElements(); + $bootmenu = $pagination->getElements(); - $this->view->pagination = $pagination->pagination($pageurl); $this->view->page = $pagination->getRequestPage(); $this->view->bootmenulist = $bootmenu; diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php index 521275d..c924b59 100644 --- a/library/Pbs/Graph.php +++ b/library/Pbs/Graph.php @@ -62,7 +62,7 @@ class Pbs_Graph{ // Gets all childs-groups from a given group private function getChildGroups($groupID, $level=1) { - if($this->crawledNodes['child'][$groupID] == 1) + if(@$this->crawledNodes['child'][$groupID] == 1) return; $this->crawledNodes['child'][$groupID] = 1; $db = Zend_Db_Table::getDefaultAdapter(); @@ -72,7 +72,7 @@ class Pbs_Graph{ foreach($result as $row){ // save the current groupID in level-list #$data[$level][] = $row['groupID']; - if($this->edges[$groupID][$row['groupID']] != 1){ + if(@$this->edges[$groupID][$row['groupID']] != 1){ $this->graphstring .= '"'.$this->getGroupTitle($groupID).'" -> "'.$this->getGroupTitle($row['groupID']).'";'."\n"; $this->edges[$groupID][$row['groupID']] = 1; } diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php index 127c4d3..9f25d03 100644 --- a/library/Pbs/Search.php +++ b/library/Pbs/Search.php @@ -74,8 +74,8 @@ class Pbs_Search{ preg_match_all("!\"(.*?)\"!is",$this->searchTerm,$matches); $tmpsearch = $this->searchTerm; for($i=0;$i<=count($matches[0]);$i++){ - $replace = str_replace(" ","<|>",$matches[0][$i]); - $tmpsearch = str_replace($matches[0][$i],$replace,$tmpsearch); + @$replace = str_replace(" ","<|>",$matches[0][$i]); + @$tmpsearch = str_replace($matches[0][$i],$replace,$tmpsearch); } $parts = explode(" ",$tmpsearch); foreach($parts as $search){ @@ -94,8 +94,8 @@ class Pbs_Search{ $searchb[] = $search; } } - $this->searcha = $searcha; - $this->searchb = $searchb; + $this->searcha = @$searcha; + $this->searchb = @$searchb; #print_a($searcha, $searchb); } public function getSearchTerm(){ -- cgit v1.2.3-55-g7522