function update($postId, $title, $description, $linksJson, $imagesJson, $groupSlug, $categoryCode) { $loginId = NULL; if (\com\indigloo\sc\auth\Login::isAdmin()) { //inject right loginId for admins $postDBRow = $this->getOnId($postId); $loginId = $postDBRow["login_id"]; } else { $loginId = \com\indigloo\sc\auth\Login::getLoginIdInSession(); } mysql\Post::update($postId, $title, $description, $linksJson, $imagesJson, $loginId, $groupSlug, $categoryCode); }