}
}
-function drop_item($id)
+function drop_item($id, $return = '')
{
$a = BaseObject::getApp();
// 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']);
$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()) {
$output = '';
- $install_title = L10n::t('Friendica Communctions Server - Setup');
+ $install_title = L10n::t('Friendica Communications Server - Setup');
switch (self::$currentWizardStep) {
case self::SYSTEM_CHECK:
'$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,
'received' => $item['received'],
'commented' => $item['commented'],
'created_date' => $item['created'],
+ 'return' => ($a->cmd) ? bin2hex($a->cmd) : '',
];
$arr = ['item' => $item, 'output' => $tmp_item];
{{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>
<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>
-
{{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>