Skip to content

Commit

Permalink
屏蔽外部代码,解决测试问题 #2053
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Dec 1, 2016
1 parent 924a78d commit 626cdee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Controller/Minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@

class Minify extends \Wei\BaseController
{
/**
* @param $req
* @param Response $res
* @return $this
* @throws \Exception
*
* @SuppressWarnings(PHPMD)
*/
public function indexAction($req, Response $res)
{
if (!$req['f']) {
return $res->setContent('Forbidden')->setStatusCode(403);
}

//@codingStandardsIgnoreStart
/*
* Configuration for "min", the default application built with the Minify
* library
Expand Down Expand Up @@ -221,7 +230,8 @@ public function indexAction($req, Response $res)
}

if ($min_allowDebugFlag) {
$min_serveOptions['debug'] = Minify_DebugDetector::shouldDebugRequest($_COOKIE, $_GET, $_SERVER['REQUEST_URI']);
$min_serveOptions['debug'] = Minify_DebugDetector::shouldDebugRequest($_COOKIE, $_GET,
$_SERVER['REQUEST_URI']);
}

if ($min_errorLogger) {
Expand All @@ -246,6 +256,8 @@ public function indexAction($req, Response $res)
}
Min::serve($min_serveController, $min_serveOptions);
}
// @codingStandardsIgnoreEnd

//require 'vendor/mrclay/minify/min/index.php';
$this->app->preventPreviousDispatch();
}
Expand Down

0 comments on commit 626cdee

Please sign in to comment.