Commit fedd94d4 authored by thomas craipeau's avatar thomas craipeau
Browse files

change createUrl createAbsoluteUrl homeUrl

parent 0ade6632
......@@ -60,7 +60,7 @@ class NewsModule extends \yii\base\Module {
// you may place code here to customize the module or the application
Yii::app()->homeUrl = Yii::app()->createUrl($this->id);
Yii::$app->homeUrl = Yii::$app->urlManager->createUrl($this->id);
//Apply theme
$themeName = $this->getTheme();
......
......@@ -109,7 +109,7 @@ if(@$media["object"]){
if(isset($media["lastAuthorShare"]) ){
if(empty($media["lastAuthorShare"]["profilThumbImageUrl"]) )
$media["lastAuthorShare"]["profilThumbImageUrl"] = $this->module->assetsUrl."/images/thumb/default_".$media["lastAuthorShare"]["type"].".png";
else $media["lastAuthorShare"]["profilThumbImageUrl"] = Yii::app()->createUrl($media["lastAuthorShare"]["profilThumbImageUrl"]) ;
else $media["lastAuthorShare"]["profilThumbImageUrl"] = Yii::$app->urlManager->createUrl($media["lastAuthorShare"]["profilThumbImageUrl"]) ;
$pluriel = ""; ?>
<img class="pull-left img-circle img-author-news-<?php echo $media["lastAuthorShare"]["id"] ?>"
src="<?php echo $media["lastAuthorShare"]["profilThumbImageUrl"]; ?>"
......@@ -314,7 +314,7 @@ if(@$media["object"]){
"authorId"=>@$media["object"]["authorId"],
"timezone"=>$timezone,
"thumbAuthor"=>@$media["object"]["author"]["profilThumbImageUrl"] ?
Yii::app()->createUrl($media["object"]["author"]["profilThumbImageUrl"]) : "",
Yii::$app->urlManager->createUrl($media["object"]["author"]["profilThumbImageUrl"]) : "",
)
);
?>
......
......@@ -108,7 +108,7 @@ foreach($news as $key => $media){
// Author name and thumb
if(@$media["targetIsAuthor"] || $media["type"]=="activityStream"){
if(@$media["target"]["profilThumbImageUrl"] && $media["target"]["profilThumbImageUrl"] != "")
$thumbAuthor = Yii::app()->createUrl('/'.$media["target"]["profilThumbImageUrl"]);
$thumbAuthor = Yii::$app->urlManager->createUrl('/'.$media["target"]["profilThumbImageUrl"]);
else
$thumbAuthor = $this->module->assetsUrl."/images/thumb/default_".$media["target"]["type"].".png";
$nameAuthor=$media["target"]["name"];
......@@ -116,7 +116,7 @@ foreach($news as $key => $media){
$authorId=$media["target"]["id"];
} else{
$thumbAuthor = @$media['author']['profilThumbImageUrl'] ?
Yii::app()->createUrl('/'.@$media['author']['profilThumbImageUrl'])
Yii::$app->urlManager->createUrl('/'.@$media['author']['profilThumbImageUrl'])
: $this->module->assetsUrl."/images/thumb/default_citoyens.png";
$nameAuthor=@$media["author"]["name"];
$authorType=Person::COLLECTION;
......@@ -124,13 +124,13 @@ foreach($news as $key => $media){
}
//$srcMainImg = "";
//if(@$media["media"]["images"] && $media["media"]["type"] != "gallery_images")
//$srcMainImg = Yii::app()->createUrl("upload/".
//$srcMainImg = Yii::$app->urlManager->createUrl("upload/".
// Yii::app()->controller->module->id."/".
// $media["media"]["images"][0]["folder"].'/'.
// $media["media"]["images"][0]["name"]);
//if(@$media["imageBackground"])
//$srcMainImg = Yii::app()->createUrl($media["imageBackground"]);
//$srcMainImg = Yii::$app->urlManager->createUrl($media["imageBackground"]);
?>
<li class="<?php echo $class; ?> <?php echo $classLi ?> list-news"
id="<?php echo @$media["type"]; ?><?php echo $key; ?>">
......
......@@ -59,7 +59,7 @@ font-family: "Homestead";
<br>
<?php echo Yii::t("common","Check the URL you entered for any mistakes and try again.",null,Yii::app()->controller->module->id);?>
<br>
<a href="<?php echo Yii::app()->createUrl('/'.$this->module->id);?>" class="btn btn-red btn-return">
<a href="<?php echo Yii::$app->urlManager->createUrl('/'.$this->module->id);?>" class="btn btn-red btn-return">
<?php echo Yii::t("common","Return home",null,Yii::app()->controller->module->id);?>
</a>
</div>
......
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