Revision 620f9137
Added by Assos Assos over 4 years ago
drupal7/sites/all/modules/captcha/captcha.admin.inc | ||
---|---|---|
53 | 53 |
$form['captcha_form_protection'] = array( |
54 | 54 |
'#type' => 'fieldset', |
55 | 55 |
'#title' => t('Form protection'), |
56 |
'#description' => t("Select the challenge type you want for each of the listed forms (identified by their so called <em>form_id</em>'s). You can easily add arbitrary forms with the textfield at the bottom of the table or with the help of the option <em>Add CAPTCHA administration links to forms</em> below."),
|
|
56 |
'#description' => t("Select the challenge type you want for each of the listed forms (identified by their so called <em>form_id</em> or <em>base_form_id</em>). You can easily add arbitrary forms with the textfield at the bottom of the table or with the help of the option <em>Add CAPTCHA administration links to forms</em> below."),
|
|
57 | 57 |
); |
58 | 58 |
$form['captcha_form_protection']['captcha_default_challenge'] = array( |
59 | 59 |
'#type' => 'select', |
... | ... | |
454 | 454 |
$form['captcha_point_form_id'] = array( |
455 | 455 |
'#type' => 'textfield', |
456 | 456 |
'#title' => t('Form ID'), |
457 |
'#description' => t('The Drupal form_id of the form to add the CAPTCHA to.'), |
|
457 |
'#description' => t('The Drupal form_id or base_form_id of the form to add the CAPTCHA to.'),
|
|
458 | 458 |
'#value' => check_plain($captcha_point_form_id), |
459 | 459 |
'#disabled' => TRUE, |
460 | 460 |
); |
... | ... | |
468 | 468 |
$form['captcha_point_form_id'] = array( |
469 | 469 |
'#type' => 'textfield', |
470 | 470 |
'#title' => t('Form ID'), |
471 |
'#description' => t('The Drupal form_id of the form to add the CAPTCHA to.'), |
|
471 |
'#description' => t('The Drupal form_id or base_form_id of the form to add the CAPTCHA to.'),
|
|
472 | 472 |
); |
473 | 473 |
} |
474 | 474 |
// Select widget for CAPTCHA type. |
drupal7/sites/all/modules/captcha/captcha.info | ||
---|---|---|
10 | 10 |
files[] = captcha.install |
11 | 11 |
files[] = captcha.test |
12 | 12 |
|
13 |
; Information added by Drupal.org packaging script on 2019-10-05
|
|
14 |
version = "7.x-1.6"
|
|
13 |
; Information added by Drupal.org packaging script on 2020-02-21
|
|
14 |
version = "7.x-1.7"
|
|
15 | 15 |
core = "7.x" |
16 | 16 |
project = "captcha" |
17 |
datestamp = "1570300087" |
|
17 |
datestamp = "1582293280" |
drupal7/sites/all/modules/captcha/captcha.module | ||
---|---|---|
403 | 403 |
|
404 | 404 |
// Get CAPTCHA type and module for given form_id. |
405 | 405 |
$captcha_point = captcha_get_form_id_setting($form_id); |
406 |
|
|
407 |
// If no captcha point found, check to see if there is a setting for the base form id |
|
408 |
if (!$captcha_point) { |
|
409 |
if (isset($form_state['build_info']['base_form_id'])) { |
|
410 |
$captcha_point = captcha_get_form_id_setting($form_state['build_info']['base_form_id']); |
|
411 |
} |
|
412 |
} |
|
413 |
|
|
406 | 414 |
if ($captcha_point && !empty($captcha_point->captcha_type)) { |
407 | 415 |
module_load_include('inc', 'captcha'); |
408 | 416 |
// Build CAPTCHA form element. |
drupal7/sites/all/modules/captcha/image_captcha/image_captcha.info | ||
---|---|---|
11 | 11 |
files[] = image_captcha.user.inc |
12 | 12 |
files[] = image_captcha.test |
13 | 13 |
|
14 |
; Information added by Drupal.org packaging script on 2019-10-05
|
|
15 |
version = "7.x-1.6"
|
|
14 |
; Information added by Drupal.org packaging script on 2020-02-21
|
|
15 |
version = "7.x-1.7"
|
|
16 | 16 |
core = "7.x" |
17 | 17 |
project = "captcha" |
18 |
datestamp = "1570300087" |
|
18 |
datestamp = "1582293280" |
drupal7/sites/all/modules/l10n_update/l10n_update.admin.inc | ||
---|---|---|
202 | 202 |
'#default_value' => variable_get('l10n_update_download_store', ''), |
203 | 203 |
'#description' => t('A path relative to the Drupal installation directory where translation files will be stored, e.g. sites/all/translations. Saved translation files can be reused by other installations. If left empty the downloaded translation will not be saved.'), |
204 | 204 |
); |
205 |
return system_settings_form($form); |
|
205 |
|
|
206 |
$form = system_settings_form($form); |
|
207 |
$form['#submit'][] = 'l10n_update_admin_settings_form_submit'; |
|
208 |
|
|
209 |
return $form; |
|
206 | 210 |
} |
207 | 211 |
|
208 | 212 |
/** |
... | ... | |
220 | 224 |
} |
221 | 225 |
} |
222 | 226 |
|
227 |
/** |
|
228 |
* Additional submit handler for update settings. |
|
229 |
*/ |
|
230 |
function l10n_update_admin_settings_form_submit($form, &$form_state) { |
|
231 |
// Add .htaccess file to the translations directory. |
|
232 |
l10n_update_ensure_htaccess(); |
|
233 |
} |
|
234 |
|
|
223 | 235 |
/** |
224 | 236 |
* Get array of import options. |
225 | 237 |
* |
drupal7/sites/all/modules/l10n_update/l10n_update.info | ||
---|---|---|
6 | 6 |
|
7 | 7 |
files[] = l10n_update.parser.inc |
8 | 8 |
|
9 |
; Information added by Drupal.org packaging script on 2014-11-10
|
|
10 |
version = "7.x-1.1"
|
|
9 |
; Information added by Drupal.org packaging script on 2019-12-16
|
|
10 |
version = "7.x-1.4"
|
|
11 | 11 |
core = "7.x" |
12 | 12 |
project = "l10n_update" |
13 |
datestamp = "1415605322" |
|
14 |
|
|
13 |
datestamp = "1576494267" |
drupal7/sites/all/modules/l10n_update/l10n_update.install | ||
---|---|---|
15 | 15 |
'name' => array( |
16 | 16 |
'description' => 'A unique short name to identify the project.', |
17 | 17 |
'type' => 'varchar', |
18 |
'length' => '50',
|
|
18 |
'length' => '255',
|
|
19 | 19 |
'not null' => TRUE, |
20 | 20 |
), |
21 | 21 |
'project_type' => array( |
... | ... | |
68 | 68 |
'project' => array( |
69 | 69 |
'description' => 'A unique short name to identify the project.', |
70 | 70 |
'type' => 'varchar', |
71 |
'length' => '50',
|
|
71 |
'length' => '255',
|
|
72 | 72 |
'not null' => TRUE, |
73 | 73 |
), |
74 | 74 |
'language' => array( |
... | ... | |
207 | 207 |
$requirements['l10n_update']['value'] = t('Not enabled'); |
208 | 208 |
$requirements['l10n_update']['severity'] = REQUIREMENT_INFO; |
209 | 209 |
} |
210 |
|
|
211 |
// Test the contents of the .htaccess file in the translations directory. |
|
212 |
$directory = variable_get('l10n_update_download_store', ''); |
|
213 |
if ($directory) { |
|
214 |
l10n_update_ensure_htaccess(); |
|
215 |
$htaccess_file = $directory . '/.htaccess'; |
|
216 |
// Check for the string which was added to the recommended .htaccess file |
|
217 |
// in the latest security update. |
|
218 |
if (!file_exists($htaccess_file) || !($contents = @file_get_contents($htaccess_file)) || strpos($contents, 'Drupal_Security_Do_Not_Remove_See_SA_2013_003') === FALSE) { |
|
219 |
$requirements['l10n_update_htaccess'] = array( |
|
220 |
'title' => t('Translations directory'), |
|
221 |
'value' => t('Not fully protected'), |
|
222 |
'severity' => REQUIREMENT_ERROR, |
|
223 |
'description' => t('See <a href="@url">@url</a> for information about the recommended .htaccess file which should be added to the %directory directory to help protect against arbitrary code execution.', array( |
|
224 |
'@url' => 'http://drupal.org/SA-CORE-2013-003', |
|
225 |
'%directory' => $directory |
|
226 |
)), |
|
227 |
); |
|
228 |
} |
|
229 |
} |
|
230 |
|
|
210 | 231 |
return $requirements; |
211 | 232 |
} |
212 | 233 |
// We must always return array, the installer doesn't use module_invoke_all() |
... | ... | |
297 | 318 |
function l10n_update_update_7006() { |
298 | 319 |
registry_rebuild(); |
299 | 320 |
} |
321 |
|
|
322 |
/** |
|
323 |
* Increase the length of the {l10n_update_project}.name column. |
|
324 |
*/ |
|
325 |
function l10n_update_update_7007() { |
|
326 |
$schema = l10n_update_schema(); |
|
327 |
db_change_field('l10n_update_project', 'name', 'name', $schema['l10n_update_project']['fields']['name']); |
|
328 |
} |
|
329 |
|
|
330 |
/** |
|
331 |
* Increase the length of the {l10n_update_file}.project column. |
|
332 |
*/ |
|
333 |
function l10n_update_update_7008() { |
|
334 |
$schema = l10n_update_schema(); |
|
335 |
db_change_field('l10n_update_file', 'project', 'project', $schema['l10n_update_file']['fields']['project']); |
|
336 |
} |
|
337 |
|
|
338 |
/** |
|
339 |
* Remove 'headers' field from cache table. |
|
340 |
*/ |
|
341 |
function l10n_update_update_7009() { |
|
342 |
if (db_field_exists('cache_l10n_update', 'headers')) { |
|
343 |
db_drop_field('cache_l10n_update', 'headers'); |
|
344 |
} |
|
345 |
} |
|
346 |
|
|
347 |
/** |
|
348 |
* Add a .htaccess file to the translations directory. |
|
349 |
*/ |
|
350 |
function l10n_update_update_7010() { |
|
351 |
module_load_include('module', 'l10n_update'); |
|
352 |
l10n_update_ensure_htaccess(); |
|
353 |
} |
drupal7/sites/all/modules/l10n_update/l10n_update.module | ||
---|---|---|
494 | 494 |
} |
495 | 495 |
return array(); |
496 | 496 |
} |
497 |
|
|
498 |
/** |
|
499 |
* Creates a .htaccess file in the translations directory if it is missing. |
|
500 |
*/ |
|
501 |
function l10n_update_ensure_htaccess() { |
|
502 |
$directory = variable_get('l10n_update_download_store', ''); |
|
503 |
if ($directory) { |
|
504 |
file_create_htaccess($directory, FALSE); |
|
505 |
} |
|
506 |
} |
drupal7/sites/all/modules/l10n_update/l10n_update.project.inc | ||
---|---|---|
47 | 47 |
|
48 | 48 |
$default_server = l10n_update_default_server(); |
49 | 49 |
|
50 |
if (module_exists('update')) { |
|
51 |
$projects_info = update_get_available(TRUE); |
|
52 |
} |
|
53 | 50 |
foreach ($projects as $name => $data) { |
54 |
|
|
55 |
// Force update fetch of project data in cases where Drupal's performance |
|
56 |
// optimized approach is missing out on some projects. |
|
57 |
// @see http://drupal.org/node/1671570#comment-6216090 |
|
58 |
if (module_exists('update') && !isset($projects_info[$name])) { |
|
59 |
module_load_include('fetch.inc', 'update'); |
|
60 |
_update_process_fetch_task($data); |
|
61 |
$available = _update_get_cached_available_releases(); |
|
62 |
if (!empty($available[$name])) { |
|
63 |
$projects_info[$name] = $available[$name]; |
|
64 |
} |
|
65 |
} |
|
66 |
|
|
67 |
if (isset($projects_info[$name]['releases']) && $projects_info[$name]['project_status'] != 'not-fetched') { |
|
68 |
// Find out if a dev version is installed. |
|
69 |
if (preg_match("/^[0-9]+\.x-([0-9]+)\..*-dev$/", $data['info']['version'], $matches)) { |
|
70 |
// Find a suitable release to use as alternative translation. |
|
71 |
foreach ($projects_info[$name]['releases'] as $project_release) { |
|
72 |
// The first release with the same major release number which is not |
|
73 |
// a dev release is the one. Releases are sorted the most recent first. |
|
74 |
if ($project_release['version_major'] == $matches[1] && |
|
75 |
(!isset($project_release['version_extra']) || $project_release['version_extra'] != 'dev')) { |
|
76 |
$release = $project_release; |
|
77 |
break; |
|
78 |
} |
|
79 |
} |
|
51 |
// For dev releases, remove the '-dev' part and trust the translation server |
|
52 |
// to fall back to the latest stable release for that branch. |
|
53 |
if (isset($data['info']['version']) && strpos($data['info']['version'], '-dev')) { |
|
54 |
if (preg_match("/^(\d+\.x-\d+\.).*$/", $data['info']['version'], $matches)) { |
|
55 |
// Example matches: 7.x-1.x-dev, 7.x-1.0-alpha1+5-dev => 7.x-1.x |
|
56 |
$data['info']['version'] = $matches[1] . 'x'; |
|
80 | 57 |
} |
81 |
if (!empty($release['version'])) { |
|
82 |
$data['info']['version'] = $release['version']; |
|
58 |
elseif (preg_match("/^(\d+\.).*$/", $data['info']['version'], $matches)) { |
|
59 |
// Example match: 7.33-dev => 7.x (Drupal core) |
|
60 |
$data['info']['version'] = $matches[1] . 'x'; |
|
83 | 61 |
} |
84 |
|
|
85 |
unset($release); |
|
86 | 62 |
} |
87 | 63 |
|
88 | 64 |
$data += array( |
... | ... | |
228 | 204 |
'name' => $project_name, |
229 | 205 |
'info' => $file->info, |
230 | 206 |
'datestamp' => isset($file->info['datestamp']) ? $file->info['datestamp'] : 0, |
231 |
'includes' => array($file->name => $file->info['name']),
|
|
207 |
'includes' => array($file->name => isset($file->info['name']) ? $file->info['name'] : $file->name),
|
|
232 | 208 |
'project_type' => $project_name == 'drupal' ? 'core' : $project_type, |
233 | 209 |
); |
234 | 210 |
} |
Also available in: Unified diff
Weekly update of contrib modules