Skip to content
This repository
Browse code

Remove tidy panel.

It had extra dependencies and wasn't
enabled by default.  It also can easily live in a
plugin/app.
  • Loading branch information...
commit 5c20afaff1c3cf42e0b2fb84fdf546e7e0350fe8 1 parent 4092a0e
Mark Story authored May 11, 2012
65  Lib/Panel/TidyPanel.php
... ...
@@ -1,65 +0,0 @@
1  
-<?php
2  
-App::uses('DebugPanel', 'DebugKit.Lib');
3  
-
4  
-/**
5  
- * Show (x)html validation errors in a tidy panel
6  
- *
7  
- * PHP version 4 and 5
8  
- *
9  
- * Copyright (c) 2009, Andy Dawson
10  
- *
11  
- * Licensed under The MIT License
12  
- * Redistributions of files must retain the above copyright notice.
13  
- *
14  
- * @copyright     Copyright (c) 2009, Andy Dawson
15  
- * @link          www.ad7six.com
16  
- * @package       debug_kit
17  
- * @subpackage    debug_kit.vendors
18  
- * @since         v 1.0 (22-Jun-2009)
19  
- * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
20  
- */
21  
-
22  
-/**
23  
- * TidyPanel class
24  
- *
25  
- * @uses          DebugPanel
26  
- * @package       debug_kit
27  
- * @subpackage    debug_kit.panel
28  
- */
29  
-class TidyPanel extends DebugPanel {
30  
-
31  
-/**
32  
- * title property
33  
- *
34  
- * @var string 'Tidy'
35  
- * @access public
36  
- */
37  
-	public $title = 'Tidy';
38  
-
39  
-/**
40  
- * elementName property
41  
- *
42  
- * @var string 'tidy'
43  
- * @access public
44  
- */
45  
-	public $elementName = 'tidy_panel';
46  
-
47  
-/**
48  
- * startup method
49  
- *
50  
- * @param mixed $controller
51  
- * @return void
52  
- * @access public
53  
- */
54  
-	public function startup(Controller $controller) {
55  
-	$isHtml = (
56  
-			!isset($controller->params['ext']) ||
57  
-			(isset($controller->params['ext']) && $controller->params['ext'] == 'html')
58  
-		);
59  
-		if ($controller->Toolbar->RequestHandler->isAjax() || !$isHtml) {
60  
-			$this->enabled = false;
61  
-			unset($controller->Toolbar->panels['Tidy']);
62  
-		}
63  
-		$controller->helpers[] = 'DebugKit.Tidy';
64  
-	}
65  
-}
5  View/Elements/tidy_panel.ctp
... ...
@@ -1,5 +0,0 @@
1  
-<?php
2  
-if (!empty($this->request->params['isAjax'])) {
3  
-	return;
4  
-}
5  
-echo $this->Tidy->report($this->output);

0 notes on commit 5c20afa

Please sign in to comment.
Something went wrong with that request. Please try again.