diff options
Diffstat (limited to 'app/helpers.php')
-rw-r--r-- | app/helpers.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers.php b/app/helpers.php index 6c8e8955..0129853f 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -574,11 +574,12 @@ function form_numeric($name, $values = array(), array $errors = array(), array $ * @param array $params Url parameters * @param boolean $csrf Add a CSRF token * @param string $class CSS class attribute + * @param boolean $new_tab Open the link in a new tab * @return string */ -function a($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '') +function a($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '', $new_tab = false) { - return '<a href="'.u($controller, $action, $params, $csrf).'" class="'.$class.'" title="'.$title.'">'.$label.'</a>'; + return '<a href="'.u($controller, $action, $params, $csrf).'" class="'.$class.'" title="'.$title.'" '.($new_tab ? 'target="_blank"' : '').'>'.$label.'</a>'; } /** |