Ejemplo n.º 1
0
 function saveCommunityToolAction()
 {
     @($code = DevblocksPlatform::importGPC($_POST['portal'], 'string'));
     @($name = DevblocksPlatform::importGPC($_POST['portal_name'], 'string', ''));
     @($iDelete = DevblocksPlatform::importGPC($_POST['do_delete'], 'integer', 0));
     UmPortalHelper::setCode($code);
     if (DEMO_MODE) {
         if ($iDelete) {
             DevblocksPlatform::redirect(new DevblocksHttpResponse(array('config', 'communities')));
         } else {
             self::getCommunityToolAction();
         }
         return;
     }
     if (null != ($instance = DAO_CommunityTool::getByCode($code))) {
         // Deleting?
         if (!empty($iDelete)) {
             $tool = DAO_CommunityTool::getByCode($code);
             /* @var $tool Model_CommunityTool */
             DAO_CommunityTool::delete($tool->id);
             DevblocksPlatform::redirect(new DevblocksHttpResponse(array('config', 'communities')));
             return;
         } else {
             $manifest = DevblocksPlatform::getExtension($instance->extension_id, false, true);
             $tool = $manifest->createInstance();
             /* @var $tool Extension_UsermeetTool */
             // Update the tool name if it has changed
             if (0 != strcmp($instance->name, $name)) {
                 DAO_CommunityTool::update($instance->id, array(DAO_CommunityTool::NAME => $name));
             }
             // Defer the rest to tool instances and extensions
             $tool->saveConfiguration();
         }
     }
     self::getCommunityToolAction();
 }
Ejemplo n.º 2
0
 function getContactSituationAction()
 {
     @($portal = DevblocksPlatform::importGPC($_REQUEST['portal'], 'string', ''));
     UmPortalHelper::setCode($portal);
     $module = DevblocksPlatform::getExtension('sc.controller.contact', true, true);
     $module->getSituation();
 }