Add next and prev link to media display 6, a=chris

Chris Pollett [2016-03-07 08:Mar:th]
Add next and prev link to media display 6, a=chris
Filename
src/controllers/components/SocialComponent.php
src/views/StaticView.php
diff --git a/src/controllers/components/SocialComponent.php b/src/controllers/components/SocialComponent.php
index 045e84ff3..442477963 100644
--- a/src/controllers/components/SocialComponent.php
+++ b/src/controllers/components/SocialComponent.php
@@ -2185,6 +2185,7 @@ class SocialComponent extends Component implements CrawlConstants
         $data['ROOT_LINK'] = $folder_prefix;
         if (!empty($data['SUB_PATH'])) {
              $folder_prefix .= "&sf=" . $data['SUB_PATH'];
+             $data['UP_LINK'] = $folder_prefix;
         }
         $url_prefix = $folder_prefix . "&arg=media";
         $prev_name = ($i < $num_resources &&
@@ -2196,7 +2197,6 @@ class SocialComponent extends Component implements CrawlConstants
         $file_name = $name_parts['filename'];
         $data['MEDIA_NAME'] = $media_name;
         $page_string = "";
-        $data['UP_LINK'] = $folder_prefix;
         if (!empty($prev_name)) {
             $data['PREV_LINK'] = "$url_prefix&amp;n=$prev_name";
         }
diff --git a/src/views/StaticView.php b/src/views/StaticView.php
index 7bd10e3d8..c45810bdb 100644
--- a/src/views/StaticView.php
+++ b/src/views/StaticView.php
@@ -99,11 +99,11 @@ class StaticView extends View
                 } else {
                     if (!empty($data['MEDIA_NAME'])) { ?>
                         <div class="top-margin"><b><a href="<?=
-                        $data['ROOT_LINK']
-                        ?>"><?=$data['PAGE_NAME'] ?></a></b> : <?php
-                        if (!empty($data['UP_LINK']) {
+                        $data['ROOT_LINK'] ?>"><?=
+                        $data['PAGE_NAME'] ?></a></b> : <?php
+                        if (!empty($data['UP_LINK'])) {
                              e("<a href='{$data['UP_LINK']
-                                }'>".$data['SUB_PATH']."</a> : ");
+                                }'>". $data['SUB_PATH']. "</a> : ");
                         }
                         if (!empty($data['PREV_LINK'])) {
                             e("<a href='{$data['PREV_LINK']
ViewGit