FIX: fix latent bug in save pipeline - trim backslashes from handler name

This commit is contained in:
Michal Kváček
2017-03-13 12:08:26 +01:00
parent ed8e2565ff
commit ce58b325c8
4 changed files with 3 additions and 23 deletions
@@ -17,7 +17,7 @@ class TurnCommentsOnOrOff implements Process
*/
function handle(Content & $content, array & $input)
{
if ($content->moduleHandler !== Article::class) {
if (trim($content->moduleHandler, '\\') !== Article::class) {
return;
}
@@ -17,8 +17,9 @@ class SaveContactInformation implements Process
*/
function handle(Content & $page, array & $input)
{
if ($page->moduleHandler != ContactForm::class)
if (trim($page->moduleHandler, '\\') != ContactForm::class) {
return;
}
$settings = [
'phone' => $input['phone'],
@@ -1,20 +0,0 @@
<?php
namespace Modules\StaticPages\PipelineProcess;
use App\CMS\Contracts\Content\DisplayPipeline\Process;
use App\Http\Controllers\Controller;
use App\Models\Content\Content;
class RenderPage implements Process {
/**
* Process and modify given page
*
* @param Content $page
*
* @return mixed
*/
function handle(Content & $page)
{
}
}
@@ -1,7 +1,6 @@
<?php namespace Modules\Staticpages\Providers;
use App\Providers\ModuleServiceProvider;
use Modules\StaticPages\PipelineProcess\RenderPage;
class StaticPagesServiceProvider extends ModuleServiceProvider
{