normalizing the space between the fat arrows in the array keys in the admin hooks...
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Sep 2018 16:55:56 +0000 (12:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 21 Sep 2018 16:55:56 +0000 (12:55 -0400)
models/admin/newDashboard/index.php

index ba8459e..16e1bf1 100644 (file)
@@ -199,7 +199,7 @@ class GlmMembersAdmin_newDashboard_index extends GlmDataMembers
         }
 
         // Not sure how to make the 'callback' use $this-> or this could get pulled out
-        function orderSort ($a, $b) { return (strcmp ($a['order'],$b['order']));    }
+        // function orderSort ($a, $b) { return (strcmp ($a['order'],$b['order']));    }
 
         // In case we want to treat the widget data before sending it to the viewfile.
         // May be able to avoid sending the (huge) Config array to the view
@@ -213,7 +213,7 @@ class GlmMembersAdmin_newDashboard_index extends GlmDataMembers
                 $addons[$a['slug']]['widgetData'] = $this->queryWidgetLists($addons[$a['slug']]['widgetData']);
 
                 // Sort the component list based on the 'order'
-                uasort($addons[$a['slug']]['widgetData']['components'], 'orderSort');
+                uasort($addons[$a['slug']]['widgetData']['components'], array($this, 'orderSort') ) ;
             } else {
                 echo "<br>" . $a['slug'] .  " has no filter called " . $a['slug'] . "-dashboard-widget";
             }
@@ -246,7 +246,7 @@ class GlmMembersAdmin_newDashboard_index extends GlmDataMembers
 
     }
 
-    // public function orderSort ($a, $b) { return (strcmp ($a['order'],$b['order']));    }
+    public function orderSort ($a, $b) { return (strcmp ($a['order'],$b['order']));    }
 
     public function queryWidgetLists( &$widgetData = false ) {