Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

543 linhas
18 KiB

  1. <?php
  2. function display_init(&$a) {
  3. if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
  4. return;
  5. }
  6. $nick = (($a->argc > 1) ? $a->argv[1] : '');
  7. $profiledata = array();
  8. // If there is only one parameter, then check if this parameter could be a guid
  9. if ($a->argc == 2) {
  10. $nick = "";
  11. $itemuid = 0;
  12. // Does the local user have this item?
  13. if (local_user()) {
  14. $r = q("SELECT `id`, `parent`, `author-name`, `author-link`, `author-avatar`, `network`, `body`, `uid`, `owner-link` FROM `item`
  15. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  16. AND `guid` = '%s' AND `uid` = %d", dbesc($a->argv[1]), local_user());
  17. if (count($r)) {
  18. $nick = $a->user["nickname"];
  19. $itemuid = local_user();
  20. }
  21. }
  22. // Or is it anywhere on the server?
  23. if ($nick == "") {
  24. $r = q("SELECT `user`.`nickname`, `item`.`id`, `item`.`parent`, `item`.`author-name`,
  25. `item`.`author-link`, `item`.`author-avatar`, `item`.`network`, `item`.`uid`, `item`.`owner-link`, `item`.`body`
  26. FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid`
  27. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  28. AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
  29. AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
  30. AND NOT `item`.`private` AND NOT `user`.`hidewall`
  31. AND `item`.`guid` = '%s'", dbesc($a->argv[1]));
  32. // AND NOT `item`.`private` AND `item`.`wall`
  33. if (count($r)) {
  34. $nick = $r[0]["nickname"];
  35. $itemuid = $r[0]["uid"];
  36. }
  37. }
  38. // Is it an item with uid=0?
  39. if ($nick == "") {
  40. $r = q("SELECT `item`.`id`, `item`.`parent`, `item`.`author-name`, `item`.`author-link`,
  41. `item`.`author-avatar`, `item`.`network`, `item`.`uid`, `item`.`owner-link`, `item`.`body`
  42. FROM `item` WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  43. AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
  44. AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
  45. AND NOT `item`.`private` AND `item`.`uid` = 0
  46. AND `item`.`guid` = '%s'", dbesc($a->argv[1]));
  47. // AND NOT `item`.`private` AND `item`.`wall`
  48. }
  49. if (count($r)) {
  50. if ($r[0]["id"] != $r[0]["parent"])
  51. $r = q("SELECT `id`, `author-name`, `author-link`, `author-avatar`, `network`, `body`, `uid`, `owner-link` FROM `item`
  52. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  53. AND `id` = %d", $r[0]["parent"]);
  54. if (($itemuid != local_user()) AND local_user()) {
  55. // Do we know this contact but we haven't got this item?
  56. // Copy it to our local storage.
  57. $contactid = get_contact($r[0]['owner-link'], local_user());
  58. if ($contactid) {
  59. $item = q("SELECT * FROM `item` WHERE `id` = %d", intval($r[0]["id"]));
  60. unset($item[0]['id']);
  61. $item[0]['uid'] = local_user();
  62. $item[0]['origin'] = 0;
  63. $item[0]['contact-id'] = $contactid;
  64. $local_copy = item_store($item[0], false, false, true);
  65. logger("Stored local copy for post ".$item[0]['id']." under id ".$local_copy, LOGGER_DEBUG);
  66. }
  67. }
  68. $profiledata = display_fetchauthor($a, $r[0]);
  69. if (strstr(normalise_link($profiledata["url"]), normalise_link($a->get_baseurl()))) {
  70. $nickname = str_replace(normalise_link($a->get_baseurl())."/profile/", "", normalise_link($profiledata["url"]));
  71. if (($nickname != $a->user["nickname"])) {
  72. $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
  73. INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
  74. WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` AND `contact`.`self` LIMIT 1",
  75. dbesc($nickname)
  76. );
  77. if (count($r))
  78. $profiledata = $r[0];
  79. $profiledata["network"] = NETWORK_DFRN;
  80. } else
  81. $profiledata = array();
  82. }
  83. } else {
  84. $a->error = 404;
  85. notice( t('Item not found.') . EOL);
  86. return;
  87. }
  88. }
  89. profile_load($a, $nick, 0, $profiledata);
  90. }
  91. function display_fetchauthor($a, $item) {
  92. $profiledata = array();
  93. $profiledata["uid"] = -1;
  94. $profiledata["nickname"] = $item["author-name"];
  95. $profiledata["name"] = $item["author-name"];
  96. $profiledata["picdate"] = "";
  97. $profiledata["photo"] = $item["author-avatar"];
  98. $profiledata["url"] = $item["author-link"];
  99. $profiledata["network"] = $item["network"];
  100. // Check for a repeated message
  101. $skip = false;
  102. $body = trim($item["body"]);
  103. // Skip if it isn't a pure repeated messages
  104. // Does it start with a share?
  105. if (!$skip AND strpos($body, "[share") > 0)
  106. $skip = true;
  107. // Does it end with a share?
  108. if (!$skip AND (strlen($body) > (strrpos($body, "[/share]") + 8)))
  109. $skip = true;
  110. if (!$skip) {
  111. $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
  112. // Skip if there is no shared message in there
  113. if ($body == $attributes)
  114. $skip = true;
  115. }
  116. if (!$skip) {
  117. $author = "";
  118. preg_match("/author='(.*?)'/ism", $attributes, $matches);
  119. if ($matches[1] != "")
  120. $profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
  121. preg_match('/author="(.*?)"/ism', $attributes, $matches);
  122. if ($matches[1] != "")
  123. $profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
  124. $profile = "";
  125. preg_match("/profile='(.*?)'/ism", $attributes, $matches);
  126. if ($matches[1] != "")
  127. $profiledata["url"] = $matches[1];
  128. preg_match('/profile="(.*?)"/ism', $attributes, $matches);
  129. if ($matches[1] != "")
  130. $profiledata["url"] = $matches[1];
  131. $avatar = "";
  132. preg_match("/avatar='(.*?)'/ism", $attributes, $matches);
  133. if ($matches[1] != "")
  134. $profiledata["photo"] = $matches[1];
  135. preg_match('/avatar="(.*?)"/ism', $attributes, $matches);
  136. if ($matches[1] != "")
  137. $profiledata["photo"] = $matches[1];
  138. $profiledata["nickname"] = $profiledata["name"];
  139. $profiledata["network"] = GetProfileUsername($profiledata["url"], "", false, true);
  140. $profiledata["address"] = "";
  141. $profiledata["about"] = "";
  142. }
  143. // Don't show details from Diaspora contacts if you don't follow the contact
  144. $showdetails = ($profiledata["network"] != NETWORK_DIASPORA);
  145. // Fetching further contact data from the contact table
  146. $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`
  147. FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `network` = '%s' AND `rel` IN (%d, %d)",
  148. dbesc(normalise_link($profiledata["url"])), intval(local_user()), dbesc($item["network"]),
  149. intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
  150. if (!count($r))
  151. $r = q("SELECT `uid`, `network`, `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`
  152. FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d AND `rel` IN (%d, %d)",
  153. dbesc(normalise_link($profiledata["url"])), intval(local_user()),
  154. intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
  155. if (count($r)) {
  156. $profiledata["name"] = $r[0]["name"];
  157. $profiledata["photo"] = $r[0]["photo"];
  158. $profiledata["nickname"] = $r[0]["nick"];
  159. $profiledata["addr"] = $r[0]["addr"];
  160. $profiledata["keywords"] = $r[0]["keywords"];
  161. $profiledata["network"] = $r[0]["network"];
  162. if (local_user() OR $showdetails) {
  163. $showdetails = true;
  164. $profiledata["address"] = $r[0]["location"];
  165. $profiledata["about"] = $r[0]["about"];
  166. $profiledata["gender"] = $r[0]["gender"];
  167. }
  168. }
  169. // Fetching profile data from global contacts
  170. if ($profiledata["network"] != NETWORK_FEED) {
  171. $r = q("SELECT `name`, `photo`, `nick`, `addr`, `location`, `about`, `gender`, `keywords`, `network` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profiledata["url"])));
  172. if (count($r)) {
  173. $profiledata["name"] = $r[0]["name"];
  174. $profiledata["photo"] = $r[0]["photo"];
  175. $profiledata["nickname"] = $r[0]["nick"];
  176. $profiledata["addr"] = $r[0]["addr"];
  177. $profiledata["network"] = $r[0]["network"];
  178. if ($r[0]["keywords"])
  179. $profiledata["keywords"] = $r[0]["keywords"];
  180. if ($showdetails) {
  181. if ($r[0]["location"])
  182. $profiledata["address"] = $r[0]["location"];
  183. if ($r[0]["about"])
  184. $profiledata["about"] = $r[0]["about"];
  185. if ($r[0]["gender"])
  186. $profiledata["gender"] = $r[0]["gender"];
  187. }
  188. }
  189. }
  190. if (local_user()) {
  191. if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)))
  192. $profiledata["remoteconnect"] = $a->get_baseurl()."/follow?url=".urlencode($profiledata["url"]);
  193. } elseif ($profiledata["network"] == NETWORK_DFRN) {
  194. $connect = str_replace("/profile/", "/dfrn_request/", $profiledata["url"]);
  195. $profiledata["remoteconnect"] = $connect;
  196. }
  197. return($profiledata);
  198. }
  199. function display_content(&$a, $update = 0) {
  200. if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
  201. notice( t('Public access denied.') . EOL);
  202. return;
  203. }
  204. require_once('include/security.php');
  205. require_once('include/conversation.php');
  206. require_once('include/acl_selectors.php');
  207. $o = '';
  208. $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), array());
  209. if($update) {
  210. $nick = $_REQUEST['nick'];
  211. }
  212. else {
  213. $nick = (($a->argc > 1) ? $a->argv[1] : '');
  214. }
  215. if($update) {
  216. $item_id = $_REQUEST['item_id'];
  217. $a->profile = array('uid' => intval($update), 'profile_uid' => intval($update));
  218. }
  219. else {
  220. $item_id = (($a->argc > 2) ? $a->argv[2] : 0);
  221. if ($a->argc == 2) {
  222. $nick = "";
  223. if (local_user()) {
  224. $r = q("SELECT `id` FROM `item`
  225. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  226. AND `guid` = '%s' AND `uid` = %d", dbesc($a->argv[1]), local_user());
  227. if (count($r)) {
  228. $item_id = $r[0]["id"];
  229. $nick = $a->user["nickname"];
  230. }
  231. }
  232. if ($nick == "") {
  233. $r = q("SELECT `user`.`nickname`, `item`.`id` FROM `item` INNER JOIN `user` ON `user`.`uid` = `item`.`uid`
  234. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  235. AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
  236. AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
  237. AND NOT `item`.`private` AND NOT `user`.`hidewall`
  238. AND `item`.`guid` = '%s'", dbesc($a->argv[1]));
  239. // AND NOT `item`.`private` AND `item`.`wall`
  240. if (count($r)) {
  241. $item_id = $r[0]["id"];
  242. $nick = $r[0]["nickname"];
  243. }
  244. }
  245. if ($nick == "") {
  246. $r = q("SELECT `item`.`id` FROM `item`
  247. WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
  248. AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
  249. AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
  250. AND NOT `item`.`private` AND `item`.`uid` = 0
  251. AND `item`.`guid` = '%s'", dbesc($a->argv[1]));
  252. // AND NOT `item`.`private` AND `item`.`wall`
  253. if (count($r)) {
  254. $item_id = $r[0]["id"];
  255. }
  256. }
  257. }
  258. }
  259. if ($item_id AND !is_numeric($item_id)) {
  260. $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
  261. dbesc($item_id), intval($a->profile['uid']));
  262. if ($r)
  263. $item_id = $r[0]["id"];
  264. else
  265. $item_id = false;
  266. }
  267. if (!$item_id) {
  268. $a->error = 404;
  269. notice(t('Item not found.').EOL);
  270. return;
  271. }
  272. $groups = array();
  273. $contact = null;
  274. $remote_contact = false;
  275. $contact_id = 0;
  276. if(is_array($_SESSION['remote'])) {
  277. foreach($_SESSION['remote'] as $v) {
  278. if($v['uid'] == $a->profile['uid']) {
  279. $contact_id = $v['cid'];
  280. break;
  281. }
  282. }
  283. }
  284. if($contact_id) {
  285. $groups = init_groups_visitor($contact_id);
  286. $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
  287. intval($contact_id),
  288. intval($a->profile['uid'])
  289. );
  290. if(count($r)) {
  291. $contact = $r[0];
  292. $remote_contact = true;
  293. }
  294. }
  295. if(! $remote_contact) {
  296. if(local_user()) {
  297. $contact_id = $_SESSION['cid'];
  298. $contact = $a->contact;
  299. }
  300. }
  301. $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1",
  302. intval($a->profile['uid'])
  303. );
  304. if(count($r))
  305. $a->page_contact = $r[0];
  306. $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
  307. if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) {
  308. notice( t('Access to this profile has been restricted.') . EOL);
  309. return;
  310. }
  311. // We need the editor here to be able to reshare an item.
  312. if ($is_owner) {
  313. $x = array(
  314. 'is_owner' => true,
  315. 'allow_location' => $a->user['allow_location'],
  316. 'default_location' => $a->user['default-location'],
  317. 'nickname' => $a->user['nickname'],
  318. 'lockstate' => ( (is_array($a->user)) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))) ? 'lock' : 'unlock'),
  319. 'acl' => populate_acl($a->user, true),
  320. 'bang' => '',
  321. 'visitor' => 'block',
  322. 'profile_uid' => local_user(),
  323. 'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
  324. );
  325. $o .= status_editor($a,$x,0,true);
  326. }
  327. $sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups);
  328. if($update) {
  329. $r = q("SELECT `id` FROM `item` WHERE `item`.`uid` = %d
  330. AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = %d)
  331. $sql_extra AND `unseen`",
  332. intval($a->profile['uid']),
  333. intval($item_id)
  334. );
  335. if(!$r)
  336. return '';
  337. }
  338. $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
  339. `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
  340. `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
  341. `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
  342. FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
  343. AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
  344. WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted`
  345. AND NOT `item`.`moderated`
  346. AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = %d)
  347. $sql_extra
  348. ORDER BY `parent` DESC, `gravity` ASC, `id` ASC",
  349. intval($a->profile['uid']),
  350. intval($item_id)
  351. );
  352. if(!$r && local_user()) {
  353. // Check if this is another person's link to a post that we have
  354. $r = q("SELECT `item`.uri FROM `item`
  355. WHERE (`item`.`id` = %d OR `item`.`uri` = '%s')
  356. LIMIT 1",
  357. intval($item_id),
  358. dbesc($item_id)
  359. );
  360. if($r) {
  361. $item_uri = $r[0]['uri'];
  362. $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `item`.`network` AS `item_network`,
  363. `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
  364. `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
  365. `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
  366. FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
  367. AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
  368. WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted`
  369. AND NOT `item`.`moderated`
  370. AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `uri` = '%s' AND uid = %d)
  371. ORDER BY `parent` DESC, `gravity` ASC, `id` ASC ",
  372. intval(local_user()),
  373. dbesc($item_uri),
  374. intval(local_user())
  375. );
  376. }
  377. }
  378. if($r) {
  379. if((local_user()) && (local_user() == $a->profile['uid'])) {
  380. $unseen = q("SELECT `id` FROM `item` WHERE `unseen` AND `parent` = %d",
  381. intval($r[0]['parent']));
  382. if ($unseen)
  383. q("UPDATE `item` SET `unseen` = 0
  384. WHERE `parent` = %d AND `unseen`",
  385. intval($r[0]['parent'])
  386. );
  387. }
  388. $items = conv_sort($r,"`commented`");
  389. if(!$update)
  390. $o .= "<script> var netargs = '?f=&nick=" . $nick . "&item_id=" . $item_id . "'; </script>";
  391. $o .= conversation($a,$items,'display', $update);
  392. // Preparing the meta header
  393. require_once('include/bbcode.php');
  394. require_once("include/html2plain.php");
  395. $description = trim(html2plain(bbcode($r[0]["body"], false, false), 0, true));
  396. $title = trim(html2plain(bbcode($r[0]["title"], false, false), 0, true));
  397. $author_name = $r[0]["author-name"];
  398. $image = "";
  399. if ($image == "")
  400. $image = $r[0]["thumb"];
  401. if ($title == "")
  402. $title = $author_name;
  403. $description = htmlspecialchars($description, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
  404. $title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
  405. $author_name = htmlspecialchars($author_name, ENT_COMPAT, 'UTF-8', true); // allow double encoding here
  406. //<meta name="keywords" content="">
  407. $a->page['htmlhead'] .= '<meta name="author" content="'.$author_name.'" />'."\n";
  408. $a->page['htmlhead'] .= '<meta name="title" content="'.$title.'" />'."\n";
  409. $a->page['htmlhead'] .= '<meta name="fulltitle" content="'.$title.'" />'."\n";
  410. $a->page['htmlhead'] .= '<meta name="description" content="'.$description.'" />'."\n";
  411. // Schema.org microdata
  412. $a->page['htmlhead'] .= '<meta itemprop="name" content="'.$title.'" />'."\n";
  413. $a->page['htmlhead'] .= '<meta itemprop="description" content="'.$description.'" />'."\n";
  414. $a->page['htmlhead'] .= '<meta itemprop="image" content="'.$image.'" />'."\n";
  415. $a->page['htmlhead'] .= '<meta itemprop="author" content="'.$author_name.'" />'."\n";
  416. // Twitter cards
  417. $a->page['htmlhead'] .= '<meta name="twitter:card" content="summary" />'."\n";
  418. $a->page['htmlhead'] .= '<meta name="twitter:title" content="'.$title.'" />'."\n";
  419. $a->page['htmlhead'] .= '<meta name="twitter:description" content="'.$description.'" />'."\n";
  420. $a->page['htmlhead'] .= '<meta name="twitter:image" content="'.$image.'" />'."\n";
  421. $a->page['htmlhead'] .= '<meta name="twitter:url" content="'.$r[0]["plink"].'" />'."\n";
  422. // Dublin Core
  423. $a->page['htmlhead'] .= '<meta name="DC.title" content="'.$title.'" />'."\n";
  424. $a->page['htmlhead'] .= '<meta name="DC.description" content="'.$description.'" />'."\n";
  425. // Open Graph
  426. $a->page['htmlhead'] .= '<meta property="og:type" content="website" />'."\n";
  427. $a->page['htmlhead'] .= '<meta property="og:title" content="'.$title.'" />'."\n";
  428. $a->page['htmlhead'] .= '<meta property="og:image" content="'.$image.'" />'."\n";
  429. $a->page['htmlhead'] .= '<meta property="og:url" content="'.$r[0]["plink"].'" />'."\n";
  430. $a->page['htmlhead'] .= '<meta property="og:description" content="'.$description.'" />'."\n";
  431. $a->page['htmlhead'] .= '<meta name="og:article:author" content="'.$author_name.'" />'."\n";
  432. // article:tag
  433. return $o;
  434. }
  435. $r = q("SELECT `id`,`deleted` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
  436. dbesc($item_id),
  437. dbesc($item_id)
  438. );
  439. if($r) {
  440. if($r[0]['deleted']) {
  441. notice( t('Item has been removed.') . EOL );
  442. }
  443. else {
  444. notice( t('Permission denied.') . EOL );
  445. }
  446. }
  447. else {
  448. notice( t('Item not found.') . EOL );
  449. }
  450. return $o;
  451. }