forked from friendica/friendica-addons
Update for new version
This commit is contained in:
parent
4d5a68c6a4
commit
641c01bb90
|
@ -714,7 +714,7 @@ function retrieve_images(&$item) {
|
||||||
if (!$url) {
|
if (!$url) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strpos($url, System::baseUrl()) === FALSE) {
|
if (strpos($url, DI::baseUrl()) === FALSE) {
|
||||||
$resource = add_retriever_resource($url, $item['uid'], $item['contact-id'], true);
|
$resource = add_retriever_resource($url, $item['uid'], $item['contact-id'], true);
|
||||||
if (!$resource['completed']) {
|
if (!$resource['completed']) {
|
||||||
add_retriever_item($item, $resource);
|
add_retriever_item($item, $resource);
|
||||||
|
@ -800,7 +800,7 @@ function retriever_transform_images(&$item, $resource) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$photo = Photo::store($image, $uid, $cid, $rid, $filename, $album, 0, 0, "", "", "", "", $desc);
|
$photo = Photo::store($image, $uid, $cid, $rid, $filename, $album, 0, 0, "", "", "", "", $desc);
|
||||||
$new_url = System::baseUrl() . '/photo/' . $rid . '-0.' . $image->getExt();
|
$new_url = DI::baseUrl() . '/photo/' . $rid . '-0.' . $image->getExt();
|
||||||
if (!strlen($new_url)) {
|
if (!strlen($new_url)) {
|
||||||
Logger::warning('retriever_transform_images: no replacement URL for image ' . $resource['url']);
|
Logger::warning('retriever_transform_images: no replacement URL for image ' . $resource['url']);
|
||||||
return;
|
return;
|
||||||
|
@ -826,7 +826,7 @@ function retriever_content($a) {
|
||||||
if ($a->argv[1] === 'help') {
|
if ($a->argv[1] === 'help') {
|
||||||
$feeds = DBA::selectToArray('contact', ['id', 'name', 'thumb'], ['uid' => local_user(), 'network' => 'feed']);
|
$feeds = DBA::selectToArray('contact', ['id', 'name', 'thumb'], ['uid' => local_user(), 'network' => 'feed']);
|
||||||
for ($i = 0; $i < count($feeds); ++$i) {
|
for ($i = 0; $i < count($feeds); ++$i) {
|
||||||
$feeds[$i]['url'] = System::baseUrl() . '/retriever/' . $feeds[$i]['id'];
|
$feeds[$i]['url'] = DI::baseUrl() . '/retriever/' . $feeds[$i]['id'];
|
||||||
}
|
}
|
||||||
$template = Renderer::getMarkupTemplate('/help.tpl', 'addon/retriever/');
|
$template = Renderer::getMarkupTemplate('/help.tpl', 'addon/retriever/');
|
||||||
$a->page['content'] .= Renderer::replaceMacros($template, array(
|
$a->page['content'] .= Renderer::replaceMacros($template, array(
|
||||||
|
@ -950,7 +950,7 @@ function retriever_contact_photo_menu($a, &$args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($args["contact"]["network"] == "feed") {
|
if ($args["contact"]["network"] == "feed") {
|
||||||
$args["menu"]['retriever'] = array(L10n::t('Retriever'), System::baseUrl() . '/retriever/' . $args["contact"]['id']);
|
$args["menu"]['retriever'] = array(L10n::t('Retriever'), DI::baseUrl() . '/retriever/' . $args["contact"]['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue