MDL-32416: Picasa repository now returns path, also fixed album title retrieval
This commit is contained in:
committed by
Aparup Banerjee
parent
39d59639e3
commit
ca984069b8
+12
-1
@@ -379,6 +379,7 @@ class google_picasa {
|
||||
const MANAGE_URL = 'http://picasaweb.google.com/';
|
||||
|
||||
private $google_curl = null;
|
||||
private $lastalbumname = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -454,6 +455,15 @@ class google_picasa {
|
||||
return $this->get_photo_details($albumcontent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the album for which get_photo_details was called last time.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_last_album_name() {
|
||||
return $this->lastalbumname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does text search on the users photos and returns
|
||||
* matches in format for picasa api
|
||||
@@ -486,7 +496,7 @@ class google_picasa {
|
||||
//hacky...
|
||||
$thumbnailinfo = $mediainfo->group->thumbnail[0]->attributes();
|
||||
|
||||
$files[] = array( 'title' => (string) $gphoto->name,
|
||||
$files[] = array( 'title' => (string) $album->title,
|
||||
'date' => userdate($gphoto->timestamp),
|
||||
'size' => (int) $gphoto->bytesUsed,
|
||||
'path' => (string) $gphoto->id,
|
||||
@@ -511,6 +521,7 @@ class google_picasa {
|
||||
public function get_photo_details($rawxml){
|
||||
|
||||
$xml = new SimpleXMLElement($rawxml);
|
||||
$this->lastalbumname = (string)$xml->title;
|
||||
|
||||
$files = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user