Fixes for userguide, added url_resolve to Table()

This commit is contained in:
Deon George
2013-11-08 22:26:58 +11:00
parent 45cadf0945
commit c014a4cec8
3 changed files with 23 additions and 6 deletions

View File

@@ -80,6 +80,19 @@ abstract class lnApp_Table {
case 'url': $x = HTML::anchor($data.$x,$x);
break;
case 'url_resolve':
$filtermatchall = array();
preg_match_all('/%(\w+)(\|.+)?(\/[lUC])?%/U',$data,$filtermatchall);
foreach ($filtermatchall[1] as $id=>$key)
$data = str_replace($filtermatchall[0][$id],$d->display($key),$data);
$x = HTML::anchor($data,$x);
break;
default:
throw HTTP_Exception::factory(501,'Unknown action :action',array(':action'=>$act));
}
}
}