phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] sitemgr/modules class.module_forum.inc.php [skwashd-1


From: Dave Hall
Subject: [Phpgroupware-cvs] sitemgr/modules class.module_forum.inc.php [skwashd-16-compat]
Date: Sun, 15 Oct 2006 04:00:11 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    sitemgr
Branch:         skwashd-16-compat
Changes by:     Dave Hall <skwashd>     06/10/15 04:00:11

Modified files:
        modules        : class.module_forum.inc.php 

Log message:
        stop crash when app not installed

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sitemgr/modules/class.module_forum.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.1.2.1&r2=1.1.2.1.4.1

Patches:
Index: class.module_forum.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/modules/class.module_forum.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.1.4.1
diff -u -b -r1.1.2.1 -r1.1.2.1.4.1
--- class.module_forum.inc.php  3 May 2003 21:10:40 -0000       1.1.2.1
+++ class.module_forum.inc.php  15 Oct 2006 04:00:11 -0000      1.1.2.1.4.1
@@ -4,9 +4,15 @@
 {
        var $template;
        var $startlevel;
+       /**
+       * @var bool $forum_enabled Is forum app installed ?
+       */
+       var $forum_enabled;
 
        function module_forum()
        {
+               if ( isset($GLOBALS['phpgw_info']['apps']['forum']) )
+               {
                $this->arguments = array(
                        'startlevel' => array(
                                'type' => 'select',
@@ -33,10 +39,13 @@
                $this->title = lang('Discussions');
                $this->description = lang('This module displays the phpgw 
forums on the web site');
                $this->bo = CreateObject('forum.boforum',1);
+                       $this->forum_enabled = true;
+               }
        }
 
        function get_user_interface()
        {
+               return 'the forum application is not installed, please contact 
your system administrator for assistance';
                $defaults = $this->block->arguments;
                if ($defaults['startlevel'] == 2 || $defaults['startlevel'] == 
3)
                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]