Skip to content

Commit

Permalink
Adjusted the addStatistic for the updated Conf/CodeTable getRowByCode…
Browse files Browse the repository at this point in the history
… method.
  • Loading branch information
bdgregg committed May 26, 2021
1 parent c5d4718 commit c047c69
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/Users/UserStatistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,25 @@ public function addStatistic($typeCode,$categoryCode,$segmentType,$note)
Code Table: UserStatCategories
*/

/* Seems to be an issue with # of categoryCodes that can be pulled at once (max:10) */
/* But performing via curl returns all (???). */
/* May need to open a case to allow resumption on pulling code tables regarding 'limit' and 'offset'? */
# Note need some error checking etc. here.

#
# These functions for CodeTables need defined.
#
#$typeDesc = $this->conf->CodeTables->getDesc('UserStatisticalTypes',$typeCode);
#$categoryDesc = $this->conf->CodeTables->getDesc('UserStatCagegories',$categoryCode);
# Get the Type and Category Descriptions for the codes from the code tables.
$stat = $this->client->conf->codetables->get('UserStatisticalTypes')->getRowByCode($typeCode);
$typeDesc = $stat[0]->description;

$stat = $this->client->conf->codetables->get('UserStatCategories')->getRowByCode($categoryCode);
$categoryDesc = $stat[0]->description;
#
# These are temporary for testing.
$typeDesc = 'Test';
$categoryDesc = 'Test';
#$typeDesc = 'Test';
#$categoryDesc = 'Test';

# Add the statistic:
$this->addStatisticRaw($typeCode,$typeDesc,$categoryCode,$categoryDesc,$segmentType,$note);

# For debugging:
#print "TypeCode: $typeCode\nTypeDesc: $typeDesc\nCategoryCode: $categoryCode\nCategoryDesc: $categoryDesc\n";

}

/**
Expand Down

0 comments on commit c047c69

Please sign in to comment.