Protection when a category has a parent that is category with other type
This commit is contained in:
parent
aaee8ff0ca
commit
bd0d932213
@ -1215,9 +1215,10 @@ class Categorie extends CommonObject
|
|||||||
while ((empty($protection) || $i < $protection) && !empty($this->motherof[$cursor_categ])) {
|
while ((empty($protection) || $i < $protection) && !empty($this->motherof[$cursor_categ])) {
|
||||||
//print ' cursor_categ='.$cursor_categ.' i='.$i.' '.$this->motherof[$cursor_categ].'<br>'."\n";
|
//print ' cursor_categ='.$cursor_categ.' i='.$i.' '.$this->motherof[$cursor_categ].'<br>'."\n";
|
||||||
$this->cats[$id_categ]['fullpath'] = '_'.$this->motherof[$cursor_categ].$this->cats[$id_categ]['fullpath'];
|
$this->cats[$id_categ]['fullpath'] = '_'.$this->motherof[$cursor_categ].$this->cats[$id_categ]['fullpath'];
|
||||||
$this->cats[$id_categ]['fulllabel'] = $this->cats[$this->motherof[$cursor_categ]]['label'].' >> '.$this->cats[$id_categ]['fulllabel'];
|
$this->cats[$id_categ]['fulllabel'] = (empty($this->cats[$this->motherof[$cursor_categ]]) ? 'NotFound' : $this->cats[$this->motherof[$cursor_categ]]['label']).' >> '.$this->cats[$id_categ]['fulllabel'];
|
||||||
//print ' Result for id_categ='.$id_categ.' : '.$this->cats[$id_categ]['fullpath'].' '.$this->cats[$id_categ]['fulllabel'].'<br>'."\n";
|
//print ' Result for id_categ='.$id_categ.' : '.$this->cats[$id_categ]['fullpath'].' '.$this->cats[$id_categ]['fulllabel'].'<br>'."\n";
|
||||||
$i++; $cursor_categ = $this->motherof[$cursor_categ];
|
$i++;
|
||||||
|
$cursor_categ = $this->motherof[$cursor_categ];
|
||||||
}
|
}
|
||||||
//print 'Result for id_categ='.$id_categ.' : '.$this->cats[$id_categ]['fullpath'].'<br>'."\n";
|
//print 'Result for id_categ='.$id_categ.' : '.$this->cats[$id_categ]['fullpath'].'<br>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -2518,7 +2518,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$maxfilesizearray = getMaxFileSizeArray();
|
$maxfilesizearray = getMaxFileSizeArray();
|
||||||
$maxmin = $maxfilesizearray['maxmin'];
|
$maxmin = $maxfilesizearray['maxmin'];
|
||||||
if ($maxmin > 0) {
|
if ($maxmin > 0) {
|
||||||
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||||
}
|
}
|
||||||
print '<input type="file" class="flat" name="photo" id="photoinput">';
|
print '<input type="file" class="flat" name="photo" id="photoinput">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user