mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Remove some deprecated methods calls
This commit is contained in:
@@ -83,13 +83,13 @@ class record_exportElement extends record_adapter
|
||||
|
||||
$sd = $this->get_subdefs();
|
||||
|
||||
$sbas_id = phrasea::sbasFromBas($this->app, $this->get_base_id());
|
||||
$sbas_id = phrasea::sbasFromBas($this->app, $this->getBaseId());
|
||||
|
||||
/** @var databox_subdef[] $subdefs */
|
||||
$subdefs = [];
|
||||
|
||||
foreach ($this->app->findDataboxById($sbas_id)->get_subdef_structure() as $subdef_type => $subdefs_obj) {
|
||||
if ($subdef_type == $this->get_type()) {
|
||||
if ($subdef_type == $this->getType()) {
|
||||
$subdefs = $subdefs_obj;
|
||||
break;
|
||||
}
|
||||
@@ -101,10 +101,10 @@ class record_exportElement extends record_adapter
|
||||
'thumbnail' => true
|
||||
];
|
||||
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->get_base_id(), 'candwnldhd')) {
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'candwnldhd')) {
|
||||
$go_dl['document'] = true;
|
||||
}
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->get_base_id(), 'candwnldpreview')) {
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'candwnldpreview')) {
|
||||
$go_dl['preview'] = true;
|
||||
}
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_hd_grant($this)) {
|
||||
@@ -117,18 +117,18 @@ class record_exportElement extends record_adapter
|
||||
|
||||
$query = $this->app['phraseanet.user-query'];
|
||||
|
||||
$masters = $query->on_base_ids([$this->get_base_id()])
|
||||
$masters = $query->on_base_ids([$this->getBaseId()])
|
||||
->who_have_right(['order_master'])
|
||||
->execute()->get_results();
|
||||
|
||||
$go_cmd = (count($masters) > 0 && $this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->get_base_id(), 'cancmd'));
|
||||
$go_cmd = (count($masters) > 0 && $this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'cancmd'));
|
||||
|
||||
$orderable['document'] = false;
|
||||
$downloadable['document'] = false;
|
||||
|
||||
if (isset($sd['document']) && is_file($sd['document']->getRealPath())) {
|
||||
if ($go_dl['document'] === true) {
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->is_restricted_download($this->get_base_id())) {
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->is_restricted_download($this->getBaseId())) {
|
||||
$this->remain_hd --;
|
||||
if ($this->remain_hd >= 0) {
|
||||
$localizedLabel = $this->app->trans('document original');
|
||||
@@ -182,7 +182,7 @@ class record_exportElement extends record_adapter
|
||||
if (isset($sd[$name]) && $sd[$name]->is_physically_present()) {
|
||||
if ($class == 'document') {
|
||||
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->is_restricted_download($this->get_base_id())) {
|
||||
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->is_restricted_download($this->getBaseId())) {
|
||||
$this->remain_hd --;
|
||||
if ($this->remain_hd >= 0)
|
||||
$downloadable[$name] = [
|
||||
|
Reference in New Issue
Block a user