mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
use new method SeedDMS_Core_[Folder|Document]::isType()
This commit is contained in:
parent
a02afe4e64
commit
89e526a5e2
|
@ -295,10 +295,10 @@ class SeedDMS_Session {
|
||||||
/* id is only set if load() was called before */
|
/* id is only set if load() was called before */
|
||||||
if($this->id) {
|
if($this->id) {
|
||||||
$dms = $object->_dms;
|
$dms = $object->_dms;
|
||||||
if(get_class($object) == $dms->getClassname('document')) {
|
if($object->isType('document')) {
|
||||||
if(!in_array($object->getID(), $this->data['clipboard']['docs']))
|
if(!in_array($object->getID(), $this->data['clipboard']['docs']))
|
||||||
array_push($this->data['clipboard']['docs'], $object->getID());
|
array_push($this->data['clipboard']['docs'], $object->getID());
|
||||||
} elseif(get_class($object) == $dms->getClassname('folder')) {
|
} elseif($object->isType('folder')) {
|
||||||
if(!in_array($object->getID(), $this->data['clipboard']['folders']))
|
if(!in_array($object->getID(), $this->data['clipboard']['folders']))
|
||||||
array_push($this->data['clipboard']['folders'], $object->getID());
|
array_push($this->data['clipboard']['folders'], $object->getID());
|
||||||
}
|
}
|
||||||
|
@ -318,11 +318,11 @@ class SeedDMS_Session {
|
||||||
/* id is only set if load() was called before */
|
/* id is only set if load() was called before */
|
||||||
if($this->id) {
|
if($this->id) {
|
||||||
$dms = $object->_dms;
|
$dms = $object->_dms;
|
||||||
if(get_class($object) == $dms->getClassname('document')) {
|
if($object->isType('document')) {
|
||||||
$key = array_search($object->getID(), $this->data['clipboard']['docs']);
|
$key = array_search($object->getID(), $this->data['clipboard']['docs']);
|
||||||
if($key !== false)
|
if($key !== false)
|
||||||
unset($this->data['clipboard']['docs'][$key]);
|
unset($this->data['clipboard']['docs'][$key]);
|
||||||
} elseif(get_class($object) == $dms->getClassname('folder')) {
|
} elseif($object->isType('folder')) {
|
||||||
$key = array_search($object->getID(), $this->data['clipboard']['folders']);
|
$key = array_search($object->getID(), $this->data['clipboard']['folders']);
|
||||||
if($key !== false)
|
if($key !== false)
|
||||||
unset($this->data['clipboard']['folders'][$key]);
|
unset($this->data['clipboard']['folders'][$key]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user