add QR-codes for Character groups Achievements (implements #124)
This commit is contained in:
parent
dd2b15bbd7
commit
bdfd021673
4 changed files with 73 additions and 2 deletions
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $models = array('seminaries', 'charactergroups', 'charactergroupsquests', 'charactergroupsqueststations');
|
||||
public $models = array('seminaries', 'charactergroups', 'charactergroupsquests', 'charactergroupsqueststations', 'charactergroupsachievements');
|
||||
|
||||
|
||||
|
||||
|
|
@ -62,6 +62,39 @@
|
|||
)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Action: cga.
|
||||
*
|
||||
* Redirect to a Character groups Achievements
|
||||
*
|
||||
* @param string $achievementHash Hash of Character groups Achievement
|
||||
*/
|
||||
public function cga($achievementHash)
|
||||
{
|
||||
// Get Achievement
|
||||
$achievement = $this->Charactergroupsachievements->getAchievementByHash($achievementHash);
|
||||
|
||||
// Get Character groups-group
|
||||
$groupsgroup = $this->Charactergroups->getGroupsgroupById($achievement['charactergroupsgroup_id']);
|
||||
|
||||
// Get seminary
|
||||
$seminary = $this->Seminaries->getSeminaryById($groupsgroup['seminary_id']);
|
||||
|
||||
// Redirect
|
||||
$this->redirect(
|
||||
$this->linker->link(
|
||||
array(
|
||||
'charactergroupsachievements',
|
||||
'achievement',
|
||||
$seminary['url'],
|
||||
$groupsgroup['url'],
|
||||
$achievement['hash']
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue