mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Strict Standards Notices entfernt; Sonderzeichen in PDFs konvertiert
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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.'<br>';
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<br>";
|
||||
return false;
|
||||
|
||||
+20
-11
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user