]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6058 from JonnyTischbein/issue_contact_batch_archive
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 1 Nov 2018 05:41:05 +0000 (06:41 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Nov 2018 05:41:05 +0000 (06:41 +0100)
[frio] Fix unarchive contact batch action

include/items.php
mod/item.php
src/Module/Install.php
src/Object/Post.php
view/theme/frio/templates/wall_thread.tpl
view/theme/quattro/templates/wall_thread.tpl
view/theme/vier/templates/wall_thread.tpl

index 887bbb5b685b5d387d0d163d795b6cce82c6e660..961a20b240e01548879faad46ffeb5630e16202c 100644 (file)
@@ -345,7 +345,7 @@ function drop_items(array $items)
        }
 }
 
-function drop_item($id)
+function drop_item($id, $return = '')
 {
        $a = BaseObject::getApp();
 
@@ -409,8 +409,15 @@ function drop_item($id)
                // delete the item
                Item::deleteForUser(['id' => $item['id']], local_user());
 
-               $a->internalRedirect('network');
-               //NOTREACHED
+               $return_url = hex2bin($return);
+               if (empty($return_url) || strpos($return_url, 'display') !== false) {
+                       $a->internalRedirect('network');
+                       //NOTREACHED
+               }
+               else {
+                       $a->internalRedirect($return_url);
+                       //NOTREACHED
+               }
        } else {
                notice(L10n::t('Permission denied.') . EOL);
                $a->internalRedirect('display/' . $item['guid']);
index c7dbfd21c689896457a4e34bfaf7c577508cd279..54ef53a4b87961484b91de0241d3c7ce594dfa67 100644 (file)
@@ -881,11 +881,16 @@ function item_content(App $a)
 
        $o = '';
 
-       if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
+       if (($a->argc >= 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
                if ($a->isAjax()) {
                        $o = Item::deleteForUser(['id' => $a->argv[2]], local_user());
                } else {
-                       $o = drop_item($a->argv[2]);
+                       if (!empty($a->argv[3])) {
+                               $o = drop_item($a->argv[2], $a->argv[3]);
+                       }
+                       else {
+                               $o = drop_item($a->argv[2]);
+                       }
                }
 
                if ($a->isAjax()) {
index 09de23c080acb399b0a43fcd7f5e48e386408f8e..2defe24adf648296fcb6002166b150cc5a0fbe44 100644 (file)
@@ -116,7 +116,7 @@ class Install extends BaseModule
 
                $output = '';
 
-               $install_title = L10n::t('Friendica Communctions Server - Setup');
+               $install_title = L10n::t('Friendica Communications Server - Setup');
 
                switch (self::$currentWizardStep) {
                        case self::SYSTEM_CHECK:
@@ -130,7 +130,7 @@ class Install extends BaseModule
                                        '$pass'                 => L10n::t('System check'),
                                        '$checks'               => self::$installer->getChecks(),
                                        '$passed'               => $status,
-                                       '$see_install'  => L10n::t('Please see the file "Install.txt".'),
+                                       '$see_install'  => L10n::t('Please see the file "INSTALL.txt".'),
                                        '$next'                 => L10n::t('Next'),
                                        '$reload'               => L10n::t('Check again'),
                                        '$phpath'               => $phppath,
index 086b78960a81d3d2982ba636083a4dbfca274bf5..e2c1ea03c3f7186af863d9dd7efe10c9ed471c3f 100644 (file)
@@ -414,6 +414,7 @@ class Post extends BaseObject
                        'received'        => $item['received'],
                        'commented'       => $item['commented'],
                        'created_date'    => $item['created'],
+                       'return'          => ($a->cmd) ? bin2hex($a->cmd) : '',
                ];
 
                $arr = ['item' => $item, 'output' => $tmp_item];
index 53efacda7020899ca4ea1229280d6758b9f31481..c46fc339dd1ff742fb7a6d8658f31c4779e3aae2 100644 (file)
@@ -141,7 +141,7 @@ as the value of $top_child_total (this is done at the end of this file)
 
                                        {{if $item.drop.dropping}}
                                        <li role="menuitem">
-                                               <button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</button>
+                                               <button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</button>
                                        </li>
                                        {{/if}}
                                </ul>
index 79bf1d6b6f028477120551e99cb1f211fad0fc5d..fda871b1968df274d4d8520a2fa680bb689ac447 100644 (file)
                                        <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
                                {{/if}}
                                {{if $item.drop.dropping}}
-                                       <a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
+                                       <a href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
                                {{/if}}
                                {{if $item.edpost}}
                                        <a class="icon edit s16" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"></a>
index 6c636d53b6000eb159250888ee5ef3286220ae7c..8debce36497f4c7e9d95cae90e852614bf6fb4e9 100644 (file)
@@ -1,4 +1,3 @@
-
 {{if $mode == display}}
 {{else}}
 {{if $item.comment_firstcollapsed}}
                                        <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
                                {{/if}}
                                {{if $item.drop.dropping}}
-                                       <a role="button" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}"><i class="icon-trash icon-large"><span class="sr-only">{{$item.drop.delete}}</span></i></a>
+                                       <a role="button" href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}"><i class="icon-trash icon-large"><span class="sr-only">{{$item.drop.delete}}</span></i></a>
                                {{/if}}
                                {{if $item.edpost}}
                                        <a role="button" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="icon-edit icon-large"><span class="sr-only">{{$item.edpost.1}}</span></i></a>