Skip to content
Snippets Groups Projects
Commit 1e3f73be authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-154] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@795 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 291b14cf
Branches
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ EOF; ...@@ -105,7 +105,7 @@ EOF;
// Enable some standard blocks. // Enable some standard blocks.
db_insert('block') db_insert('block')
->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache')) ->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'title', 'cache'))
->values(array( ->values(array(
'module' => 'block', 'module' => 'block',
'delta' => 101, 'delta' => 101,
...@@ -114,6 +114,7 @@ EOF; ...@@ -114,6 +114,7 @@ EOF;
'weight' => 0, 'weight' => 0,
'region' => 'contactinfo', 'region' => 'contactinfo',
'pages' => '', 'pages' => '',
'title' => 'Contact Us',
'cache' => DRUPAL_CACHE_GLOBAL, 'cache' => DRUPAL_CACHE_GLOBAL,
)) ))
->values(array( ->values(array(
...@@ -124,6 +125,7 @@ EOF; ...@@ -124,6 +125,7 @@ EOF;
'weight' => 0, 'weight' => 0,
'region' => 'leftcollinks', 'region' => 'leftcollinks',
'pages' => '', 'pages' => '',
'title' => 'Related Links',
'cache' => DRUPAL_CACHE_GLOBAL, 'cache' => DRUPAL_CACHE_GLOBAL,
)) ))
->values(array( ->values(array(
...@@ -134,6 +136,7 @@ EOF; ...@@ -134,6 +136,7 @@ EOF;
'weight' => 0, 'weight' => 0,
'region' => 'optionalfooter', 'region' => 'optionalfooter',
'pages' => '', 'pages' => '',
'title' => '<none>',
'cache' => DRUPAL_CACHE_GLOBAL, 'cache' => DRUPAL_CACHE_GLOBAL,
)) ))
->values(array( ->values(array(
...@@ -144,6 +147,7 @@ EOF; ...@@ -144,6 +147,7 @@ EOF;
'weight' => 0, 'weight' => 0,
'region' => 'footercontent', 'region' => 'footercontent',
'pages' => '', 'pages' => '',
'title' => '<none>',
'cache' => DRUPAL_CACHE_GLOBAL, 'cache' => DRUPAL_CACHE_GLOBAL,
)) ))
->execute(); ->execute();
......
...@@ -334,3 +334,27 @@ function unl_update_7108() { ...@@ -334,3 +334,27 @@ function unl_update_7108() {
'default' => '', 'default' => '',
)); ));
} }
// Update blocks to have correct titles, to correspond to a profile/theme update.
function unl_update_7109() {
db_update('block')
->condition('title', '')
->condition('region', 'leftcollinks')
->fields(array('title' => 'Related Links'))
->execute();
db_update('block')
->condition('title', '')
->condition('region', 'contactinfo')
->fields(array('title' => 'Contact Us'))
->execute();
db_update('block')
->condition('title', '')
->condition('region', 'optionalfooter')
->fields(array('title' => '<none>'))
->execute();
db_update('block')
->condition('title', '')
->condition('region', 'footercontent')
->fields(array('title' => '<none>'))
->execute();
}
...@@ -482,9 +482,10 @@ class Unl_Migration_Tool ...@@ -482,9 +482,10 @@ class Unl_Migration_Tool
$this->_blocks['contact_info'] = $this->_get_instance_editable_content($html, 'contactinfo'); $this->_blocks['contact_info'] = $this->_get_instance_editable_content($html, 'contactinfo');
$this->_blocks['optional_footer'] = $this->_get_instance_editable_content($html, 'optionalfooter'); $this->_blocks['optional_footer'] = $this->_get_instance_editable_content($html, 'optionalfooter');
$this->_blocks['footer_content'] = $this->_get_instance_editable_content($html, 'footercontent'); $this->_blocks['footer_content'] = $this->_get_instance_editable_content($html, 'footercontent');
// @TODO replace these with str_replace calls
$this->_blocks['related_links'] = trim(strtr($this->_blocks['related_links'], array('<h3>Related Links</h3>' => ''))); $this->_blocks['related_links'] = trim(strtr($this->_blocks['related_links'], array('<h3>Related Links</h3>' => '')));
$this->_blocks['contact_info'] = trim(strtr($this->_blocks['contact_info'], array('<h3>Contacting Us</h3>' => ''))); $this->_blocks['contact_info'] = trim(strtr($this->_blocks['contact_info'], array('<h3>Contacting Us</h3>' => '')));
$this->_blocks['contact_info'] = trim(strtr($this->_blocks['contact_info'], array('<h3>Contact Us</h3>' => '')));
} }
private function _create_blocks() { private function _create_blocks() {
......
...@@ -127,30 +127,15 @@ if ($page['sidebar_first'] && !$page['sidebar_second']) { ...@@ -127,30 +127,15 @@ if ($page['sidebar_first'] && !$page['sidebar_second']) {
} }
// Related Links // Related Links
$leftcollinks = '';
if ($page['leftcollinks']) { if ($page['leftcollinks']) {
$leftcollinks = render($page['leftcollinks']); $t->leftcollinks = render($page['leftcollinks']);
} }
$t->leftcollinks = <<<EOF // Contact Us
<h3>Related Links</h3>
$leftcollinks
EOF;
// Contacting Us
$contactinfo = '';
if ($page['contactinfo']) { if ($page['contactinfo']) {
$contactinfo = render($page['contactinfo']); $t->contactinfo = render($page['contactinfo']);
} }
$t->contactinfo = <<<EOF
<h3>Contacting Us</h3>
$contactinfo
EOF;
// Optional Footer // Optional Footer
if ($page['optionalfooter']) { if ($page['optionalfooter']) {
$t->optionalfooter = render($page['optionalfooter']); $t->optionalfooter = render($page['optionalfooter']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment