From b8997d1f66aa5d89a4ba91900def70e5d06e036c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 3 Jan 2020 17:14:21 +0100 Subject: fix 0.0.2 --- main.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/main.php b/main.php index 9000d31..06f9d34 100644 --- a/main.php +++ b/main.php @@ -15,7 +15,17 @@ function strip_tags_content($text, $tags = '', $invert = FALSE) { } return $text; } -function DOMinnerHTML(DOMNode $element) { +function is_domDocument($object) +{ + if($object instanceof DOMDocument) { + return true; + } + else { + return false; + } +} +function DOMinnerHTML($element) { + if(!is_domDocument($element)) return -6; $innerHTML = ""; $children = $element->childNodes; foreach ($children as $child) { @@ -49,12 +59,12 @@ Errors: -3 bad username and/or password (diplomatski odgovor ;-) -4 not written yet (suka bljet) -5 session exists in another system (sucky) - -6 + -6 error in fetched data */ class itisClient { private $username; private $password; - public $version = array(0, 0, 1); + public $version = array(0, 0, 2); private $programname = "itisclient"; private $programdomain = 'itisclient.sijanec.tk'; private $cookiedir; // set at runtime, ker je get_curerent_user, v login() -- cgit v1.2.3