changed form action url
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Feb 2016 20:12:13 +0000 (15:12 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 25 Feb 2016 20:12:13 +0000 (15:12 -0500)
models/admin/member/social.php
views/admin/member/social.html

index ef9be9f..23ae86f 100644 (file)
@@ -182,10 +182,12 @@ class GlmMembersAdmin_member_social extends GlmDataSocial
         );
         
         // If there's an action option
-        if (isset($_REQUEST['option'])) {
-            $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING));
-        }
-        
+//        if (isset($_REQUEST['option'])) {
+//            $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING));
+//        }
+//      
+        $option = $_REQUEST['option'];
+        echo $option;
         $socialData = $this->editEntry($memberID);
         
         if (!$socialData) {
@@ -223,7 +225,7 @@ class GlmMembersAdmin_member_social extends GlmDataSocial
             );
 
         }
-        
+
 //        if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') {
         if ($option == 'submit') {
 
@@ -232,7 +234,7 @@ class GlmMembersAdmin_member_social extends GlmDataSocial
             if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
                 glmMembersAdmin::addNotice("<b>&nbsp;&nbsp;Social Update:</b> $memberID", 'Process');
             }
-
+echo $option;
             // If update was successful then use editEntry() to setup for the edit again.
             if ($socialData) {
 
@@ -240,11 +242,11 @@ class GlmMembersAdmin_member_social extends GlmDataSocial
                 $socialUpdated = true;
 
                 // Also update all member info records with any possible name change
-                $sql = "
-                    UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
-                       SET facebook_url = 'www.testval.com'
-                     WHERE member_id = 1
-                ;";
+                  $sql = "
+                INSERT INTO ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+                   (member_id,facebook_url)
+                 VALUES (1, 'www.failedcheck.com')
+            ;";
 //                $sql = "
 //                    UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
 //                       SET facebook_url = '".addslashes($socialData['fieldData']['name'])."'
index df3628d..8afd3bf 100644 (file)
@@ -8,8 +8,8 @@
         <h3>Social Model</h3>
         <p>{$displayData}</p>
         <a href="{$thisURL}?page={$thisPage}&glm_action=more">Click me to see more!</a>
-        <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
-            <input type="submit" class="button glm-button submit" value="submit">
+        <form action="{$thisURL}?page={$thisPage}&glm_action=social&member=1" method="post" enctype="multipart/form-data">
+            <input type="submit" class="button glm-button submit" value="submit" name='submit'>
             <input type="hidden" name="option" value="submit">
             <div class="button glm-button right">Update</div>
             <table class="glm-admin-table">