diff --git a/include/Excel/OLE.php b/include/Excel/OLE.php
index 40efcf1cf..9cbf18742 100644
--- a/include/Excel/OLE.php
+++ b/include/Excel/OLE.php
@@ -320,7 +320,7 @@ class OLE extends PEAR
* @param integer $date A timestamp
* @return string The string for the OLE container
*/
- function LocalDate2OLE($date = null)
+ static function LocalDate2OLE($date = null)
{
if (!isset($date)) {
return "\x00\x00\x00\x00\x00\x00\x00\x00";
@@ -367,7 +367,7 @@ class OLE extends PEAR
* @param integer $string A binary string with the encoded date
* @return string The timestamp corresponding to the string
*/
- function OLE2LocalDate($string)
+ static function OLE2LocalDate($string)
{
if (strlen($string) != 8) {
return new PEAR_Error("Expecting 8 byte string");
diff --git a/include/Excel/Root.php b/include/Excel/Root.php
index 78936604d..e3fd631dc 100644
--- a/include/Excel/Root.php
+++ b/include/Excel/Root.php
@@ -45,10 +45,11 @@ class OLE_PPS_Root extends OLE_PPS
*/
function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
{
+ $ole_obj = new OLE();
$this->_tmp_dir = '';
$this->OLE_PPS(
null,
- OLE::Asc2Ucs('Root Entry'),
+ $ole_obj->Asc2Ucs('Root Entry'),
OLE_PPS_TYPE_ROOT,
null,
null,
diff --git a/include/Excel/Workbook.php b/include/Excel/Workbook.php
index 4b0ec189f..f8d1149cd 100644
--- a/include/Excel/Workbook.php
+++ b/include/Excel/Workbook.php
@@ -577,7 +577,8 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
*/
function _storeOLEFile()
{
- $OLE = new OLE_PPS_File(OLE::Asc2Ucs('Book'));
+ $ole_obj = new OLE();
+ $OLE = new OLE_PPS_File($ole_obj->Asc2Ucs('Book'));
if ($this->_tmp_dir != '') {
$OLE->setTempDir($this->_tmp_dir);
}
diff --git a/include/lehrstunde.class.php b/include/lehrstunde.class.php
index e655de3dc..6d8bd5f99 100644
--- a/include/lehrstunde.class.php
+++ b/include/lehrstunde.class.php
@@ -315,7 +315,10 @@ class lehrstunde extends basis_db
// Gruppen ermitteln
if (is_null($this->ss))
- $this->ss=studiensemester::getNearest();
+ {
+ $studiensemester_obj = new studiensemester();
+ $this->ss=$studiensemester_obj->getNearest();
+ }
$sql_query="SELECT gruppe_kurzbz FROM public.tbl_benutzergruppe WHERE uid='".addslashes($uid)."' AND (studiensemester_kurzbz='".addslashes($this->ss)."' OR studiensemester_kurzbz IS NULL)";
if (!$result_einheit=$this->db_query($sql_query))
diff --git a/include/xslfo2pdf/fo_block.php b/include/xslfo2pdf/fo_block.php
index 4e1756e2f..e39518acb 100644
--- a/include/xslfo2pdf/fo_block.php
+++ b/include/xslfo2pdf/fo_block.php
@@ -49,7 +49,7 @@ class FO_Block extends FO_LayoutObject{
return self::$CHILDNODES;
}
- function initAttributes($node) {
+ function initAttributes(DOMNode $node) {
global $height_of_current_row;
//echo $node->parentNode->nodeName.'
';
if($node->parentNode->nodeName!='fo:table-cell')
@@ -188,7 +188,7 @@ class FO_Inline extends FO_Block {
}
class FO_BasicLink extends FO_Block {
- function initAttributes($node) {
+ function initAttributes(DOMNode $node) {
$this->initLocalAttribute($node, "internal-destination");
$this->initLocalAttribute($node, "external-destination");
}
@@ -225,7 +225,7 @@ class FO_BasicLink extends FO_Block {
//oesi - add ExternalGraphics
class FO_ExternalGraphic extends FO_Block
{
- function initAttributes($node)
+ function initAttributes(DOMNode $node)
{
$this->initLocalAttribute($node, "src");
$this->initLocalAttribute($node, "width");
@@ -254,4 +254,4 @@ class FO_ExternalGraphic extends FO_Block
}
-?>
\ No newline at end of file
+?>
diff --git a/include/xslfo2pdf/fo_layout.php b/include/xslfo2pdf/fo_layout.php
index db3c1fdf9..43f461686 100644
--- a/include/xslfo2pdf/fo_layout.php
+++ b/include/xslfo2pdf/fo_layout.php
@@ -69,7 +69,11 @@ class FO_LayoutObject extends FO_FlowContainer {
function convert($str)
{
//echo str_replace('EURO',chr(128),utf8_decode($str));
- return str_replace('EURO',chr(128),utf8_decode($str));
+ $str = str_replace('EURO',chr(128),$str);
+ $str = str_replace('ĉ','c',$str);
+ $str = str_replace('č','c',$str);
+
+ return utf8_decode($str);
}
//Spaltenhoehe Berechnen
diff --git a/include/xslfo2pdf/xslfo2pdf.php b/include/xslfo2pdf/xslfo2pdf.php
index 9455be749..58a62b4d8 100644
--- a/include/xslfo2pdf/xslfo2pdf.php
+++ b/include/xslfo2pdf/xslfo2pdf.php
@@ -39,7 +39,9 @@ require_once("svg_path.php");
class XslFo2PDF {
function generatePdf($xml, $name="out.pdf", $dest='') {
- $doc = DOMDocument::loadXML($xml);
+ $doc = new DOMDocument();
+ $doc->loadXML($xml);
+
if ($doc === false) {
echo "failed loading dom
";
return false;
diff --git a/webdav/Caldav_Backend.php b/webdav/Caldav_Backend.php
index 861706ded..fb232ad27 100644
--- a/webdav/Caldav_Backend.php
+++ b/webdav/Caldav_Backend.php
@@ -159,17 +159,26 @@ class MySabre_CalDAV_Backend extends Sabre_CalDAV_Backend_Abstract
$unr = mb_substr($objectUri, mb_strpos($objectUri,'-')+1);
$dtstart = mb_substr($objectUri,0,mb_strpos($objectUri,'-'));
- //dtstart: 19700325T020000Z
- $jahr = mb_substr($dtstart,0,4);
- $monat = mb_substr($dtstart,4,2);
- $tag = mb_substr($dtstart,6,2);
- $stunde = mb_substr($dtstart,9,2);
- $minute = mb_substr($dtstart,11,2);
- $sekunde = mb_substr($dtstart,13,2);
- $begin = mktime($stunde, $minute, $sekunde, $monat, $tag-1, $jahr);
- $ende = mktime($stunde, $minute, $sekunde, $monat, $tag+1, $jahr);
- //error_log("getCalendarData unr: $unr dtstart: $dtstart");
- //error_log($begin.'/'.$ende);
+ if(mb_strlen($dtstart)==15)
+ {
+ //dtstart: 19700325T020000
+ $jahr = mb_substr($dtstart,0,4);
+ $monat = mb_substr($dtstart,4,2);
+ $tag = mb_substr($dtstart,6,2);
+ $stunde = mb_substr($dtstart,9,2);
+ $minute = mb_substr($dtstart,11,2);
+ $sekunde = mb_substr($dtstart,13,2);
+ $begin = mktime($stunde, $minute, $sekunde, $monat, $tag-1, $jahr);
+ $ende = mktime($stunde, $minute, $sekunde, $monat, $tag+1, $jahr);
+ //error_log("getCalendarData unr: $unr dtstart: $dtstart");
+ //error_log($begin.'/'.$ende);
+ }
+ else
+ {
+ //error_log("dtstart laenge abnormal: $dtstart");
+ $begin = mktime(0,0,0,date('m'),date('d')-14,date('Y'));
+ $ende = mktime(0,0,0,date('m')+6,date('d'),date('Y'));
+ }
}
else
{