fixing conflicting smartyTemplate support names that conflict with GlmMemberDb smarty...
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 16 Nov 2017 18:26:31 +0000 (13:26 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 16 Nov 2017 18:26:31 +0000 (13:26 -0500)
controllers/admin.php
lib/smartyPrototypeTemplateSupport.php [new file with mode: 0644]
lib/smartyTemplateSupport.php [deleted file]

index a27dc3b..7e9567e 100644 (file)
@@ -391,8 +391,8 @@ class glmProtoAdmin
          */
 
         // Load Smarty Template support
-        require (GLM_PROTO_PLUGIN_DIR . '/lib/smartyTemplateSupport.php');
-        $smarty = new smartyTemplateSupport();
+        require (GLM_PROTO_PLUGIN_DIR . '/lib/smartyPrototypeTemplateSupport.php');
+        $smarty = new smartyPrototypeTemplateSupport();
 
         // Add some standard parameters
         $smarty->templateAssign('request_uri', $_SERVER['REQUEST_URI']);
diff --git a/lib/smartyPrototypeTemplateSupport.php b/lib/smartyPrototypeTemplateSupport.php
new file mode 100644 (file)
index 0000000..c496780
--- /dev/null
@@ -0,0 +1,104 @@
+<?php
+
+/**
+ * Gaslight Media Prototype Management and Display
+ * Smarty Templates Support Class
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmPrototypeManagement
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ */
+
+/*
+ * This class loads, instatiates, and configures Smarty Templates for this
+ * plugin.
+ *
+ * This class should be extended with the class that will need to use Smarty.
+ * This
+ * will make the $template object available to the class extending this one as
+ * $this->template.
+ *
+ * The templateAssign() method simplifies adding parameters to the template.
+ *
+ * To use this class you must execute the following. No need to assign the
+ * result.
+ *
+ * new smartyTemplateSupport();
+ *
+ */
+class smartyPrototypeTemplateSupport {
+
+       /**
+        * Smarty Template Object
+        *
+        * @var $template
+        * @access public
+        */
+       public $template;
+
+       /*
+        * Smarty Template Support Constructor
+        *
+        * This constructor loads and instatiates smarty templates, then adds some
+        * standard template parameters.
+        *
+        * @return object Class object
+        *
+        */
+       public function __construct() {
+
+               /*
+                * Load and instatiate Smarty Templates
+                */
+               require (GLM_PROTO_PLUGIN_DIR . '/lib/Smarty-3.1.21/libs/Smarty.class.php');
+
+               $this->template = new Smarty ();
+
+               /*
+                * Configure Smarty Templates for this site
+                */
+               $this->template->setTemplateDir ( GLM_PROTO_PLUGIN_DIR . '/views' );
+               $this->template->setCompileDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/templates_c' );
+               $this->template->setCacheDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/cache' );
+               $this->template->setConfigDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/configs' );
+       }
+
+       /*
+        * Assign parameters to the template
+        *
+        * This method assigns either one parameter to the template object in this
+        * class or an array of parameters.
+        *
+        * Submit an array of parameters to the template.
+        *
+        * @name array Array of arrays with parameter name (key), value pairs
+        *
+        * or
+        *
+        * Submit one parameter to the template
+        *
+        * @param text parameter name
+        * @param {whatever} parameter value
+        *
+        * @return void
+        */
+       public function templateAssign($param, $value = null) {
+
+               // If this is a single assignment
+               if ($value !== null) {
+                       $this->template->assign ( $param, $value );
+
+                       // Otherwise it's an array of parameter/value pairs
+               } elseif (is_array ( $param )) {
+
+                       while ( list ( $key, $value ) = each ( $param ) ) {
+                               $this->template->assign ( $key, $value );
+                       }
+               }
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/lib/smartyTemplateSupport.php b/lib/smartyTemplateSupport.php
deleted file mode 100644 (file)
index 75ee778..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-/**
- * Gaslight Media Prototype Management and Display
- * Smarty Templates Support Class
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmPrototypeManagement
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- */
-
-/*
- * This class loads, instatiates, and configures Smarty Templates for this
- * plugin.
- *
- * This class should be extended with the class that will need to use Smarty.
- * This
- * will make the $template object available to the class extending this one as
- * $this->template.
- *
- * The templateAssign() method simplifies adding parameters to the template.
- *
- * To use this class you must execute the following. No need to assign the
- * result.
- *
- * new smartyTemplateSupport();
- *
- */
-class smartyTemplateSupport {
-
-       /**
-        * Smarty Template Object
-        *
-        * @var $template
-        * @access public
-        */
-       public $template;
-
-       /*
-        * Smarty Template Support Constructor
-        *
-        * This constructor loads and instatiates smarty templates, then adds some
-        * standard template parameters.
-        *
-        * @return object Class object
-        *
-        */
-       public function __construct() {
-
-               /*
-                * Load and instatiate Smarty Templates
-                */
-               require (GLM_PROTO_PLUGIN_DIR . '/lib/Smarty-3.1.21/libs/Smarty.class.php');
-
-               $this->template = new Smarty ();
-
-               /*
-                * Configure Smarty Templates for this site
-                */
-               $this->template->setTemplateDir ( GLM_PROTO_PLUGIN_DIR . '/views' );
-               $this->template->setCompileDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/templates_c' );
-               $this->template->setCacheDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/cache' );
-               $this->template->setConfigDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/configs' );
-       }
-
-       /*
-        * Assign parameters to the template
-        *
-        * This method assigns either one parameter to the template object in this
-        * class or an array of parameters.
-        *
-        * Submit an array of parameters to the template.
-        *
-        * @name array Array of arrays with parameter name (key), value pairs
-        *
-        * or
-        *
-        * Submit one parameter to the template
-        *
-        * @param text parameter name
-        * @param {whatever} parameter value
-        *
-        * @return void
-        */
-       public function templateAssign($param, $value = null) {
-
-               // If this is a single assignment
-               if ($value !== null) {
-                       $this->template->assign ( $param, $value );
-
-                       // Otherwise it's an array of parameter/value pairs
-               } elseif (is_array ( $param )) {
-
-                       while ( list ( $key, $value ) = each ( $param ) ) {
-                               $this->template->assign ( $key, $value );
-                       }
-               }
-       }
-}
-
-?>
\ No newline at end of file