Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485128
UpdateJob.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
881 B
Referenced Files
None
Subscribers
None
UpdateJob.php
View Options
<?php
namespace
App\Jobs\Resource
;
use
App\Jobs\ResourceJob
;
class
UpdateJob
extends
ResourceJob
{
/**
* Execute the job.
*
* @return void
*/
public
function
handle
()
{
$resource
=
$this
->
getResource
();
if
(!
$resource
)
{
return
;
}
// Cancel the update if the resource is deleted
if
(
$resource
->
isDeleted
())
{
$this
->
delete
();
return
;
}
if
(
\config
(
'app.with_ldap'
)
&&
$resource
->
isLdapReady
())
{
\App\Backends\LDAP
::
updateResource
(
$resource
);
}
if
(
\config
(
'app.with_imap'
)
&&
$resource
->
isImapReady
())
{
if
(!
\App\Backends\IMAP
::
updateResource
(
$resource
,
$this
->
properties
))
{
throw
new
\Exception
(
"Failed to update mailbox for resource {$this->resourceId}."
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 1:06 AM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387349
Default Alt Text
UpdateJob.php (881 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment