Moved functions out of boot.php into class
- z_root() => $a->getBaseURL() - absurl() => removed because no usage - is_ajax() => $a->isAjax() - current_load() => System::currentLoad() - argc() => $a->argc - argv($x) => $a->getArgumentValue($x)
This commit is contained in:
parent
14e7686df4
commit
2c541afd47
8 changed files with 66 additions and 90 deletions
|
@ -876,13 +876,13 @@ function item_content(App $a)
|
|||
$o = '';
|
||||
|
||||
if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
|
||||
if (is_ajax()) {
|
||||
if ($a->isAjax()) {
|
||||
$o = Item::deleteForUser(['id' => $a->argv[2]], local_user());
|
||||
} else {
|
||||
$o = drop_item($a->argv[2]);
|
||||
}
|
||||
|
||||
if (is_ajax()) {
|
||||
if ($a->isAjax()) {
|
||||
// ajax return: [<item id>, 0 (no perm) | <owner id>]
|
||||
echo json_encode([intval($a->argv[2]), intval($o)]);
|
||||
killme();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue