Permalink
Browse files

Font-based mimes

  • Loading branch information...
1 parent 60dcdcd commit cf0ba6fefed83dc42be4dd9fa9023d48de307b84 @cdujeu cdujeu committed Jul 11, 2016
@@ -66,7 +66,7 @@ public static function getMimeInfo($ajxpNode, $isDir = null)
if (!isSet($mime)) {
$mime = $registeredExtensions["ajxp_empty"];
}
- return array($mime[2], $mime[1]);
+ return array($mime[3], $mime[1], $mime[2]);
}
@@ -95,7 +95,12 @@ private static function getRegisteredExtensions(ContextInterface $ctx)
$res = array();
/** @var \DOMElement $node */
foreach ($nodes as $node) {
- $res[$node->getAttribute("mime")] = array($node->getAttribute("mime"), $node->getAttribute("icon"), $node->getAttribute("messageId"));
+ $res[$node->getAttribute("mime")] = array(
+ $node->getAttribute("mime"),
+ $node->getAttribute("icon"),
+ $node->getAttribute("font"),
+ $node->getAttribute("messageId")
+ );
}
if (count($res)) {
$EXTENSIONS = array_merge($EXTENSIONS, $res);
@@ -3198,4 +3198,4 @@ public static function availableDriversToXML($filterByTagName = "", $filterByDri
*/
protected function initRepository(ContextInterface $ctx){
}
-}
+}
@@ -1586,13 +1586,17 @@ public function loadNodeInfo(&$ajxpNode, $parentNode = false, $details = false)
if (RecycleBinManager::recycleEnabled() && $ajxpNode->getPath() == RecycleBinManager::getRelativeRecycle()) {
$recycleIcon = ($this->countChildren($ajxpNode, false, true)>0?"trashcan_full.png":"trashcan.png");
$metaData["icon"] = $recycleIcon;
+ $metaData["fonticon"] = "delete";
$metaData["mimestring_id"] = 122;
//$ajxpNode->setLabel($mess[122]);
$metaData["ajxp_mime"] = "ajxp_recycle";
} else {
$mimeData = StatHelper::getMimeInfo($ajxpNode, !$isLeaf);
$metaData["mimestring_id"] = $mimeData[0];
$metaData["icon"] = $mimeData[1];
+ if(!empty($mimeData[2])){
+ $metaData["fonticon"] = $mimeData[2];
+ }
if ($metaData["icon"] == "folder.png") {
$metaData["openicon"] = "folder_open.png";
}

0 comments on commit cf0ba6f

Please sign in to comment.