Commit a9aebfab by Carsten Brandt

minor message improvements

parent 6d1dd1d5
...@@ -9,6 +9,7 @@ namespace yii\build\controllers; ...@@ -9,6 +9,7 @@ namespace yii\build\controllers;
use Yii; use Yii;
use yii\console\Controller; use yii\console\Controller;
use yii\helpers\Console;
use yii\helpers\VarDumper; use yii\helpers\VarDumper;
/** /**
...@@ -33,7 +34,10 @@ class MimeTypeController extends Controller ...@@ -33,7 +34,10 @@ class MimeTypeController extends Controller
if ($outFile === null) { if ($outFile === null) {
$outFile = Yii::getAlias('@yii/helpers/mimeTypes.php'); $outFile = Yii::getAlias('@yii/helpers/mimeTypes.php');
} }
$this->stdout('downloading mime-type file from apache httpd repository...');
if ($content = file_get_contents('http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co')) { if ($content = file_get_contents('http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co')) {
$this->stdout("done.\n", Console::FG_GREEN);
$this->stdout("generating file $outFile...");
$mimeMap = []; $mimeMap = [];
foreach(explode("\n", $content) as $line) { foreach(explode("\n", $content) as $line) {
$line = trim($line); $line = trim($line);
...@@ -65,6 +69,7 @@ return $array; ...@@ -65,6 +69,7 @@ return $array;
EOD; EOD;
file_put_contents($outFile, $content); file_put_contents($outFile, $content);
$this->stdout("done.\n", Console::FG_GREEN);
} else { } else {
$this->stderr("Failed to download mime.types file from apache SVN.\n"); $this->stderr("Failed to download mime.types file from apache SVN.\n");
} }
......
...@@ -194,8 +194,7 @@ class Module extends \yii\base\Module implements BootstrapInterface ...@@ -194,8 +194,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
return true; return true;
} }
} }
Yii::warning('Access to debugger is denied due to IP address restriction. The requested IP is ' . $ip, __METHOD__); Yii::warning('Access to debugger is denied due to IP address restriction. The requesting IP address is ' . $ip, __METHOD__);
return false; return false;
} }
......
Markdown is supported
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