Move files into correct names.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Feb 2017 15:51:21 +0000 (10:51 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 8 Feb 2017 15:51:21 +0000 (10:51 -0500)
For new name

models/admin/communicator/index.php [new file with mode: 0644]
models/admin/management/communicator.php [new file with mode: 0644]
models/admin/management/streamsend.php [deleted file]
models/admin/streamsend/index.php [deleted file]
views/admin/management/communicator.html [new file with mode: 0644]
views/admin/management/streamsend.html [deleted file]

diff --git a/models/admin/communicator/index.php b/models/admin/communicator/index.php
new file mode 100644 (file)
index 0000000..5413348
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Streamsend Dashboard
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link     http://dev.gaslightmedia.com/
+ */
+
+class GlmMembersAdmin_streamsend_index // extends GlmDataStreamsend
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+
+    /**
+     * Constructor
+     *
+     * This contractor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successful and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the controller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        /*
+         * Run constructor for the Streamsend data class
+         *
+         * Note, the third parameter is a flag that indicates to the Contacts
+         * data class that it should flag a group of fields as 'view_only'.
+         */
+        //parent::__construct(false, false, true);
+
+    }
+
+    public function modelAction($actionData = false)
+    {
+
+        // Compile template data
+        $templateData = array(
+        );
+             // Return status, any suggested view, and any data to controller
+        return array(
+            'status'        => true,
+            'modelRedirect' => false,
+            'view'          => 'admin/streamsend/index.html',
+            'data'          => $templateData
+        );
+
+    }
+
+
+}
diff --git a/models/admin/management/communicator.php b/models/admin/management/communicator.php
new file mode 100644 (file)
index 0000000..7cfdc41
--- /dev/null
@@ -0,0 +1,214 @@
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members DB - Streamsend Add-on - Management Streamsend Tab
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author     Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  streamsend.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link     http://dev.gaslightmedia.com/
+ */
+
+// Load Management Streamsend data abstract
+//require_once GLM_MEMBERS_STREAMSEND_PLUGIN_CLASS_PATH.'/data/dataManagement.php';
+
+/**
+ * GlmMembersAdmin_management_streamsend
+ *
+ * PHP version 5
+ *
+ * @category Model
+ * @package GLM Member DB
+ * @author    Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ *            @release SVN: $Id: packaging.php,v 1.0 2011/01/25 19:31:47 cscott
+ *            Exp $
+ */
+class GlmMembersAdmin_management_streamsend //extends GlmDataStreamsendManagement
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * dbh Postgres database connection
+     *
+     * @var mixed
+     * @access public
+     */
+    public $dbh;
+    /**
+     * settings used for the schema and tablenames
+     *
+     * @var mixed
+     * @access public
+     */
+    public $settings = array();
+    /**
+     * streamsend
+     *
+     * @var bool
+     * @access public
+     */
+    public $streamsend = array();
+    public $image_owner;
+
+    /**
+     * Constructor
+     *
+     * This contructor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successfull and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the contoller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        // Run constructor for members data class
+        //parent::__construct(false, false);
+
+    }
+
+    /**
+     * modelAction
+     *
+     * @param bool $actionData
+     * @access public
+     * @return void
+     */
+    public function modelAction($actionData = false)
+    {
+
+        $option                = false;
+        $settings_updated      = false;
+        $settings_update_error = false;
+        $streamsend_settings   = false;
+        $option2               = false;
+
+        if (isset($_REQUEST['option'])) {
+            $option = $_REQUEST['option'];
+        }
+
+        switch ($option) {
+
+            case 'settings':
+
+            default:
+
+                // Make sure option is set if default
+                $option = 'settings';
+
+                // Determine if current user can edit configurations
+                if (!current_user_can('glm_members_management')) {
+                    return array(
+                        'status'           => false,
+                        'menuItemRedirect' => 'error',
+                        'modelRedirect'    => 'index',
+                        'view'             => 'admin/error/index.html',
+                        'data'             => array(
+                            'reason' => 'User does not have rights to make configuration changes.'
+                        )
+                    );
+                }
+
+                // Check for submission option
+                $option2 = '';
+                if (isset($_REQUEST['option2'])) {
+                    $option2 = $_REQUEST['option2'];
+                }
+
+                switch($option2) {
+
+                    // Update the settings and redisplay the form
+                    case 'submit':
+
+                        // Update the event management settings
+                        //$streamsend_settings = $this->updateEntry(1);
+                        if ($streamsend_settings['status']) {
+                            $settings_updated = true;
+                        } else {
+                            $settings_update_error = true;
+                        }
+
+                        break;
+
+                    // Default is to get the current settings and display the form
+                    default:
+
+                        // Try to get the first (should be only) entry for general settings.
+                        //$streamsend_settings = $this->editEntry(1);
+                        //echo '<pre>$streamsend_settings: ' . print_r( $streamsend_settings, true ) . '</pre>';
+
+                        if ($streamsend_settings === false) {
+
+                            if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+                                glmMembersAdmin::addNotice("<b>&nbsp;&nbsp;/models/admin/management/streamsend.php: Unable to load streamsend management settings.", 'Alert');
+                            }
+
+                        }
+
+                        break;
+
+                }
+
+                break;
+
+        }
+
+        // Populate the state list for event default state selection
+        $streamsend_settings['event_default_state'] = $this->config['states'];
+
+        // Compile template data
+        $template_data = array(
+            'option'              => $option,
+            'settingsUpdated'     => $settings_updated,
+            'settingsUpdateError' => $settings_update_error,
+            'streamsendSettings'  => $streamsend_settings,
+        );
+
+        // Return status, suggested view, and data to controller
+        return array(
+            'status'           => true,
+            'menuItemRedirect' => false,
+            'modelRedirect'    => false,
+            'view'             => 'admin/management/streamsend.html',
+            'data'             => $template_data
+        );
+
+
+    }
+
+}
+
+?>
diff --git a/models/admin/management/streamsend.php b/models/admin/management/streamsend.php
deleted file mode 100644 (file)
index 7cfdc41..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-<?php
-/**
- * Gaslight Media Members Database
- * GLM Members DB - Streamsend Add-on - Management Streamsend Tab
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmMembersDatabase
- * @author     Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  streamsend.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link     http://dev.gaslightmedia.com/
- */
-
-// Load Management Streamsend data abstract
-//require_once GLM_MEMBERS_STREAMSEND_PLUGIN_CLASS_PATH.'/data/dataManagement.php';
-
-/**
- * GlmMembersAdmin_management_streamsend
- *
- * PHP version 5
- *
- * @category Model
- * @package GLM Member DB
- * @author    Chuck Scott <cscott@gaslightmedia.com>
- * @license http://www.gaslightmedia.com Gaslightmedia
- *            @release SVN: $Id: packaging.php,v 1.0 2011/01/25 19:31:47 cscott
- *            Exp $
- */
-class GlmMembersAdmin_management_streamsend //extends GlmDataStreamsendManagement
-{
-
-    /**
-     * WordPress Database Object
-     *
-     * @var $wpdb
-     * @access public
-     */
-    public $wpdb;
-    /**
-     * dbh Postgres database connection
-     *
-     * @var mixed
-     * @access public
-     */
-    public $dbh;
-    /**
-     * settings used for the schema and tablenames
-     *
-     * @var mixed
-     * @access public
-     */
-    public $settings = array();
-    /**
-     * streamsend
-     *
-     * @var bool
-     * @access public
-     */
-    public $streamsend = array();
-    public $image_owner;
-
-    /**
-     * Constructor
-     *
-     * This contructor performs the work for this model. This model returns
-     * an array containing the following.
-     *
-     * 'status'
-     *
-     * True if successfull and false if there was a fatal failure.
-     *
-     * 'view'
-     *
-     * A suggested view name that the contoller should use instead of the
-     * default view for this model or false to indicate that the default view
-     * should be used.
-     *
-     * 'data'
-     *
-     * Data that the model is returning for use in merging with the view to
-     * produce output.
-     *
-     * @wpdb object WordPress database object
-     *
-     * @return array Array containing status, suggested view, and any data
-     */
-    public function __construct ($wpdb, $config)
-    {
-
-        // Save WordPress Database object
-        $this->wpdb = $wpdb;
-
-        // Save plugin configuration object
-        $this->config = $config;
-
-        // Run constructor for members data class
-        //parent::__construct(false, false);
-
-    }
-
-    /**
-     * modelAction
-     *
-     * @param bool $actionData
-     * @access public
-     * @return void
-     */
-    public function modelAction($actionData = false)
-    {
-
-        $option                = false;
-        $settings_updated      = false;
-        $settings_update_error = false;
-        $streamsend_settings   = false;
-        $option2               = false;
-
-        if (isset($_REQUEST['option'])) {
-            $option = $_REQUEST['option'];
-        }
-
-        switch ($option) {
-
-            case 'settings':
-
-            default:
-
-                // Make sure option is set if default
-                $option = 'settings';
-
-                // Determine if current user can edit configurations
-                if (!current_user_can('glm_members_management')) {
-                    return array(
-                        'status'           => false,
-                        'menuItemRedirect' => 'error',
-                        'modelRedirect'    => 'index',
-                        'view'             => 'admin/error/index.html',
-                        'data'             => array(
-                            'reason' => 'User does not have rights to make configuration changes.'
-                        )
-                    );
-                }
-
-                // Check for submission option
-                $option2 = '';
-                if (isset($_REQUEST['option2'])) {
-                    $option2 = $_REQUEST['option2'];
-                }
-
-                switch($option2) {
-
-                    // Update the settings and redisplay the form
-                    case 'submit':
-
-                        // Update the event management settings
-                        //$streamsend_settings = $this->updateEntry(1);
-                        if ($streamsend_settings['status']) {
-                            $settings_updated = true;
-                        } else {
-                            $settings_update_error = true;
-                        }
-
-                        break;
-
-                    // Default is to get the current settings and display the form
-                    default:
-
-                        // Try to get the first (should be only) entry for general settings.
-                        //$streamsend_settings = $this->editEntry(1);
-                        //echo '<pre>$streamsend_settings: ' . print_r( $streamsend_settings, true ) . '</pre>';
-
-                        if ($streamsend_settings === false) {
-
-                            if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
-                                glmMembersAdmin::addNotice("<b>&nbsp;&nbsp;/models/admin/management/streamsend.php: Unable to load streamsend management settings.", 'Alert');
-                            }
-
-                        }
-
-                        break;
-
-                }
-
-                break;
-
-        }
-
-        // Populate the state list for event default state selection
-        $streamsend_settings['event_default_state'] = $this->config['states'];
-
-        // Compile template data
-        $template_data = array(
-            'option'              => $option,
-            'settingsUpdated'     => $settings_updated,
-            'settingsUpdateError' => $settings_update_error,
-            'streamsendSettings'  => $streamsend_settings,
-        );
-
-        // Return status, suggested view, and data to controller
-        return array(
-            'status'           => true,
-            'menuItemRedirect' => false,
-            'modelRedirect'    => false,
-            'view'             => 'admin/management/streamsend.html',
-            'data'             => $template_data
-        );
-
-
-    }
-
-}
-
-?>
diff --git a/models/admin/streamsend/index.php b/models/admin/streamsend/index.php
deleted file mode 100644 (file)
index 5413348..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/**
- * Gaslight Media Members Database
- * Admin Streamsend Dashboard
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmMembersDatabase
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link     http://dev.gaslightmedia.com/
- */
-
-class GlmMembersAdmin_streamsend_index // extends GlmDataStreamsend
-{
-
-    /**
-     * WordPress Database Object
-     *
-     * @var $wpdb
-     * @access public
-     */
-    public $wpdb;
-    /**
-     * Plugin Configuration Data
-     *
-     * @var $config
-     * @access public
-     */
-    public $config;
-
-    /**
-     * Constructor
-     *
-     * This contractor performs the work for this model. This model returns
-     * an array containing the following.
-     *
-     * 'status'
-     *
-     * True if successful and false if there was a fatal failure.
-     *
-     * 'view'
-     *
-     * A suggested view name that the controller should use instead of the
-     * default view for this model or false to indicate that the default view
-     * should be used.
-     *
-     * 'data'
-     *
-     * Data that the model is returning for use in merging with the view to
-     * produce output.
-     *
-     * @wpdb object WordPress database object
-     *
-     * @return array Array containing status, suggested view, and any data
-     */
-    public function __construct ($wpdb, $config)
-    {
-
-        // Save WordPress Database object
-        $this->wpdb = $wpdb;
-
-        // Save plugin configuration object
-        $this->config = $config;
-
-        /*
-         * Run constructor for the Streamsend data class
-         *
-         * Note, the third parameter is a flag that indicates to the Contacts
-         * data class that it should flag a group of fields as 'view_only'.
-         */
-        //parent::__construct(false, false, true);
-
-    }
-
-    public function modelAction($actionData = false)
-    {
-
-        // Compile template data
-        $templateData = array(
-        );
-             // Return status, any suggested view, and any data to controller
-        return array(
-            'status'        => true,
-            'modelRedirect' => false,
-            'view'          => 'admin/streamsend/index.html',
-            'data'          => $templateData
-        );
-
-    }
-
-
-}
diff --git a/views/admin/management/communicator.html b/views/admin/management/communicator.html
new file mode 100644 (file)
index 0000000..077964f
--- /dev/null
@@ -0,0 +1,29 @@
+{include file='admin/management/header.html'}
+
+    <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
+        <a id="glm-settings" data-show-table="glm-table-settings" class="glm-settings-tab nav-tab{if $option=='settings'} nav-tab-active{/if}">Settings</a>
+    </h2>
+
+    <!-- Management Settings -->
+
+    <table id="glm-table-settings" class="glm-admin-table glm-settings-table{if $option!='settings'} glm-hidden{/if}">
+        <tr>
+            <td colspan="2">
+                {if $settingsUpdated}<h2 class="glm-notice glm-flash-updated glm-right">Settings Updated</h2>{/if}
+                {if $settingsUpdateError}<span class="glm-error glm-flash-updated glm-right">Settings Update Error</span>{/if}
+                <h2>Management Settings</h2>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
+                    <input type="hidden" name="glm_action" value="streamsend">
+                    <input type="hidden" name="option" value="settings">
+                    <input type="hidden" name="option2" value="submit">
+                    <table class="glm-admin-table">
+                    </table>
+                    <input type="submit" value="Update Settings" class="button-primary">
+                </form>
+            </td>
+        </tr>
+    </table>
diff --git a/views/admin/management/streamsend.html b/views/admin/management/streamsend.html
deleted file mode 100644 (file)
index 077964f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{include file='admin/management/header.html'}
-
-    <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
-        <a id="glm-settings" data-show-table="glm-table-settings" class="glm-settings-tab nav-tab{if $option=='settings'} nav-tab-active{/if}">Settings</a>
-    </h2>
-
-    <!-- Management Settings -->
-
-    <table id="glm-table-settings" class="glm-admin-table glm-settings-table{if $option!='settings'} glm-hidden{/if}">
-        <tr>
-            <td colspan="2">
-                {if $settingsUpdated}<h2 class="glm-notice glm-flash-updated glm-right">Settings Updated</h2>{/if}
-                {if $settingsUpdateError}<span class="glm-error glm-flash-updated glm-right">Settings Update Error</span>{/if}
-                <h2>Management Settings</h2>
-            </td>
-        </tr>
-        <tr>
-            <td>
-                <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
-                    <input type="hidden" name="glm_action" value="streamsend">
-                    <input type="hidden" name="option" value="settings">
-                    <input type="hidden" name="option2" value="submit">
-                    <table class="glm-admin-table">
-                    </table>
-                    <input type="submit" value="Update Settings" class="button-primary">
-                </form>
-            </td>
-        </tr>
-    </table>