Correction niveau et paramètres
This commit is contained in:
parent
ef9584e5e4
commit
c7535df8c5
@ -61,6 +61,7 @@ class ArborescenceController extends Zend_Controller_Action
|
||||
|
||||
$request = $this->getRequest();
|
||||
$key = $request->getParam('key');
|
||||
$parent = $request->getParam('parent');
|
||||
$niveau = $request->getParam('niveau', 1);
|
||||
$niveau = $niveau + 1;
|
||||
|
||||
@ -80,7 +81,6 @@ class ArborescenceController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
$niveau++;
|
||||
$nafM = new Application_Model_Naf();
|
||||
$sql = $nafM->select();
|
||||
|
||||
@ -89,8 +89,8 @@ class ArborescenceController extends Zend_Controller_Action
|
||||
} elseif (!empty($parent) && $niveau>2) {
|
||||
$sql->where("code LIKE '".$parent."%'");
|
||||
}
|
||||
$sql->where('niveau = ?', $niveau)->order('code ASC');
|
||||
|
||||
$sql->where('niveau = ?', $niveau)->order('code ASC');
|
||||
|
||||
$result = $nafM->fetchAll($sql)->toArray();
|
||||
$tabNaf = array();
|
||||
foreach($result as $item){
|
||||
|
Loading…
Reference in New Issue
Block a user