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

Contents of /contributions/modules/swftools/swftools.install

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Mar 17 21:35:59 2009 UTC (8 months, 1 week ago) by stuartgreenfield
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +24 -1 lines
File MIME type: text/x-php
Add zlib status messages to Drupal status report and to SWF Tools status report.
1 <?php
2 // $Id: swftools.install,v 1.2 2008/09/07 19:42:14 stuartgreenfield Exp $
3
4 function swftools_uninstall() {
5 db_query("DELETE from {variable} WHERE name LIKE 'swftools%'");
6 }
7
8
9 /**
10 * Check that the zlib extension exists for PHP.
11 */
12 function swftools_requirements($phase) {
13
14 // Ensure translations don't break at install time
15 $t = get_t();
16
17 // Check if the zlib library is loaded
18 $has_zlib = extension_loaded('zlib');
19
20 // Generate the requirements array ready for return
21 $requirements['swftools'] = array(
22 'title' => $t('Zlib library'),
23 'description' => $has_zlib ? '' : $t('Without the <a href="@url">zlib library</a> SWF Tools is unable to automatically determine the dimensions of compressed swf files. SWF Tools will work but the size of compressed swf content must be specified, otherwise the content may not appear in some browsers.', array('@url' => 'http://www.php.net/zlib')),
24 'value' => $has_zlib ? $t('Enabled') : $t('Not installed'),
25 'severity' => $has_zlib ? REQUIREMENT_OK : REQUIREMENT_WARNING,
26 );
27
28 // Return the array
29 return $requirements;
30 }

  ViewVC Help
Powered by ViewVC 1.1.2