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/resourcegroup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/processors/security/resourcegroup/remove.class.php
<?php
/**
 * Remove a resource group
 *
 * @param integer $id The ID of the resource group
 *
 * @package modx
 * @subpackage processors.security.resourcegroup
 */
class modResourceGroupRemoveProcessor extends modProcessor {
    /** @var modResourceGroup $resourceGroup */
    public $resourceGroup;

    public function checkPermissions() {
        return $this->modx->hasPermission('resourcegroup_delete');
    }
    public function getLanguageTopics() {
        return array('user','access');
    }

    public function initialize() {
        $id = $this->getProperty('id',false);
        if (empty($id)) return $this->modx->lexicon('resource_group_err_ns');
        $this->resourceGroup = $this->modx->getObject('modResourceGroup',$id);
        if (empty($this->resourceGroup)) return $this->modx->lexicon('resource_group_err_nf');
        return true;
    }

    public function process() {
        if ($this->resourceGroup->remove() == false) {
            return $this->failure($this->modx->lexicon('resource_group_err_remove'));
        }
        $this->logManagerAction();
        return $this->success('',$this->resourceGroup);
    }

    public function logManagerAction() {
        $this->modx->logManagerAction('delete_resource_group','modResourceGroup',$this->resourceGroup->get('id'));
    }
}
return 'modResourceGroupRemoveProcessor';

Spamworldpro Mini