[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.xslttemplates.inc.php,1.2,1.3
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.xslttemplates.inc.php,1.2,1.3 |
Date: |
Sun, 22 Sep 2002 22:35:28 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv4680
Modified Files:
class.xslttemplates.inc.php
Log Message:
A few changes to add_file().
Index: class.xslttemplates.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.xslttemplates.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.xslttemplates.inc.php 22 Sep 2002 23:03:57 -0000 1.2
--- class.xslttemplates.inc.php 23 Sep 2002 02:35:25 -0000 1.3
***************
*** 50,54 ****
}
! function add_file($filename,$root='',$time=1)
{
if (!is_array($filename))
--- 50,54 ----
}
! function add_file($filename,$rootdir='',$time=1)
{
if (!is_array($filename))
***************
*** 58,61 ****
--- 58,62 ----
$rootdir=$this->rootdir;
}
+
if (substr($filename, 0, 1) != '/')
{
***************
*** 66,69 ****
--- 67,71 ----
$new_filename = $filename;
}
+
if ($this->print && $time!=2 && $time!=4)
{
***************
*** 71,75 ****
}
!
if (!file_exists($new_filename.'.xsl'))
{
--- 73,77 ----
}
! // echo 'Rootdir:
'.$rootdir.'<br>'."\n".'Filename: '.$filename.'<br>'."\n".'New Filename:
'.$new_filename.'<br>'."\n";
if (!file_exists($new_filename.'.xsl'))
{
***************
*** 77,85 ****
{
case 2:
! $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root);
! $new_filename =
$this->add_file($filename,$new_root,3);
break;
case 3:
! $new_filename =
$this->add_file($filename,$root,4);
break;
case 4:
--- 79,89 ----
{
case 2:
! $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$rootdir);
!
$this->add_file($filename,$new_root,3);
! return;
break;
case 3:
!
$this->add_file($filename,$rootdir,4);
! return;
break;
case 4:
***************
*** 89,102 ****
if (!$this->print)
{
! $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root);
! $new_filename =
$this->add_file(str_replace($root.'/','',$new_filename),$new_root,4);
}
else
{
! $new_filename =
$this->add_file($filename,$root,2);
}
}
}
! $this->xslfiles[$filename] =
$new_filename.'.xsl';
}
else
--- 93,111 ----
if (!$this->print)
{
! $new_root =
str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$rootdir);
!
$this->add_file($filename,$new_root,4);
! return;
}
else
{
!
$this->add_file($filename,$rootdir,2);
! return;
}
}
}
! else
! {
! $this->xslfiles[$filename] =
$new_filename.'.xsl';
! }
}
else
***************
*** 130,134 ****
else
{
! $this->xmlvar .= $xml;
}
}
--- 139,143 ----
else
{
! $this->xmlvars .= $xml;
}
}
***************
*** 163,168 ****
$this->xsldata .= "\t".'<xsl:apply-templates
select="PHPGW"/>'."\n";
$this->xsldata .= '</xsl:template>'."\n";
! while(list(,$xslfile) = each($this->xslfiles))
{
$fd = fopen ($xslfile, "r");
$this->xsldata .= fread($fd,
filesize($xslfile));
--- 172,179 ----
$this->xsldata .= "\t".'<xsl:apply-templates
select="PHPGW"/>'."\n";
$this->xsldata .= '</xsl:template>'."\n";
! reset($this->xslfiles);
! while(list($dummy,$xslfile) =
each($this->xslfiles))
{
+ // echo 'XSLFILES:
'.$dummy.'<br>'."\n".'XSL File: '.$xslfile.'<br>'."\n";
$fd = fopen ($xslfile, "r");
$this->xsldata .= fread($fd,
filesize($xslfile));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.xslttemplates.inc.php,1.2,1.3,
Mark A Peters <address@hidden> <=