function rateItem($args) { LogMsg(0, "rateItem: id=" . $args->id . ", rating=" . $args->rating); //first add the rating $this->ratings->addRating($this->user, $args->id, $args->rating); //now form a result $result = new StdClass(); //this logic probably should be set in a separate function to make it easier to modify $result->shouldSkip = $args->rating < 0 ? true : false; $result->messageStringId = "fakeStringIDForTheRatingMessage"; return array('rateItemResult' => $result); }
function doInternal($arr) { global $ms; $ms->Internal($arr); LogMsg("Internal", $arr); }