Merge commit 'origin/core-1.0.0' into core
[platal.git] / plugins / compiler.icon.php
index c675903..4487e59 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  *  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));
 
     $alt = 'alt=""';
-    
+
     if (isset($title)) {
         $title = pl_entities(trim($title, '\'"'), ENT_QUOTES);
         $alt = 'alt="'.$title.'"';
@@ -34,7 +33,7 @@ function smarty_compiler_icon($tag_attrs, &$compiler)
 
     $name = pl_entities(trim($name, '\'"'), ENT_QUOTES);
     $name = "images/icons/$name.gif";
-    if ($full) {
+    if (isset($full) && $full) {
         global $globals;
         $name = $globals->baseurl . '/' . $name;
     }