private function filedepot_archiver::getPathComponent in filedepot 7
Same name in this branch
- 7 filedepot_archiver.class.php \filedepot_archiver::getPathComponent()
- 7 filedepot_archiver.zip.class.php \filedepot_archiver::getPathComponent()
Searches for the path component and returns the ProcessedPathObject - if it does not exist in the processedpathcomponents list, then it is grabbed from the DB
Return value
ProcessedPathObject for that cid or NULL if nothing can be found
2 calls to filedepot_archiver::getPathComponent()
- filedepot_archiver::getProcessedPath in ./
filedepot_archiver.class.php - Returns the full path from first parent (top level) to last parent Also adds all lookup items to the queue to preserve database lookups
- filedepot_archiver::getProcessedPath in ./
filedepot_archiver.zip.class.php - Returns the full path from first parent (top level) to last parent Also adds all lookup items to the queue to preserve database lookups
File
- ./
filedepot_archiver.zip.class.php, line 100 - filedepot_archiver.class.php Archiving class for filedepot
Class
- filedepot_archiver
- @file filedepot_archiver.class.php Archiving class for filedepot
Code
private function getPathComponent($cid) {
if (!array_key_exists($cid, $this->processedPathComponents)) {
$result = db_query("SELECT pid, name FROM {filedepot_categories} WHERE cid = :cid", array(
':cid' => $cid,
));
$A = $result
->fetchAssoc();
if ($A) {
$ppo = new ProcessedPathObject();
$ppo->catName = $A['name'];
$ppo->catPid = $A['pid'];
$this->processedPathComponents[$cid] = $ppo;
}
else {
return NULL;
}
}
return $this->processedPathComponents[$cid];
}