Skip to content

Commit

Permalink
Changed migration of headlines to text items in preparation for headl…
Browse files Browse the repository at this point in the history
…ine controller deprecation.

Still gives the anomaly of double headlines after migration because the old headline module didn't display the module title.  The post-migrate FIX is to decide if you want an h1 title, make the text item title blank, or if you want an h2 title, make the module title blank.
[#151]
  • Loading branch information
dleffler committed May 4, 2011
1 parent fec12b2 commit 40606c2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class migrationController extends expController {
'resourcesmodule'=>'filedownloadController',
'rotatormodule'=>'textController',
'faqmodule'=>'faqController',
'headlinemodule'=>'headlineController',
// 'headlinemodule'=>'headlineController',
'headlinemodule'=>'textController',
'linkmodule'=>'linksController',
'weblogmodule'=>'blogController',
'listingmodule'=>'portfolioController',
Expand Down Expand Up @@ -1086,7 +1087,7 @@ private function convert($iloc, $module, $hc=0) {

//check to see if it's already pulled in (circumvent !is_original)
$ploc = $iloc;
$ploc->mod = "headline";
$ploc->mod = "text";
if ($db->countObjects($ploc->mod, "location_data='".serialize($ploc)."'")) {
$iloc->mod = 'headlinemodule';
$linked = true;
Expand All @@ -1097,9 +1098,9 @@ private function convert($iloc, $module, $hc=0) {
$headlines = $old_db->selectObjects('headline', "location_data='".serialize($iloc)."'");
if ($headlines) {
foreach ($headlines as $hl) {
$headline = new headline();
$headline = new text();
$loc = expUnserialize($hl->location_data);
$loc->mod = "headline";
$loc->mod = "text";
$headline->location_data = serialize($loc);
$headline->title = $hl->headline;
$headline->poster = 1;
Expand Down

0 comments on commit 40606c2

Please sign in to comment.