diff --git a/include/application.php b/include/application.php index adbbac9..0ebda5f 100644 --- a/include/application.php +++ b/include/application.php @@ -1068,6 +1068,11 @@ class Application { { return $this->iAppId; } + + function objectShowAddEntry() + { + return TRUE; + } } function get_vendor_from_keywords($sKeywords) diff --git a/include/distribution.php b/include/distribution.php index e1b22ab..2503781 100644 --- a/include/distribution.php +++ b/include/distribution.php @@ -669,6 +669,11 @@ class distribution { { return FALSE; } + + function objectShowAddEntry() + { + return TRUE; + } } ?> diff --git a/include/objectManager.php b/include/objectManager.php index 6025c6f..ea2906a 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -130,8 +130,14 @@ class ObjectManager break; } - echo "
makeUrl("add", false, - "Add $this->sClass entry")."\">Add an entry?
"; + if(method_exists($oObject, "objectShowAddEntry") && + $oObject->objectShowAddEntry()) + { + echo "
makeUrl("add", false, + "Add $this->sClass entry"). + "\">Add an entry?
"; + } return; } @@ -187,7 +193,9 @@ class ObjectManager echo ""; $oObject = new $this->sClass(); - if($oObject->canEdit()) + if($oObject->canEdit() && + method_exists($oObject, "objectShowAddEntry") && + $oObject->objectShowAddEntry()) { echo "

makeUrl("add", false, "Add $this->sClass")."\">Add entry\n"; diff --git a/include/vendor.php b/include/vendor.php index 41105d8..eb847e7 100644 --- a/include/vendor.php +++ b/include/vendor.php @@ -395,6 +395,11 @@ class Vendor { $iDefaultPerPage = 25; return array($aItemsPerPage, $iDefaultPerPage); } + + function objectShowAddEntry() + { + return TRUE; + } } ?>