projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug in surveys : a link had disappeared
[platal.git]
/
plugins
/
compiler.icon.php
diff --git
a/plugins/compiler.icon.php
b/plugins/compiler.icon.php
index
f7478c6
..
330ac2a
100644
(file)
--- a/
plugins/compiler.icon.php
+++ b/
plugins/compiler.icon.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
6
Polytechnique.org *
+ * Copyright (C) 2003-200
7
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-18,20
+18,26
@@
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
+require_once 'platal.inc.php';
function smarty_compiler_icon($tag_attrs, &$compiler)
{
extract($compiler->_parse_attrs($tag_attrs));
if (isset($title)) {
function smarty_compiler_icon($tag_attrs, &$compiler)
{
extract($compiler->_parse_attrs($tag_attrs));
if (isset($title)) {
- $title = 'title="'.
html
entities(trim($title, '\'"'), ENT_QUOTES).'" ';
+ $title = 'title="'.
pl_
entities(trim($title, '\'"'), ENT_QUOTES).'" ';
}
}
- $name = htmlentities(trim($name, '\'"'), ENT_QUOTES);
+ $name = pl_entities(trim($name, '\'"'), ENT_QUOTES);
+ $name = "images/icons/$name.gif";
+ if ($full) {
+ global $globals;
+ $name = $globals->baseurl . '/' . $name;
+ }
- return "?><img src='
images/icons/$name.gif
' alt='' $title /><?php";
+ return "?><img src='
$name
' alt='' $title /><?php";
}
}
-/* vim: set expandtab: */
+/* vim: set expandtab
enc=utf-8
: */
?>
?>