Skip to content

Commit

Permalink
Merge branch 'release-2.21.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
krampstudio committed Mar 24, 2016
2 parents 622a9ab + 3dd77c9 commit d2aef89
Show file tree
Hide file tree
Showing 19 changed files with 113 additions and 104 deletions.
18 changes: 0 additions & 18 deletions .htaccess

This file was deleted.

34 changes: 0 additions & 34 deletions index.php

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'label' => 'Tao base',
'description' => 'TAO meta-extension',
'license' => 'GPL-2.0',
'version' => '2.20.0',
'version' => '2.21.0',
'author' => 'Open Assessment Technologies, CRP Henri Tudor',
'requires' => array(
'generis' => '>=2.12.0'
Expand Down
2 changes: 1 addition & 1 deletion models/classes/controllerMap/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private function isControllerClassNameValid($controllerClassName)
// abstract so just move along
$reflection = new \ReflectionClass($controllerClassName);
if ($reflection->isAbstract()) {
common_Logger::w($controllerClassName.' is abstract');
common_Logger::i($controllerClassName.' is abstract');
$returnValue = false;
}
}
Expand Down
13 changes: 6 additions & 7 deletions models/classes/mvc/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use tao_helpers_Request;
use tao_helpers_Uri;
use Request;
use HttpRequest;
use HTTPToolkit;

use Exception;
Expand Down Expand Up @@ -403,12 +402,12 @@ protected function setDefaultTimezone()
* @throws ActionEnforcingException in case of wrong module or action
* @throws tao_models_classes_UserException when a request try to acces a protected area
*/
protected function mvc()
{
$re = new HttpRequest();
$fc = new TaoFrontController($re);
$fc->loadModule();
}
protected function mvc()
{
$re = \common_http_Request::currentRequest();
$fc = new TaoFrontController();
$fc->legacy($re);
}

/**
* Load external resources for the current context
Expand Down
1 change: 0 additions & 1 deletion models/classes/routing/FlowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use common_ext_ExtensionsManager;
use HTTPToolkit;
use InterruptedActionException;
use HttpRequest;
use Context;
use FlowController as ClearFwFlowController;
use tao_helpers_Uri;
Expand Down
2 changes: 1 addition & 1 deletion models/classes/routing/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Resolver
/**
* Resolves a request to a method
*
* @param HttpRequest $pRequest
* @param common_http_Request $pRequest
* @return string
*/
public function __construct(common_http_Request $request) {
Expand Down
44 changes: 15 additions & 29 deletions models/classes/routing/TaoFrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,35 @@
*/
namespace oat\tao\model\routing;

use FrontController;
use HttpRequest;
use Context;
use InterruptedActionException;
use common_ext_ExtensionsManager;
use common_http_Request;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

/**
* A simple controller to replace the ClearFw controller
*
* @author Joel Bout, <[email protected]>
*/
class TaoFrontController implements FrontController
class TaoFrontController
{
/**
* @var common_http_Request
*/
private $httpRequest;

/**
*
* @param HttpRequest $pRequest
*/
public function __construct( HttpRequest $pRequest ) {
// ignore deprecated request class
$this->httpRequest = common_http_Request::currentRequest();
}

/**
* Returns the request to be executed
*
* @return common_http_Request
*/
protected function getRequest() {
return $this->httpRequest;

public function __invoke(ServerRequestInterface $request, ResponseInterface $response) {
$request->getUri();
$pRequest = \common_http_Request::currentRequest();
$this->legacy($pRequest, $response);
}

/**
* (non-PHPdoc)
* @see FrontController::loadModule()
* Run the controller
*
* @param common_http_Request $pRequest
* @param ResponseInterface $response
*/
public function loadModule() {
$resolver = new Resolver($this->getRequest());
public function legacy(common_http_Request $pRequest) {
$resolver = new Resolver($pRequest);

// load the responsible extension
$ext = common_ext_ExtensionsManager::singleton()->getExtensionById($resolver->getExtensionId());
Expand Down Expand Up @@ -89,7 +75,7 @@ public function loadModule() {

try
{
$enforcer = new ActionEnforcer($resolver->getExtensionId(), $resolver->getControllerClass(), $resolver->getMethodName(), $this->getRequest()->getParams());
$enforcer = new ActionEnforcer($resolver->getExtensionId(), $resolver->getControllerClass(), $resolver->getMethodName(), $pRequest->getParams());
$enforcer->execute();
}
catch (InterruptedActionException $iE)
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public function update($initialVersion) {
$this->setVersion('2.19.0');
}

$this->skip('2.19.0', '2.20.0');
$this->skip('2.19.0', '2.21.0');

}

Expand Down
3 changes: 2 additions & 1 deletion views/build/grunt/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function(grunt) {
var awsS3 = grunt.config('aws_s3') || {};
var clean = grunt.config('clean') || {};
var root = grunt.option('root');
var concurrency = grunt.option('s3-concurrency') || 20; // run the cli with --s3-concurrency=N
var ext = require('../tasks/helpers/extensions')(grunt, root); //extension helper
var out = 'output';

Expand Down Expand Up @@ -40,7 +41,7 @@ module.exports = function(grunt) {
accessKeyId: awsConfig.s3.accessKeyId,
secretAccessKey: awsConfig.s3.secretKey,
region: awsConfig.s3.region,
uploadConcurrency: 5,
uploadConcurrency: concurrency,
bucket: awsConfig.s3.bucket
};
awsS3.clean = {
Expand Down
2 changes: 1 addition & 1 deletion views/css/tao-3.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/css/tao-3.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit d2aef89

Please sign in to comment.