Project

General

Profile

Revision bf6fb0ee

Added by Assos Assos almost 6 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/ds/ds.info
13 13
files[] = tests/ds.forms.test
14 14
configure = admin/structure/ds
15 15

  
16
; Information added by Drupal.org packaging script on 2018-04-18
17
version = "7.x-2.15"
16
; Information added by Drupal.org packaging script on 2018-07-03
17
version = "7.x-2.16"
18 18
core = "7.x"
19 19
project = "ds"
20
datestamp = "1524068596"
20
datestamp = "1530614326"
drupal7/sites/all/modules/ds/ds.module
957 957
          return drupal_render($renderable_block);
958 958
          break;
959 959
        case DS_BLOCK_TITLE_CONTENT:
960
          if (isset($block->subject) && isset($block->content['#markup'])) {
961
            return '<h2 class="block-title">' . $block->subject . '</h2>' . $block->content['#markup'];
960
          if (isset($block->subject) && isset($block->content) && $block->content) {
961
            return '<h2 class="block-title">' . $block->subject . '</h2>' . drupal_render($block->content);
962 962
          }
963 963
          break;
964 964
        case DS_BLOCK_CONTENT:
965
          if (isset($block->content['#markup'])) {
966
            return $block->content['#markup'];
965
          if (isset($block->content) && $block->content) {
966
            return drupal_render($block->content);
967 967
          }
968 968
          break;
969 969
      }
drupal7/sites/all/modules/ds/modules/ds_devel/ds_devel.info
5 5
dependencies[] = ds
6 6
dependencies[] = devel
7 7

  
8
; Information added by Drupal.org packaging script on 2018-04-18
9
version = "7.x-2.15"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-2.16"
10 10
core = "7.x"
11 11
project = "ds"
12
datestamp = "1524068596"
12
datestamp = "1530614326"
drupal7/sites/all/modules/ds/modules/ds_extras/ds_extras.info
5 5
dependencies[] = ds
6 6
configure = admin/structure/ds/list/extras
7 7

  
8
; Information added by Drupal.org packaging script on 2018-04-18
9
version = "7.x-2.15"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-2.16"
10 10
core = "7.x"
11 11
project = "ds"
12
datestamp = "1524068596"
12
datestamp = "1530614326"
drupal7/sites/all/modules/ds/modules/ds_format/ds_format.info
5 5
dependencies[] = ds
6 6
configure = admin/structure/ds/list/extras
7 7

  
8
; Information added by Drupal.org packaging script on 2018-04-18
9
version = "7.x-2.15"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-2.16"
10 10
core = "7.x"
11 11
project = "ds"
12
datestamp = "1524068596"
12
datestamp = "1530614326"
drupal7/sites/all/modules/ds/modules/ds_forms/ds_forms.info
4 4
package = "Display Suite"
5 5
dependencies[] = ds
6 6

  
7
; Information added by Drupal.org packaging script on 2018-04-18
8
version = "7.x-2.15"
7
; Information added by Drupal.org packaging script on 2018-07-03
8
version = "7.x-2.16"
9 9
core = "7.x"
10 10
project = "ds"
11
datestamp = "1524068596"
11
datestamp = "1530614326"
drupal7/sites/all/modules/ds/modules/ds_search/ds_search.info
5 5
dependencies[] = ds
6 6
configure = admin/structure/ds/list/search
7 7

  
8
; Information added by Drupal.org packaging script on 2018-04-18
9
version = "7.x-2.15"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-2.16"
10 10
core = "7.x"
11 11
project = "ds"
12
datestamp = "1524068596"
12
datestamp = "1530614326"
drupal7/sites/all/modules/ds/modules/ds_ui/ds_ui.info
4 4
package = "Display Suite"
5 5
dependencies[] = ds
6 6

  
7
; Information added by Drupal.org packaging script on 2018-04-18
8
version = "7.x-2.15"
7
; Information added by Drupal.org packaging script on 2018-07-03
8
version = "7.x-2.16"
9 9
core = "7.x"
10 10
project = "ds"
11
datestamp = "1524068596"
11
datestamp = "1530614326"
drupal7/sites/all/modules/ds/tests/ds_exportables_test/ds_exportables_test.info
4 4
core = 7.x
5 5
hidden = TRUE
6 6

  
7
; Information added by Drupal.org packaging script on 2018-04-18
8
version = "7.x-2.15"
7
; Information added by Drupal.org packaging script on 2018-07-03
8
version = "7.x-2.16"
9 9
core = "7.x"
10 10
project = "ds"
11
datestamp = "1524068596"
11
datestamp = "1530614326"
drupal7/sites/all/modules/ds/tests/ds_test.info
5 5
dependencies[] = ds_extras
6 6
hidden = TRUE
7 7

  
8
; Information added by Drupal.org packaging script on 2018-04-18
9
version = "7.x-2.15"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-2.16"
10 10
core = "7.x"
11 11
project = "ds"
12
datestamp = "1524068596"
12
datestamp = "1530614326"
drupal7/sites/all/modules/uuid/uuid.info
7 7
dependencies[] = node
8 8
dependencies[] = user
9 9

  
10
; Information added by Drupal.org packaging script on 2017-04-27
11
version = "7.x-1.0"
10
; Information added by Drupal.org packaging script on 2018-07-03
11
version = "7.x-1.1"
12 12
core = "7.x"
13 13
project = "uuid"
14
datestamp = "1493291958"
15

  
14
datestamp = "1530614937"
drupal7/sites/all/modules/uuid/uuid_path/uuid_path.info
5 5
dependencies[] = uuid
6 6

  
7 7

  
8
; Information added by Drupal.org packaging script on 2017-04-27
9
version = "7.x-1.0"
8
; Information added by Drupal.org packaging script on 2018-07-03
9
version = "7.x-1.1"
10 10
core = "7.x"
11 11
project = "uuid"
12
datestamp = "1493291958"
13

  
12
datestamp = "1530614937"
drupal7/sites/all/modules/uuid/uuid_services/uuid_services.file_services.test
1
<?php
2

  
3
/**
4
 * @file
5
 * Test the UUID File Services integration.
6
 */
7

  
8
 /**
9
  * Test the UUID File Services integration.
10
  */
11
class UuidFileServicesTest extends ServicesWebTestCase {
12

  
13
  protected $priviledgedUser = NULL;
14

  
15
  protected $endpoint = NULL;
16

  
17
  /**
18
   * Implementation of getInfo().
19
   */
20
  public static function getInfo() {
21
    return array(
22
      'name' => 'UUID File Services tests',
23
      'description' => 'Test the file services resource UUID methods and actions.',
24
      'group' => 'UUID',
25
    );
26
  }
27

  
28
  /**
29
   * Implementation of setUp().
30
   */
31
  public function setUp() {
32
    parent::setUp(
33
      'ctools',
34
      'services',
35
      'rest_server',
36
      'uuid_services',
37
      'entity',
38
      'file',
39
      'field',
40
      'file_entity'
41
    );
42
    $this->endpoint = $this->saveNewEndpoint();
43

  
44
    variable_set('file_entity_default_allowed_extensions', 'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm');
45
  }
46

  
47
  /**
48
   * {@inheritdoc}
49
   */
50
  public function saveNewEndpoint() {
51
    $edit = $this->populateEndpointFAPI();
52
    $endpoint = new stdClass();
53
    $endpoint->disabled = FALSE;
54
    $endpoint->api_version = 3;
55
    $endpoint->name = $edit['name'];
56
    $endpoint->server = $edit['server'];
57
    $endpoint->path = $edit['path'];
58
    $endpoint->authentication = array(
59
      'services' => 'services',
60
    );
61
    $endpoint->server_settings = array(
62
      'formatters' => array(
63
        'json' => TRUE,
64
        'bencode' => TRUE,
65
        'rss' => TRUE,
66
        'plist' => TRUE,
67
        'xmlplist' => TRUE,
68
        'php' => TRUE,
69
        'yaml' => TRUE,
70
        'jsonp' => FALSE,
71
        'xml' => FALSE,
72
      ),
73
      'parsers' => array(
74
        'application/x-yaml' => TRUE,
75
        'application/json' => TRUE,
76
        'application/vnd.php.serialized' => TRUE,
77
        'application/plist' => TRUE,
78
        'application/plist+xml' => TRUE,
79
        'application/x-www-form-urlencoded' => TRUE,
80
        'multipart/form-data' => TRUE,
81
      ),
82
    );
83
    $endpoint->resources = array(
84
      'file' => array(
85
        'operations' => array(
86
          'retrieve' => array(
87
            'enabled' => '1',
88
          ),
89
          'delete' => array(
90
            'enabled' => '1',
91
          ),
92
          'index' => array(
93
            'enabled' => '1',
94
          ),
95
          'update' => array(
96
            'enabled' => '1',
97
          ),
98
        ),
99
        'actions' => array(
100
          'create_raw' => array(
101
            'enabled' => '1',
102
          ),
103
        ),
104
      ),
105
    );
106
    $endpoint->debug = 1;
107
    $endpoint->export_type = FALSE;
108
    services_endpoint_save($endpoint);
109
    $endpoint = services_endpoint_load($endpoint->name);
110
    $this->assertTrue($endpoint->name == $edit['name'], 'Endpoint successfully created');
111
    return $endpoint;
112
  }
113

  
114
  /**
115
   * Tests file creation.
116
   */
117
  public function testFileUpdate() {
118
    $this->privilegedUser = $this->drupalCreateUser(array('create files'));
119
    $this->drupalLogin($this->privilegedUser);
120

  
121
    // Get a test file.
122
    $testfiles = $this->drupalGetTestFiles('php');
123
    $testfile = current($testfiles);
124

  
125
    // Setup file to be created.
126
    $filepath = file_default_scheme() . '://' . rand() . '/' . rand() . '/' . $testfile->filename;
127
    $file_data = array(
128
      'uid' => '0',
129
      'filesize' => filesize($testfile->uri),
130
      'filename' => $testfile->filename,
131
      'filepath' => $filepath,
132
      'file' => base64_encode(file_get_contents($testfile->uri)),
133
      'uuid' => 'ee26fe5d-f781-4a38-bfe0-8bb350b90073',
134
      'type' => 'image',
135
      'filemime' => 'text/plain',
136
      'uri' => $testfile->uri,
137
    );
138

  
139
    $response = $this->servicesPut($this->endpoint->path . '/file/create', $file_data);
140

  
141
    // Get the saved file's extension.
142
    $file = file_load($response['body']->fid);
143
    $name = explode('.', $file->filename);
144
    $last = array_pop($name);
145
    $extension = strtolower($last);
146

  
147
    $this->assertNotEqual('php', $extension, 'File was not created with a "php" extension.', 'UUID: File Create');
148
  }
149

  
150
}
drupal7/sites/all/modules/uuid/uuid_services/uuid_services.info
7 7
dependencies[] = uuid
8 8
dependencies[] = entity
9 9

  
10
; Information added by Drupal.org packaging script on 2017-04-27
11
version = "7.x-1.0"
10
; Information added by Drupal.org packaging script on 2018-07-03
11
version = "7.x-1.1"
12 12
core = "7.x"
13 13
project = "uuid"
14
datestamp = "1493291958"
15

  
14
datestamp = "1530614937"
drupal7/sites/all/modules/uuid/uuid_services/uuid_services.module
147 147
      $entity = (object) $entity;
148 148
    }
149 149
    $entity->uuid_services = TRUE;
150
    // Sanitize file user input.
151
    if ($entity_type == 'file') {
152
      $entity->filename = _services_file_check_name_extension($entity->filename);
153
      $entity->uri = _services_file_check_destination_uri($entity->uri);
154
      if (!empty($entity->filepath)) {
155
        $entity->filepath = _services_file_check_destination($entity->filepath);
156
      }
157
    }
150 158
    entity_uuid_save($entity_type, $entity);
151 159
    return $entity;
152 160
  }
drupal7/sites/all/modules/uuid/uuid_services_example/uuid_services_example.info
11 11
features[features_api][] = api:2
12 12
features[services_endpoint][] = uuid_services_example
13 13

  
14
; Information added by Drupal.org packaging script on 2017-04-27
15
version = "7.x-1.0"
14
; Information added by Drupal.org packaging script on 2018-07-03
15
version = "7.x-1.1"
16 16
core = "7.x"
17 17
project = "uuid"
18
datestamp = "1493291958"
19

  
18
datestamp = "1530614937"

Also available in: Unified diff