From: Anthony Talarico Date: Tue, 24 May 2016 15:34:39 +0000 (-0400) Subject: fixed conditionals for page title and page ID error handling X-Git-Tag: v2.0.0^2~8^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3d19347ab1444a600880e0dc4b4dbfd53a2ffcf5;p=WP-Plugins%2Fglm-member-db.git fixed conditionals for page title and page ID error handling --- diff --git a/models/admin/management/index.php b/models/admin/management/index.php index 597f8cbf..8cfb535b 100644 --- a/models/admin/management/index.php +++ b/models/admin/management/index.php @@ -162,10 +162,9 @@ class GlmMembersAdmin_management_index extends GlmDataSettingsGeneral 'post_title' => $postValueTitle ); wp_update_post($args); - echo $pageTitle; - } else if($pageTitle == $postValueTitle && !empty($postValueTitle)) { - - } else{ + } else if($pageTitle == $postValueTitle) { + + } else if(empty($postValueTitle)){ $settingsUpdateError = true; $settingsUpdated = false; $titleError = true; diff --git a/views/admin/management/index.html b/views/admin/management/index.html index 98dbc878..a0ff1210 100644 --- a/views/admin/management/index.html +++ b/views/admin/management/index.html @@ -19,8 +19,8 @@ - {if $idError}Page ID should be a number, may not be blank and should be associated with an existing page{/if} - {if $titleError}Page name should not be empty{/if} + {if $idError}Page ID should be numerical and should not be empty{/if} + {if $titleError}Page Title should not be blank{/if} {foreach from=$requiredPages key=addon item=requiredPage} {foreach from=$requiredPage key=requiredPageName item=requiredPageData}

Plugin: {$addon}