Example #1
0
static function getAlbums()
{
	$result = array();
	foreach(Query::getAlbumsList() as $album)
	{
		if($album["id"] != Query::$pageId and $album["name"] != "membres")
		{
			$subResult = array();
			$subResult["name"] = $album["name"];
			$subResult["photos"] = array();
			$array = Query::getObject("photos", $album["id"]."/");
			foreach($array["data"] as $photo)
			{
				$ophoto = array();
				$ophoto["thumbnail"] = $photo["picture"];
				$ophoto["name"] = $photo["source"];
				$ophoto["description"] = $photo["name"];
				array_push($subResult["photos"], $ophoto);
			}
			array_push($result, $subResult);
		}
	}
	return $result;
}