Fixes a bug that prevented changing wiki page resource paths once set, a=chris

Chris Pollett [2018-05-23 22:May:rd]
Fixes a bug that prevented changing wiki page resource paths once set, a=chris
Filename
src/models/GroupModel.php
diff --git a/src/models/GroupModel.php b/src/models/GroupModel.php
index 472f7883b..13a39e244 100644
--- a/src/models/GroupModel.php
+++ b/src/models/GroupModel.php
@@ -1199,7 +1199,7 @@ class GroupModel extends Model implements MediaConstants
             $result = $db->execute($sql, [$parsed_page, $page_id]);
         } else {
             $discuss_thread = $this->addGroupItem(0, $group_id, $user_id,
-                $thread_title, $thread_description." ".date("r", $pubdate),
+                $thread_title, $thread_description." " . date("r", $pubdate),
                 C\WIKI_GROUP_ITEM);
             $sql = "INSERT INTO GROUP_PAGE (DISCUSS_THREAD, GROUP_ID,
                 TITLE, PAGE, LOCALE_TAG) VALUES (?, ?, ?, ?, ?)";
@@ -1649,7 +1649,7 @@ class GroupModel extends Model implements MediaConstants
                 file_exists($thumb_path . $sub_path)) {
                 return [$group_path . $sub_path, $thumb_path . $sub_path,
                     $group_path, $thumb_path];
-            } elseif (!$create) {
+            } else if (!$create) {
                 return false;
             }
         } elseif (!$create) {
@@ -1665,7 +1665,7 @@ class GroupModel extends Model implements MediaConstants
             version to the new locations
          */
         if (file_exists($group_path) || L\makePath($group_path)) {
-            if (!$redirected &&
+            if ($check_redirect && !$redirected &&
                 file_exists($group_path . "/$redirect_filename")) {
                 $tmp_path = file_get_contents($group_path .
                     "/$redirect_filename");
ViewGit