Skip to content
Snippets Groups Projects
Commit c72d3691 authored by Clément Damiens's avatar Clément Damiens
Browse files

custom fix 
parent e39c138e
No related branches found
No related tags found
No related merge requests found
custom 0 → 120000
custom
\ No newline at end of file
......@@ -10,7 +10,7 @@ if( @$_GET["el"])
{
$stum = explode(".", $_GET["el"] );
//if( Element::getModelByType( $stum[0] ) ){
$el = ($stum[0]=="city") ? City::getById($stum[1])
$el = ($stum[0]=="city") ? City::getByInsee($stum[1])
: Element::getByTypeAndId( $stum[0] , $stum[1] );
if(@$el["custom"]){
Yii::app()->session['custom'] = array( "id" => (string) $el["_id"],
......@@ -20,8 +20,8 @@ if( @$_GET["el"])
//}
}
} else {
//Yii::app()->session["custom"] = null; ?>
//delete custom;
Yii::app()->session["custom"] = null;
//delete custom; ?>
<?php }
if( @Yii::app()->session['custom'] ){ ?>
......@@ -38,5 +38,3 @@ if( @Yii::app()->session['custom'] ){ ?>
<?php }
}
?>
alert("xxx<?php echo Yii::app()->session['custom']["id"]; ?>")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment