Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /home/palandch/www/core/model/modx/processors/security/documentgroup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/processors/security/documentgroup/removedocument.php
<?php
/**
 * Remove a resource-resourcegroup pairing
 *
 * @param integer $document_group The ID of the resource group
 * @param integer $document The ID of the resource
 *
 * @package modx
 * @subpackage processors.security.documentgroup
 */
if (!$modx->hasPermission('access_permissions')) return $modx->error->failure($modx->lexicon('permission_denied'));
$modx->lexicon->load('access','resource');

if (empty($scriptProperties['document_group'])) return $modx->error->failure($modx->lexicon('resource_group_err_ns'));
if (empty($scriptProperties['document'])) return $modx->error->failure($modx->lexicon('resource_err_ns'));

/* get resource group resource */
$resourceGroupResource = $modx->getObject('modResourceGroupResource',array(
	'document_group' => $scriptProperties['document_group'],
	'document' => $scriptProperties['document'],
));
if ($resourceGroupResource == null) return $modx->error->failure($modx->lexicon('resource_group_resource_err_nf'));

/* remove association */
if ($resourceGroupResource->remove() == false) {
    return $modx->error->failure($modx->lexicon('resource_group_resource_err_remove'));
}

return $modx->error->success('',$resourceGroupResource);

Spamworldpro Mini