From: Steve Sutton Date: Tue, 27 Aug 2019 12:51:47 +0000 (-0400) Subject: Add docs for two methods X-Git-Tag: v2.13.1^2~12 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fbe59e047b633a5e949ab45e50125997d510a428;p=WP-Plugins%2Fglm-member-db.git Add docs for two methods Adding Documentation for the two methods setting and resetting the groups. --- diff --git a/lib/GlmDataAbstract/DataAbstract.php b/lib/GlmDataAbstract/DataAbstract.php index ca5a572f..a02de454 100755 --- a/lib/GlmDataAbstract/DataAbstract.php +++ b/lib/GlmDataAbstract/DataAbstract.php @@ -3297,29 +3297,13 @@ $forEdit = true; ]; $params = array_merge( $defaults, $config ); + // echo '
$params: ' . print_r( $params, true ) . '
'; // extract $params Array extract( $params ); $this->selectGroupFields(); - // For testing only - /* - echo "

getList():
- - - - - - - - - -
Where:$where
Order:$order
Field Vals:$fieldVals
ID Field:$idField
Start:$start
Limit:$limit
Prohibit List Options$prohibitListOptions
Append Select$appendSelect
-

- "; - */ - $seed = false; // NOTE: $fieldVals not yet implemented @@ -3442,6 +3426,7 @@ $forEdit = true; $list = $this->wpdb->get_results( $sql, ARRAY_A ); if ( count( $list ) == 0 ) { + $this->restoreFields(); return false; } @@ -3473,6 +3458,7 @@ $forEdit = true; $return['stats'] = $stats; } + $this->restoreFields(); return $return; } @@ -4301,6 +4287,13 @@ $forEdit = true; } + /** + * Modify the $this->fields array to a set of group fields. + * + * Group fields are setup using $groupSelect Array. + * + * @return void + */ public function selectGroupFields() { if ( $this->groupSelect && is_array( $this->groupSelect ) && !empty( $this->groupSelect ) ) { @@ -4327,6 +4320,13 @@ $forEdit = true; } } + /** + * Modify the $this->fields array back to its standard set of fields. + * + * Set the $this->fields to $this->saveFields + * + * @return void + */ public function restoreFields() { if ( isset( $this->saveFields ) && is_array( $this->saveFields ) && !empty( $this->saveFields ) ) {