updated drupal core to 7.51
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
function node_overview_types() {
|
||||
$types = node_type_get_types();
|
||||
$names = node_type_get_names();
|
||||
$field_ui = module_exists('field_ui');
|
||||
$field_ui = module_exists('field_ui') && user_access('administer fields');
|
||||
$header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '4' : '2'));
|
||||
$rows = array();
|
||||
|
||||
|
@@ -9,8 +9,8 @@ required = TRUE
|
||||
configure = admin/structure/types
|
||||
stylesheets[all][] = node.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -410,6 +410,7 @@ function node_schema() {
|
||||
'nid' => array(
|
||||
'description' => 'The {node}.nid that was read.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
),
|
||||
@@ -943,6 +944,23 @@ function node_update_7015() {
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change {history}.nid to an unsigned int in order to match {node}.nid.
|
||||
*/
|
||||
function node_update_7016() {
|
||||
db_drop_primary_key('history');
|
||||
db_drop_index('history', 'nid');
|
||||
db_change_field('history', 'nid', 'nid', array(
|
||||
'description' => 'The {node}.nid that was read.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
'default' => 0,
|
||||
));
|
||||
db_add_primary_key('history', array('uid', 'nid'));
|
||||
db_add_index('history', 'nid', array('nid'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup updates-7.x-extra".
|
||||
*/
|
||||
|
@@ -1518,7 +1518,7 @@ class NodeTypeTestCase extends DrupalWebTestCase {
|
||||
* Tests editing a node type using the UI.
|
||||
*/
|
||||
function testNodeTypeEditing() {
|
||||
$web_user = $this->drupalCreateUser(array('bypass node access', 'administer content types'));
|
||||
$web_user = $this->drupalCreateUser(array('bypass node access', 'administer content types', 'administer fields'));
|
||||
$this->drupalLogin($web_user);
|
||||
|
||||
$instance = field_info_instance('node', 'body', 'page');
|
||||
@@ -2768,8 +2768,8 @@ class NodeAccessFieldTestCase extends NodeWebTestCase {
|
||||
node_access_rebuild();
|
||||
|
||||
// Create some users.
|
||||
$this->admin_user = $this->drupalCreateUser(array('access content', 'bypass node access'));
|
||||
$this->content_admin_user = $this->drupalCreateUser(array('access content', 'administer content types'));
|
||||
$this->admin_user = $this->drupalCreateUser(array('access content', 'bypass node access', 'administer fields'));
|
||||
$this->content_admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer fields'));
|
||||
|
||||
// Add a custom field to the page content type.
|
||||
$this->field_name = drupal_strtolower($this->randomName() . '_field_name');
|
||||
@@ -2986,3 +2986,36 @@ class NodePageCacheTest extends NodeWebTestCase {
|
||||
$this->assertResponse(404);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that multi-byte UTF-8 characters are stored and retrieved correctly.
|
||||
*/
|
||||
class NodeMultiByteUtf8Test extends NodeWebTestCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Multi-byte UTF-8',
|
||||
'description' => 'Test that multi-byte UTF-8 characters are stored and retrieved correctly.',
|
||||
'group' => 'Node',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that multi-byte UTF-8 characters are stored and retrieved correctly.
|
||||
*/
|
||||
public function testMultiByteUtf8() {
|
||||
$connection = Database::getConnection();
|
||||
// On MySQL, this test will only run if 'charset' is set to 'utf8mb4' in
|
||||
// settings.php.
|
||||
if (!($connection->utf8mb4IsSupported() && $connection->utf8mb4IsActive())) {
|
||||
return;
|
||||
}
|
||||
$title = '🐙';
|
||||
$this->assertTrue(drupal_strlen($title, 'utf-8') < strlen($title), 'Title has multi-byte characters.');
|
||||
$node = $this->drupalCreateNode(array('title' => $title));
|
||||
$this->drupalGet('node/' . $node->nid);
|
||||
$result = $this->xpath('//h1[@id="page-title"]');
|
||||
$this->assertEqual(trim((string) $result[0]), $title, 'The passed title was returned.');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
project = "drupal"
|
||||
datestamp = "1456343506"
|
||||
datestamp = "1475694174"
|
||||
|
||||
|
Reference in New Issue
Block a user