mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
default path when create a new subviews
This commit is contained in:
@@ -1473,6 +1473,16 @@ class databox extends base implements ThumbnailedElement
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the default subdef path
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSubdefStorage(){
|
||||||
|
|
||||||
|
return p4string::addEndSlash($this->app['conf']->get(['main', 'storage', 'subdefs'])).$this->get_dbname()."/subdefs/";
|
||||||
|
}
|
||||||
|
|
||||||
protected function retrieve_structure()
|
protected function retrieve_structure()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@@ -202,6 +202,11 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
|
|||||||
$mediaTypeElement->appendChild($dom_struct->createTextNode($mediatype));
|
$mediaTypeElement->appendChild($dom_struct->createTextNode($mediatype));
|
||||||
$subdef->appendChild($mediaTypeElement);
|
$subdef->appendChild($mediaTypeElement);
|
||||||
|
|
||||||
|
$defaultPath = $this->databox->getSubdefStorage();
|
||||||
|
$pathElement = $dom_struct->createElement('path');
|
||||||
|
$pathElement->appendChild($dom_struct->createTextNode($defaultPath));
|
||||||
|
$subdef->appendChild($pathElement);
|
||||||
|
|
||||||
$dom_xp = $this->databox->get_xpath_structure();
|
$dom_xp = $this->databox->get_xpath_structure();
|
||||||
$query = '//record/subdefs/subdefgroup[@name="' . $groupname . '"]';
|
$query = '//record/subdefs/subdefgroup[@name="' . $groupname . '"]';
|
||||||
$groups = $dom_xp->query($query);
|
$groups = $dom_xp->query($query);
|
||||||
|
Reference in New Issue
Block a user