Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#208542 by KarenS, webernet: save old actions table when upgrading fr…

…om Drupal 5 with a previous actions install
  • Loading branch information...
commit b3c7ff77ffdc327c900e2ecf72e93510aee7f622 1 parent 33633c5
@goba goba authored
Showing with 13 additions and 6 deletions.
  1. +13 −6 modules/system/system.install
View
19 modules/system/system.install
@@ -62,7 +62,7 @@ function system_requirements($phase) {
$requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
$requirements['php']['severity'] = REQUIREMENT_ERROR;
}
-
+
// Test PHP memory_limit
$memory_limit = ini_get('memory_limit');
$requirements['php_memory_limit'] = array(
@@ -80,7 +80,7 @@ function system_requirements($phase) {
$description = $t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
$requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING;
}
-
+
if (!empty($description)) {
if ($php_ini_path = get_cfg_var('cfg_file_path')) {
$description .= ' '. $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
@@ -88,11 +88,11 @@ function system_requirements($phase) {
else {
$description .= ' '. $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
}
-
+
$requirements['php_memory_limit']['description'] = $description .' '. $t('See the <a href="@url">Drupal requirements</a> for more information.', array('@url' => 'http://drupal.org/requirements'));
}
}
-
+
// Test DB version
global $db_type;
if (function_exists('db_status_report')) {
@@ -2035,6 +2035,13 @@ function system_update_6029() {
*/
function system_update_6030() {
$ret = array();
+
+ // Rename the old contrib actions table if it exists so the contrib version
+ // of the module can do something with the old data.
+ if (db_table_exists('actions')) {
+ db_rename_table($ret, 'actions', 'actions_old_contrib');
+ }
+
$schema['actions'] = array(
'fields' => array(
'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
@@ -2416,7 +2423,7 @@ function system_update_6044() {
/**
* Update blog, book and locale module permissions.
- *
+ *
* Blog module got "edit own blog" replaced with the more granular "create
* blog entries", "edit own blog entries" and "delete own blog entries"
* permissions. We grant create and edit to previously privileged users, but
@@ -2441,7 +2448,7 @@ function system_update_6045() {
$ret[] = update_sql("UPDATE {permission} SET perm = '$renamed_permission' WHERE rid = $role->rid");
}
}
-
+
// Notify user that delete permissions may have been changed. This was in
// effect since system_update_6039(), but there was no user notice.
drupal_set_message('Drupal now has separate edit and delete permissions. Previously, users who were able to edit content were automatically allowed to delete it. For added security, delete permissions for individual core content types have been <strong>removed</strong> from all roles on your site (only roles with the "administer nodes" permission can now delete these types of content). If you would like to reenable any individual delete permissions, you can do this at the <a href="'. url('admin/user/permissions', array('fragment' => 'module-node')) .'">permissions page</a>.');
Please sign in to comment.
Something went wrong with that request. Please try again.