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
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ EOF;
// Enable some standard blocks.
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(
'module' => 'block',
'delta' => 101,
......@@ -114,6 +114,7 @@ EOF;
'weight' => 0,
'region' => 'contactinfo',
'pages' => '',
'title' => 'Contact Us',
'cache' => DRUPAL_CACHE_GLOBAL,
))
->values(array(
......@@ -124,6 +125,7 @@ EOF;
'weight' => 0,
'region' => 'leftcollinks',
'pages' => '',
'title' => 'Related Links',
'cache' => DRUPAL_CACHE_GLOBAL,
))
->values(array(
......@@ -134,6 +136,7 @@ EOF;
'weight' => 0,
'region' => 'optionalfooter',
'pages' => '',
'title' => '<none>',
'cache' => DRUPAL_CACHE_GLOBAL,
))
->values(array(
......@@ -144,6 +147,7 @@ EOF;
'weight' => 0,
'region' => 'footercontent',
'pages' => '',
'title' => '<none>',
'cache' => DRUPAL_CACHE_GLOBAL,
))
->execute();
......
......@@ -334,3 +334,27 @@ function unl_update_7108() {
'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
$this->_blocks['contact_info'] = $this->_get_instance_editable_content($html, 'contactinfo');
$this->_blocks['optional_footer'] = $this->_get_instance_editable_content($html, 'optionalfooter');
$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['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() {
......
......@@ -127,30 +127,15 @@ if ($page['sidebar_first'] && !$page['sidebar_second']) {
}
// Related Links
$leftcollinks = '';
if ($page['leftcollinks']) {
$leftcollinks = render($page['leftcollinks']);
$t->leftcollinks = render($page['leftcollinks']);
}
$t->leftcollinks = <<<EOF
<h3>Related Links</h3>
$leftcollinks
EOF;
// Contacting Us
$contactinfo = '';
// Contact Us
if ($page['contactinfo']) {
$contactinfo = render($page['contactinfo']);
$t->contactinfo = render($page['contactinfo']);
}
$t->contactinfo = <<<EOF
<h3>Contacting Us</h3>
$contactinfo
EOF;
// Optional Footer
if ($page['optionalfooter']) {
$t->optionalfooter = render($page['optionalfooter']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment