Révision 5587145e
Ajouté par Assos Assos il y a presque 7 ans
drupal7/.htaccess | ||
---|---|---|
3 | 3 |
# |
4 | 4 |
|
5 | 5 |
# Protect files and directories from prying eyes. |
6 |
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> |
|
7 |
Order allow,deny |
|
6 |
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> |
|
7 |
<IfModule mod_authz_core.c> |
|
8 |
Require all denied |
|
9 |
</IfModule> |
|
10 |
<IfModule !mod_authz_core.c> |
|
11 |
Order allow,deny |
|
12 |
</IfModule> |
|
8 | 13 |
</FilesMatch> |
9 | 14 |
|
10 | 15 |
# Don't show directory listings for URLs which map to a directory. |
... | ... | |
80 | 85 |
# If you do not have mod_rewrite installed, you should remove these |
81 | 86 |
# directories from your webroot or otherwise protect them from being |
82 | 87 |
# downloaded. |
83 |
RewriteRule "(^|/)\." - [F]
|
|
88 |
RewriteRule "/\.|^\.(?!well-known/)" - [F]
|
|
84 | 89 |
|
85 | 90 |
# If your site can be accessed both with and without the 'www.' prefix, you |
86 | 91 |
# can use one of the following settings to redirect users to your preferred |
drupal7/CHANGELOG.txt | ||
---|---|---|
1 | 1 |
|
2 |
Drupal 7.56, 2017-06-21 |
|
3 |
----------------------- |
|
4 |
- Fixed security issues (access bypass). See SA-CORE-2017-003. |
|
5 |
|
|
6 |
Drupal 7.55, 2017-06-07 |
|
7 |
----------------------- |
|
8 |
- Fixed incompatibility with PHP versions 7.0.19 and 7.1.5 due to duplicate |
|
9 |
DATE_RFC7231 definition. |
|
10 |
- Made Drupal core pass all automated tests on PHP 7.1. |
|
11 |
- Allowed services such as Let's Encrypt to work with Drupal on Apache, by |
|
12 |
making Drupal's .htaccess file allow access to the .well-known directory |
|
13 |
defined by RFC 5785. |
|
14 |
- Made new Drupal sites work correctly on Apache 2.4 when the mod_access_compat |
|
15 |
Apache module is disabled. |
|
16 |
- Fixed Drupal's URL-generating functions to always encode '[' and ']' so that |
|
17 |
the URLs will pass HTML5 validation. |
|
18 |
- Various additional bug fixes. |
|
19 |
- Various API documentation improvements. |
|
20 |
- Additional automated test coverage. |
|
21 |
|
|
2 | 22 |
Drupal 7.54, 2017-02-01 |
3 | 23 |
----------------------- |
4 | 24 |
- Modules are now able to define theme engines (API addition: |
drupal7/includes/bootstrap.inc | ||
---|---|---|
8 | 8 |
/** |
9 | 9 |
* The current system version. |
10 | 10 |
*/ |
11 |
define('VERSION', '7.54');
|
|
11 |
define('VERSION', '7.56');
|
|
12 | 12 |
|
13 | 13 |
/** |
14 | 14 |
* Core API compatibility. |
... | ... | |
254 | 254 |
* http://tools.ietf.org/html/rfc7231#section-7.1.1.1 |
255 | 255 |
* |
256 | 256 |
* Example: Sun, 06 Nov 1994 08:49:37 GMT |
257 |
* |
|
258 |
* This constant was introduced in PHP 7.0.19 and PHP 7.1.5 but needs to be |
|
259 |
* defined by Drupal for earlier PHP versions. |
|
257 | 260 |
*/ |
258 |
define('DATE_RFC7231', 'D, d M Y H:i:s \G\M\T'); |
|
261 |
if (!defined('DATE_RFC7231')) { |
|
262 |
define('DATE_RFC7231', 'D, d M Y H:i:s \G\M\T'); |
|
263 |
} |
|
259 | 264 |
|
260 | 265 |
/** |
261 | 266 |
* Provides a caching wrapper to be used in place of large array structures. |
drupal7/includes/common.inc | ||
---|---|---|
487 | 487 |
$params = array(); |
488 | 488 |
|
489 | 489 |
foreach ($query as $key => $value) { |
490 |
$key = ($parent ? $parent . '[' . rawurlencode($key) . ']' : rawurlencode($key));
|
|
490 |
$key = $parent ? $parent . rawurlencode('[' . $key . ']') : rawurlencode($key);
|
|
491 | 491 |
|
492 | 492 |
// Recurse into children. |
493 | 493 |
if (is_array($value)) { |
drupal7/includes/database/pgsql/database.inc | ||
---|---|---|
11 | 11 |
*/ |
12 | 12 |
|
13 | 13 |
/** |
14 |
* The name by which to obtain a lock for retrive the next insert id.
|
|
14 |
* The name by which to obtain a lock for retrieving the next insert id.
|
|
15 | 15 |
*/ |
16 | 16 |
define('POSTGRESQL_NEXTID_LOCK', 1000); |
17 | 17 |
|
... | ... | |
55 | 55 |
$connection_options['pdo'] += array( |
56 | 56 |
// Prepared statements are most effective for performance when queries |
57 | 57 |
// are recycled (used several times). However, if they are not re-used, |
58 |
// prepared statements become ineffecient. Since most of Drupal's
|
|
58 |
// prepared statements become inefficient. Since most of Drupal's
|
|
59 | 59 |
// prepared queries are not re-used, it should be faster to emulate |
60 | 60 |
// the preparation than to actually ready statements for re-use. If in |
61 | 61 |
// doubt, reset to FALSE and measure performance. |
... | ... | |
175 | 175 |
} |
176 | 176 |
|
177 | 177 |
/** |
178 |
* Retrive a the next id in a sequence.
|
|
178 |
* Retrieve the next id in a sequence.
|
|
179 | 179 |
* |
180 | 180 |
* PostgreSQL has built in sequences. We'll use these instead of inserting |
181 | 181 |
* and updating a sequences table. |
182 | 182 |
*/ |
183 | 183 |
public function nextId($existing = 0) { |
184 | 184 |
|
185 |
// Retrive the name of the sequence. This information cannot be cached |
|
185 |
// Retrieve the name of the sequence. This information cannot be cached
|
|
186 | 186 |
// because the prefix may change, for example, like it does in simpletests. |
187 | 187 |
$sequence_name = $this->makeSequenceName('sequences', 'value'); |
188 | 188 |
|
... | ... | |
194 | 194 |
} |
195 | 195 |
|
196 | 196 |
// PostgreSQL advisory locks are simply locks to be used by an |
197 |
// application such as Drupal. This will prevent other Drupal proccesses
|
|
197 |
// application such as Drupal. This will prevent other Drupal processes |
|
198 | 198 |
// from altering the sequence while we are. |
199 | 199 |
$this->query("SELECT pg_advisory_lock(" . POSTGRESQL_NEXTID_LOCK . ")"); |
200 | 200 |
|
... | ... | |
209 | 209 |
// Reset the sequence to a higher value than the existing id. |
210 | 210 |
$this->query("ALTER SEQUENCE " . $sequence_name . " RESTART WITH " . ($existing + 1)); |
211 | 211 |
|
212 |
// Retrive the next id. We know this will be as high as we want it. |
|
212 |
// Retrieve the next id. We know this will be as high as we want it.
|
|
213 | 213 |
$id = $this->query("SELECT nextval('" . $sequence_name . "')")->fetchField(); |
214 | 214 |
|
215 | 215 |
$this->query("SELECT pg_advisory_unlock(" . POSTGRESQL_NEXTID_LOCK . ")"); |
drupal7/includes/database/pgsql/install.inc | ||
---|---|---|
165 | 165 |
LANGUAGE \'sql\'' |
166 | 166 |
); |
167 | 167 |
|
168 |
// Using || to concatenate in Drupal is not recommeneded because there are
|
|
168 |
// Using || to concatenate in Drupal is not recommended because there are |
|
169 | 169 |
// database drivers for Drupal that do not support the syntax, however |
170 | 170 |
// they do support CONCAT(item1, item2) which we can replicate in |
171 | 171 |
// PostgreSQL. PostgreSQL requires the function to be defined for each |
drupal7/includes/database/pgsql/select.inc | ||
---|---|---|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
// If a table loads all fields, it can not be added again. It would |
83 |
// result in an ambigious alias error because that field would be loaded
|
|
83 |
// result in an ambiguous alias error because that field would be loaded
|
|
84 | 84 |
// twice: Once through table_alias.* and once directly. If the field |
85 | 85 |
// actually belongs to a different table, it must be added manually. |
86 | 86 |
foreach ($this->tables as $table) { |
... | ... | |
90 | 90 |
} |
91 | 91 |
|
92 | 92 |
// If $field contains an characters which are not allowed in a field name |
93 |
// it is considered an expression, these can't be handeld automatically
|
|
93 |
// it is considered an expression, these can't be handled automatically
|
|
94 | 94 |
// either. |
95 | 95 |
if ($this->connection->escapeField($field) != $field) { |
96 | 96 |
return $return; |
drupal7/includes/database/query.inc | ||
---|---|---|
845 | 845 |
/** |
846 | 846 |
* Executes the DELETE query. |
847 | 847 |
* |
848 |
* @return |
|
849 |
* The return value is dependent on the database connection.
|
|
848 |
* @return int
|
|
849 |
* The number of rows affected by the delete query.
|
|
850 | 850 |
*/ |
851 | 851 |
public function execute() { |
852 | 852 |
$values = array(); |
... | ... | |
1242 | 1242 |
* MergeQuery::updateFields() and MergeQuery::insertFields() needs to be called |
1243 | 1243 |
* instead. MergeQuery::fields() can also be called which calls both of these |
1244 | 1244 |
* methods as the common case is to use the same column-value pairs for both |
1245 |
* INSERT and UPDATE. However, this is not mandatory. Another convinient
|
|
1245 |
* INSERT and UPDATE. However, this is not mandatory. Another convenient
|
|
1246 | 1246 |
* wrapper is MergeQuery::key() which adds the same column-value pairs to the |
1247 | 1247 |
* condition and the INSERT query part. |
1248 | 1248 |
* |
drupal7/includes/database/schema.inc | ||
---|---|---|
164 | 164 |
* @see drupal_install_schema() |
165 | 165 |
*/ |
166 | 166 |
|
167 |
/** |
|
168 |
* Base class for database schema definitions. |
|
169 |
*/ |
|
167 | 170 |
abstract class DatabaseSchema implements QueryPlaceholderInterface { |
168 | 171 |
|
169 | 172 |
protected $connection; |
... | ... | |
291 | 294 |
protected function buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) { |
292 | 295 |
$info = $this->connection->getConnectionOptions(); |
293 | 296 |
|
294 |
// Retrive the table name and schema |
|
297 |
// Retrieve the table name and schema
|
|
295 | 298 |
$table_info = $this->getPrefixInfo($table_name, $add_prefix); |
296 | 299 |
|
297 | 300 |
$condition = new DatabaseCondition('AND'); |
drupal7/includes/database/sqlite/query.inc | ||
---|---|---|
99 | 99 |
|
100 | 100 |
/** |
101 | 101 |
* SQLite specific implementation of DeleteQuery. |
102 |
* |
|
103 |
* When the WHERE is omitted from a DELETE statement and the table being deleted |
|
104 |
* has no triggers, SQLite uses an optimization to erase the entire table content |
|
105 |
* without having to visit each row of the table individually. |
|
106 |
* |
|
107 |
* Prior to SQLite 3.6.5, SQLite does not return the actual number of rows deleted |
|
108 |
* by that optimized "truncate" optimization. |
|
109 | 102 |
*/ |
110 | 103 |
class DeleteQuery_sqlite extends DeleteQuery { |
111 | 104 |
public function execute() { |
105 |
// When the WHERE is omitted from a DELETE statement and the table being |
|
106 |
// deleted has no triggers, SQLite uses an optimization to erase the entire |
|
107 |
// table content without having to visit each row of the table individually. |
|
108 |
// Prior to SQLite 3.6.5, SQLite does not return the actual number of rows |
|
109 |
// deleted by that optimized "truncate" optimization. But we want to return |
|
110 |
// the number of rows affected, so we calculate it directly. |
|
112 | 111 |
if (!count($this->condition)) { |
113 | 112 |
$total_rows = $this->connection->query('SELECT COUNT(*) FROM {' . $this->connection->escapeTable($this->table) . '}')->fetchField(); |
114 | 113 |
parent::execute(); |
drupal7/includes/database/sqlite/schema.inc | ||
---|---|---|
244 | 244 |
// database. So the syntax '...RENAME TO database.table' would fail. |
245 | 245 |
// So we must determine the full table name here rather than surrounding |
246 | 246 |
// the table with curly braces incase the db_prefix contains a reference |
247 |
// to a database outside of our existsing database.
|
|
247 |
// to a database outside of our existing database. |
|
248 | 248 |
$info = $this->getPrefixInfo($new_name); |
249 | 249 |
$this->connection->query('ALTER TABLE {' . $table . '} RENAME TO ' . $info['table']); |
250 | 250 |
|
drupal7/includes/errors.inc | ||
---|---|---|
66 | 66 |
_drupal_log_error(array( |
67 | 67 |
'%type' => isset($types[$error_level]) ? $severity_msg : 'Unknown error', |
68 | 68 |
// The standard PHP error handler considers that the error messages |
69 |
// are HTML. We mimick this behavior here.
|
|
69 |
// are HTML. We mimic this behavior here. |
|
70 | 70 |
'!message' => filter_xss_admin($message), |
71 | 71 |
'%function' => $caller['function'], |
72 | 72 |
'%file' => $caller['file'], |
... | ... | |
114 | 114 |
return array( |
115 | 115 |
'%type' => get_class($exception), |
116 | 116 |
// The standard PHP exception handler considers that the exception message |
117 |
// is plain-text. We mimick this behavior here.
|
|
117 |
// is plain-text. We mimic this behavior here. |
|
118 | 118 |
'!message' => check_plain($message), |
119 | 119 |
'%function' => $caller['function'], |
120 | 120 |
'%file' => $caller['file'], |
... | ... | |
233 | 233 |
} |
234 | 234 |
else { |
235 | 235 |
// Display the message if the current error reporting level allows this type |
236 |
// of message to be displayed, and unconditionnaly in update.php.
|
|
236 |
// of message to be displayed, and unconditionally in update.php.
|
|
237 | 237 |
if (error_displayable($error)) { |
238 | 238 |
$class = 'error'; |
239 | 239 |
|
drupal7/includes/file.inc | ||
---|---|---|
535 | 535 |
EOF; |
536 | 536 |
|
537 | 537 |
if ($private) { |
538 |
$lines = "Deny from all\n\n" . $lines; |
|
538 |
$lines = <<<EOF |
|
539 |
# Deny all requests from Apache 2.4+. |
|
540 |
<IfModule mod_authz_core.c> |
|
541 |
Require all denied |
|
542 |
</IfModule> |
|
543 |
|
|
544 |
# Deny all requests from Apache 2.0-2.2. |
|
545 |
<IfModule !mod_authz_core.c> |
|
546 |
Deny from all |
|
547 |
</IfModule> |
|
548 |
EOF |
|
549 |
. "\n\n" . $lines; |
|
539 | 550 |
} |
540 | 551 |
|
541 | 552 |
return $lines; |
... | ... | |
889 | 900 |
*/ |
890 | 901 |
function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXISTS_RENAME) { |
891 | 902 |
$original_source = $source; |
892 |
$original_destination = $destination; |
|
893 | 903 |
|
894 | 904 |
// Assert that the source file actually exists. |
895 | 905 |
if (!file_exists($source)) { |
... | ... | |
1604 | 1614 |
|
1605 | 1615 |
// If we made it this far it's safe to record this file in the database. |
1606 | 1616 |
if ($file = file_save($file)) { |
1617 |
// Track non-public files in the session if they were uploaded by an |
|
1618 |
// anonymous user. This allows modules such as the File module to only |
|
1619 |
// grant view access to the specific anonymous user who uploaded the file. |
|
1620 |
// See file_file_download(). |
|
1621 |
// The 'file_public_schema' variable is used to allow other publicly |
|
1622 |
// accessible file schemes to be treated the same as the public:// scheme |
|
1623 |
// provided by Drupal core and to avoid adding unnecessary data to the |
|
1624 |
// session (and the resulting bypass of the page cache) in those cases. For |
|
1625 |
// security reasons, only schemes that are completely publicly accessible, |
|
1626 |
// with no download restrictions, should be added to this variable. See |
|
1627 |
// file_managed_file_value(). |
|
1628 |
if (!$user->uid && !in_array($destination_scheme, variable_get('file_public_schema', array('public')))) { |
|
1629 |
$_SESSION['anonymous_allowed_file_ids'][$file->fid] = $file->fid; |
|
1630 |
} |
|
1607 | 1631 |
// Add file to the cache. |
1608 | 1632 |
$upload_cache[$form_field_name] = $file; |
1609 | 1633 |
return $file; |
... | ... | |
2553 | 2577 |
* An associative array of headers, as expected by file_transfer(). |
2554 | 2578 |
*/ |
2555 | 2579 |
function file_get_content_headers($file) { |
2556 |
$name = mime_header_encode($file->filename); |
|
2557 | 2580 |
$type = mime_header_encode($file->filemime); |
2558 | 2581 |
|
2559 | 2582 |
return array( |
drupal7/misc/drupal.js | ||
---|---|---|
168 | 168 |
Drupal.formatString = function(str, args) { |
169 | 169 |
// Transform arguments before inserting them. |
170 | 170 |
for (var key in args) { |
171 |
switch (key.charAt(0)) { |
|
172 |
// Escaped only. |
|
173 |
case '@': |
|
174 |
args[key] = Drupal.checkPlain(args[key]); |
|
175 |
break; |
|
176 |
// Pass-through. |
|
177 |
case '!': |
|
178 |
break; |
|
179 |
// Escaped and placeholder. |
|
180 |
case '%': |
|
181 |
default: |
|
182 |
args[key] = Drupal.theme('placeholder', args[key]); |
|
183 |
break; |
|
171 |
if (args.hasOwnProperty(key)) { |
|
172 |
switch (key.charAt(0)) { |
|
173 |
// Escaped only. |
|
174 |
case '@': |
|
175 |
args[key] = Drupal.checkPlain(args[key]); |
|
176 |
break; |
|
177 |
// Pass-through. |
|
178 |
case '!': |
|
179 |
break; |
|
180 |
// Escaped and placeholder. |
|
181 |
default: |
|
182 |
args[key] = Drupal.theme('placeholder', args[key]); |
|
183 |
break; |
|
184 |
} |
|
184 | 185 |
} |
185 |
str = str.replace(key, args[key]); |
|
186 | 186 |
} |
187 |
return str; |
|
187 |
|
|
188 |
return Drupal.stringReplace(str, args, null); |
|
189 |
}; |
|
190 |
|
|
191 |
/** |
|
192 |
* Replace substring. |
|
193 |
* |
|
194 |
* The longest keys will be tried first. Once a substring has been replaced, |
|
195 |
* its new value will not be searched again. |
|
196 |
* |
|
197 |
* @param {String} str |
|
198 |
* A string with placeholders. |
|
199 |
* @param {Object} args |
|
200 |
* Key-value pairs. |
|
201 |
* @param {Array|null} keys |
|
202 |
* Array of keys from the "args". Internal use only. |
|
203 |
* |
|
204 |
* @return {String} |
|
205 |
* Returns the replaced string. |
|
206 |
*/ |
|
207 |
Drupal.stringReplace = function (str, args, keys) { |
|
208 |
if (str.length === 0) { |
|
209 |
return str; |
|
210 |
} |
|
211 |
|
|
212 |
// If the array of keys is not passed then collect the keys from the args. |
|
213 |
if (!$.isArray(keys)) { |
|
214 |
keys = []; |
|
215 |
for (var k in args) { |
|
216 |
if (args.hasOwnProperty(k)) { |
|
217 |
keys.push(k); |
|
218 |
} |
|
219 |
} |
|
220 |
|
|
221 |
// Order the keys by the character length. The shortest one is the first. |
|
222 |
keys.sort(function (a, b) { return a.length - b.length; }); |
|
223 |
} |
|
224 |
|
|
225 |
if (keys.length === 0) { |
|
226 |
return str; |
|
227 |
} |
|
228 |
|
|
229 |
// Take next longest one from the end. |
|
230 |
var key = keys.pop(); |
|
231 |
var fragments = str.split(key); |
|
232 |
|
|
233 |
if (keys.length) { |
|
234 |
for (var i = 0; i < fragments.length; i++) { |
|
235 |
// Process each fragment with a copy of remaining keys. |
|
236 |
fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); |
|
237 |
} |
|
238 |
} |
|
239 |
|
|
240 |
return fragments.join(args[key]); |
|
188 | 241 |
}; |
189 | 242 |
|
190 | 243 |
/** |
... | ... | |
251 | 304 |
* A translated string. |
252 | 305 |
*/ |
253 | 306 |
Drupal.formatPlural = function (count, singular, plural, args, options) { |
254 |
var args = args || {};
|
|
307 |
args = args || {}; |
|
255 | 308 |
args['@count'] = count; |
256 | 309 |
// Determine the index of the plural form. |
257 | 310 |
var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1); |
drupal7/modules/aggregator/aggregator.info | ||
---|---|---|
7 | 7 |
configure = admin/config/services/aggregator/settings |
8 | 8 |
stylesheets[all][] = aggregator.css |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/aggregator/aggregator.module | ||
---|---|---|
455 | 455 |
db_delete('aggregator_category') |
456 | 456 |
->condition('cid', $edit['cid']) |
457 | 457 |
->execute(); |
458 |
// Remove category from feeds. |
|
459 |
db_delete('aggregator_category_feed') |
|
460 |
->condition('cid', $edit['cid']) |
|
461 |
->execute(); |
|
462 |
// Remove category from feed items. |
|
463 |
db_delete('aggregator_category_item') |
|
464 |
->condition('cid', $edit['cid']) |
|
465 |
->execute(); |
|
458 | 466 |
// Make sure there is no active block for this category. |
459 | 467 |
if (module_exists('block')) { |
460 | 468 |
db_delete('block') |
drupal7/modules/aggregator/aggregator.test | ||
---|---|---|
418 | 418 |
} |
419 | 419 |
|
420 | 420 |
/** |
421 |
* Creates a feed and makes sure you can add more than one category to it.
|
|
421 |
* Creates a feed and makes sure you can add/delete categories to it.
|
|
422 | 422 |
*/ |
423 | 423 |
function testCategorizeFeed() { |
424 | 424 |
|
... | ... | |
448 | 448 |
// Assert the feed has two categories. |
449 | 449 |
$this->getFeedCategories($db_feed); |
450 | 450 |
$this->assertEqual(count($db_feed->categories), 2, 'Feed has 2 categories'); |
451 |
|
|
452 |
// Use aggregator_save_feed() to delete a category. |
|
453 |
$category = reset($categories); |
|
454 |
aggregator_save_category(array('cid' => $category->cid)); |
|
455 |
|
|
456 |
// Assert that category is deleted. |
|
457 |
$db_category = db_query("SELECT COUNT(*) FROM {aggregator_category} WHERE cid = :cid", array(':cid' => $category->cid))->fetchField(); |
|
458 |
$this->assertFalse($db_category, format_string('The category %title has been deleted.', array('%title' => $category->title))); |
|
459 |
|
|
460 |
// Assert that category has been removed from feed. |
|
461 |
$categorized_feeds = db_query("SELECT COUNT(*) FROM {aggregator_category_feed} WHERE cid = :cid", array(':cid' => $category->cid))->fetchField(); |
|
462 |
$this->assertFalse($categorized_feeds, format_string('The category %title has been removed from feed %feed_title.', array('%title' => $category->title, '%feed_title' => $feed['title']))); |
|
463 |
|
|
464 |
// Assert that no broken links (associated with the deleted category) |
|
465 |
// appear on one of the other category pages. |
|
466 |
$this->createSampleNodes(); |
|
467 |
$this->drupalGet('admin/config/services/aggregator'); |
|
468 |
$this->clickLink('update items'); |
|
469 |
$categories = $this->getCategories(); |
|
470 |
$category = reset($categories); |
|
471 |
$this->drupalGet('aggregator/categories/' . $category->cid); |
|
472 |
global $base_path; |
|
473 |
$this->assertNoRaw('<a href="' . $base_path . 'aggregator/categories/"></a>,'); |
|
451 | 474 |
} |
475 |
|
|
452 | 476 |
} |
453 | 477 |
|
454 | 478 |
/** |
... | ... | |
685 | 709 |
} |
686 | 710 |
} |
687 | 711 |
|
712 |
// Delete category from feed items when category is deleted. |
|
713 |
$cid = reset($feed->categories); |
|
714 |
$categories = $this->getCategories(); |
|
715 |
$category_title = $categories[$cid]->title; |
|
716 |
|
|
717 |
// Delete category. |
|
718 |
aggregator_save_category(array('cid' => $cid)); |
|
719 |
|
|
720 |
// Assert category has been removed from feed items. |
|
721 |
$categorized_count = db_query("SELECT COUNT(*) FROM {aggregator_category_item} WHERE cid = :cid", array(':cid' => $cid))->fetchField(); |
|
722 |
$this->assertFalse($categorized_count, format_string('The category %title has been removed from feed items.', array('%title' => $category_title))); |
|
688 | 723 |
// Delete feed. |
689 | 724 |
$this->deleteFeed($feed); |
690 | 725 |
} |
726 |
|
|
691 | 727 |
} |
692 | 728 |
|
693 | 729 |
/** |
drupal7/modules/aggregator/tests/aggregator_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/block/block.info | ||
---|---|---|
6 | 6 |
files[] = block.test |
7 | 7 |
configure = admin/structure/block |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/block/block.module | ||
---|---|---|
432 | 432 |
drupal_alter('block_info', $current_blocks, $theme, $code_blocks); |
433 | 433 |
foreach ($current_blocks as $module => $module_blocks) { |
434 | 434 |
foreach ($module_blocks as $delta => $block) { |
435 |
if (!isset($block['pages'])) { |
|
436 |
// {block}.pages is type 'text', so it cannot have a |
|
437 |
// default value, and not null, so we need to provide |
|
438 |
// value if the module did not. |
|
439 |
$block['pages'] = ''; |
|
440 |
} |
|
441 |
// Make sure weight is set. |
|
442 |
if (!isset($block['weight'])) { |
|
443 |
$block['weight'] = 0; |
|
444 |
} |
|
435 |
// Make sure certain attributes are set. |
|
436 |
$block += array( |
|
437 |
'pages' => '', |
|
438 |
'weight' => 0, |
|
439 |
'status' => 0, |
|
440 |
); |
|
441 |
// Check for active blocks in regions that are not available. |
|
445 | 442 |
if (!empty($block['region']) && $block['region'] != BLOCK_REGION_NONE && !isset($regions[$block['region']]) && $block['status'] == 1) { |
446 | 443 |
drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block['info'], '%region' => $block['region'])), 'warning'); |
447 | 444 |
// Disabled modules are moved into the BLOCK_REGION_NONE later so no |
448 | 445 |
// need to move the block to another region. |
449 | 446 |
$block['status'] = 0; |
450 | 447 |
} |
451 |
// Set region to none if not enabled and make sure status is set.
|
|
448 |
// Set region to none if not enabled. |
|
452 | 449 |
if (empty($block['status'])) { |
453 | 450 |
$block['status'] = 0; |
454 | 451 |
$block['region'] = BLOCK_REGION_NONE; |
drupal7/modules/block/tests/block_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/block/tests/themes/block_test_theme/block_test_theme.info | ||
---|---|---|
13 | 13 |
regions[highlighted] = Highlighted |
14 | 14 |
regions[help] = Help |
15 | 15 |
|
16 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
17 |
version = "7.54"
|
|
16 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
17 |
version = "7.56"
|
|
18 | 18 |
project = "drupal" |
19 |
datestamp = "1485986921"
|
|
19 |
datestamp = "1498069849"
|
|
20 | 20 |
|
drupal7/modules/blog/blog.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = blog.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/book/book.info | ||
---|---|---|
7 | 7 |
configure = admin/content/book/settings |
8 | 8 |
stylesheets[all][] = book.css |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/color/color.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = color.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/comment/comment.info | ||
---|---|---|
9 | 9 |
configure = admin/content/comment |
10 | 10 |
stylesheets[all][] = comment.css |
11 | 11 |
|
12 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
13 |
version = "7.54"
|
|
12 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
13 |
version = "7.56"
|
|
14 | 14 |
project = "drupal" |
15 |
datestamp = "1485986921"
|
|
15 |
datestamp = "1498069849"
|
|
16 | 16 |
|
drupal7/modules/contact/contact.info | ||
---|---|---|
6 | 6 |
files[] = contact.test |
7 | 7 |
configure = admin/structure/contact |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/contact/contact.module | ||
---|---|---|
234 | 234 |
* Implements hook_user_presave(). |
235 | 235 |
*/ |
236 | 236 |
function contact_user_presave(&$edit, $account, $category) { |
237 |
$edit['data']['contact'] = isset($edit['contact']) ? $edit['contact'] : variable_get('contact_default_status', 1); |
|
237 |
if (isset($edit['contact'])) { |
|
238 |
// Set new value. |
|
239 |
$edit['data']['contact'] = $edit['contact']; |
|
240 |
} |
|
241 |
elseif (!isset($account->data['contact'])) { |
|
242 |
// Use default if none has been set. |
|
243 |
$edit['data']['contact'] = variable_get('contact_default_status', 1); |
|
244 |
} |
|
238 | 245 |
} |
239 | 246 |
|
240 | 247 |
/** |
drupal7/modules/contact/contact.test | ||
---|---|---|
346 | 346 |
$this->drupalGet('user/' . $this->contact_user->uid . '/contact'); |
347 | 347 |
$this->assertResponse(200); |
348 | 348 |
|
349 |
// Test that users can disable their contact form. |
|
350 |
$this->drupalLogin($this->contact_user); |
|
351 |
$edit = array('contact' => FALSE); |
|
352 |
$this->drupalPost('user/' . $this->contact_user->uid . '/edit', $edit, 'Save'); |
|
353 |
$this->drupalLogout(); |
|
354 |
$this->drupalGet('user/' . $this->contact_user->uid . '/contact'); |
|
355 |
$this->assertResponse(403); |
|
356 |
|
|
357 |
// Test that user's contact status stays disabled when saving. |
|
358 |
$contact_user_temp = user_load($this->contact_user->uid, TRUE); |
|
359 |
user_save($contact_user_temp); |
|
360 |
$this->drupalGet('user/' . $this->contact_user->uid . '/contact'); |
|
361 |
$this->assertResponse(403); |
|
362 |
|
|
363 |
// Test that users can enable their contact form. |
|
364 |
$this->drupalLogin($this->contact_user); |
|
365 |
$edit = array('contact' => TRUE); |
|
366 |
$this->drupalPost('user/' . $this->contact_user->uid . '/edit', $edit, 'Save'); |
|
367 |
$this->drupalLogout(); |
|
368 |
$this->drupalGet('user/' . $this->contact_user->uid . '/contact'); |
|
369 |
$this->assertResponse(200); |
|
370 |
|
|
349 | 371 |
// Revoke the personal contact permission for the anonymous user. |
350 | 372 |
user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array('access user contact forms')); |
351 | 373 |
$this->drupalGet('user/' . $this->contact_user->uid . '/contact'); |
drupal7/modules/contextual/contextual.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = contextual.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/dashboard/dashboard.info | ||
---|---|---|
7 | 7 |
dependencies[] = block |
8 | 8 |
configure = admin/dashboard/customize |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/dblog/dblog.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = dblog.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/field/field.info | ||
---|---|---|
11 | 11 |
required = TRUE |
12 | 12 |
stylesheets[all][] = theme/field.css |
13 | 13 |
|
14 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
15 |
version = "7.54"
|
|
14 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
15 |
version = "7.56"
|
|
16 | 16 |
project = "drupal" |
17 |
datestamp = "1485986921"
|
|
17 |
datestamp = "1498069849"
|
|
18 | 18 |
|
drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info | ||
---|---|---|
7 | 7 |
files[] = field_sql_storage.test |
8 | 8 |
required = TRUE |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/field/modules/list/list.info | ||
---|---|---|
7 | 7 |
dependencies[] = options |
8 | 8 |
files[] = tests/list.test |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/field/modules/list/tests/list_test.info | ||
---|---|---|
5 | 5 |
version = VERSION |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/field/modules/number/number.info | ||
---|---|---|
6 | 6 |
dependencies[] = field |
7 | 7 |
files[] = number.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/field/modules/options/options.info | ||
---|---|---|
6 | 6 |
dependencies[] = field |
7 | 7 |
files[] = options.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/field/modules/text/text.info | ||
---|---|---|
7 | 7 |
files[] = text.test |
8 | 8 |
required = TRUE |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/field/tests/field_test.info | ||
---|---|---|
6 | 6 |
version = VERSION |
7 | 7 |
hidden = TRUE |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/field/theme/field.tpl.php | ||
---|---|---|
4 | 4 |
* @file field.tpl.php |
5 | 5 |
* Default template implementation to display the value of a field. |
6 | 6 |
* |
7 |
* This file is not used and is here as a starting point for customization only. |
|
8 |
* @see theme_field() |
|
7 |
* This file is not used by Drupal core, which uses theme functions instead for |
|
8 |
* performance reasons. The markup is the same, though, so if you want to use |
|
9 |
* template files rather than functions to extend field theming, copy this to |
|
10 |
* your custom theme. See theme_field() for a discussion of performance. |
|
9 | 11 |
* |
10 | 12 |
* Available variables: |
11 | 13 |
* - $items: An array of field values. Use render() to output them. |
... | ... | |
45 | 47 |
*/ |
46 | 48 |
?> |
47 | 49 |
<!-- |
48 |
THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
|
|
50 |
This file is not used by Drupal core, which uses theme functions instead.
|
|
49 | 51 |
See http://api.drupal.org/api/function/theme_field/7 for details. |
50 | 52 |
After copying this file to your theme's folder and customizing it, remove this |
51 | 53 |
HTML comment. |
drupal7/modules/field_ui/field_ui.info | ||
---|---|---|
6 | 6 |
dependencies[] = field |
7 | 7 |
files[] = field_ui.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/file/file.info | ||
---|---|---|
6 | 6 |
dependencies[] = field |
7 | 7 |
files[] = tests/file.test |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/file/file.module | ||
---|---|---|
146 | 146 |
// headers for files controlled by other modules. Make an exception for |
147 | 147 |
// temporary files where the host entity has not yet been saved (for example, |
148 | 148 |
// an image preview on a node/add form) in which case, allow download by the |
149 |
// file's owner. |
|
150 |
if (empty($references) && ($file->status == FILE_STATUS_PERMANENT || $file->uid != $user->uid)) { |
|
149 |
// file's owner. For anonymous file owners, only the browser session that |
|
150 |
// uploaded the file should be granted access. |
|
151 |
if (empty($references) && ($file->status == FILE_STATUS_PERMANENT || $file->uid != $user->uid || (!$user->uid && empty($_SESSION['anonymous_allowed_file_ids'][$file->fid])))) { |
|
151 | 152 |
return; |
152 | 153 |
} |
153 | 154 |
|
... | ... | |
283 | 284 |
$form['#prefix'] .= theme('status_messages'); |
284 | 285 |
$output = drupal_render($form); |
285 | 286 |
$js = drupal_add_js(); |
286 |
$settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
|
|
287 |
$settings = drupal_array_merge_deep_array($js['settings']['data']);
|
|
287 | 288 |
|
288 | 289 |
$commands[] = ajax_command_replace(NULL, $output, $settings); |
289 | 290 |
return array('#type' => 'ajax', '#commands' => $commands); |
drupal7/modules/file/tests/file.test | ||
---|---|---|
1551 | 1551 |
$this->assertNoRaw($node_file->filename, 'File without view field access permission does not appear after attempting to attach it to a new node.'); |
1552 | 1552 |
$this->drupalGet(file_create_url($node_file->uri)); |
1553 | 1553 |
$this->assertResponse(403, 'Confirmed that access is denied for the file without view field access permission after attempting to attach it to a new node.'); |
1554 |
|
|
1555 |
// As an anonymous user, create a temporary file with no references and |
|
1556 |
// confirm that only the session that uploaded it may view it. |
|
1557 |
$this->drupalLogout(); |
|
1558 |
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array( |
|
1559 |
"create $type_name content", |
|
1560 |
'access content', |
|
1561 |
)); |
|
1562 |
$test_file = $this->getTestFile('text'); |
|
1563 |
$this->drupalGet('node/add/' . $type_name); |
|
1564 |
$edit = array('files[' . $field_name . '_' . LANGUAGE_NONE . '_0]' => drupal_realpath($test_file->uri)); |
|
1565 |
$this->drupalPost(NULL, $edit, t('Upload')); |
|
1566 |
$files = file_load_multiple(array(), array('uid' => 0)); |
|
1567 |
$this->assertEqual(1, count($files), 'Loaded one anonymous file.'); |
|
1568 |
$file = end($files); |
|
1569 |
$this->assertNotEqual($file->status, FILE_STATUS_PERMANENT, 'File is temporary.'); |
|
1570 |
$usage = file_usage_list($file); |
|
1571 |
$this->assertFalse($usage, 'No file usage found.'); |
|
1572 |
$file_url = file_create_url($file->uri); |
|
1573 |
$this->drupalGet($file_url); |
|
1574 |
$this->assertResponse(200, 'Confirmed that the anonymous uploader has access to the temporary file.'); |
|
1575 |
// Close the prior connection and remove the session cookie. |
|
1576 |
$this->curlClose(); |
|
1577 |
$this->cookies = array(); |
|
1578 |
$this->drupalGet($file_url); |
|
1579 |
$this->assertResponse(403, 'Confirmed that another anonymous user cannot access the temporary file.'); |
|
1580 |
|
|
1581 |
// As an anonymous user, create a permanent file that is referenced by a |
|
1582 |
// published node and confirm that all anonymous users may view it. |
|
1583 |
$test_file = $this->getTestFile('text'); |
|
1584 |
$this->drupalGet('node/add/' . $type_name); |
|
1585 |
$edit = array(); |
|
1586 |
$edit['title'] = $this->randomName(); |
|
1587 |
$edit['files[' . $field_name . '_' . LANGUAGE_NONE . '_0]'] = drupal_realpath($test_file->uri); |
|
1588 |
$this->drupalPost(NULL, $edit, t('Save')); |
|
1589 |
$new_node = $this->drupalGetNodeByTitle($edit['title']); |
|
1590 |
$file = file_load($new_node->{$field_name}[LANGUAGE_NONE][0]['fid']); |
|
1591 |
$this->assertEqual($file->status, FILE_STATUS_PERMANENT, 'File is permanent.'); |
|
1592 |
$usage = file_usage_list($file); |
|
1593 |
$this->assertTrue($usage, 'File usage found.'); |
|
1594 |
$file_url = file_create_url($file->uri); |
|
1595 |
$this->drupalGet($file_url); |
|
1596 |
$this->assertResponse(200, 'Confirmed that the anonymous uploader has access to the permanent file that is referenced by a published node.'); |
|
1597 |
// Close the prior connection and remove the session cookie. |
|
1598 |
$this->curlClose(); |
|
1599 |
$this->cookies = array(); |
|
1600 |
$this->drupalGet($file_url); |
|
1601 |
$this->assertResponse(200, 'Confirmed that another anonymous user also has access to the permanent file that is referenced by a published node.'); |
|
1602 |
|
|
1603 |
// As an anonymous user, create a permanent file that is referenced by an |
|
1604 |
// unpublished node and confirm that no anonymous users may view it (even |
|
1605 |
// the session that uploaded the file) because they cannot view the |
|
1606 |
// unpublished node. |
|
1607 |
$test_file = $this->getTestFile('text'); |
|
1608 |
$this->drupalGet('node/add/' . $type_name); |
|
1609 |
$edit = array(); |
|
1610 |
$edit['title'] = $this->randomName(); |
|
1611 |
$edit['files[' . $field_name . '_' . LANGUAGE_NONE . '_0]'] = drupal_realpath($test_file->uri); |
|
1612 |
$this->drupalPost(NULL, $edit, t('Save')); |
|
1613 |
$new_node = $this->drupalGetNodeByTitle($edit['title']); |
|
1614 |
$new_node->status = NODE_NOT_PUBLISHED; |
|
1615 |
node_save($new_node); |
|
1616 |
$file = file_load($new_node->{$field_name}[LANGUAGE_NONE][0]['fid']); |
|
1617 |
$this->assertEqual($file->status, FILE_STATUS_PERMANENT, 'File is permanent.'); |
|
1618 |
$usage = file_usage_list($file); |
|
1619 |
$this->assertTrue($usage, 'File usage found.'); |
|
1620 |
$file_url = file_create_url($file->uri); |
|
1621 |
$this->drupalGet($file_url); |
|
1622 |
$this->assertResponse(403, 'Confirmed that the anonymous uploader cannot access the permanent file when it is referenced by an unpublished node.'); |
|
1623 |
// Close the prior connection and remove the session cookie. |
|
1624 |
$this->curlClose(); |
|
1625 |
$this->cookies = array(); |
|
1626 |
$this->drupalGet($file_url); |
|
1627 |
$this->assertResponse(403, 'Confirmed that another anonymous user cannot access the permanent file when it is referenced by an unpublished node.'); |
|
1554 | 1628 |
} |
1555 | 1629 |
} |
1556 | 1630 |
|
drupal7/modules/file/tests/file_module_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/filter/filter.info | ||
---|---|---|
7 | 7 |
required = TRUE |
8 | 8 |
configure = admin/config/content/formats |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/forum/forum.info | ||
---|---|---|
9 | 9 |
configure = admin/structure/forum |
10 | 10 |
stylesheets[all][] = forum.css |
11 | 11 |
|
12 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
13 |
version = "7.54"
|
|
12 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
13 |
version = "7.56"
|
|
14 | 14 |
project = "drupal" |
15 |
datestamp = "1485986921"
|
|
15 |
datestamp = "1498069849"
|
|
16 | 16 |
|
drupal7/modules/help/help.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = help.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/image/image.info | ||
---|---|---|
7 | 7 |
files[] = image.test |
8 | 8 |
configure = admin/config/media/image-styles |
9 | 9 |
|
10 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
11 |
version = "7.54"
|
|
10 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
11 |
version = "7.56"
|
|
12 | 12 |
project = "drupal" |
13 |
datestamp = "1485986921"
|
|
13 |
datestamp = "1498069849"
|
|
14 | 14 |
|
drupal7/modules/image/tests/image_module_test.info | ||
---|---|---|
6 | 6 |
files[] = image_module_test.module |
7 | 7 |
hidden = TRUE |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/locale/locale.info | ||
---|---|---|
6 | 6 |
files[] = locale.test |
7 | 7 |
configure = admin/config/regional/language |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/locale/locale.test | ||
---|---|---|
819 | 819 |
* Additional options to pass to the translation import form. |
820 | 820 |
*/ |
821 | 821 |
function importPoFile($contents, array $options = array()) { |
822 |
$name = tempnam('temporary://', "po_") . '.po'; |
|
822 |
$name = drupal_tempnam('temporary://', "po_") . '.po';
|
|
823 | 823 |
file_put_contents($name, $contents); |
824 | 824 |
$options['files[file]'] = $name; |
825 | 825 |
$this->drupalPost('admin/config/regional/translate/import', $options, t('Import')); |
... | ... | |
1113 | 1113 |
* Additional options to pass to the translation import form. |
1114 | 1114 |
*/ |
1115 | 1115 |
function importPoFile($contents, array $options = array()) { |
1116 |
$name = tempnam('temporary://', "po_") . '.po'; |
|
1116 |
$name = drupal_tempnam('temporary://', "po_") . '.po';
|
|
1117 | 1117 |
file_put_contents($name, $contents); |
1118 | 1118 |
$options['files[file]'] = $name; |
1119 | 1119 |
$this->drupalPost('admin/config/regional/translate/import', $options, t('Import')); |
... | ... | |
1340 | 1340 |
function testExportTranslation() { |
1341 | 1341 |
// First import some known translations. |
1342 | 1342 |
// This will also automatically enable the 'fr' language. |
1343 |
$name = tempnam('temporary://', "po_") . '.po'; |
|
1343 |
$name = drupal_tempnam('temporary://', "po_") . '.po';
|
|
1344 | 1344 |
file_put_contents($name, $this->getPoFile()); |
1345 | 1345 |
$this->drupalPost('admin/config/regional/translate/import', array( |
1346 | 1346 |
'langcode' => 'fr', |
drupal7/modules/locale/tests/locale_test.info | ||
---|---|---|
5 | 5 |
version = VERSION |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/menu/menu.info | ||
---|---|---|
6 | 6 |
files[] = menu.test |
7 | 7 |
configure = admin/structure/menu |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/node/node.info | ||
---|---|---|
9 | 9 |
configure = admin/structure/types |
10 | 10 |
stylesheets[all][] = node.css |
11 | 11 |
|
12 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
13 |
version = "7.54"
|
|
12 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
13 |
version = "7.56"
|
|
14 | 14 |
project = "drupal" |
15 |
datestamp = "1485986921"
|
|
15 |
datestamp = "1498069849"
|
|
16 | 16 |
|
drupal7/modules/node/tests/node_access_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/node/tests/node_test.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/node/tests/node_test_exception.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
hidden = TRUE |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/openid/openid.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = openid.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/openid/tests/openid_test.info | ||
---|---|---|
6 | 6 |
dependencies[] = openid |
7 | 7 |
hidden = TRUE |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/overlay/overlay.info | ||
---|---|---|
4 | 4 |
version = VERSION |
5 | 5 |
core = 7.x |
6 | 6 |
|
7 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
8 |
version = "7.54"
|
|
7 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
8 |
version = "7.56"
|
|
9 | 9 |
project = "drupal" |
10 |
datestamp = "1485986921"
|
|
10 |
datestamp = "1498069849"
|
|
11 | 11 |
|
drupal7/modules/path/path.info | ||
---|---|---|
6 | 6 |
files[] = path.test |
7 | 7 |
configure = admin/config/search/path |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/php/php.info | ||
---|---|---|
5 | 5 |
core = 7.x |
6 | 6 |
files[] = php.test |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
9 |
version = "7.54"
|
|
8 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
9 |
version = "7.56"
|
|
10 | 10 |
project = "drupal" |
11 |
datestamp = "1485986921"
|
|
11 |
datestamp = "1498069849"
|
|
12 | 12 |
|
drupal7/modules/poll/poll.info | ||
---|---|---|
6 | 6 |
files[] = poll.test |
7 | 7 |
stylesheets[all][] = poll.css |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2017-02-01
|
|
10 |
version = "7.54"
|
|
9 |
; Information added by Drupal.org packaging script on 2017-06-21
|
|
10 |
version = "7.56"
|
|
11 | 11 |
project = "drupal" |
12 |
datestamp = "1485986921"
|
|
12 |
datestamp = "1498069849"
|
|
13 | 13 |
|
drupal7/modules/profile/profile.info | ||
---|---|---|
11 | 11 |
; See user_system_info_alter(). |
Formats disponibles : Unified diff
Update to 7.56