phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgroupware about.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgroupware about.php
Date: Tue, 20 Feb 2007 14:09:16 +0000

CVSROOT:        /sources/phpgroupware
Module name:    phpgroupware
Changes by:     Sigurd Nes <sigurdne>   07/02/20 14:09:16

Modified files:
        .              : about.php 

Log message:
        Fix

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/about.php?cvsroot=phpgroupware&r1=1.26&r2=1.27

Patches:
Index: about.php
===================================================================
RCS file: /sources/phpgroupware/phpgroupware/about.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- about.php   15 Apr 2005 13:19:15 -0000      1.26
+++ about.php   20 Feb 2007 14:09:16 -0000      1.27
@@ -8,11 +8,10 @@
        * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgroupware
-       * @version $Id: about.php,v 1.26 2005/04/15 13:19:15 powerstat Exp $
+       * @version $Id: about.php,v 1.27 2007/02/20 14:09:16 sigurdne Exp $
        */
 
        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
-       $GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
        $GLOBALS['phpgw_info']['flags']['noheader'] = True;
        
        /**
@@ -25,8 +24,6 @@
        {
                if (!($included = 
$GLOBALS['phpgw']->hooks->single('about',$app)))
                {
-               
-                       
                        /**
                        * About this application
                        *
@@ -57,7 +54,7 @@
                                        . "<tr><td align=\"right\"><img 
src=\"$icon\" alt=\"\" /></td>"
                                        . "<td 
align=\"left\"><b>$info[title]</b></td></tr>";
 
-                               if ($info['description'])
+                               if (isset($info['description']) && 
$info['description'])
                                {
                                        $info['description'] = 
lang($info['description']);
                                        $s .= "<tr><td colspan='2' 
align='center'>$info[description]</td></tr>\n";
@@ -73,7 +70,7 @@
                                        {
                                                $s .= "<tr><td width=\"50%\" 
align=\"right\">$val</td><td>";
                                                $infos = $info[$key];
-                                               for ($n = 0; 
is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n)
+                                               for ($n = 0; 
isset($info[$key][$n]) && is_array($info[$key][$n]) && ($infos = 
$info[$key][$n]) || !$n; ++$n)
                                                {
                                                        if (!is_array($infos) 
&& isset($info[$key.'_email']))
                                                        {
@@ -88,9 +85,9 @@
                                                                        $names 
= '';
                                                                }
                                                                $infos = '';
-                                                               while 
(list($user,$domain) = $emails)
+                                                               while 
(@list($user,$domain) = $emails)
                                                                {
-                                                                       if 
($infos) $infos .= '<br />';
+                                                                       if 
(isset($infos) && $infos) $infos .= '<br />';
                                                                        $name = 
$names ? array_shift($names) : $user;
                                                                        $infos 
.= "<a href=\"mailto:$user at $domain\" 
onClick=\"document.location='mailto:$user'+'@'+'$domain'; return 
false;\">$name</a>";
                                                                        
array_shift($emails); array_shift($emails);
@@ -113,35 +110,34 @@
                $api_only = True;
        }
 
-       $tpl = 
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'));
-       $tpl->set_file(array(
+       $GLOBALS['phpgw']->template->set_file(array(
                'phpgw_about'         => 'about.tpl',
                'phpgw_about_unknown' => 'about_unknown.tpl'
        ));
 
-       
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo'));
-       $tpl->set_var('phpgw_version','phpGroupWare API version ' . 
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
+       
$GLOBALS['phpgw']->template->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo'));
+       $GLOBALS['phpgw']->template->set_var('phpgw_version','phpGroupWare API 
version ' . $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
        if ($included)
        {
-               $tpl->set_var('phpgw_app_about',about_app('',''));
-               //about_app($tpl,"phpgw_app_about");
+               
$GLOBALS['phpgw']->template->set_var('phpgw_app_about',about_app('',''));
+               //about_app($GLOBALS['phpgw']->template,"phpgw_app_about");
        }
        else
        {
                if ($api_only)
                {
-                       $tpl->set_var('phpgw_app_about','');
+                       
$GLOBALS['phpgw']->template->set_var('phpgw_app_about','');
                }
                else
                {
-                       $tpl->set_var('app_header',$app);
-                       $tpl->parse('phpgw_app_about','phpgw_about_unknown');
+                       $GLOBALS['phpgw']->template->set_var('app_header',$app);
+                       
$GLOBALS['phpgw']->template->parse('phpgw_app_about','phpgw_about_unknown');
                }
        }
 
        $title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? 
$GLOBALS['phpgw_info']['apps'][$app]['title'] : 'phpGroupWare';
        $GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title);
-       $GLOBALS['phpgw']->common->phpgw_header();
-       $tpl->pparse('out','phpgw_about');
+       $GLOBALS['phpgw']->common->phpgw_header(true);
+       $GLOBALS['phpgw']->template->pparse('out','phpgw_about');
        $GLOBALS['phpgw']->common->phpgw_footer();
 ?>




reply via email to

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