Commit 0ade6632 authored by thomas craipeau's avatar thomas craipeau
Browse files

replace Yii::app()->request

parent 9b03f7b4
......@@ -26,7 +26,7 @@ class DefaultController extends CommunecterController {
{
//echo "hello there"; exit ;
// if(Yii::app()->request->isAjaxRequest)
// if(Yii::$app->request->isAjax)
// echo $this->renderPartial("index");
// else
// {
......@@ -34,7 +34,7 @@ class DefaultController extends CommunecterController {
// $this->render("index");
// }
if(Yii::app()->request->isAjaxRequest)
if(Yii::$app->request->isAjax)
return $this->renderPartial("index");
else{
$this->layout = "//layouts/directory";
......
......@@ -93,7 +93,7 @@ class IndexAction extends \PixelHumain\PixelHumain\components\Action
$params["inline"]=$inline;
if (in_array($type,[Organization::COLLECTION, Project::COLLECTION, Event::COLLECTION, Person::COLLECTION]))
$params["deletePending"] = Element::isElementStatusDeletePending($type, $id);
if(Yii::app()->request->isAjaxRequest)
if(Yii::$app->request->isAjax)
return $ctrl->renderPartial("news.views.co.index", $params);
else
return $ctrl->render("news.views.co.index", $params);
......
......@@ -230,7 +230,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<div class="dropdown no-padding pull-right">
<a data-toggle="dropdown" class="btn btn-default" id="btn-toogle-dropdown-targetIsAuthor" href="#">
<?php if(@Yii::$app->session["user"]["profilThumbImageUrl"]){ ?>
<img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).Yii::$app->session["user"]["profilThumbImageUrl"]; ?>'>
<img height=20 width=20 src='<?php echo Yii::$app->request->getBaseUrl(true).Yii::$app->session["user"]["profilThumbImageUrl"]; ?>'>
<?php } else { ?>
<img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_citoyens.png' ?>'>
<?php } ?>
......@@ -241,7 +241,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<a href="javascript:;" class="targetIsAuthor" data-value="1">
<h4 class="list-group-item-heading">
<?php if(@$parent["profilThumbImageUrl"]){ ?>
<img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'>
<img height=20 width=20 src='<?php echo Yii::$app->request->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'>
<?php } else { ?>
<img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_'.$contextParentType.'.png' ?>'>
<?php } ?>
......@@ -252,7 +252,7 @@ if(isset(Yii::$app->session['userId'])){ ?>
<li>
<a href="javascript:;" class="targetIsAuthor" data-value="0"><h4 class="list-group-item-heading">
<?php if(@Yii::$app->session["user"]["profilThumbImageUrl"]){ ?>
<img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).Yii::$app->session["user"]["profilThumbImageUrl"]; ?>'>
<img height=20 width=20 src='<?php echo Yii::$app->request->getBaseUrl(true).Yii::$app->session["user"]["profilThumbImageUrl"]; ?>'>
<?php } else { ?>
<img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_citoyens.png' ?>'>
<?php } ?>
......
......@@ -48,7 +48,7 @@ $cssAnsScriptFiles = array(
'/plugins/showdown/showdown.min.js',
'/plugins/to-markdown/to-markdown.js',
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->request->baseUrl);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::$app->request->baseUrl);
?>
<style>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment