- Patch #195496 by bjaspan and hunmonk: no 'char' data type in Schema API (and removed spaces).
parent
9c835a88ca
commit
02539ac3f8
|
@ -1500,10 +1500,10 @@ function drupal_map_assoc($array, $function = NULL) {
|
|||
*/
|
||||
function drupal_eval($code) {
|
||||
global $theme_path, $theme_info, $conf;
|
||||
|
||||
|
||||
// Store current theme path.
|
||||
$old_theme_path = $theme_path;
|
||||
|
||||
|
||||
// Restore theme_path to the theme, as long as drupal_eval() executes,
|
||||
// so code evaluted will not see the caller module as the current theme.
|
||||
// If theme info is not initialized get the path from theme_default.
|
||||
|
@ -1518,10 +1518,10 @@ function drupal_eval($code) {
|
|||
print eval('?>'. $code);
|
||||
$output = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
|
||||
// Recover original theme path.
|
||||
$theme_path = $old_theme_path;
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -503,6 +503,7 @@ function db_field_names($fields) {
|
|||
function db_type_placeholder($type) {
|
||||
switch ($type) {
|
||||
case 'varchar':
|
||||
case 'char':
|
||||
case 'text':
|
||||
case 'datetime':
|
||||
return '\'%s\'';
|
||||
|
|
|
@ -199,6 +199,7 @@ function db_type_map() {
|
|||
// database types back into schema types.
|
||||
$map = array(
|
||||
'varchar:normal' => 'VARCHAR',
|
||||
'char:normal' => 'CHAR',
|
||||
|
||||
'text:tiny' => 'SMALLTEXT',
|
||||
'text:small' => 'SMALLTEXT',
|
||||
|
|
|
@ -461,6 +461,7 @@ function db_type_map() {
|
|||
// database types back into schema types.
|
||||
$map = array(
|
||||
'varchar:normal' => 'varchar',
|
||||
'char:normal' => 'char',
|
||||
|
||||
'text:tiny' => 'text',
|
||||
'text:small' => 'text',
|
||||
|
|
|
@ -63,7 +63,7 @@ function drupal_get_schema_versions($module) {
|
|||
* @param $reset
|
||||
* Set to TRUE after modifying the system table.
|
||||
* @param $array
|
||||
* Set to TRUE if you want to get information about all modules in the
|
||||
* Set to TRUE if you want to get information about all modules in the
|
||||
* system.
|
||||
* @return
|
||||
* The currently installed schema version.
|
||||
|
|
|
@ -9,7 +9,7 @@ function color_help($path, $arg) {
|
|||
case 'admin/help#color':
|
||||
$output = '<p>'. t('The color module allows a site administrator to quickly and easily change the color scheme of certain themes. Although all themes do not support color module, both Garland, the default theme, and Minnelli, its fixed width counterpart, were designed to take advantage of its features. By using color module with a compatible theme, you can easily change the color of links, backgrounds, text, and other theme elements. Color module requires that your <a href="@url">file download method</a> be set to public.', array('@url' => url('admin/settings/file-system'))) .'</p>';
|
||||
$output .= '<p>'. t("It is important to remember that color module saves a modified copy of the theme's specified stylesheets in the files directory. This means that if you make any manual changes to your theme's stylesheet, you must save your color settings again, even if they haven't changed. This causes the color module generated version of the stylesheets in the files directory to be recreated using the new version of the original file.") .'</p>';
|
||||
$output .= '<p>'. t('For more information, see the online handbook entry for <a href="@color">Color module</a>.', array('@color' => 'http://drupal.org/handbook/modules/color/')) .'</p>';
|
||||
$output .= '<p>'. t('For more information, see the online handbook entry for <a href="@color">Color module</a>.', array('@color' => 'http://drupal.org/handbook/modules/color/')) .'</p>';
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
@ -334,8 +334,8 @@ function color_scheme_form_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
// Aggregate @imports recursively for each configured top level CSS file
|
||||
// without optimization. Aggregation and optimization will be
|
||||
// Aggregate @imports recursively for each configured top level CSS file
|
||||
// without optimization. Aggregation and optimization will be
|
||||
// handled by drupal_build_css_cache() only.
|
||||
$style = drupal_load_stylesheet($paths['source'] . $file, FALSE);
|
||||
|
||||
|
@ -352,7 +352,7 @@ function color_scheme_form_submit($form, &$form_state) {
|
|||
$base_file = basename($file);
|
||||
$css[] = $paths['target'] . $base_file;
|
||||
_color_save_stylesheet($paths['target'] . $base_file, $style, $paths);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Maintain list of files.
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
function forum_install() {
|
||||
// Create tables.
|
||||
drupal_install_schema('forum');
|
||||
// Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
|
||||
db_query("UPDATE {system} SET weight = 1 WHERE name = 'forum'");
|
||||
// Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
|
||||
db_query("UPDATE {system} SET weight = 1 WHERE name = 'forum'");
|
||||
}
|
||||
|
||||
function forum_enable() {
|
||||
|
|
|
@ -357,7 +357,7 @@ function forum_form_alter(&$form, $form_state, $form_id) {
|
|||
$form['settings']['relations'] = array('#type' => 'value', '#value' => FALSE);
|
||||
$form['settings']['tags'] = array('#type' => 'value', '#value' => FALSE);
|
||||
$form['settings']['multiple'] = array('#type' => 'value', '#value' => FALSE);
|
||||
unset($form['delete']);
|
||||
unset($form['delete']);
|
||||
}
|
||||
}
|
||||
// Hide multiple parents select from forum terms.
|
||||
|
|
|
@ -366,12 +366,12 @@ function menu_item_delete_submit($form, &$form_state) {
|
|||
*/
|
||||
function menu_edit_item_submit($form, &$form_state) {
|
||||
$item = $form_state['values']['menu'];
|
||||
|
||||
|
||||
// The value of "hidden" is the opposite of the value
|
||||
// supplied by the "enabled" checkbox.
|
||||
// supplied by the "enabled" checkbox.
|
||||
$item['hidden'] = (int) !$item['enabled'];
|
||||
unset($item['enabled']);
|
||||
|
||||
|
||||
$item['options']['attributes']['title'] = $item['description'];
|
||||
list($item['menu_name'], $item['plid']) = explode(':', $item['parent']);
|
||||
if (!menu_link_save($item)) {
|
||||
|
|
|
@ -656,7 +656,7 @@ function node_revision_delete_confirm_submit($form, &$form_state) {
|
|||
db_query("DELETE FROM {node_revisions} WHERE nid = %d AND vid = %d", $node_revision->nid, $node_revision->vid);
|
||||
node_invoke_nodeapi($node_revision, 'delete revision');
|
||||
watchdog('content', '@type: deleted %title revision %revision.', array('@type' => $node_revision->type, '%title' => $node_revision->title, '%revision' => $node_revision->vid));
|
||||
drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array('%revision-date' => format_date($node_revision->revision_timestamp), '@type' => node_get_types('name', $node_revision), '%title' => $node_revision->title)));
|
||||
drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array('%revision-date' => format_date($node_revision->revision_timestamp), '@type' => node_get_types('name', $node_revision), '%title' => $node_revision->title)));
|
||||
$form_state['redirect'] = 'node/'. $node_revision->nid;
|
||||
if (db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d', $node_revision->nid)) > 1) {
|
||||
$form_state['redirect'] .= '/revisions';
|
||||
|
|
|
@ -16,7 +16,7 @@ function php_help($path, $arg) {
|
|||
$output = '<p>'. t('The PHP filter adds the ability to include PHP code in posts. PHP is a general-purpose scripting language widely-used for web development; the content management system used by this website has been developed using PHP.') .'</p>';
|
||||
$output .= '<p>'. t('Through the PHP filter, users with the proper permission may include custom PHP code within a page of the site. While this is a powerful and flexible feature if used by a trusted user with PHP experience, it is a significant and dangerous security risk in the hands of a malicious user. Even a trusted user may accidentally compromise the site by entering malformed or incorrect PHP code. Only the most trusted users should be granted permission to use the PHP filter, and all PHP code added through the PHP filter should be carefully examined before use.') .'</p>';
|
||||
$output .= '<p>'. t('<a href="@drupal">Drupal.org</a> offers <a href="@php-snippets">some example PHP snippets</a>, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/handbook/customization/php-snippets'))) .'</p>';
|
||||
$output .= '<p>'. t('For more information, see the online handbook entry for <a href="@php">PHP module</a>.', array('@php' => 'http://drupal.org/handbook/modules/php/')) .'</p>';
|
||||
$output .= '<p>'. t('For more information, see the online handbook entry for <a href="@php">PHP module</a>.', array('@php' => 'http://drupal.org/handbook/modules/php/')) .'</p>';
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1043,7 +1043,7 @@ function system_schema() {
|
|||
* @defgroup updates-4.7.x-extra Extra system updates for 4.7.x
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
function system_update_last_removed() {
|
||||
return 179;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue