Started work on permitting search on multiple sites at one time.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 4 Aug 2016 20:00:58 +0000 (16:00 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 4 Aug 2016 20:00:58 +0000 (16:00 -0400)
classes/data/dataManagement.php
classes/glmSearch.php
models/admin/dashboardWidget/search.php
views/admin/dashboardWidget/search.html
views/admin/management/search.html

index 682c99a..7d28a7b 100644 (file)
@@ -127,7 +127,6 @@ class GlmDataSearchManagement extends GlmDataAbstract
             'website' => array (
                 'field' => 'website',
                 'type' => 'text',
-                'required' => true,
                 'use' => 'a'
             ),
 
index 2af2878..deda4f0 100644 (file)
@@ -278,7 +278,10 @@ class GLMSearch
         if ($this->filter) {\r
 \r
             // Determine if there's a specific filter type and value - Default to host:\r
-            $query = 'host:"'.$this->website.'"';\r
+            $query = '';\r
+            if (trim($this->website) != '') {\r
+                $query = 'host:"'.$this->website.'"';\r
+            }\r
             if ($this->filterType) {\r
                 if ($this->filterValue) {\r
                     $query = $this->filterType.':"'.$this->filterValue.'"';\r
index 22f6b63..ac109de 100644 (file)
@@ -106,13 +106,13 @@ class GlmMembersAdmin_dashboardWidget_search
         }
 
         $websiteNotice = false;
-        if (trim($website) != GLM_MEMBERS_HOSTNAME) {
+        if (trim($website) != '' && (trim($website) != GLM_MEMBERS_HOSTNAME)) {
             $websiteNotice = true;
             $displayNotice = true;
         }
 
         $loginNotice = false;
-        if (trim($website) == '') {
+        if (trim($login) == '') {
             $loginNotice = true;
             $displayNotice = true;
         }
index 0787060..a1f93db 100644 (file)
@@ -5,7 +5,7 @@
         <a href="{$adminUrl}?page=glm-members-admin-menu-management&glm_action=search">Fix search settings</a>
     </h4>
     {if $indexNotice}No Index set<br>{/if}
-    {if $websiteNotice}No Website set or does not match current site<br>{/if}
+    {if $websiteNotice}Website does not match current site<br>{/if}
     {if $loginNotice}No OSS Login set<br>{/if}
     {if $keyNotice}No OSS Key set<br>{/if}
     
index ef784ee..2518214 100644 (file)
@@ -26,6 +26,7 @@
                 <th {if $searchSettings.fieldRequired.website}class="glm-required"{/if}>Website:</th>
                 <td {if $searchSettings.fieldFail.website}class="glm-form-bad-input glm-form-bad-input-misc"{/if}>
                     <input type="text" name="website" value="{$searchSettings.fieldData.website}" class="glm-form-text-input-medium">
+                    <!-- Leave blank to search all sites in the selected Index.  -->
                     {if $searchSettings.fieldFail.website}<p>{$searchSettings.fieldFail.website}</p>{/if}
                 </td>
             </tr>