Commit 2dfb3202 authored by Pierre-Yves Gosset's avatar Pierre-Yves Gosset

modules update: views_bulk_operations, charts, devel, disable_messages,...

modules update: views_bulk_operations, charts, devel, disable_messages, form_builder, honaypot, libraries, pgbar, rules, views, webform, webform_validation, wysiwyg, bootstrap
parent cf7717be
......@@ -8,9 +8,8 @@ configure = admin/config/content/charts
files[] = views/charts_plugin_style_chart.inc
files[] = views/charts_plugin_display_chart.inc
; Information added by Drupal.org packaging script on 2018-03-08
version = "7.x-2.0"
; Information added by Drupal.org packaging script on 2018-08-15
version = "7.x-2.1"
core = "7.x"
project = "charts"
datestamp = "1520494693"
datestamp = "1534294687"
......@@ -360,10 +360,17 @@ function charts_charts_type_info() {
* Default colors used in all libraries.
*/
function charts_default_colors() {
return array(
'#2f7ed8', '#0d233a', '#8bbc21','#910000', '#1aadce',
'#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a',
);
$form = variable_get('charts_default_settings');
if (isset($form['colors'])) {
return $form['colors'];
}
else {
return array(
'#2f7ed8', '#0d233a', '#8bbc21','#910000', '#1aadce',
'#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a',
);
}
}
/**
......
......@@ -4,9 +4,8 @@ package = Charts
core = 7.x
dependencies[] = charts
; Information added by Drupal.org packaging script on 2018-03-08
version = "7.x-2.0"
; Information added by Drupal.org packaging script on 2018-08-15
version = "7.x-2.1"
core = "7.x"
project = "charts"
datestamp = "1520494693"
datestamp = "1534294687"
......@@ -5,9 +5,8 @@ core = 7.x
dependencies[] = libraries
dependencies[] = charts
; Information added by Drupal.org packaging script on 2018-03-08
version = "7.x-2.0"
; Information added by Drupal.org packaging script on 2018-08-15
version = "7.x-2.1"
core = "7.x"
project = "charts"
datestamp = "1520494693"
datestamp = "1534294687"
......@@ -29,6 +29,9 @@ function charts_highcharts_library() {
'js' => array(
array('data' => $highcharts_info['library path'] . '/js/highcharts.js', 'type' => 'file'),
),
'css' => array(
array('data' => $highcharts_info['library path'] . '/css/highcharts.css', 'type' => 'file'),
),
);
}
$library['charts_highcharts'] = array(
......
......@@ -167,7 +167,7 @@ class charts_plugin_style_chart extends views_plugin_style {
'#title_position' => $this->options['title_position'],
'#tooltips' => $this->options['tooltips'],
'#data_labels' => $this->options['data_labels'],
'#colors' => $this->options['colors'],
'#colors' => ($this->options['type'] != 'geomap') ? $this->options['colors'] : FALSE,
'#background' => $this->options['background'] ? $this->options['background'] : 'transparent',
'#legend' => $this->options['legend_position'] ? TRUE : FALSE,
'#legend_position' => $this->options['legend_position'] ? $this->options['legend_position'] : NULL,
......
File mode changed from 100755 to 100644
/**
* @file
* Right-to-left styles for Devel.
*/
.dev-query, .dev-timer, .dev-memory-usage {
align: left;
direction: ltr;
......@@ -5,4 +10,4 @@
}
.dev-query, .dev-timer, .dev-memory-usage table {
direction: ltr;
}
\ No newline at end of file
}
<?php
/**
* @file
* Functions for Devel administrative pages.
*/
/**
* Form constructor for the settings form.
*
* @ingroup forms
*/
function devel_admin_settings() {
_devel_display_block_help_message();
$form['queries'] = array('#type' => 'fieldset', '#title' => t('Query log'));
$description = t('Display a log of the database queries needed to generate the current page, and the execution time for each. Also, queries which are repeated during a single page view are summed in the # column, and printed in red since they are candidates for caching.');
......@@ -22,6 +34,12 @@ function devel_admin_settings() {
),
),
);
$form['queries']['settings']['devel_show_query_args_first'] = array(
'#type' => 'checkbox',
'#title' => t('Show query arguments'),
'#default_value' => variable_get('devel_show_query_args_first', FALSE),
'#description' => t('Show arguments rather than the query placeholders in the logged query.'),
);
$form['queries']['settings']['devel_query_sort'] = array('#type' => 'radios',
'#title' => t('Sort query log'),
'#default_value' => variable_get('devel_query_sort', DEVEL_QUERY_SORT_BY_SOURCE),
......@@ -36,57 +54,13 @@ function devel_admin_settings() {
'#description' => t('Enter an integer in milliseconds. Any query which takes longer than this many milliseconds will be highlighted in the query log. This indicates a possibly inefficient query, or a candidate for caching.'),
);
$form['xhprof'] = array(
'#type' => 'fieldset',
'#title' => 'XHProf',
'#description' => t('XHProf is a php extension which is essential for profiling your Drupal site. It pinpoints slow functions, and also memory hogging functions.'),
);
$description = extension_loaded('xhprof') ? t('Profile requests with the xhprof php extension.') : '<span class="warning">' . t('You must enable the <a href="!url">xhprof php extension</a> to use this feature.', array('!url' => url('http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/'))) . '</span>';
$form['xhprof']['devel_xhprof_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enable profiling of all page views and <a href="!drush">drush</a> requests.', array('!drush' => url('http://drush.ws'))),
'#default_value' => variable_get('devel_xhprof_enabled', FALSE),
'#description' => $description,
'#disabled' => !extension_loaded('xhprof'),
);
$form['xhprof']['settings'] = array(
'#type' => 'container',
'#states' => array(
'invisible' => array(
'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE),
),
),
);
$form['xhprof']['settings']['devel_xhprof_directory'] = array(
'#type' => 'textfield',
'#title' => 'xhprof directory',
'#description' => t('Location of the xhprof source code on your system, where the directory "xhprof_lib" can be found, usually somewhere in /usr/local/share or /usr/share, include the leading forward slash.'),
'#default_value' => variable_get('devel_xhprof_directory', ''),
'#states' => array(
'invisible' => array(
'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE),
),
),
);
$form['xhprof']['settings']['devel_xhprof_url'] = array(
'#type' => 'textfield',
'#title' => 'XHProf URL',
'#description' => t('Path to the publically accessible xhprof_html - required to display profiler reports. You will need to set this up outside Drupal, for example at http://xhprof.localhost/xhprof_html'),
'#default_value' => variable_get('devel_xhprof_url', ''),
'#states' => array(
'invisible' => array(
'input[name="devel_xhprof_enabled"]' => array('checked' => FALSE),
),
),
);
$form['devel_api_url'] = array('#type' => 'textfield',
'#title' => t('API Site'),
'#default_value' => variable_get('devel_api_url', 'api.drupal.org'),
'#description' => t('The base URL for your developer documentation links. You might change this if you run <a href="!url">api.module</a> locally.', array('!url' => url('http://drupal.org/project/api'))));
$form['dev_timer'] = array('#type' => 'checkbox',
$form['devel_timer'] = array('#type' => 'checkbox',
'#title' => t('Display page timer'),
'#default_value' => variable_get('dev_timer', 0),
'#default_value' => variable_get('devel_timer', 0),
'#description' => t('Display page execution time in the query log box.'),
);
......@@ -161,6 +135,45 @@ function devel_admin_settings() {
return system_settings_form($form);
}
/**
* Displays a helpful message if Menu module is not installed.
*/
function _devel_display_block_help_message() {
if (!module_exists('menu')) {
$devel_block_alert = t('Devel block alert: The Devel block requires the Core Menu module. The Devel block will become available once you <a href="!url">enable Menu</a>.',
array('!url' => url('admin/modules'))
);
$variables = array(
'!admin_menu_url' => url('https://drupal.org/project/admin_menu', array('external' => TRUE)),
'!admin_menu_name' => 'Administration Menu',
'!admin_menu_config_url' => url('admin/config/administration/admin_menu'),
'!icon_menu' => t('Icon menu'),
);
if (!module_exists('admin_menu')) {
$devel_block_alert .= '<br />' . t('Alternatively, you can install <a href="!admin_menu_url">!admin_menu_name</a> which supports displaying the Devel menu items in its !icon_menu.', $variables);
}
else {
$admin_menu_components = variable_get('admin_menu_components', array());
if (empty($admin_menu_components['admin_menu.icon']) || !user_access('access administration menu')) {
$devel_block_alert .= '<br />' . t("Alternatively, if you <a href='!admin_menu_config_url'>enable !admin_menu_name's !icon_menu</a> you will find the Devel menu items there.", $variables);
} else {
// Don't bother with a message in the 'normal' case.
return;
}
}
drupal_set_message($devel_block_alert, 'warning');
}
}
/**
* Demonstrates the active error handler.
*
* Generates some warnings or errors so that the reaction of the current error
* handler can be observed.
*
* @param $severity
* The severity level that the error handler should demonstrate.
*/
function devel_demonstrate_error_handlers($severity) {
switch ($severity) {
case 'warning':
......
/**
* @file
* Styles for elements created by Devel.
*/
.dev-query, .dev-timer, .dev-memory-usage {
padding: 1em;
}
......
......@@ -64,7 +64,9 @@ function devel_drush_command() {
}
/**
* A command callback. This is faster than 3 separate bootstraps.
* A command callback for reinstalling one or more projects.
*
* This is faster than 3 separate bootstraps.
*/
function drush_devel_reinstall() {
$projects = func_get_args();
......@@ -80,7 +82,7 @@ function drush_devel_reinstall() {
}
/**
* A command callback.
* A command callback for downloading a project.
*/
function drush_devel_download($path = NULL) {
// If no path is provided by the user, set our default path.
......@@ -112,7 +114,7 @@ function drush_devel_download($path = NULL) {
}
/**
* Command handler. Show hook implementations.
* A command handler for showing hook implementations.
*/
function drush_devel_fn_hook($hook) {
// Get implementations in the .install files as well.
......@@ -130,7 +132,7 @@ function drush_devel_fn_hook($hook) {
}
/**
* Command handler. Show source code of specified function or method.
* A command handler for showing source code of a function or method.
*/
function drush_devel_fn_view($function_name) {
// Get implementations in the .install files as well.
......@@ -159,7 +161,7 @@ function drush_devel_fn_view($function_name) {
}
/**
* Command callback. List available tokens.
* A command callback for listing available tokens.
*/
function drush_devel_token() {
$rows[] = array(dt('Group'), dt('Token'), dt('Name'));
......@@ -174,8 +176,7 @@ function drush_devel_token() {
/**
* Print the specified function, including any
* doxygen-style comments that come before it.
* Prints a function including any Doxygen-style comments preceding it.
*/
function _drush_devel_print_function($file, $start_line, $end_line) {
$line_num = 0;
......
......@@ -7,9 +7,8 @@ tags[] = developer
files[] = devel.test
files[] = devel.mail.inc
; Information added by Drupal.org packaging script on 2014-05-01
version = "7.x-1.5"
; Information added by Drupal.org packaging script on 2018-04-18
version = "7.x-1.6"
core = "7.x"
project = "devel"
datestamp = "1398963366"
datestamp = "1524009787"
......@@ -32,7 +32,7 @@ function devel_enable() {
*/
function devel_uninstall() {
variable_del('devel_execution');
variable_del('dev_timer');
variable_del('devel_timer');
variable_del('devel_query_display');
variable_del('devel_redirect_page');
variable_del('devel_api_url');
......@@ -47,9 +47,6 @@ function devel_uninstall() {
variable_del('devel_query_sort');
variable_del('devel_rebuild_theme_registry');
variable_del('devel_use_uncompressed_jquery');
variable_del('devel_xhprof_directory');
variable_del('devel_xhprof_enabled');
variable_del('devel_xhprof_url');
variable_del('devel_debug_mail_file_format');
variable_del('devel_debug_mail_directory');
......@@ -62,7 +59,9 @@ function devel_uninstall() {
}
/**
* Remove feature for storing queries. Cleanup deprecated tables and variables.
* Remove feature for storing queries.
*
* Cleanup deprecated tables and variables.
*/
function devel_update_7000() {
db_drop_table('devel_queries');
......@@ -81,7 +80,7 @@ function devel_update_7001() {
}
/**
* Remove deprecated variables - dev_query, devel_code_coverage
* Remove deprecated variables: dev_query, devel_code_coverage.
*/
function devel_update_7002() {
variable_del('dev_query'); // Sad trombone. http://drupalcode.org/viewvc/drupal/drupal/includes/database.mysql.inc?revision=1.2&view=markup
......@@ -117,7 +116,9 @@ function devel_update_7004() {
}
/**
* Delete variable 'devel_form_weights' from database as it was removed from code.
* Delete variable 'devel_form_weights'.
*
* 'devel_form_weights' was removed from code.
*/
function devel_update_7005() {
variable_del('devel_form_weights');
......@@ -133,3 +134,23 @@ function devel_update_7006() {
variable_del('dev_mem');
}
/**
* Delete 'devel_xhprof_*' variables as they were removed from code.
*/
function devel_update_7007() {
variable_del('devel_xhprof_directory');
variable_del('devel_xhprof_enabled');
variable_del('devel_xhprof_url');
}
/**
* Change variable "dev_timer" to "devel_timer".
*/
function devel_update_7008() {
if (variable_get('dev_timer') !== NULL) {
variable_set('devel_timer', variable_get('dev_timer'));
}
variable_del('dev_timer');
}
/**
* @file
* Behaviors for Devel.
*/
(function ($) {
// Explain link in query log
/**