diff options
author | Max Kostikov <max@kostikov.co> | 2019-03-30 22:55:36 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-03-30 22:55:36 +0100 |
commit | 1ee91dd690f195f56afed7151d51730aa476e592 (patch) | |
tree | 9540b80be06ba8745a715197b6c1a1a480062362 /Zotlabs | |
parent | f9e602c44cc75c1b0129c1f1f70a7879efc7ff01 (diff) | |
download | volse-hubzilla-1ee91dd690f195f56afed7151d51730aa476e592.tar.gz volse-hubzilla-1ee91dd690f195f56afed7151d51730aa476e592.tar.bz2 volse-hubzilla-1ee91dd690f195f56afed7151d51730aa476e592.zip |
Add remove cover photo processing
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Cover_photo.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index b911ac991..822cc8ef6 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -48,6 +48,16 @@ class Cover_photo extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo'); + + // Remove cover photo + if(isset($_POST['remove'])) { + q("update photo set photo_usage = %d where photo_usage = %d and uid = %d", + intval(PHOTO_NORMAL), + intval(PHOTO_COVER), + intval(local_channel()) + ); + goaway(z_root() . '/cover_photo'); + } if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) { |