From ca0a6f3dea052028c6fc8b0f0429e8a1878692a8 Mon Sep 17 00:00:00 2001
From: Nick Barry <nbarry@unl.edu>
Date: Tue, 25 Nov 2014 12:06:31 -0600
Subject: [PATCH] Keep formatting for headings in bulletin view

---
 .../modules/bulletin/controllers/ViewController.php       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/application/modules/bulletin/controllers/ViewController.php b/application/modules/bulletin/controllers/ViewController.php
index 748ff104..5f86e157 100644
--- a/application/modules/bulletin/controllers/ViewController.php
+++ b/application/modules/bulletin/controllers/ViewController.php
@@ -16,7 +16,7 @@ class Bulletin_ViewController extends Requests_ViewController
             $session = new Zend_Session_Namespace('Edit Request ' . $in['id']);
             $section = $session->section;
 
-            
+
             if ($request->getId()) {
                 $this->view->initialRequest = false;
             } else {
@@ -46,8 +46,12 @@ class Bulletin_ViewController extends Requests_ViewController
         $this->view->request = $request;
         $this->view->id = $in['id'];
         $this->view->section = $section;
+
         //$this->view->originalFileContents = UNL_UndergraduateBulletin_EPUB_Utilities::format($this->view->originalFileContents);
         //$this->view->proposedFileContents = UNL_UndergraduateBulletin_EPUB_Utilities::format($this->view->proposedFileContents);
+        $this->view->originalFileContents = UNL_UndergraduateBulletin_EPUB_Utilities::convertHeadings($this->view->originalFileContents);
+        $this->view->proposedFileContents = UNL_UndergraduateBulletin_EPUB_Utilities::convertHeadings($this->view->proposedFileContents);
+
         $this->view->isRequestValid = $request->isValid();
     }
 
@@ -110,6 +114,7 @@ class Bulletin_ViewController extends Requests_ViewController
             );
             $contents = Bulletin_SectionModel::getBodyHtml($contents);
             //$contents = UNL_UndergraduateBulletin_EPUB_Utilities::format($contents);
+            $contents = UNL_UndergraduateBulletin_EPUB_Utilities::convertHeadings($contents);
             $requestOriginalFileContents[$request->getId()] = $contents;
 
             $contents = $repo->getFileNotes(
@@ -117,6 +122,7 @@ class Bulletin_ViewController extends Requests_ViewController
             );
             $contents = Bulletin_SectionModel::getBodyHtml($contents);
             //$contents = UNL_UndergraduateBulletin_EPUB_Utilities::format($contents);
+            $contents = UNL_UndergraduateBulletin_EPUB_Utilities::convertHeadings($contents);
             $requestProposedFileContents[$request->getId()] = $contents;
         }
 
-- 
GitLab