From 977abd94ad487ae5f51504f084117521da6d9755 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 24 Apr 2014 10:52:13 -0400 Subject: [PATCH] Fixed various notices. --- module/VuFind/src/VuFind/Controller/RecordController.php | 9 ++++++--- module/VuFind/src/VuFind/ILS/Driver/Demo.php | 4 +++- .../templates/record/storageretrievalrequest.phtml | 4 ++-- .../templates/record/storageretrievalrequest.phtml | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/RecordController.php b/module/VuFind/src/VuFind/Controller/RecordController.php index abbe5be0fd1..ffbc7ad1cf7 100644 --- a/module/VuFind/src/VuFind/Controller/RecordController.php +++ b/module/VuFind/src/VuFind/Controller/RecordController.php @@ -217,7 +217,8 @@ class RecordController extends AbstractRecord 'requestGroups' => $requestGroups, 'defaultRequestGroup' => $defaultRequestGroup, 'requestGroupNeeded' => $requestGroupNeeded, - 'helpText' => $checkHolds['helpText'] + 'helpText' => isset($checkHolds['helpText']) + ? $checkHolds['helpText'] : null ) ); } @@ -323,7 +324,8 @@ class RecordController extends AbstractRecord 'homeLibrary' => $this->getUser()->home_library, 'extraFields' => $extraFields, 'defaultRequiredDate' => $defaultRequired, - 'helpText' => $checkRequests['helpText'] + 'helpText' => isset($checkRequests['helpText']) + ? $checkRequests['helpText'] : null ) ); } @@ -433,7 +435,8 @@ class RecordController extends AbstractRecord 'homeLibrary' => $this->getUser()->home_library, 'extraFields' => $extraFields, 'defaultRequiredDate' => $defaultRequired, - 'helpText' => $checkRequests['helpText'] + 'helpText' => isset($checkRequests['helpText']) + ? $checkRequests['helpText'] : null ) ); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index 296e9a4acb0..65bde55ebbb 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -1329,7 +1329,9 @@ class Demo extends AbstractBase $requestGroup = ''; foreach ($this->getRequestGroups(null, null) as $group) { - if ($group['id'] == $holdDetails['requestGroupId']) { + if (isset($holdDetails['requestGroupId']) + && $group['id'] == $holdDetails['requestGroupId'] + ) { $requestGroup = $group['name']; break; } diff --git a/themes/blueprint/templates/record/storageretrievalrequest.phtml b/themes/blueprint/templates/record/storageretrievalrequest.phtml index ae4eeaba60e..89748cfa63d 100644 --- a/themes/blueprint/templates/record/storageretrievalrequest.phtml +++ b/themes/blueprint/templates/record/storageretrievalrequest.phtml @@ -23,8 +23,8 @@ <input type="radio" id="storageRetrievalRequestTitle" name="gatheredDetails[level]" value="title"<?=isset($this->gatheredDetails['level']) && $this->gatheredDetails['level'] == 'title' ? ' checked="checked"' : ''?>> <strong><label for="storageRetrievalRequestTitle"><?=$this->transEsc('storage_retrieval_request_reference')?></label></strong><br/> <div id="storageRetrievalRequestReference" class="storageRetrievalRequestReference"> - <span class="label"><?=$this->transEsc('storage_retrieval_request_volume')?>:</span> <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['volume']) : ''?>"></input><br/> - <span class="label"><?=$this->transEsc('storage_retrieval_request_issue')?>:</span> <input type="text" name="gatheredDetails[issue]" value="<?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['issue']) : ''?>"></input><br/> + <span class="label"><?=$this->transEsc('storage_retrieval_request_volume')?>:</span> <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['volume']) ? $this->escapeHtml($this->gatheredDetails['volume']) : ''?>"></input><br/> + <span class="label"><?=$this->transEsc('storage_retrieval_request_issue')?>:</span> <input type="text" name="gatheredDetails[issue]" value="<?=isset($this->gatheredDetails['issue']) ? $this->escapeHtml($this->gatheredDetails['issue']) : ''?>"></input><br/> <span class="label"><?=$this->transEsc('storage_retrieval_request_year')?>:</span> <input type="text" name="gatheredDetails[year]" value="<?=isset($this->gatheredDetails['year']) ? $this->escapeHtml($this->gatheredDetails['year']) : ''?>"></input><br/> </div> </div> diff --git a/themes/bootstrap/templates/record/storageretrievalrequest.phtml b/themes/bootstrap/templates/record/storageretrievalrequest.phtml index 9f8c2a1161b..04d674b045c 100644 --- a/themes/bootstrap/templates/record/storageretrievalrequest.phtml +++ b/themes/bootstrap/templates/record/storageretrievalrequest.phtml @@ -31,11 +31,11 @@ <div id="storageRetrievalRequestReference" class="storageRetrievalRequestReference"> <label class="control-label"><?=$this->transEsc('storage_retrieval_request_volume')?>:</label> <div class="controls"> - <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['volume']) : ''?>"></input><br/> + <input type="text" name="gatheredDetails[volume]" value="<?=isset($this->gatheredDetails['volume']) ? $this->escapeHtml($this->gatheredDetails['volume']) : ''?>"></input><br/> </div> <label class="control-label"><?=$this->transEsc('storage_retrieval_request_issue')?>:</label> <div class="controls"> - <input type="text" name="gatheredDetails[issue]" value="<?=isset($this->gatheredDetails['comment']) ? $this->escapeHtml($this->gatheredDetails['issue']) : ''?>"></input><br/> + <input type="text" name="gatheredDetails[issue]" value="<?=isset($this->gatheredDetails['issue']) ? $this->escapeHtml($this->gatheredDetails['issue']) : ''?>"></input><br/> </div> <label class="control-label"><?=$this->transEsc('storage_retrieval_request_year')?>:</label> <div class="controls"> -- GitLab