mirror of
https://github.com/friendica/friendica
synced 2025-05-03 11:44:09 +02:00
Move include/security tp /src/Core/Authentication and /src/Util/Security
This commit is contained in:
parent
93c6dddc0d
commit
05be2db725
30 changed files with 613 additions and 572 deletions
|
@ -7,6 +7,7 @@ namespace Friendica\Model;
|
|||
use Friendica\BaseObject;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Util\Security;
|
||||
|
||||
require_once 'boot.php';
|
||||
require_once 'include/dba.php';
|
||||
|
@ -409,7 +410,7 @@ class Group extends BaseObject
|
|||
'$createtext' => L10n::t('Create a new group'),
|
||||
'$creategroup' => L10n::t('Group Name: '),
|
||||
'$editgroupstext' => L10n::t('Edit groups'),
|
||||
'$form_security_token' => get_form_security_token('group_edit'),
|
||||
'$form_security_token' => Security::get_form_security_token('group_edit'),
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -3060,7 +3060,7 @@ class Item extends BaseObject
|
|||
$uid = local_user();
|
||||
}
|
||||
|
||||
if (!can_write_wall($uid)) {
|
||||
if (!Security::can_write_wall($uid)) {
|
||||
logger('like: unable to write on wall ' . $uid);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Object\Image;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Security;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
|
||||
|
@ -226,7 +227,7 @@ class Photo
|
|||
*/
|
||||
public static function getAlbums($uid, $update = false)
|
||||
{
|
||||
$sql_extra = permissions_sql($uid);
|
||||
$sql_extra = Security::permissions_sql($uid);
|
||||
|
||||
$key = "photo_albums:".$uid.":".local_user().":".remote_user();
|
||||
$albums = Cache::get($key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue