<?php

function fn_concat_cc($aql)
{	
	$list = $aql->Consume(2);
	
	$val = $list[1]->value.$list[0]->value;
			
	$a = new AQLStackElement();
	$a->typename = "const";
	$a->islist = false;
	$a->value = $val;
	array_push($aql->stack,$a);
}

function fn_concat_rc($aql)
{	
	$list = $aql->Consume(2);
	
	global $installfolder;
	require_once($installfolder.'/model/relationship.php');
	
	$val = $list[1]->value[0].$list[0]->value;
	
	$rels = Relationships::GetAllRelationships();
	foreach($rels as $r)
	{
		if ($r->id == $list[1]->value[0])
		{	
			$val = $r->name.' '.$list[0]->value;			
			break;
		}
	}	
	
	#echo $val;
			
	$a = new AQLStackElement();
	$a->typename = "const";
	$a->islist = false;
	$a->value = $val;
	array_push($aql->stack,$a);
}

?>