diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-02-21 00:20:02 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-02-21 00:20:02 +0000 |
commit | f579b7bef4684cdaf58a4ea00883c70d75e401d6 (patch) | |
tree | 6d9484edabcba118db24094cdde2126e5c9bfcd8 | |
parent | 3b46143435b528684d52772039540273bbcea52b (diff) |
revert revision 1842 on default-colors.css (it messes with where backgrounds are transparent and/or inherited - see picture page for clear and dark theme!)
web services correction:
- urls were not sent for method images.getInfo
- uniformization: all element urls (tn_url, element_url, high_url) are xml attributes for all methods
git-svn-id: http://piwigo.org/svn/trunk@1845 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/ws_functions.inc.php | 27 | ||||
-rw-r--r-- | template/yoga/default-colors.css | 2 |
2 files changed, 20 insertions, 9 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 01e749d6f..494b3596f 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -3,7 +3,6 @@ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ -// | branch : BSF (Best So Far) // | file : $Id$ // | last update : $Date$ // | last modifier : $Author$ @@ -243,6 +242,16 @@ function ws_std_get_urls($image_row) return $ret; } +/** + * returns an array of image attributes that are to be encoded as xml attributes + * instead of xml elements + */ +function ws_std_get_image_xml_attributes() +{ + return array( + 'id','tn_url','element_url','high_url', 'file','width','height','hit' + ); +} /** * returns PWG version (web service method) @@ -394,7 +403,7 @@ LIMIT '.$params['per_page']*$params['page'].','.$params['per_page']; 'count' => count($images) ), WS_XML_CONTENT => new PwgNamedArray($images, 'image', - array('id', 'tn_url', 'element_url', 'file','width','height','hit') ) + ws_std_get_image_xml_attributes() ) ) ); } @@ -438,7 +447,8 @@ function ws_categories_getList($params, &$service) $query = ' SELECT id, name, uppercats, global_rank, - max_date_last, count_images AS nb_images, count_categories AS nb_categories + nb_images, count_images AS total_nb_images, + date_last, max_date_last, count_categories AS nb_categories FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id=cat_id WHERE '. implode(' @@ -457,7 +467,7 @@ ORDER BY global_rank'; 'cat_name' => $row['name'], ) ); - foreach( array('id','nb_images','nb_categories') as $key) + foreach( array('id','nb_images','total_nb_images','nb_categories') as $key) { $row[$key] = (int)$row[$key]; } @@ -467,7 +477,7 @@ ORDER BY global_rank'; return array( 'categories' => new PwgNamedArray($cats,'category', - array('id','url','nb_images','nb_categories','max_date_last') + array('id','url','nb_images','total_nb_images','nb_categories','date_last','max_date_last') ) ); } @@ -501,7 +511,7 @@ LIMIT 1;'; { return new PwgError(999, "image_id not found"); } - array_merge( $image_row, ws_std_get_urls($image_row) ); + $image_row = array_merge( $image_row, ws_std_get_urls($image_row) ); //-------------------------------------------------------- related categories $query = ' @@ -600,6 +610,7 @@ SELECT COUNT(rate) AS count ); unset($ret['path']); unset($ret['storage_category_id']); + return new PwgNamedStruct('image',$ret, null, array('name','comment') ); } @@ -711,7 +722,7 @@ SELECT * FROM '.IMAGES_TABLE.' 'count' => count($images) ), WS_XML_CONTENT => new PwgNamedArray($images, 'image', - array('id', 'tn_url', 'element_url', 'file','width','height','hit') ) + ws_std_get_image_xml_attributes() ) ) ); } @@ -945,7 +956,7 @@ LIMIT '.$params['per_page']*$params['page'].','.$params['per_page']; 'count' => count($images) ), WS_XML_CONTENT => new PwgNamedArray($images, 'image', - array('id', 'tn_url', 'element_url', 'file','width','height','hit') ) + ws_std_get_image_xml_attributes() ) ) ); } diff --git a/template/yoga/default-colors.css b/template/yoga/default-colors.css index 5e5a64a68..e88f21208 100644 --- a/template/yoga/default-colors.css +++ b/template/yoga/default-colors.css @@ -1,5 +1,5 @@ /* $Id$ */ -#content, #menubar, #thePicturePage #the_page { background-color: #eef; } + /* others */ .pleaseNote { background: #9c9c9c; |