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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/processors/system/dashboard/removemultiple.class.php
<?php
/**
 * Removes multiple Dashboards
 *
 * @var modX $modx
 * @var array $scriptProperties
 * @var modProcessor $this
 *
 * @package modx
 * @subpackage processors.system.dashboard
 */
class modDashboardRemoveMultipleProcessor extends modProcessor {
    public function checkPermissions() {
        return $this->modx->hasPermission('dashboards');
    }

    public function getLanguageTopics() {
        return array('dashboards');
    }

    public function process() {
        $dashboards = $this->getProperty('dashboards',null);

        if (empty($dashboards)) {
            return $this->failure($this->modx->lexicon('dashboard_err_ns'));
        }

        $dashboardIds = is_array($dashboards) ? $dashboards : explode(',',$dashboards);
        foreach ($dashboardIds as $dashboardId) {
            /** @var modDashboard $dashboard */
            $dashboard = $this->modx->getObject('modDashboard',$dashboardId);
            if (empty($dashboard)) { continue; }

            if ($dashboard->remove() == false) {
                $this->modx->log(modX::LOG_LEVEL_ERROR,$this->modx->lexicon('dashboard_err_remove'));
                continue;
            }
            $this->modx->logManagerAction('dashboard_remove','modDashboard',$dashboard->get('id'));
        }

        return $this->success();
    }
}
return 'modDashboardRemoveMultipleProcessor';

Spamworldpro Mini