phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.sowo_hour.inc.php class.uiwo...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.sowo_hour.inc.php class.uiwo...
Date: Thu, 23 Mar 2006 11:57:40 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Branch:         
Changes by:     Sigurd Nes <address@hidden>     06/03/23 11:57:40

Modified files:
        inc            : class.sowo_hour.inc.php class.uiwo_hour.inc.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sowo_hour.inc.php.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uiwo_hour.inc.php.diff?tr1=1.20&tr2=1.21&r1=text&r2=text

Patches:
Index: property/inc/class.sowo_hour.inc.php
diff -u property/inc/class.sowo_hour.inc.php:1.12 
property/inc/class.sowo_hour.inc.php:1.13
--- property/inc/class.sowo_hour.inc.php:1.12   Fri Mar 10 09:24:30 2006
+++ property/inc/class.sowo_hour.inc.php        Thu Mar 23 11:57:40 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.sowo_hour.inc.php,v 1.12 2006/03/10 09:24:30 
sigurdne Exp $
+       * @version $Id: class.sowo_hour.inc.php,v 1.13 2006/03/23 11:57:40 
sigurdne Exp $
        */
 
        /**
@@ -443,7 +443,6 @@
 
                function add_custom_hour($hour,$workorder_id)
                {
-
                        $hour['record'] = $this->next_record($workorder_id);
 
                        if($hour['chapter_id'])
@@ -479,6 +478,11 @@
                                $hour['grouping_descr'] = $hour['new_grouping'];
                        }
 
+                       if(!$hour['cat_per_cent'])
+                       {
+                               $hour['cat_per_cent']= 100;
+                       }
+//_debug
                        $values= array(
                                        $this->account,
                                        $hour['descr'],
@@ -511,7 +515,6 @@
                        $receipt['message'][] = array('msg'=>lang('hour %1 is 
added!',$receipt['hour_id']));
 
                        return $receipt;
-
                }
 
                function read_single_hour($hour_id)
@@ -549,6 +552,10 @@
 
                        $hour['descr'] = 
$this->db->db_addslashes($hour['descr']);
                        $hour['remark'] = 
$this->db->db_addslashes($hour['remark']);
+                       if(!$hour['cat_per_cent'])
+                       {
+                               $hour['cat_per_cent']= 100;
+                       }
 //_debug_array($hour);
 
 
Index: property/inc/class.uiwo_hour.inc.php
diff -u property/inc/class.uiwo_hour.inc.php:1.20 
property/inc/class.uiwo_hour.inc.php:1.21
--- property/inc/class.uiwo_hour.inc.php:1.20   Fri Mar 10 09:24:30 2006
+++ property/inc/class.uiwo_hour.inc.php        Thu Mar 23 11:57:40 2006
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.uiwo_hour.inc.php,v 1.20 2006/03/10 09:24:30 
sigurdne Exp $
+       * @version $Id: class.uiwo_hour.inc.php,v 1.21 2006/03/23 11:57:40 
sigurdne Exp $
        */
 
        /**
@@ -757,17 +757,37 @@
 
                        if($to_email)
                        {
-                               
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . SEP . $this->currentapp 
. SEP . 'templates' . SEP . 'default' . SEP . 'wo_hour'));
-                               
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . SEP . $this->currentapp 
. SEP . 'templates' . SEP . 'default' . SEP . 'location_view'));
+                               
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . SEP . $this->currentapp 
. SEP . 'templates' . SEP . 'base' . SEP . 'wo_hour'));
+                               
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . SEP . $this->currentapp 
. SEP . 'templates' . SEP . 'base' . SEP . 'location_view'));
 
                                
$this->create_html->set_var('phpgw',array('email_data' => $email_data));
 
                                $this->create_html->xsl_parse();
                                $this->create_html->xml_parse();
-                               $xsltproc = xslt_create();
-                               $arguments = array('/_xml' => 
$this->create_html->xmldata, '/_xsl' => $this->create_html->xsldata);
-                               $html = 
xslt_process($xsltproc,'arg:/_xml','arg:/_xsl',NULL,$arguments);
-                               xslt_free($xsltproc);
+
+                               $minor = explode(".",phpversion());
+
+                               if ($minor[0] == 5)
+                               {
+                                       $xml = new DOMDocument;
+                                       
$xml->loadXML($this->create_html->xmldata);
+
+                                       $xsl = new DOMDocument;
+                                       
$xsl->loadXML($this->create_html->xsldata);
+
+                                       // Configure the transformer
+                                       $proc = new XSLTProcessor;
+                                       $proc->importStyleSheet($xsl); // 
attach the xsl rules
+
+                                       $html =  $proc->transformToXML($xml);
+                               }
+                               else
+                               {
+                                       $xsltproc = xslt_create();
+                                       $arguments = array('/_xml' => 
$this->create_html->xmldata, '/_xsl' => $this->create_html->xsldata);
+                                       $html = 
xslt_process($xsltproc,'arg:/_xml','arg:/_xsl',NULL,$arguments);
+                                       xslt_free($xsltproc);
+                               }
 
 //                             print $html;
 




reply via email to

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