Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/models/addontype.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/models/addontype.php')
-rw-r--r--site/app/models/addontype.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/site/app/models/addontype.php b/site/app/models/addontype.php
index 8353724..ab65b82 100644
--- a/site/app/models/addontype.php
+++ b/site/app/models/addontype.php
@@ -60,6 +60,16 @@ class Addontype extends AppModel
'dependent' => false,
'exclusive' => false,
'finderSql' => ''
+ ),
+ 'Collection' =>
+ array('className' => 'Collection',
+ 'conditions' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'foreignKey' => 'addontype_id',
+ 'dependent' => false,
+ 'exclusive' => false,
+ 'finderSql' => ''
)
);
@@ -71,6 +81,10 @@ class Addontype extends AppModel
*/
function getName($id) {
switch($id) {
+ case ADDON_ACTIVITY:
+ return ___('general_addontype_activity');
+ case ADDON_CONTENT:
+ return ___('general_addontype_content');
case ADDON_EXTENSION:
return ___('general_addontype_extension');
case ADDON_THEME:
@@ -94,6 +108,14 @@ class Addontype extends AppModel
* @return array
*/
function getNames() {
+ // we are sugar
+ $addontypes = array();
+ global $app_listedtypes;
+ foreach ($app_listedtypes[APP_SUGAR] as $type) {
+ $addontypes[$type] = $this->getName($type);
+ }
+ return $addontypes;
+
$addontypes = array(
ADDON_EXTENSION => ___('general_addontype_extension_plural'),
ADDON_THEME => ___('general_addontype_theme_plural'),