Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 7475b96

Browse files
committed
fix destination for gallery uploads
1 parent fc580dd commit 7475b96

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

acp/core/files.upload_gallery.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
die('Error: CSRF Token is invalid');
1717
}
1818

19-
$year = date('Y',time());
19+
$year = (int) $_REQUEST['post_year'];
20+
2021
$gallery_id = 'gallery'. (int) $_REQUEST['gal'];
2122
$uploads_dir = '../../content/galleries/'.$year.'/'.$gallery_id;
2223

acp/core/posts.edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@
703703
$form_tpl = str_replace('{post_type}', $post_data['post_type'], $form_tpl);
704704
$form_tpl = str_replace('{post_id}', $post_data['post_id'], $form_tpl);
705705
$form_tpl = str_replace('{post_date}', $post_data['post_date'], $form_tpl);
706+
$form_tpl = str_replace('{post_year}', date('Y',$post_data['post_date']), $form_tpl);
706707
$form_tpl = str_replace('{modus}', $modus, $form_tpl);
707708
$form_tpl = str_replace('{token}', $_SESSION['token'], $form_tpl);
708709
$form_tpl = str_replace('{formaction}', '?tn=posts&sub=edit', $form_tpl);

acp/templates/gallery_upload_form.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<input name="file" type="file" multiple />
1313
</div>
1414
<input type="hidden" name="gal" value="{post_id}">
15+
<input type="hidden" name="post_year" value="{post_year}">
1516
<input type="hidden" name="w" value="{max_img_width}">
1617
<input type="hidden" name="w_tmb" value="{max_tmb_width}">
1718
<input type="hidden" name="h" value="{max_img_height}">

core/posts-list.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@
145145
/* entry date */
146146
$entrydate_year = date('Y',$get_posts[$k]['post_date']);
147147

148-
149148
/* post images */
150149
$first_post_image = '';
151150
$post_images = explode("<->", $get_posts[$k]['post_images']);

0 commit comments

Comments
 (0)