本文整理汇总了PHP中AJXP_Utils::isBrowsableArchive方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_Utils::isBrowsableArchive方法的具体用法?PHP AJXP_Utils::isBrowsableArchive怎么用?PHP AJXP_Utils::isBrowsableArchive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AJXP_Utils
的用法示例。
在下文中一共展示了AJXP_Utils::isBrowsableArchive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filterNodeName
function filterNodeName($nodePath, $nodeName, $isLeaf, $lsOptions)
{
if (AJXP_Utils::isHidden($nodeName) && !$this->driverConf["SHOW_HIDDEN_FILES"]) {
return false;
}
$nodeType = "d";
if ($isLeaf) {
if (AJXP_Utils::isBrowsableArchive($nodeName)) {
$nodeType = "z";
} else {
$nodeType = "f";
}
}
if (!$lsOptions[$nodeType]) {
return false;
}
if ($nodeType == "d") {
if (RecycleBinManager::recycleEnabled() && $nodePath . "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
return false;
}
return !$this->filterFolder($nodeName);
} else {
if ($nodeName == "." || $nodeName == "..") {
return false;
}
if (RecycleBinManager::recycleEnabled() && $nodePath == RecycleBinManager::getRecyclePath() && $nodeName == RecycleBinManager::getCacheFileName()) {
return false;
}
return !$this->filterFile($nodeName);
}
}
示例2: filterNodeName
public function filterNodeName($nodePath, $nodeName, &$isLeaf, $lsOptions)
{
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
$isLeaf = is_file($nodePath . "/" . $nodeName) || AJXP_Utils::isBrowsableArchive($nodeName);
if (AJXP_Utils::isHidden($nodeName) && !$showHiddenFiles) {
return false;
}
$nodeType = "d";
if ($isLeaf) {
if (AJXP_Utils::isBrowsableArchive($nodeName)) {
$nodeType = "z";
} else {
$nodeType = "f";
}
}
if (!$lsOptions[$nodeType]) {
return false;
}
if ($nodeType == "d") {
if (RecycleBinManager::recycleEnabled() && $nodePath . "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
return false;
}
return !$this->filterFolder($nodeName);
} else {
if ($nodeName == "." || $nodeName == "..") {
return false;
}
if (RecycleBinManager::recycleEnabled() && $nodePath == RecycleBinManager::getRecyclePath() && $nodeName == RecycleBinManager::getCacheFileName()) {
return false;
}
return !$this->filterFile($nodeName);
}
}
示例3: loadNodeInfo
/**
* @param AJXP_Node $ajxpNode
* @param bool $parentNode
* @param bool $details
* @return void
*/
public function loadNodeInfo(&$ajxpNode, $parentNode = false, $details = false)
{
$mess = ConfService::getMessages();
$nodeName = basename($ajxpNode->getPath());
$metaData = $ajxpNode->metadata;
if (!isset($metaData["is_file"])) {
$isLeaf = is_file($ajxpNode->getUrl()) || AJXP_Utils::isBrowsableArchive($nodeName);
$metaData["is_file"] = $isLeaf ? "1" : "0";
} else {
$isLeaf = $metaData["is_file"] == "1" ? true : false;
}
$metaData["filename"] = $ajxpNode->getPath();
if (RecycleBinManager::recycleEnabled() && $ajxpNode->getPath() == RecycleBinManager::getRelativeRecycle()) {
$recycleIcon = $this->countFiles($ajxpNode->getUrl(), false, true) > 0 ? "trashcan_full.png" : "trashcan.png";
$metaData["icon"] = $recycleIcon;
$metaData["mimestring"] = $mess[122];
$ajxpNode->setLabel($mess[122]);
$metaData["ajxp_mime"] = "ajxp_recycle";
} else {
$mimeData = AJXP_Utils::mimeData($ajxpNode->getUrl(), !$isLeaf);
$metaData["mimestring_id"] = $mimeData[0];
//AJXP_Utils::mimetype($ajxpNode->getUrl(), "type", !$isLeaf);
$metaData["icon"] = $mimeData[1];
//AJXP_Utils::mimetype($nodeName, "image", !$isLeaf);
if ($metaData["icon"] == "folder.png") {
$metaData["openicon"] = "folder_open.png";
}
if (!$isLeaf) {
$metaData["ajxp_mime"] = "ajxp_folder";
}
}
//if ($lsOptions["l"]) {
$metaData["file_group"] = @filegroup($ajxpNode->getUrl()) || "unknown";
$metaData["file_owner"] = @fileowner($ajxpNode->getUrl()) || "unknown";
$crtPath = $ajxpNode->getPath();
$vRoots = $this->repository->listVirtualRoots();
$metaData["ajxp_readonly"] = "false";
if (!@$this->isWriteable($ajxpNode->getUrl())) {
$metaData["ajxp_readonly"] = "true";
}
if (!empty($crtPath)) {
if (isset($vRoots[ltrim($crtPath, "/")])) {
$metaData["ajxp_readonly"] = $vRoots[ltrim($crtPath, "/")]["right"] == "r" ? "true" : "false";
}
} else {
if (count($vRoots)) {
$metaData["ajxp_readonly"] = "true";
}
}
$fPerms = @fileperms($ajxpNode->getUrl());
if ($fPerms !== false) {
$fPerms = substr(decoct($fPerms), $isLeaf ? 2 : 1);
} else {
$fPerms = '0000';
}
$metaData["file_perms"] = $fPerms;
$datemodif = $this->date_modif($ajxpNode->getUrl());
$metaData["ajxp_modiftime"] = $datemodif ? $datemodif : "0";
$metaData["ajxp_description"] = $metaData["ajxp_relativetime"] = $mess[4] . " " . AJXP_Utils::relativeDate($datemodif, $mess);
$metaData["bytesize"] = 0;
if ($isLeaf) {
$metaData["bytesize"] = filesize($ajxpNode->getUrl());
}
$metaData["filesize"] = AJXP_Utils::roundSize($metaData["bytesize"]);
if (AJXP_Utils::isBrowsableArchive($nodeName)) {
$metaData["ajxp_mime"] = "ajxp_browsable_archive";
}
if ($details == "minimal") {
$miniMeta = array("is_file" => $metaData["is_file"], "filename" => $metaData["filename"], "bytesize" => $metaData["bytesize"], "ajxp_modiftime" => $metaData["ajxp_modiftime"]);
$ajxpNode->mergeMetadata($miniMeta);
} else {
$ajxpNode->mergeMetadata($metaData);
}
}