Code

Removed image to html function
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:57:19 +0000 (13:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 13:57:19 +0000 (13:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7790 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ObjectList.inc
include/class_ObjectListViewport.inc

index 0c86a24b00fb5937555752edc84a6d5b66f35d8f..0a63c8aeacaf2a4ae9b23d65b76d993848ced582 100644 (file)
@@ -361,6 +361,7 @@ class ObjectList implements IteratorAggregate {
     $tmp2 = array();
     foreach($tmp as $key => $entry){
       $entry['id']= $key;
+      $entry['_icon'] = "<img src='images/".$entry['_icon']."' alt=''>";
       $tmp2[] = $entry;
     }
 
index 355e3c0af5e5ebaffd9b3e67bfc58543bdc7d0c4..4bf3f5bc89ef52c94cd63fda5580df9f84bc26cb 100644 (file)
@@ -96,12 +96,6 @@ class ObjectListViewport extends GOsaGuiElement {
   }
 
 
-  /* FIXME: replace this -> not our task */
-  private function getEntryIcon($entry,$alt = ""){
-    return("<img src='images/".$entry['_icon']."' alt='".$alt."' class='center'>");
-  }
-
-
        /*! \brief Renders entries from the ObjectList iterator into a string
            Gets the entry descriptions from the ObjectList object and renders them.
       \return HTML rendered list entries
@@ -116,12 +110,7 @@ class ObjectListViewport extends GOsaGuiElement {
       if (!isset($entry[$attribute])){
         throw new ObjectListViewportException(sprintf(_("Can't locate attribute '%s' to replace in entry!"), $attribute));
       } else {
-
-        if(preg_match("/_icon/i",$attribute)){
-          $buffer= preg_replace('/\{'.$attribute.'\}/', $this->getEntryIcon($entry),$buffer); 
-        }else{
-          $buffer= preg_replace('/\{'.$attribute.'\}/', $entry[$attribute],$buffer);
-        }
+        $buffer= preg_replace('/\{'.$attribute.'\}/', $entry[$attribute],$buffer);
       }
     }