forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fix in smarty to not modify translation parameters before they ar…
…e translated (openemr#2160) And a bunch of other related smarty stuff
- Loading branch information
1 parent
c49c451
commit 0a815cd
Showing
27 changed files
with
533 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 55 additions & 55 deletions
110
interface/forms/vitals/templates/vitals/general_new.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,15 @@ | |
* Smarty plugin | ||
* @package Smarty | ||
* @subpackage plugins | ||
* simplified xl() version for smarty templates | ||
* Christian Navalici 2007 | ||
* xl() version for smarty templates | ||
* | ||
* Copyright (C) 2007 Christian Navalici | ||
* Copyright (C) 2019 Brady Miller <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
*/ | ||
|
||
|
||
|
@@ -33,7 +40,5 @@ function smarty_function_xl($params, &$smarty) | |
$translate = $params['t']; | ||
} | ||
|
||
xl($translate, 'e'); | ||
echo xl($translate); | ||
} | ||
|
||
/* vim: set expandtab: */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Smarty plugin | ||
* @package Smarty | ||
* @subpackage plugins | ||
* xla() version for smarty templates | ||
* | ||
* Copyright (C) 2007 Christian Navalici | ||
* Copyright (C) 2019 Brady Miller <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
*/ | ||
|
||
/** | ||
* Smarty {xla} function plugin | ||
* | ||
* Type: function<br> | ||
* Name: xla<br> | ||
* Purpose: translate in OpenEMR and escape for html attr - Smarty templates<br> | ||
* | ||
* Examples: | ||
* | ||
* {xla t="some words"} | ||
* | ||
* @param array | ||
* @param Smarty | ||
*/ | ||
|
||
|
||
function smarty_function_xla($params, &$smarty) | ||
{ | ||
if (empty($params['t'])) { | ||
$smarty->trigger_error("xk: missing 't' parameter"); | ||
return; | ||
} else { | ||
$translate = $params['t']; | ||
} | ||
|
||
echo xla($translate); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Smarty plugin | ||
* @package Smarty | ||
* @subpackage plugins | ||
* xlj() version for smarty templates | ||
* | ||
* Copyright (C) 2007 Christian Navalici | ||
* Copyright (C) 2019 Brady Miller <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
*/ | ||
|
||
|
||
/** | ||
* Smarty {xlj} function plugin | ||
* | ||
* Type: function<br> | ||
* Name: xlj<br> | ||
* Purpose: translate in OpenEMR and escape for js - Smarty templates<br> | ||
* | ||
* Examples: | ||
* | ||
* {xlj t="some words"} | ||
* | ||
* @param array | ||
* @param Smarty | ||
*/ | ||
|
||
|
||
function smarty_function_xlj($params, &$smarty) | ||
{ | ||
if (empty($params['t'])) { | ||
$smarty->trigger_error("xk: missing 't' parameter"); | ||
return; | ||
} else { | ||
$translate = $params['t']; | ||
} | ||
|
||
echo xlj($translate); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Smarty plugin | ||
* @package Smarty | ||
* @subpackage plugins | ||
* xlt() version for smarty templates | ||
* | ||
* Copyright (C) 2007 Christian Navalici | ||
* Copyright (C) 2019 Brady Miller <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
*/ | ||
|
||
|
||
/** | ||
* Smarty {xlt} function plugin | ||
* | ||
* Type: function<br> | ||
* Name: xlt<br> | ||
* Purpose: translate in OpenEMR - Smarty templates<br> | ||
* | ||
* Examples: | ||
* | ||
* {xlt t="some words"} | ||
* | ||
* @param array | ||
* @param Smarty | ||
*/ | ||
|
||
|
||
function smarty_function_xlt($params, &$smarty) | ||
{ | ||
if (empty($params['t'])) { | ||
$smarty->trigger_error("xk: missing 't' parameter"); | ||
return; | ||
} else { | ||
$translate = $params['t']; | ||
} | ||
|
||
echo xlt($translate); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.