[Mapbender-commits] r9867 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 16 03:42:52 PST 2018


Author: armin11
Date: 2018-02-16 03:42:52 -0800 (Fri, 16 Feb 2018)
New Revision: 9867

Modified:
   trunk/mapbender/http/classes/class_ckanApi.php
Log:
Add log option for debugging

Modified: trunk/mapbender/http/classes/class_ckanApi.php
===================================================================
--- trunk/mapbender/http/classes/class_ckanApi.php	2018-02-16 09:56:20 UTC (rev 9866)
+++ trunk/mapbender/http/classes/class_ckanApi.php	2018-02-16 11:42:52 UTC (rev 9867)
@@ -230,6 +230,18 @@
 		//require_once('lib/php_markdown/markdown.php');
 	}
 
+	//for debugging purposes only
+	private function logit($text){
+	 	if($h = fopen("/tmp/class_ckanApi.log","a")){
+					$content = $text .chr(13).chr(10);
+					if(!fwrite($h,$content)){
+						#exit;
+					}
+					fclose($h);
+				}
+	 	
+	 }
+
 	/**
 	 * Destructor
 	 *
@@ -1085,6 +1097,10 @@
 		$e = new mb_exception("response: ".$response);
 		$e = new mb_exception("content_type: ".$info['content_type']);*/
 
+		$this->logit("url: ".$curlUrl);
+		$this->logit("send data: ".$data);
+		$this->logit("response: ".$response);
+		$this->logit("content_type: ".$info['content_type']);
 		// Determine how to parse
 		if (isset($info['content_type']) && $info['content_type']) {
 			$content_type = str_replace('application/', '', 



More information about the Mapbender_commits mailing list