Code

Added simple workaround for sorting of foreign values
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 09:44:19 +0000 (09:44 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 09:44:19 +0000 (09:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14113 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index 34afc1e095edb942deb0d8245f0cf979a38eabcf..3b3e04bd502d68c179fd8694310629a912d8d71e 100644 (file)
@@ -306,7 +306,11 @@ class listing {
         $trow.="<td ".$this->colprops[$index]." class='list0'>".$renderedCell."</td>\n";
 
         // Save rendered column
-        $this->entries[$row]["_sort$index"]= $renderedCell;
+        $sort= preg_replace('/.*>([^<]+)<.*$/', '$1', $renderedCell);
+        if (preg_match('/</', $sort)){
+          $sort= "";
+        }
+        $this->entries[$row]["_sort$index"]= $sort;
       }
       $trow.="</tr>\n";