summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-11-17 17:55:11 +0100
committerRemi Collet <fedora@famillecollet.com>2013-11-17 17:55:11 +0100
commit58d63c129b16c4f4f461755efde0ec7e86f8077d (patch)
tree8db4842abcbf8c3bd4c57fc85de948af938476df
parentbe9f96e74ef96c85ef0b9c11c30f220c140ad48a (diff)
cleansup
-rw-r--r--class/FedoraClient.php38
-rw-r--r--class/FedoraPkgdb.php2
2 files changed, 11 insertions, 29 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index 7aa2bbb..4071348 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -27,9 +27,9 @@
* @category Main
* @package FedoraClient
*
- * @author Remi Collet <unknown@unknwown.com>
+ * @author Remi Collet <remi@fedoraproject.org>
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010 Remi Collet
+ * @copyright 2010-2013 Remi Collet
* @license http://www.gnu.org/licenses/lgpl-2.1.txt LGPL License 2.1 or (at your option) any later version
* @link http://github.com/remicollet/rpmphp/
* @since The begining of times.
@@ -72,19 +72,13 @@ abstract class FedoraClient
$this->_agent = 'Fedora PHPClient/'.self::VERSION;
}
- $this->logDebug(
- 3,
- __CLASS__."::".__FUNCTION__.": agent='".$this->_agent."'"
- );
+ $this->logDebug(3, __METHOD__.": agent='".$this->_agent."'");
}
function setUrl($url)
{
$this->url = $url;
- $this->logDebug(
- 3,
- __CLASS__."::".__FUNCTION__.": url='$url'"
- );
+ $this->logDebug(3, __METHOD__.": url='$url'");
}
function logDebug($level, $msg)
@@ -120,10 +114,7 @@ abstract class FedoraClient
);
// run the request
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": call '$url'"
- );
+ $this->logDebug(2, __METHOD__.": call '$url'");
curl_exec($curl);
@@ -135,28 +126,22 @@ abstract class FedoraClient
if ($http_status==401 || $http_status==403) {
$this->logDebug(
1,
- __CLASS__."::".__FUNCTION__.
+ __METHOD__.
": http_status '$http_status' Authentication failed logging in"
);
return array();
} else if ($http_status>=400) {
$this->logDebug(
1,
- __CLASS__."::".__FUNCTION__.
+ __METHOD__.
": http_status '$http_status' Unknown HTTP Server Response"
);
return array();
} else {
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": http_status '$http_status'"
- );
+ $this->logDebug(2, __METHOD__.": http_status '$http_status'");
}
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": close connexion"
- );
+ $this->logDebug(2, __METHOD__.": close connexion");
curl_close($curl);
return json_decode($this->data, true);
@@ -164,10 +149,7 @@ abstract class FedoraClient
function receive($curl, $data)
{
- $this->logDebug(
- 9,
- __CLASS__."::".__FUNCTION__.": $data"
- );
+ $this->logDebug(9, __METHOD__.": $data");
$this->data .= $data;
return strlen($data);
}
diff --git a/class/FedoraPkgdb.php b/class/FedoraPkgdb.php
index da43986..1650493 100644
--- a/class/FedoraPkgdb.php
+++ b/class/FedoraPkgdb.php
@@ -27,7 +27,7 @@
* @category Main
* @package FedoraClient
*
- * @author Remi Collet <unknown@unknwown.com>
+ * @author Remi Collet <remi@fedoraproject.org>
* @author Johan Cwiklinski <johan@x-tnd.be>
* @copyright 2010-2013 Remi Collet
* @license http://www.gnu.org/licenses/lgpl-2.1.txt LGPL License 2.1 or (at your option) any later version