Module: appdb Branch: master Commit: f2e17d3af3abcbf5fdcaf32cbe4ad076cbf599e7 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=f2e17d3af3abcbf5fdcaf32cb...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Sun Oct 14 16:12:21 2007 +0200
objectManager: Add support for hiding the reject button, use it for buglinks
---
include/bugs.php | 5 +++++ include/objectManager.php | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/include/bugs.php b/include/bugs.php index 7e87f0d..6e28be0 100644 --- a/include/bugs.php +++ b/include/bugs.php @@ -482,6 +482,11 @@ class Bug echo $oTable->GetString(); }
+ function objectHideReject() + { + return TRUE; + } + // NOTE: we don't have any editing support for this entry at this time // so output the entry and a field to identify the bug id function outputEditor() diff --git a/include/objectManager.php b/include/objectManager.php index fec70ff..75de915 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -271,6 +271,14 @@ class ObjectManager $this->handleMultiPageControls($aClean, FALSE); }
+ private function getOptionalSetting($sFunction, $bDefault) + { + if(!method_exists($this->sClass, $sFunction)) + return $bDefault; + + return $this->getObject()->$sFunction(); + } + /* display the entry for editing */ public function display_entry_for_editing($aClean, $sErrors) { @@ -363,7 +371,7 @@ class ObjectManager 'class="button" />',"\n"; }
- if(!$this->bIsRejected) + if(!$this->bIsRejected && !$this->getOptionalSetting("objectHideReject", FALSE)) { echo '<input name="sSubmit" type="submit" value="Reject" class="button" '. '/>',"\n";