summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormomo-i <momo-i@ampache>2009-03-15 23:55:33 +0000
committermomo-i <momo-i@ampache>2009-03-15 23:55:33 +0000
commit6a40eb1fe81c24d191186eee20a1b30d18919194 (patch)
tree35afd8fda042cb9d37bfd4117acbcdc73e543413
parentcc36557ebd32a41a9b31d21611b5a1f731b96efa (diff)
downloadampache-6a40eb1fe81c24d191186eee20a1b30d18919194.tar.gz
ampache-6a40eb1fe81c24d191186eee20a1b30d18919194.tar.bz2
ampache-6a40eb1fe81c24d191186eee20a1b30d18919194.zip
Fixed: xmlrpc get image. getEncoding doesn't static function
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--lib/class/catalog.class.php12
-rw-r--r--modules/pearxmlrpc/rpc.php2
3 files changed, 9 insertions, 6 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index a5409d26..632076b0 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.5-Beta1
+ - Fixed xmlrpc get image. getEncoding doesn't static function
- Add democratic methods to api, can now vote, devote, get url
and the current democratic playlist through the api
- Revert to old Random Play method
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 305c83ec..b398e87f 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1297,7 +1297,7 @@ class Catalog extends database_object {
// Try to sync the album images from the remote catalog
echo "<p>" . _('Starting synchronisation of album images') . ".</p><br />\n";
- $this->get_remote_album_images($client, $token);
+ $this->get_remote_album_images($client, $token, $path);
echo "<p>" . _('Completed synchronisation of album images') . ".</p><hr />\n";
flush();
@@ -1350,7 +1350,7 @@ class Catalog extends database_object {
* get_album_images
* This function retrieves the album information from the remote server
*/
- public function get_remote_album_images($client,$token) {
+ public function get_remote_album_images($client,$token,$path) {
$encoded_key = new XML_RPC_Value($token,'string');
$query_array = array($encoded_key);
@@ -1365,7 +1365,7 @@ class Catalog extends database_object {
if ( !$response->faultCode() ) {
$data = XML_RPC_Decode($value);
- $total = $this->update_remote_album_images($data, $client->server, $token);
+ $total = $this->update_remote_album_images($data, $client->server, $token, $path);
echo _('images synchronized: ') . ' ' . $total . "<br />";
flush();
}
@@ -1422,7 +1422,7 @@ class Catalog extends database_object {
* @package XMLRPC
* @catagory Client
*/
- public function update_remote_album_images($data, $remote_server, $auth) {
+ public function update_remote_album_images($data, $remote_server, $auth, $path) {
$label = "catalog.class.php::update_remote_album_images";
$total_updated = 0;
@@ -1450,8 +1450,10 @@ class Catalog extends database_object {
if ($local_album_id != 0) {
// Local album found lets add the cover
+ if(isset($path) AND !eregi("^/", $path)) { $path = "/".$path; }
+ debug_event($label, "remote_server: " . $remote_server,'4');
$server_path = "http://" . ltrim($remote_server, "http://");
- $server_path.= "/image.php?id=" . $remote_album->id;
+ $server_path.= $path."/image.php?id=" . $remote_album->id;
$server_path.= "&auth=" . $auth;
debug_event($label, "image_url: " . $server_path,'4');
$data['url'] = $server_path;
diff --git a/modules/pearxmlrpc/rpc.php b/modules/pearxmlrpc/rpc.php
index 8af48f8d..18c0fddf 100644
--- a/modules/pearxmlrpc/rpc.php
+++ b/modules/pearxmlrpc/rpc.php
@@ -1417,7 +1417,7 @@ class XML_RPC_Message extends XML_RPC_Base
* @link http://php.net/xml_parser_create
* @since Method available since Release 1.2.0
*/
- function getEncoding($data) {
+ public static function getEncoding($data) {
global $XML_RPC_defencoding;
debug_event("rpc.php::getEncoding", "begin", "4");