Commit db5b18f0 authored by Julie gauthier's avatar Julie gauthier

Merge branch '685-maj-3-4-request-response-deprecations' into 'develop'

Resolve "maj 3.4 Request & Response Deprecations"

Closes #685

See merge request !258
parents 3783dd3d 7dbdb715
Pipeline #5305 failed with stage
in 6 minutes and 59 seconds
<?php
namespace App\Controller\Api\V1;
use App\Controller\AppController;
......@@ -28,7 +29,7 @@ class LicenceTypesController extends AppController
/**
* View method
*
* @param string|null $id Licence Type id.
* @param string|null $id Licence Type id.
* @return void
* @throws NotFoundException When record not found.
*/
......@@ -37,7 +38,7 @@ class LicenceTypesController extends AppController
$licenceType = $this->LicenceTypes->get(
$id,
[
'contain' => []
'contain' => []
]
);
$this->set('licenceType', $licenceType);
......@@ -53,7 +54,7 @@ class LicenceTypesController extends AppController
{
$licenceType = $this->LicenceTypes->newEntity();
if ($this->request->is('post')) {
$licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->data);
$licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->getData());
if ($this->LicenceTypes->save($licenceType)) {
$this->Flash->success(__('The licence type has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -62,14 +63,14 @@ class LicenceTypesController extends AppController
$errors = $licenceType->errors();
}
}
$this->set(compact(['licenceType','errors']));
$this->set('_serialize', ['licenceType','errors']);
$this->set(compact(['licenceType', 'errors']));
$this->set('_serialize', ['licenceType', 'errors']);
}
/**
* Edit method
*
* @param string|null $id Licence Type id.
* @param string|null $id Licence Type id.
* @return void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -78,11 +79,11 @@ class LicenceTypesController extends AppController
$licenceType = $this->LicenceTypes->get(
$id,
[
'contain' => []
'contain' => []
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->data);
$licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->getData());
if ($this->LicenceTypes->save($licenceType)) {
$this->Flash->success(__('The licence type has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -97,7 +98,7 @@ class LicenceTypesController extends AppController
/**
* Delete method
*
* @param string|null $id Licence Type id.
* @param string|null $id Licence Type id.
* @return Response|null Redirects to index.
* @throws NotFoundException When record not found.
*/
......
......@@ -32,7 +32,7 @@ class LicensesController extends AppController
/**
* View method
*
* @param string|null $id License id.
* @param string|null $id License id.
* @return void
* @throws NotFoundException When record not found.
*/
......@@ -57,7 +57,7 @@ class LicensesController extends AppController
{
$license = $this->Licenses->newEntity();
if ($this->request->is('post')) {
$license = $this->Licenses->patchEntity($license, $this->request->data);
$license = $this->Licenses->patchEntity($license, $this->request->getData());
if ($this->Licenses->save($license)) {
$this->Flash->success(__('The license has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -73,7 +73,7 @@ class LicensesController extends AppController
/**
* Edit method
*
* @param string|null $id License id.
* @param string|null $id License id.
* @return void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -86,7 +86,7 @@ class LicensesController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$license = $this->Licenses->patchEntity($license, $this->request->data);
$license = $this->Licenses->patchEntity($license, $this->request->getData());
if ($this->Licenses->save($license)) {
$this->Flash->success(__('The license has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -102,7 +102,7 @@ class LicensesController extends AppController
/**
* Delete method
*
* @param string|null $id License id.
* @param string|null $id License id.
* @return Response|null Redirects to index.
* @throws NotFoundException When record not found.
*/
......
......@@ -99,8 +99,10 @@ class PagesController extends AppController
$Softwares = TableRegistry::get("Softwares");
//TO SORT
if (isset($this->request->query["order"])) {
$sort = explode(".", $this->request->query["order"]);
if (!is_null($this->request->getQuery("order"))) {
$sort = explode(".", $this->request->getQuery("order"));
// Note JGauthier 2019-07-16: just discovered this horror. This is not the correct way to do this.
// TODO This should be fixed
$this->request->query["sort"] = $sort[0];
$this->request->query["direction"] = $sort[1];
}
......@@ -122,20 +124,22 @@ class PagesController extends AppController
]
];
if (isset($this->request->data["search"])) {
$searchQuery = $this->request->data["search"];
if (null !== ($this->request->getData("search"))) {
$searchQuery = $this->request->getData("search");
} else {
$searchQuery = $this->request->query["search"];
$searchQuery = $this->request->getData("search");
}
$this->set('searchQuery', $searchQuery);
// keep spaces , uppercase and transiterate accent characters to non-accent characters.
// Note JGauthier 2019-07-16: just discovered this horror. This is not the correct way to do this.
// TODO This should be fixed
$this->request->query['search'] = strtoupper(Text::slug($searchQuery));
$softwares = $Softwares
->find(
'search',
[
'search' => $this->request->query,
'search' => $this->request->getQueryParams(),
"contain" => ["Reviews"],
]
)
......@@ -155,7 +159,7 @@ class PagesController extends AppController
->find(
'search',
[
'search' => $this->request->query,
'search' => $this->request->getQueryParams(),
'contain' => ['UserTypes'],
'order' => [
'Users.username' => Configure::read('ORDER')
......@@ -199,11 +203,11 @@ class PagesController extends AppController
$this->set('hasServiceProvider', $hasServiceProvider);
$this->set('order', $order);
$this->set('screenCaptured', $screenCaptured);
// $this->set('sort',$this->request->data['sort']);
// $this->set('direction',$this->request->data['direction']);
// $this->set('sort',$this->request->getData('sort'));
// $this->set('direction',$this->request->getData('direction'));
//To populate SearchForm
$this->request->data = $this->request->query;
$this->request->getData($this->request->getQueryParams());
$this->set('softwares', $this->paginate($softwares));
$this->set('users', $this->paginate($this->Users));
......
......@@ -35,7 +35,7 @@ class RawMetricsSoftwaresController extends AppController
/**
* View method
*
* @param string|null $id Raw Metrics Software id.
* @param string|null $id Raw Metrics Software id.
* @return Response|null
* @throws RecordNotFoundException When record not found.
*/
......@@ -61,7 +61,10 @@ class RawMetricsSoftwaresController extends AppController
{
$rawMetricsSoftware = $this->RawMetricsSoftwares->newEntity();
if ($this->request->is('post')) {
$rawMetricsSoftware = $this->RawMetricsSoftwares->patchEntity($rawMetricsSoftware, $this->request->data);
$rawMetricsSoftware = $this->RawMetricsSoftwares->patchEntity(
$rawMetricsSoftware,
$this->request->getData()
);
if ($this->RawMetricsSoftwares->save($rawMetricsSoftware)) {
$this->Flash->success(__('The raw metrics software has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -77,7 +80,7 @@ class RawMetricsSoftwaresController extends AppController
/**
* Edit method
*
* @param string|null $id Raw Metrics Software id.
* @param string|null $id Raw Metrics Software id.
* @return Response|void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -90,7 +93,10 @@ class RawMetricsSoftwaresController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$rawMetricsSoftware = $this->RawMetricsSoftwares->patchEntity($rawMetricsSoftware, $this->request->data);
$rawMetricsSoftware = $this->RawMetricsSoftwares->patchEntity(
$rawMetricsSoftware,
$this->request->getData()
);
if ($this->RawMetricsSoftwares->save($rawMetricsSoftware)) {
$this->Flash->success(__('The raw metrics software has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -106,7 +112,7 @@ class RawMetricsSoftwaresController extends AppController
/**
* Delete method
*
* @param string|null $id Raw Metrics Software id.
* @param string|null $id Raw Metrics Software id.
* @return Response|null Redirects to index.
* @throws RecordNotFoundException When record not found.
*/
......
......@@ -29,7 +29,7 @@ class RelationshipTypesController extends AppController
/**
* View method
*
* @param string|null $id Relationship Type id.
* @param string|null $id Relationship Type id.
* @return void
* @throws NotFoundException When record not found.
*/
......@@ -54,7 +54,7 @@ class RelationshipTypesController extends AppController
{
$relationshipType = $this->RelationshipTypes->newEntity();
if ($this->request->is('post')) {
$relationshipType = $this->RelationshipTypes->patchEntity($relationshipType, $this->request->data);
$relationshipType = $this->RelationshipTypes->patchEntity($relationshipType, $this->request->getData());
if ($this->RelationshipTypes->save($relationshipType)) {
$this->Flash->success(__('The relationship type has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -69,7 +69,7 @@ class RelationshipTypesController extends AppController
/**
* Edit method
*
* @param string|null $id Relationship Type id.
* @param string|null $id Relationship Type id.
* @return void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -82,7 +82,7 @@ class RelationshipTypesController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$relationshipType = $this->RelationshipTypes->patchEntity($relationshipType, $this->request->data);
$relationshipType = $this->RelationshipTypes->patchEntity($relationshipType, $this->request->getData());
if ($this->RelationshipTypes->save($relationshipType)) {
$this->Flash->success(__('The relationship type has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -97,7 +97,7 @@ class RelationshipTypesController extends AppController
/**
* Delete method
*
* @param string|null $id Relationship Type id.
* @param string|null $id Relationship Type id.
* @return Response|null Redirects to index.
* @throws NotFoundException When record not found.
*/
......
......@@ -34,7 +34,7 @@ class RelationshipsController extends AppController
/**
* View method
*
* @param string|null $id Relationship id.
* @param string|null $id Relationship id.
* @return void
* @throws NotFoundException When record not found.
*/
......@@ -59,7 +59,7 @@ class RelationshipsController extends AppController
{
$relationship = $this->Relationships->newEntity();
if ($this->request->is('post')) {
$relationship = $this->Relationships->patchEntity($relationship, $this->request->data);
$relationship = $this->Relationships->patchEntity($relationship, $this->request->getData());
if ($this->Relationships->save($relationship)) {
$this->Flash->success(__('The relationship has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -77,7 +77,7 @@ class RelationshipsController extends AppController
/**
* Edit method
*
* @param string|null $id Relationship id.
* @param string|null $id Relationship id.
* @return void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -90,7 +90,7 @@ class RelationshipsController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$relationship = $this->Relationships->patchEntity($relationship, $this->request->data);
$relationship = $this->Relationships->patchEntity($relationship, $this->request->getData());
if ($this->Relationships->save($relationship)) {
$this->Flash->success(__('The relationship has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -108,7 +108,7 @@ class RelationshipsController extends AppController
/**
* Delete method
*
* @param string|null $id Relationship id.
* @param string|null $id Relationship id.
* @return Response|null Redirects to index.
* @throws NotFoundException When record not found.
*/
......
......@@ -69,7 +69,7 @@ class RelationshipsSoftwaresController extends AppController
if ($this->request->is('post')) {
$relationshipsSoftware = $this->RelationshipsSoftwares->patchEntity(
$relationshipsSoftware,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwares->save($relationshipsSoftware)) {
$this->Flash->success(__('The relationships software has been saved.'));
......@@ -102,7 +102,7 @@ class RelationshipsSoftwaresController extends AppController
if ($this->request->is(['patch', 'post', 'put'])) {
$relationshipsSoftware = $this->RelationshipsSoftwares->patchEntity(
$relationshipsSoftware,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwares->save($relationshipsSoftware)) {
$this->Flash->success(__('The relationships software has been saved.'));
......
......@@ -40,7 +40,7 @@ class RelationshipsSoftwaresUsersController extends AppController
'all',
[
'contain' => ["Users", "Relationships"],
'conditions' => ["Relationships.cd = " => $this->request->query['Relationships']],
'conditions' => ["Relationships.cd = " => $this->request->getQuery('Relationships')],
]
)
->distinct("user_id");
......@@ -90,7 +90,7 @@ class RelationshipsSoftwaresUsersController extends AppController
if ($this->request->is('post') && !$this->request->is('json')) {
$relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity(
$relationshipsSoftwaresUser,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
$this->Flash->success(__('The relationships softwares user has been saved.'));
......@@ -106,7 +106,7 @@ class RelationshipsSoftwaresUsersController extends AppController
} elseif ($this->request->is('post') && $this->request->is('json')) {
$relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity(
$relationshipsSoftwaresUser,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
$message = "Success";
......@@ -153,7 +153,7 @@ class RelationshipsSoftwaresUsersController extends AppController
if ($this->request->is(['patch', 'post', 'put']) && !$this->request->is('json')) {
$relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity(
$relationshipsSoftwaresUser,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
$this->Flash->success(__('The relationships softwares user has been saved.'));
......@@ -170,7 +170,7 @@ class RelationshipsSoftwaresUsersController extends AppController
} elseif ($this->request->is(['patch', 'post', 'put']) && $this->request->is('json')) {
$relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity(
$relationshipsSoftwaresUser,
$this->request->data
$this->request->getData()
);
if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
$message = "Success";
......
......@@ -32,7 +32,7 @@ class RelationshipsUsersController extends AppController
/**
* View method
*
* @param string|null $id Relationships User id.
* @param string|null $id Relationships User id.
* @return void
* @throws NotFoundException When record not found.
*/
......@@ -57,7 +57,7 @@ class RelationshipsUsersController extends AppController
{
$relationshipsUser = $this->RelationshipsUsers->newEntity();
if ($this->request->is('post')) {
$relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->data);
$relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->getData());
if ($this->RelationshipsUsers->save($relationshipsUser)) {
$this->Flash->success(__('The relationships user has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -74,7 +74,7 @@ class RelationshipsUsersController extends AppController
/**
* Edit method
*
* @param string|null $id Relationships User id.
* @param string|null $id Relationships User id.
* @return void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -87,7 +87,7 @@ class RelationshipsUsersController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->data);
$relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->getData());
if ($this->RelationshipsUsers->save($relationshipsUser)) {
$this->Flash->success(__('The relationships user has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -104,7 +104,7 @@ class RelationshipsUsersController extends AppController
/**
* Delete method
*
* @param string|null $id Relationships User id.
* @param string|null $id Relationships User id.
* @return Response|null Redirects to index.
* @throws NotFoundException When record not found.
*/
......
......@@ -44,19 +44,19 @@ class ReviewsController extends AppController
public function index()
{
if (isset($this->request->params['software_id'])) {
if (!is_null($this->request->getParam('software_id'))) {
$this->viewBuilder()->setTemplate("reviews_software");
$software = $this->Reviews->Softwares->find("all")->select([
"id",
"softwarename"
])->where(["id" => $this->request->params['software_id']])->firstOrFail();
])->where(["id" => $this->request->getParam('software_id')])->firstOrFail();
$this->set('software', $software);
$this->set('_serialize', ['software']);
}
$this->paginate = [
'conditions' => isset($this->request->params['software_id']) ? [
'Softwares.id ' => $this->request->params['software_id']
'conditions' => !is_null($this->request->getParam('software_id')) ? [
'Softwares.id ' => $this->request->getParam('software_id')
] : [],
'contain' => [
'Users' => ["fields" => ["id", "username", 'logo_directory', 'photo',]],
......@@ -123,34 +123,34 @@ class ReviewsController extends AppController
$message = "";
if ($this->request->is('post')) {
try {
$software = $this->Reviews->Softwares->get($this->request->params['software_id']);
$this->request->data['software_id'] = $software->id;
$software = $this->Reviews->Softwares->get($this->request->getParam('software_id'));
$this->request->getData($software->id);
} catch (Exception $e) {
throw new SoftwareNotFoundException(
"The software with the id " . $this->request->params['software_id'] . " does not exist"
"The software with the id " . $this->request->getParam('software_id') . " does not exist"
);
}
try {
$user = $this->Reviews->Users->get($this->Auth->user('id'));
$this->request->data['user_id'] = $user->id;
$this->request->getData($user->id);
} catch (Exception $e) {
throw new UserNotFoundException("The user with the id " . $this->Auth->user('id') . " does not exist");
}
$review = $this->Reviews->patchEntity($review, $this->request->data);
$review = $this->Reviews->patchEntity($review, $this->request->getData());
if ($this->Reviews->save($review)) {
$message = "Success";
if (!$this->request->is('json')) {
$this->Flash->success(__d("Forms", "Your review has been posted"));
$this->redirect("softwares/" . $this->request->data['software_id']);
$this->redirect("softwares/" . $this->request->getData('software_id'));
}
} else {
if (!$this->request->is('json')) {
$this->Flash->error(__d("Forms", "You can not post more than one review for a software."));
$this->redirect("softwares/" . $this->request->data['software_id']);
$this->redirect("softwares/" . $this->request->getData('software_id'));
} else {
$message = "Error";
$review = $review->errors();
......@@ -182,7 +182,7 @@ class ReviewsController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$review = $this->Reviews->patchEntity($review, $this->request->data);
$review = $this->Reviews->patchEntity($review, $this->request->getData());
if ($this->Reviews->save($review)) {
$this->Flash->success(__('The review has been saved.'));
return $this->redirect(['action' => 'index']);
......
......@@ -22,19 +22,19 @@ class ScreenshotsController extends AppController
*/
public function index()
{
if (isset($this->request->params['software_id'])) {
if (! is_null($this->request->getParam('software_id'))) {
$this->viewBuilder()->setTemplate("screenshots_software");
$software = $this->Screenshots->Softwares->find("all")->select([
"id",
"softwarename"
])->where(["id" => $this->request->params['software_id']])->firstOrFail();
])->where(["id" => $this->request->getParam('software_id')])->firstOrFail();
$this->set('software', $software);
$this->set('_serialize', ['software']);
}
$this->paginate = [
'conditions' => isset($this->request->params['software_id']) ? [
'Softwares.id ' => $this->request->params['software_id']
'conditions' => ! is_null($this->request->getParam('software_id')) ? [
'Softwares.id ' => $this->request->getParam('software_id')
] : [],
'contain' => [
'Softwares'
......@@ -73,7 +73,7 @@ class ScreenshotsController extends AppController
{
$screenshot = $this->Screenshots->newEntity();
if ($this->request->is('post')) {
$screenshot = $this->Screenshots->patchEntity($screenshot, $this->request->data);
$screenshot = $this->Screenshots->patchEntity($screenshot, $this->request->getData());
if ($this->Screenshots->save($screenshot)) {
$this->Flash->success(__('The screenshot has been saved.'));
return $this->redirect(['action' => 'index']);
......@@ -102,7 +102,7 @@ class ScreenshotsController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$screenshot = $this->Screenshots->patchEntity($screenshot, $this->request->data);
$screenshot = $this->Screenshots->patchEntity($screenshot, $this->request->getData());
if ($this->Screenshots->save($screenshot)) {
$this->Flash->success(__('The screenshot has been saved.'));
return $this->redirect(['action' => 'index']);
......
......@@ -107,8 +107,8 @@ class SoftwaresController extends AppController
$this->request->allowMethod(['post', 'get']);
// For sorting
if (!empty($this->request->data) && isset($this->request->data["order"])) {
$sort = explode(".", $this->request->data["order"]);
if (!is_null($this->request->getData()) && !is_null($this->request->getData("order"))) {
$sort = explode(".", $this->request->getData("order"));
$this->request->query["sort"] = $sort[0];
$this->request->query["direction"] = $sort[1];
}
......@@ -168,7 +168,7 @@ class SoftwaresController extends AppController
->find(
'search',
[
'search' => $this->request->data,
'search' => $this->request->getData(),
"contain" => ["Reviews"],
]
)
......@@ -309,7 +309,7 @@ class SoftwaresController extends AppController
// no id specified => ALL software listed
if ($id == null && $this->request->is('get') && $this->request->is('json')) {
$softwares = $this->Softwares
->find('search', ['search' => $this->request->query]);
->find('search', ['search' => $this->request->getQueryParams()]);
$this->set('softwares', $this->paginate($softwares));
$this->set('_serialize', ['softwares']);
......@@ -323,11 +323,11 @@ class SoftwaresController extends AppController
*/
public function add()
{
if (isset($this->request->data)
&& !empty($this->request->data)
if (null !== ($this->request->getData())
&& null !== ($this->request->getData())
) {
$software = $this->Softwares->newEntity(
$this->request->data,
$this->request->getData(),
['associated' => "Screenshots", "Tags"]
);
} else {
......@@ -339,7 +339,7 @@ class SoftwaresController extends AppController
$message = "";
if ($this->Auth->user('id')) {
if (!empty($this->request->data)) {
if (null !== ($this->request->getData())) {
if ($this->Softwares->save($software)) {
$message = "Success";
$this->request->is('json')
......@@ -500,7 +500,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]
);
} else {
......@@ -516,7 +516,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]);
}
}
......@@ -568,7 +568,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]
);
}
......@@ -700,7 +700,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]
);
} else {
......@@ -719,7 +719,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]
);
}
......@@ -772,7 +772,7 @@ class SoftwaresController extends AppController
"prefix" => false,
"controller" => "Softwares",
"action" => $id,
"language" => $this->request->param("language"),
"language" => $this->request->getParam("language"),
]
);
}
......@@ -842,7 +842,7 @@ class SoftwaresController extends AppController
*/
public function tagged()
{
$tags = $this->request->params['pass'];
$tags = $this->request->getParam('pass');
$softwares = $this->Softwares->find(
'tagged',
[
......
......@@ -35,7 +35,7 @@ class SoftwaresTagsController extends AppController
/**
* View method
*
* @param string|null $id Softwares Tag id.
* @param string|null $id Softwares Tag id.
* @return Response|null
* @throws RecordNotFoundException When record not found.
*/
......@@ -61,7 +61,7 @@ class SoftwaresTagsController extends AppController
{
$softwaresTag = $this->SoftwaresTags->newEntity();
if ($this->request->is('post')) {
$softwaresTag = $this->SoftwaresTags->patchEntity($softwaresTag, $this->request->data);
$softwaresTag = $this->SoftwaresTags->patchEntity($softwaresTag, $this->request->getData());
if ($this->SoftwaresTags->save($softwaresTag)) {
$this->Flash->success(__d('Tags', 'The software tag has been saved.'));
......@@ -79,7 +79,7 @@ class SoftwaresTagsController extends AppController
/**
* Edit method
*
* @param string|null $id Softwares Tag id.
* @param string|null $id Softwares Tag id.
* @return Response|void Redirects on successful edit, renders view otherwise.
* @throws NotFoundException When record not found.
*/
......@@ -92,7 +92,7 @@ class SoftwaresTagsController extends AppController
]
);
if ($this->request->is(['patch', 'post', 'put'])) {
$softwaresTag = $this->SoftwaresTags->patchEntity($softwaresTag, $this->request->data);
$softwaresTag = $this->SoftwaresTags->patchEntity($softwaresTag, $this->request->getData());
if ($this->SoftwaresTags->save($softwaresTag)) {
$this->Flash->success(__d('Tags', 'The softwares tag has been saved.'));
......@@ -110,7 +110,7 @@ class SoftwaresTagsController extends AppController
/**
* Delete method
*