feature #379 multiple format, step 2: download formats

* if formats are available, replace the download link on picture.php by a switchBox with all formats
* register format in the history table for future statistics
This commit is contained in:
plegall
2015-12-07 10:54:18 +01:00
parent 8e098d502a
commit c3b748ecbf
7 changed files with 132 additions and 3 deletions
+3 -1
View File
@@ -407,7 +407,7 @@ SELECT id, name
* @param string $image_type
* @return bool
*/
function pwg_log($image_id = null, $image_type = null)
function pwg_log($image_id = null, $image_type = null, $format_id = null)
{
global $conf, $user, $page;
@@ -445,6 +445,7 @@ INSERT INTO '.HISTORY_TABLE.'
category_id,
image_id,
image_type,
format_id,
tag_ids
)
VALUES
@@ -457,6 +458,7 @@ INSERT INTO '.HISTORY_TABLE.'
'.(isset($page['category']['id']) ? $page['category']['id'] : 'NULL').',
'.(isset($image_id) ? $image_id : 'NULL').',
'.(isset($image_type) ? "'".$image_type."'" : 'NULL').',
'.(isset($format_id) ? $format_id : 'NULL').',
'.(isset($tags_string) ? "'".$tags_string."'" : 'NULL').'
)
;';