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/system/settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/processors/system/settings/remove.class.php
<?php
/**
 * Remove a system setting
 *
 * @param string $key The key of the setting
 *
 * @package modx
 * @subpackage processors.system.settings
 */
class modSystemSettingsRemoveProcessor extends modObjectRemoveProcessor {
    public $classKey = 'modSystemSetting';
    public $languageTopics = array('setting','namespace');
    public $permission = 'settings';
    public $objectType = 'setting';
    public $primaryKeyField = 'key';

    public function afterRemove() {
        $this->removeRelatedLexiconEntries();
        $this->modx->reloadConfig();
        return true;
    }

    /**
     * Remove all Lexicon Entries related to the setting
     * @return void
     */
    public function removeRelatedLexiconEntries() {
        /** @var modLexiconEntry $entry */
        $entry = $this->modx->getObject('modLexiconEntry',array(
            'namespace' => $this->object->get('namespace'),
            'name' => 'setting_'.$this->object->get('key'),
        ));
        if (!empty($entry)) {
            $entry->remove();
        }

        /** @var modLexiconEntry $description */
        $description = $this->modx->getObject('modLexiconEntry',array(
            'namespace' => $this->object->get('namespace'),
            'name' => 'setting_'.$this->object->get('key').'_desc',
        ));
        if (!empty($description)) {
            $description->remove();
        }
    }
}
return 'modSystemSettingsRemoveProcessor';

Spamworldpro Mini