Documentation

This commit is contained in:
Michael RICOIS 2014-04-22 07:54:38 +00:00
parent c8945abe15
commit d59c887924
2 changed files with 7 additions and 6 deletions

View File

@ -35,9 +35,11 @@ class DocumentationController extends Zend_Controller_Action
$type = $request->getParam('type', 'sd');
$ws = strtolower($request->getParam('name','entreprise'));
$myService = $this->view->WsServices[$ws];
// Gestion des versions
$serviceVersions = array();
$configServiceVersions = $this->view->WsServices[$ws]['versions'];
$configServiceVersions = $myService['versions'];
foreach( $configServiceVersions as $section => $params ){
$serviceVersions[$section] = $params;
if ($params['defaut']) {
@ -46,14 +48,13 @@ class DocumentationController extends Zend_Controller_Action
}
$version = $request->getParam('version', $defautVersion);
$this->view->assign('serviceName', $this->view->WsServices[$ws]['name']);
$this->view->assign('serviceName', $myService['name']);
$this->view->assign('serviceVersion', $version);
$isDeprecated = false;
if ( $this->view->WsServices[$ws]['actif'] == false ) {
if ( $myService['versions'][$version]['defaut'] == '' ) {
$isDeprecated = true;
}
$isDeprecated = true;
$this->view->assign('isDeprecated', $isDeprecated);
if ( $type == 'client') {

View File

@ -15,8 +15,8 @@ return array(
'interne' => array(
'actif' => true,
'versions' => array(
'0.6' => array( 'actif' => true, 'defaut' => 'beta' ),
'0.5' => array( 'actif' => true, 'defaut' => true ),
'0.6' => array( 'actif' => true, 'defaut' => true ),
'0.5' => array( 'actif' => true, 'defaut' => false ),
'0.4' => array( 'actif' => true, 'defaut' => false ),
'0.3' => array( 'actif' => true, 'defaut' => false ),
'0.2' => array( 'actif' => false, 'defaut' => false ),