CRM_Utils_System_WordPress::url - Change code-branch for case "!isset($path)&&!isset...
authorTim Otten <totten@civicrm.org>
Wed, 9 Apr 2014 00:41:18 +0000 (17:41 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 9 Apr 2014 03:12:04 +0000 (20:12 -0700)
CRM/Utils/System/WordPress.php

index fb3f634f4b5ea36f2056c071f004b6f06cf2e7dc..1ec74201548f758fa6811b1fff722d0473d10687 100644 (file)
@@ -312,6 +312,13 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
       $base .= $config->wpBasePage;
     }
 
+    if (!isset($path) && !isset($query)) {
+      // This seems to have very different structure than the others. I don't know
+      // why it's so different (and I can only find two obvious use-cases, of which
+      // at least one looks gratuitous).
+      return $base . $fragment;
+    }
+
     if (isset($path)) {
       if (isset($query)) {
         if ($permlinkStructure != '' && ($pageID || $script != '')) {
@@ -339,9 +346,6 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
           return $base . '?' . $query . $pageID . $fragment;
         }
       }
-      else {
-        return $base . $fragment;
-      }
     }
   }