Moved session init to index from adminHooks to fix pseudo-random sort on front-end.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Nov 2018 16:59:27 +0000 (11:59 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Nov 2018 17:36:27 +0000 (12:36 -0500)
index.php
readme.txt
setup/adminHooks.php [changed mode: 0644->0755]

index 454e7a9..64253a9 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Associate - Members Plugin
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media GLM Associate core plugin and Members database.
- * Version: 2.10.45
+ * Version: 2.10.46
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabase
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.10.45
+ * @version 2.10.46
  */
 
 $GLOBALS['glmAssociateMemTracker'] = memory_get_usage();
@@ -47,7 +47,7 @@ if (!defined('ABSPATH')) {
  *
  */
 
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.45');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.10.46');
 define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.44');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
@@ -429,6 +429,13 @@ if (GLM_MEMBERS_PLUGIN_DEBUG_VERBOSE) {
     trigger_error(glmAssociateMemoryUsage()." - End glm-member-db setup",E_USER_NOTICE);
 }
 
+// Initialize a PHP session if not already set
+add_action( 'init', function(){
+    if ( ! session_id() ) {
+        session_start();
+    }
+});
+
 /*
  *
  * Run desired controller
index b38dd1e..1f10cb7 100755 (executable)
@@ -70,6 +70,9 @@ There is of course much more to this.
 * Fixed member listings not using selected sort order setting past first page.
 * Smarty Templates updated to version 3.1.33 due to use of "each()" that is being depricated in PHP.
 
+= 2.10.46 =
+* Moved session startup from adminHooks.php to index.php to ensure there's always a session started.
+
 = 2.10.43 =
 * Country is no longer required for Authorize.net Payment Gateway unless International payment
 
old mode 100644 (file)
new mode 100755 (executable)
index 2f167d2..825f15d
@@ -398,10 +398,3 @@ function glm_admin_import_help_tab () {
          __( 'Help Guide' ) . '</a></p>'
      );
 }
-
-// If no session then start one.
-add_action( 'init', function(){
-    if ( ! session_id() ) {
-        session_start();
-    }
-});