fix metadata call
This commit is contained in:
parent
e7a3cb0fa1
commit
91cbf257dd
11
_admin.php
11
_admin.php
@ -332,12 +332,11 @@ class adminBehaviorPostExpired
|
||||
|
||||
if ($post_id) {
|
||||
|
||||
$rs = $core->meta->getMeta(
|
||||
'post_expired',
|
||||
1,
|
||||
null,
|
||||
$post_id
|
||||
);
|
||||
$rs = $core->meta->getMetadata([
|
||||
'meta_type' => 'post_expired',
|
||||
'post_id' => $post_id,
|
||||
'limit' => 1
|
||||
]);
|
||||
|
||||
if (!$rs->isEmpty()) {
|
||||
$post_expired = decodePostExpired($rs->meta_id);
|
||||
|
@ -19,7 +19,7 @@ $this->registerModule(
|
||||
'Expired entries',
|
||||
'Change entries options at a given date',
|
||||
'Jean-Christian Denis and Contributors',
|
||||
'2021.08.19',
|
||||
'2021.08.20',
|
||||
[
|
||||
'permissions' => 'usage,contentadmin',
|
||||
'type' => 'plugin',
|
||||
|
@ -182,17 +182,17 @@ class rsExtPostExpiredPublic extends rsExtPost
|
||||
public static function postExpiredDate(record $rs)
|
||||
{
|
||||
if (!$rs->postexpired[$rs->post_id]) { //memory
|
||||
$rs_date = $rs->core->meta->getMetadata(array(
|
||||
$rs_date = $rs->core->meta->getMetadata([
|
||||
'meta_type' => 'post_expired',
|
||||
'post_id'=> $rs->post_id,
|
||||
'limit'=> 1
|
||||
));
|
||||
]);
|
||||
|
||||
if ($rs_date->isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$v = unserialize(base64_decode($rs_date->meta_id));
|
||||
$v = decodePostExpired($rs_date->meta_id);
|
||||
$rs->postexpired[$rs->post_id] = $v['date'];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user