protected function actionListFile()
    {
        list($selected, $action) = $this->getPostedAction();

        $disk = $db = 0;

        foreach ($selected as $file_id) {
            if ($action === 'delete' && $this->access('file_delete')) {
                $this->file->deleteAll($file_id, $db, $disk);
            }
        }

        if (!empty($selected)) {
            $severity = $disk && $disk == $db ? 'success' : 'warning';
            $message = $this->text('Deleted from database: %db, disk: %disk', array('%db' => $db, '%disk' => $disk));
            $this->setMessage($message, $severity);
        }
    }
protected function actionListFile()
    {
        list($selected, $action) = $this->getPostedAction();

        $disk = $db = 0;

        foreach ($selected as $file_id) {
            if ($action === 'delete' && $this->access('file_delete')) {
                $this->file->deleteAll($file_id, $db, $disk);
            }
        }

        if (!empty($selected)) {
            $severity = $disk && $disk == $db ? 'success' : 'warning';
            $message = $this->text('Deleted from database: %db, disk: %disk', array('%db' => $db, '%disk' => $disk));
            $this->setMessage($message, $severity);
        }
    }
protected function actionListFile ( ) { list ( $ selected , $ action ) = $ this -> getPostedAction ( ) ; $ disk = $ db = 0 ; foreach ( $ selected as $ file_id ) { if ( $ action === 'delete' && $ this -> access ( 'file_delete' ) ) { $ this -> file -> deleteAll ( $ file_id , $ db , $ disk ) ; } } if ( ! empty ( $ selected ) ) { $ severity = $ disk && $ disk == $ db ? 'success' : 'warning' ; $ message = $ this -> text ( 'Deleted from database: %db, disk: %disk' , array ( '%db' => $ db , '%disk' => $ disk ) ) ; $ this -> setMessage ( $ message , $ severity ) ; } }
Applies an action to the selected files
Applies an action to the selected files