41 lines
617 B
PHP
41 lines
617 B
PHP
<?php
|
|
|
|
namespace Zotlabs\Module;
|
|
|
|
use Zotlabs\Web\Controller;
|
|
|
|
class Link extends Controller {
|
|
|
|
function init() {
|
|
|
|
}
|
|
|
|
function get() {
|
|
|
|
$item_id = ((argc() > 1) ? intval(argv(1)) : 0);
|
|
|
|
if(! $item_id) {
|
|
\App::$error = 404;
|
|
notice( t('Item not found.') . EOL);
|
|
return;
|
|
}
|
|
|
|
$r = q("select uuid from item where id = %d limit 1",
|
|
intval($item_id)
|
|
);
|
|
|
|
if (!$r) {
|
|
notice( t('Item not found.') . EOL);
|
|
return;
|
|
}
|
|
|
|
if (get_config('link','hideasides')) {
|
|
goaway(z_root() . '/display/' . $r[0]['uuid'] . '?link_hideasides=1');
|
|
}
|
|
|
|
goaway(z_root() . '/display/' . $r[0]['uuid']);
|
|
|
|
}
|
|
|
|
}
|