[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/swftools/ -> swftools.install (source)

   1  <?php
   2  // $Id: swftools.install,v 1.2.2.4 2009/03/17 23:13:22 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  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7