Completed
Pull Request — 1.1 (#4)
by
unknown
02:47
created
src/Mouf/Utils/Patcher/PatchInstaller.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -18,41 +18,41 @@
 block discarded – undo
18 18
 
19 19
 class PatchInstaller implements PackageInstallerInterface
20 20
 {
21
-    /**
22
-     * (non-PHPdoc)
23
-     * @see \Mouf\Installer\PackageInstallerInterface::install()
24
-     * @param  MoufManager         $moufManager
25
-     * @throws \Mouf\MoufException
26
-     */
27
-    public static function install(MoufManager $moufManager)
28
-    {
29
-        // Let's create the instance.
30
-        $patchService = InstallUtils::getOrCreateInstance('patchService', 'Mouf\\Utils\\Patcher\\PatchService', $moufManager);
31
-
32
-        $consoleUtils = new ConsoleUtils($moufManager);
33
-
34
-        $listPatchesCommand = $moufManager->createInstance(ListPatchesCommand::class);
35
-        $listPatchesCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
36
-        $consoleUtils->registerCommand($listPatchesCommand);
37
-
38
-        $applyAllPatchesCommand = $moufManager->createInstance(ApplyAllPatchesCommand::class);
39
-        $applyAllPatchesCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
40
-        $consoleUtils->registerCommand($applyAllPatchesCommand);
41
-
42
-        $applyPatchCommand = $moufManager->createInstance(ApplyPatchCommand::class);
43
-        $applyPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
44
-        $consoleUtils->registerCommand($applyPatchCommand);
45
-
46
-        $skipPatchCommand = $moufManager->createInstance(SkipPatchCommand::class);
47
-        $skipPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
48
-        $consoleUtils->registerCommand($skipPatchCommand);
49
-
50
-        $revertPatchCommand = $moufManager->createInstance(RevertPatchCommand::class);
51
-        $revertPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
52
-        $consoleUtils->registerCommand($revertPatchCommand);
53
-
54
-
55
-        // Let's rewrite the MoufComponents.php file to save the component
56
-        $moufManager->rewriteMouf();
57
-    }
21
+	/**
22
+	 * (non-PHPdoc)
23
+	 * @see \Mouf\Installer\PackageInstallerInterface::install()
24
+	 * @param  MoufManager         $moufManager
25
+	 * @throws \Mouf\MoufException
26
+	 */
27
+	public static function install(MoufManager $moufManager)
28
+	{
29
+		// Let's create the instance.
30
+		$patchService = InstallUtils::getOrCreateInstance('patchService', 'Mouf\\Utils\\Patcher\\PatchService', $moufManager);
31
+
32
+		$consoleUtils = new ConsoleUtils($moufManager);
33
+
34
+		$listPatchesCommand = $moufManager->createInstance(ListPatchesCommand::class);
35
+		$listPatchesCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
36
+		$consoleUtils->registerCommand($listPatchesCommand);
37
+
38
+		$applyAllPatchesCommand = $moufManager->createInstance(ApplyAllPatchesCommand::class);
39
+		$applyAllPatchesCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
40
+		$consoleUtils->registerCommand($applyAllPatchesCommand);
41
+
42
+		$applyPatchCommand = $moufManager->createInstance(ApplyPatchCommand::class);
43
+		$applyPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
44
+		$consoleUtils->registerCommand($applyPatchCommand);
45
+
46
+		$skipPatchCommand = $moufManager->createInstance(SkipPatchCommand::class);
47
+		$skipPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
48
+		$consoleUtils->registerCommand($skipPatchCommand);
49
+
50
+		$revertPatchCommand = $moufManager->createInstance(RevertPatchCommand::class);
51
+		$revertPatchCommand->getConstructorArgumentProperty("patchService")->setValue($patchService);
52
+		$consoleUtils->registerCommand($revertPatchCommand);
53
+
54
+
55
+		// Let's rewrite the MoufComponents.php file to save the component
56
+		$moufManager->rewriteMouf();
57
+	}
58 58
 }
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Commands/SkipPatchCommand.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -15,45 +15,45 @@
 block discarded – undo
15 15
  */
16 16
 class SkipPatchCommand extends Command
17 17
 {
18
-    /**
19
-     * @var PatchService
20
-     */
21
-    private $patchService;
18
+	/**
19
+	 * @var PatchService
20
+	 */
21
+	private $patchService;
22 22
 
23
-    public function __construct(PatchService $patchService)
24
-    {
25
-        parent::__construct();
26
-        $this->patchService = $patchService;
27
-    }
23
+	public function __construct(PatchService $patchService)
24
+	{
25
+		parent::__construct();
26
+		$this->patchService = $patchService;
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * {@inheritdoc}
32
-     */
33
-    protected function configure()
34
-    {
35
-        $this
36
-        ->setName('patches:skip')
37
-        ->setDescription('Skip a patch.')
38
-        ->addArgument(
39
-            'name',
40
-            InputArgument::REQUIRED,
41
-            'The name of the patch instance to be skipped'
42
-        )
43
-        ->setHelp(<<<EOT
30
+	/**
31
+	 * {@inheritdoc}
32
+	 */
33
+	protected function configure()
34
+	{
35
+		$this
36
+		->setName('patches:skip')
37
+		->setDescription('Skip a patch.')
38
+		->addArgument(
39
+			'name',
40
+			InputArgument::REQUIRED,
41
+			'The name of the patch instance to be skipped'
42
+		)
43
+		->setHelp(<<<EOT
44 44
 Skips a patch. You must pass in parameter the name of the patch.
45 45
 EOT
46
-        );
47
-    }
46
+		);
47
+	}
48 48
 
49
-    /**
50
-     * {@inheritdoc}
51
-     */
52
-    protected function execute(InputInterface $input, OutputInterface $output)
53
-    {
54
-        $patchName = $input->getArgument('name');
55
-        $this->patchService->skip($patchName);
49
+	/**
50
+	 * {@inheritdoc}
51
+	 */
52
+	protected function execute(InputInterface $input, OutputInterface $output)
53
+	{
54
+		$patchName = $input->getArgument('name');
55
+		$this->patchService->skip($patchName);
56 56
 
57
-        $output->writeln('Patch marked as skipped');
58
-    }
57
+		$output->writeln('Patch marked as skipped');
58
+	}
59 59
 }
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Commands/ApplyPatchCommand.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -15,47 +15,47 @@
 block discarded – undo
15 15
  */
16 16
 class ApplyPatchCommand extends Command
17 17
 {
18
-    /**
19
-     * @var PatchService
20
-     */
21
-    private $patchService;
22
-
23
-    public function __construct(PatchService $patchService)
24
-    {
25
-        parent::__construct();
26
-        $this->patchService = $patchService;
27
-    }
28
-
29
-
30
-    /**
31
-     * {@inheritdoc}
32
-     */
33
-    protected function configure()
34
-    {
35
-        $this
36
-        ->setName('patches:apply')
37
-        ->setDescription('Apply a patch.')
38
-        ->addArgument(
39
-            'name',
40
-            InputArgument::REQUIRED,
41
-            'The name of the patch instance to be applied'
42
-        )
43
-        ->setHelp(<<<EOT
18
+	/**
19
+	 * @var PatchService
20
+	 */
21
+	private $patchService;
22
+
23
+	public function __construct(PatchService $patchService)
24
+	{
25
+		parent::__construct();
26
+		$this->patchService = $patchService;
27
+	}
28
+
29
+
30
+	/**
31
+	 * {@inheritdoc}
32
+	 */
33
+	protected function configure()
34
+	{
35
+		$this
36
+		->setName('patches:apply')
37
+		->setDescription('Apply a patch.')
38
+		->addArgument(
39
+			'name',
40
+			InputArgument::REQUIRED,
41
+			'The name of the patch instance to be applied'
42
+		)
43
+		->setHelp(<<<EOT
44 44
 Apply a patch. You must pass in parameter the name of the patch.
45 45
 
46 46
 Use patches:apply-all to apply all pending patches.
47 47
 EOT
48
-        );
49
-    }
50
-
51
-    /**
52
-     * {@inheritdoc}
53
-     */
54
-    protected function execute(InputInterface $input, OutputInterface $output)
55
-    {
56
-        $patchName = $input->getArgument('name');
57
-        $this->patchService->apply($patchName);
58
-
59
-        $output->writeln('Patch successfully applied');
60
-    }
48
+		);
49
+	}
50
+
51
+	/**
52
+	 * {@inheritdoc}
53
+	 */
54
+	protected function execute(InputInterface $input, OutputInterface $output)
55
+	{
56
+		$patchName = $input->getArgument('name');
57
+		$this->patchService->apply($patchName);
58
+
59
+		$output->writeln('Patch successfully applied');
60
+	}
61 61
 }
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Commands/ApplyAllPatchesCommand.php 1 patch
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -15,65 +15,65 @@
 block discarded – undo
15 15
  */
16 16
 class ApplyAllPatchesCommand extends Command
17 17
 {
18
-    /**
19
-     * @var PatchService
20
-     */
21
-    private $patchService;
18
+	/**
19
+	 * @var PatchService
20
+	 */
21
+	private $patchService;
22 22
 
23
-    public function __construct(PatchService $patchService)
24
-    {
25
-        parent::__construct();
26
-        $this->patchService = $patchService;
27
-    }
23
+	public function __construct(PatchService $patchService)
24
+	{
25
+		parent::__construct();
26
+		$this->patchService = $patchService;
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * {@inheritdoc}
32
-     */
33
-    protected function configure()
34
-    {
35
-        $this
36
-        ->setName('patches:apply-all')
37
-        ->setDescription('Apply all pending patches.')
38
-        ->setDefinition(array(
30
+	/**
31
+	 * {@inheritdoc}
32
+	 */
33
+	protected function configure()
34
+	{
35
+		$this
36
+		->setName('patches:apply-all')
37
+		->setDescription('Apply all pending patches.')
38
+		->setDefinition(array(
39 39
 
40
-        ))
41
-        ->setHelp(<<<EOT
40
+		))
41
+		->setHelp(<<<EOT
42 42
 Apply all pending patches.
43 43
 
44 44
 Use patches:apply if you want to cherry-pick a particular patch.
45 45
 EOT
46
-        );
47
-    }
46
+		);
47
+	}
48 48
 
49
-    /**
50
-     * {@inheritdoc}
51
-     */
52
-    protected function execute(InputInterface $input, OutputInterface $output)
53
-    {
54
-        $patchesArray = $this->patchService->getView();
49
+	/**
50
+	 * {@inheritdoc}
51
+	 */
52
+	protected function execute(InputInterface $input, OutputInterface $output)
53
+	{
54
+		$patchesArray = $this->patchService->getView();
55 55
 
56
-        $count = 0;
57
-        try {
58
-            foreach ($patchesArray as $patch) {
59
-                if ($patch['status'] == PatchInterface::STATUS_AWAITING || $patch['status'] == PatchInterface::STATUS_ERROR) {
60
-                    $this->patchService->apply($patch['uniqueName']);
61
-                    $count++;
62
-                }
63
-            }
64
-        } catch (\Exception $e) {
65
-            $output->writeln(sprintf(
66
-                    'An error occured while applying patch <info>%s</info>: <error>%s</error>', $patch['uniqueName'], $e->getMessage()
67
-                ));
68
-            throw $e;
69
-        }
56
+		$count = 0;
57
+		try {
58
+			foreach ($patchesArray as $patch) {
59
+				if ($patch['status'] == PatchInterface::STATUS_AWAITING || $patch['status'] == PatchInterface::STATUS_ERROR) {
60
+					$this->patchService->apply($patch['uniqueName']);
61
+					$count++;
62
+				}
63
+			}
64
+		} catch (\Exception $e) {
65
+			$output->writeln(sprintf(
66
+					'An error occured while applying patch <info>%s</info>: <error>%s</error>', $patch['uniqueName'], $e->getMessage()
67
+				));
68
+			throw $e;
69
+		}
70 70
 
71
-        if ($count) {
72
-            $output->writeln(sprintf(
73
-                    '<info>%d</info> patches successfully applied', $count
74
-                ));
75
-        } else {
76
-            $output->writeln('<info>No patches to apply</info>');
77
-        }
78
-    }
71
+		if ($count) {
72
+			$output->writeln(sprintf(
73
+					'<info>%d</info> patches successfully applied', $count
74
+				));
75
+		} else {
76
+			$output->writeln('<info>No patches to apply</info>');
77
+		}
78
+	}
79 79
 }
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Commands/RevertPatchCommand.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -15,45 +15,45 @@
 block discarded – undo
15 15
  */
16 16
 class RevertPatchCommand extends Command
17 17
 {
18
-    /**
19
-     * @var PatchService
20
-     */
21
-    private $patchService;
18
+	/**
19
+	 * @var PatchService
20
+	 */
21
+	private $patchService;
22 22
 
23
-    public function __construct(PatchService $patchService)
24
-    {
25
-        parent::__construct();
26
-        $this->patchService = $patchService;
27
-    }
23
+	public function __construct(PatchService $patchService)
24
+	{
25
+		parent::__construct();
26
+		$this->patchService = $patchService;
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * {@inheritdoc}
32
-     */
33
-    protected function configure()
34
-    {
35
-        $this
36
-        ->setName('patches:revert')
37
-        ->setDescription('Revert a patch.')
38
-        ->addArgument(
39
-            'name',
40
-            InputArgument::REQUIRED,
41
-            'The name of the patch instance to be reverted'
42
-        )
43
-        ->setHelp(<<<EOT
30
+	/**
31
+	 * {@inheritdoc}
32
+	 */
33
+	protected function configure()
34
+	{
35
+		$this
36
+		->setName('patches:revert')
37
+		->setDescription('Revert a patch.')
38
+		->addArgument(
39
+			'name',
40
+			InputArgument::REQUIRED,
41
+			'The name of the patch instance to be reverted'
42
+		)
43
+		->setHelp(<<<EOT
44 44
 Reverts a patch. You must pass in parameter the name of the patch.
45 45
 EOT
46
-        );
47
-    }
46
+		);
47
+	}
48 48
 
49
-    /**
50
-     * {@inheritdoc}
51
-     */
52
-    protected function execute(InputInterface $input, OutputInterface $output)
53
-    {
54
-        $patchName = $input->getArgument('name');
55
-        $this->patchService->revert($patchName);
49
+	/**
50
+	 * {@inheritdoc}
51
+	 */
52
+	protected function execute(InputInterface $input, OutputInterface $output)
53
+	{
54
+		$patchName = $input->getArgument('name');
55
+		$this->patchService->revert($patchName);
56 56
 
57
-        $output->writeln('Patch successfully reverted');
58
-    }
57
+		$output->writeln('Patch successfully reverted');
58
+	}
59 59
 }
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Commands/ListPatchesCommand.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -15,66 +15,66 @@
 block discarded – undo
15 15
  */
16 16
 class ListPatchesCommand extends Command
17 17
 {
18
-    /**
19
-     * @var PatchService
20
-     */
21
-    private $patchService;
18
+	/**
19
+	 * @var PatchService
20
+	 */
21
+	private $patchService;
22 22
 
23
-    public function __construct(PatchService $patchService)
24
-    {
25
-        parent::__construct();
26
-        $this->patchService = $patchService;
27
-    }
23
+	public function __construct(PatchService $patchService)
24
+	{
25
+		parent::__construct();
26
+		$this->patchService = $patchService;
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * {@inheritdoc}
32
-     */
33
-    protected function configure()
34
-    {
35
-        $this
36
-        ->setName('patches:list')
37
-        ->setDescription('List all the patches.')
38
-        ->setDefinition(array(
30
+	/**
31
+	 * {@inheritdoc}
32
+	 */
33
+	protected function configure()
34
+	{
35
+		$this
36
+		->setName('patches:list')
37
+		->setDescription('List all the patches.')
38
+		->setDefinition(array(
39 39
 
40
-        ))
41
-        ->setHelp(<<<EOT
40
+		))
41
+		->setHelp(<<<EOT
42 42
 List all patches declared in Mouf patch service.
43 43
 
44 44
 The command will display the status of each patch, i.e. whether it has been applied or skipped or is waiting to be applied.
45 45
 EOT
46
-        );
47
-    }
46
+		);
47
+	}
48 48
 
49
-    /**
50
-     * {@inheritdoc}
51
-     */
52
-    protected function execute(InputInterface $input, OutputInterface $output)
53
-    {
54
-        $patches = $this->patchService->getView();
49
+	/**
50
+	 * {@inheritdoc}
51
+	 */
52
+	protected function execute(InputInterface $input, OutputInterface $output)
53
+	{
54
+		$patches = $this->patchService->getView();
55 55
 
56
-        $rows = array_map(function($row) {
57
-            return [ $row['uniqueName'], $this->renderStatus($row['status']) ];
58
-        }, $patches);
56
+		$rows = array_map(function($row) {
57
+			return [ $row['uniqueName'], $this->renderStatus($row['status']) ];
58
+		}, $patches);
59 59
 
60
-        $table = new Table($output);
61
-        $table
62
-            ->setHeaders(array('Patch', 'Status'))
63
-            ->setRows($rows)
64
-        ;
65
-        $table->render();
66
-    }
60
+		$table = new Table($output);
61
+		$table
62
+			->setHeaders(array('Patch', 'Status'))
63
+			->setRows($rows)
64
+		;
65
+		$table->render();
66
+	}
67 67
 
68
-    private function renderStatus($status) {
69
-        $map = [
70
-            PatchInterface::STATUS_APPLIED => "<info>Applied</info>",
71
-            PatchInterface::STATUS_SKIPPED => "<comment>Skipped</comment>",
72
-            PatchInterface::STATUS_AWAITING => "Awaiting",
73
-            PatchInterface::STATUS_ERROR => "<error>Skipped</error>",
74
-        ];
75
-        if (!isset($map[$status])) {
76
-            throw new \Exception('Unexpected status "'.$map[$status].'"');
77
-        }
78
-        return $map[$status];
79
-    }
68
+	private function renderStatus($status) {
69
+		$map = [
70
+			PatchInterface::STATUS_APPLIED => "<info>Applied</info>",
71
+			PatchInterface::STATUS_SKIPPED => "<comment>Skipped</comment>",
72
+			PatchInterface::STATUS_AWAITING => "Awaiting",
73
+			PatchInterface::STATUS_ERROR => "<error>Skipped</error>",
74
+		];
75
+		if (!isset($map[$status])) {
76
+			throw new \Exception('Unexpected status "'.$map[$status].'"');
77
+		}
78
+		return $map[$status];
79
+	}
80 80
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $patches = $this->patchService->getView();
55 55
 
56 56
         $rows = array_map(function($row) {
57
-            return [ $row['uniqueName'], $this->renderStatus($row['status']) ];
57
+            return [$row['uniqueName'], $this->renderStatus($row['status'])];
58 58
         }, $patches);
59 59
 
60 60
         $table = new Table($output);
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/Controllers/PatchController.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 
19 19
 /**
20 20
  * The controller to track which patchs have been applied.
21
-
22 21
  */
23 22
 class PatchController extends AbstractMoufInstanceController {
24 23
 	
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	 * @Action
44 44
 	 * @Logged
45 45
 	 */
46
-	public function defaultAction($name, $selfedit="false") {
46
+	public function defaultAction($name, $selfedit = "false") {
47 47
 		$this->initController($name, $selfedit);
48 48
 		
49 49
 		$patchService = new InstanceProxy($name, $selfedit == "true");
Please login to merge, or discard this patch.
src/Mouf/Utils/Patcher/PatchService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -161,15 +161,15 @@
 block discarded – undo
161 161
 			
162 162
 			$html = '<strong>Patcher</strong>: <a href="'.ROOT_URL.'vendor/mouf/mouf/patcher/?name='.$instanceName.'" class="btn btn-large btn-success patch-run-all"><i class="icon-arrow-right icon-white"></i> Apply ';
163 163
 			if ($nbAwaitingPatchs != 0) {
164
-				$html .= $nbAwaitingPatchs." awaiting patch".(($nbAwaitingPatchs != 1)?"es":"");
164
+				$html .= $nbAwaitingPatchs." awaiting patch".(($nbAwaitingPatchs != 1) ? "es" : "");
165 165
 				if ($nbPatchsInError != 0) {
166
-					$html .=" and";
166
+					$html .= " and";
167 167
 				}
168 168
 			}
169 169
 			if ($nbPatchsInError != 0) {
170
-				$html .=$nbPatchsInError." patch".(($nbPatchsInError != 1)?"es":"")." in error";
170
+				$html .= $nbPatchsInError." patch".(($nbPatchsInError != 1) ? "es" : "")." in error";
171 171
 			}
172
-			$html .='</a>';
172
+			$html .= '</a>';
173 173
 				
174 174
 			
175 175
 			return new MoufValidatorResult($status, $html);
Please login to merge, or discard this patch.
src/views/patchesList.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 <?php 
20 20
 	echo '<button class="btn btn-large btn-success patch-run-all"><i class="icon-arrow-right icon-white"></i> Apply ';
21 21
 	if ($this->nbAwaiting != 0) {
22
-		echo $this->nbAwaiting." awaiting patch".(($this->nbAwaiting != 1)?"es":"");
22
+		echo $this->nbAwaiting." awaiting patch".(($this->nbAwaiting != 1) ? "es" : "");
23 23
 		if ($this->nbError != 0) {
24 24
 			echo " and ";
25 25
 		}
26 26
 	}
27 27
 	if ($this->nbError != 0) {
28
-		echo $this->nbError." patch".(($this->nbError != 1)?"es":"")." in error";
28
+		echo $this->nbError." patch".(($this->nbError != 1) ? "es" : "")." in error";
29 29
 	}
30 30
 	echo '</button>';
31 31
 ?>
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 		<td>
67 67
 		<?php 
68 68
 		
69
-		echo '<button class="btn btn-mini btn-success patch-apply" '.(($patch['status'] == PatchInterface::STATUS_APPLIED)?'disabled="disabled"':'').'><i class="icon-arrow-right icon-white"></i> Apply</button>';
70
-		echo ' <button class="btn btn-mini btn-info patch-skip" '.(($patch['status'] == PatchInterface::STATUS_APPLIED || $patch['status'] == PatchInterface::STATUS_SKIPPED)?'disabled="disabled"':'').'><i class="icon-share-alt icon-white"></i> Skip</button>';
69
+		echo '<button class="btn btn-mini btn-success patch-apply" '.(($patch['status'] == PatchInterface::STATUS_APPLIED) ? 'disabled="disabled"' : '').'><i class="icon-arrow-right icon-white"></i> Apply</button>';
70
+		echo ' <button class="btn btn-mini btn-info patch-skip" '.(($patch['status'] == PatchInterface::STATUS_APPLIED || $patch['status'] == PatchInterface::STATUS_SKIPPED) ? 'disabled="disabled"' : '').'><i class="icon-share-alt icon-white"></i> Skip</button>';
71 71
 		if ($patch['canRevert']) {
72
-			echo ' <button class="btn btn-mini btn-inverse patch-revert" '.(($patch['status'] == PatchInterface::STATUS_AWAITING)?'disabled="disabled"':'').'><i class="icon-arrow-left icon-white"></i> Revert</button>';
72
+			echo ' <button class="btn btn-mini btn-inverse patch-revert" '.(($patch['status'] == PatchInterface::STATUS_AWAITING) ? 'disabled="disabled"' : '').'><i class="icon-arrow-left icon-white"></i> Revert</button>';
73 73
 		}
74 74
 		if ($patch['edit_url']) {
75 75
 			echo ' <a class="btn btn-mini btn-danger patch-edit" href="'.ROOT_URL.$patch['edit_url'].'"><i class="icon-edit icon-white"></i> Edit</a>';
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	<tr>
83 83
 		<td colspan="4">
84 84
 			<div class="alert alert-error">
85
-			<strong>Last error message</strong>: <?php echo plainstring_to_htmlprotected($patch['error_message']);?>
85
+			<strong>Last error message</strong>: <?php echo plainstring_to_htmlprotected($patch['error_message']); ?>
86 86
 			</div>
87 87
 		</td>
88 88
 	</tr>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@  discard block
 block discarded – undo
5 5
 <?php if (empty($this->patchesArray)): ?>
6 6
 <div class="alert alert-info">No patches have been registered yet.</div>
7 7
 <?php 
8
-else:
8
+else {
9
+	:
9 10
 
10 11
 if ($this->nbAwaiting == 0 && $this->nbError == 0) {
11 12
 ?>
@@ -14,7 +15,9 @@  discard block
 block discarded – undo
14 15
 } else {
15 16
 ?>
16 17
 <form action="runAllPatches" method="post">
17
-	<input name="name" type="hidden" value="<?php echo plainstring_to_htmlprotected($this->instanceName); ?>"></input>
18
+	<input name="name" type="hidden" value="<?php echo plainstring_to_htmlprotected($this->instanceName);
19
+}
20
+?>"></input>
18 21
 	<input name="selfedit" type="hidden" value="<?php echo plainstring_to_htmlprotected($this->selfedit); ?>"></input>
19 22
 <?php 
20 23
 	echo '<button class="btn btn-large btn-success patch-run-all"><i class="icon-arrow-right icon-white"></i> Apply ';
Please login to merge, or discard this patch.