/[drupal]/contributions/modules/beautify/beautify.install
ViewVC logotype

Contents of /contributions/modules/beautify/beautify.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Jan 6 15:29:55 2009 UTC (10 months, 3 weeks ago) by psynaptic
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
Initial commit of Beautify module. This module buffers the HTML output of Drupal and processes it through HTMLTidy, htmLawed or a set of built-in functions for beautifying (auto-indentation), flattening (removing indentations) and compacting the source code output to the browser.
1 <?php
2
3 /**
4 * Implementation of hook_requirements().
5 */
6 function html_processor_requirements($phase) {
7 $requirements = array();
8 $t = get_t();
9 switch ($phase) {
10 case 'runtime':
11 if (!html_processor_htmltidy_test($message, $version)) {
12 $requirements['html_processor_htmltidy'] = array(
13 'title' => $t('HTML Tidy'),
14 'description' => $t('Download and install the HTML Tidy binary <a href="http://tidy.sourceforge.net/">http://tidy.sourceforge.net/</a>'),
15 'severity' => $phase == 'install' ? REQUIREMENT_WARNING : REQUIREMENT_ERROR,
16 'value' => $t('Tidy binary not found.'),
17 );
18 }
19 else {
20 $requirements['html_processor_htmltidy'] = array(
21 'title' => $t('HTML Tidy'),
22 'severity' => REQUIREMENT_OK,
23 'value' => $t('HTMLTidy was found <code>%tidy_version</code>', array('%tidy_version' => $version)),
24 );
25 }
26 break;
27 }
28 return $requirements;
29 }

  ViewVC Help
Powered by ViewVC 1.1.2