original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Applies an action to the selected files
docstring_tokens: Applies an action to the selected files