X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=10f626458665c7beb19e2d23d970f924387e7857;hb=4da9395075e13553d200ced03ffc104743d9bc98;hp=acc6bec4fbf2d75b4810a840f2ab869789bafe28;hpb=6191fab4d7c99295dec88b1c01d7c52d23ac74d4;p=friendica.git diff --git a/include/text.php b/include/text.php index acc6bec4fb..10f6264586 100644 --- a/include/text.php +++ b/include/text.php @@ -462,33 +462,6 @@ function perms2str($p) { return $ret; } - -/** - * generate a guaranteed unique (for this domain) item ID for ATOM - * safe from birthday paradox - * - * @param string $hostname - * @param int $uid - * @return string - */ -function item_new_uri($hostname, $uid, $guid = "") { - - do { - if ($guid == "") { - $hash = get_guid(32); - } else { - $hash = $guid; - $guid = ""; - } - - $uri = "urn:X-dfrn:" . $hostname . ':' . $uid . ':' . $hash; - - $dups = dba::exists('item', ['uri' => $uri]); - } while ($dups == true); - - return $uri; -} - /** * @deprecated * wrapper to load a view template, checking for alternate @@ -1011,7 +984,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside = '$action_url' => $url, '$search_label' => L10n::t('Search'), '$save_label' => $save_label, - '$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'), + '$savedsearch' => local_user() && Feature::isEnabled(local_user(),'savedsearch'), '$search_hint' => L10n::t('@name, !forum, #tags, content'), '$mode' => $mode ]; @@ -1204,8 +1177,8 @@ function put_item_in_cache(&$item, $update = false) } if ($update && ($item["id"] > 0)) { - dba::update('item', ['rendered-html' => $item["rendered-html"], 'rendered-hash' => $item["rendered-hash"]], - ['id' => $item["id"]], false); + Item::update(['rendered-html' => $item["rendered-html"], 'rendered-hash' => $item["rendered-hash"]], + ['id' => $item["id"]]); } }