summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install31
1 files changed, 29 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index aed7cc489..c0300000e 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -465,7 +465,7 @@ function system_requirements($phase) {
$requirements['update status'] = array(
'value' => $t('Not enabled'),
'severity' => REQUIREMENT_WARNING,
- 'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update manager module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information, <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/modules'))),
+ 'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update manager module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information, <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/documentation/modules/update', '@module' => url('admin/modules'))),
);
}
else {
@@ -810,6 +810,7 @@ function system_schema() {
'length' => 255,
'not null' => TRUE,
'default' => '',
+ 'binary' => TRUE,
),
'uri' => array(
'description' => 'The URI to access the file (either local or remote).',
@@ -817,6 +818,7 @@ function system_schema() {
'length' => 255,
'not null' => TRUE,
'default' => '',
+ 'binary' => TRUE,
),
'filemime' => array(
'description' => "The file's MIME type.",
@@ -2173,6 +2175,7 @@ function system_update_7034() {
'length' => 255,
'not null' => TRUE,
'default' => '',
+ 'binary' => TRUE,
),
'uri' => array(
'description' => 'URI of file.',
@@ -2180,6 +2183,7 @@ function system_update_7034() {
'length' => 255,
'not null' => TRUE,
'default' => '',
+ 'binary' => TRUE,
),
'filemime' => array(
'description' => "The file's MIME type.",
@@ -2791,7 +2795,7 @@ function system_update_7061(&$sandbox) {
foreach ($revision['file'][LANGUAGE_NONE] as $delta => $file) {
// We will convert filepaths to uri using the default scheme
// and stripping off the existing file directory path.
- $file['uri'] = $scheme . str_replace($basename, '', $file['filepath']);
+ $file['uri'] = $scheme . preg_replace('!^' . preg_quote($basename) . '!', '', $file['filepath']);
$file['uri'] = file_stream_wrapper_uri_normalize($file['uri']);
unset($file['filepath']);
// Insert into the file_managed table.
@@ -2989,6 +2993,29 @@ function system_update_7072() {
*/
/**
+ * Add binary to {file_managed}, in case system_update_7034() was run without
+ * it.
+ */
+function system_update_7073() {
+ db_change_field('file_managed', 'filename', 'filename', array(
+ 'description' => 'Name of the file with no path components. This may differ from the basename of the URI if the file is renamed to avoid overwriting an existing file.',
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '',
+ 'binary' => TRUE,
+ ));
+ db_change_field('file_managed', 'uri', 'uri', array(
+ 'description' => 'The URI to access the file (either local or remote).',
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '',
+ 'binary' => TRUE,
+ ));
+}
+
+/**
* @} End of "defgroup updates-7.x-extra"
* The next series of updates should start at 8000.
*/