mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Replace Addon class with AddonHelper in mod photos.php
This commit is contained in:
parent
b84eb33ae2
commit
c50827a803
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,6 @@ use Friendica\Content\Nav;
|
||||||
use Friendica\Content\Pager;
|
use Friendica\Content\Pager;
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Core\ACL;
|
use Friendica\Core\ACL;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
|
@ -1067,6 +1066,7 @@ function photos_content()
|
||||||
$cmnt_tpl = Renderer::getMarkupTemplate('comment_item.tpl');
|
$cmnt_tpl = Renderer::getMarkupTemplate('comment_item.tpl');
|
||||||
$tpl = Renderer::getMarkupTemplate('photo_item.tpl');
|
$tpl = Renderer::getMarkupTemplate('photo_item.tpl');
|
||||||
$return_path = DI::args()->getCommand();
|
$return_path = DI::args()->getCommand();
|
||||||
|
$addonHelper = DI::addonHelper();
|
||||||
|
|
||||||
if (!DBA::isResult($items)) {
|
if (!DBA::isResult($items)) {
|
||||||
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
|
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
|
||||||
|
@ -1075,7 +1075,7 @@ function photos_content()
|
||||||
* This should be better if done by a hook
|
* This should be better if done by a hook
|
||||||
*/
|
*/
|
||||||
$qcomment = null;
|
$qcomment = null;
|
||||||
if (Addon::isEnabled('qcomment')) {
|
if ($addonHelper->isAddonEnabled('qcomment')) {
|
||||||
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
||||||
$qcomment = $words ? explode("\n", $words) : [];
|
$qcomment = $words ? explode("\n", $words) : [];
|
||||||
}
|
}
|
||||||
|
@ -1131,7 +1131,7 @@ function photos_content()
|
||||||
* This should be better if done by a hook
|
* This should be better if done by a hook
|
||||||
*/
|
*/
|
||||||
$qcomment = null;
|
$qcomment = null;
|
||||||
if (Addon::isEnabled('qcomment')) {
|
if ($addonHelper->isAddonEnabled('qcomment')) {
|
||||||
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
||||||
$qcomment = $words ? explode("\n", $words) : [];
|
$qcomment = $words ? explode("\n", $words) : [];
|
||||||
}
|
}
|
||||||
|
@ -1211,7 +1211,7 @@ function photos_content()
|
||||||
* This should be better if done by a hook
|
* This should be better if done by a hook
|
||||||
*/
|
*/
|
||||||
$qcomment = null;
|
$qcomment = null;
|
||||||
if (Addon::isEnabled('qcomment')) {
|
if ($addonHelper->isAddonEnabled('qcomment')) {
|
||||||
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words');
|
||||||
$qcomment = $words ? explode("\n", $words) : [];
|
$qcomment = $words ? explode("\n", $words) : [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue