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

Contents of /contributions/modules/simplepie/simplepie.install

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Aug 31 22:03:32 2009 UTC (2 months, 3 weeks ago) by mustafau
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +32 -2 lines
File MIME type: text/x-php
Upgrade to Drupal 7.

This upgrade implements hook_aggregator_parse().
Since core parser has many problems, SimplePie Core will replace core parser in many sites until a SimpleXML based one replaces core parser.
1 <?php
2 // $Id: simplepie.install,v 1.1 2008/04/23 17:16:30 mustafau Exp $
3
4 /**
5 * @file
6 */
7
8 /**
9 * Implement hook_uninstall().
10 */
11 function simplepie_uninstall() {
12 variable_del('simplepie_cache_location');
13 }
14
15 /**
16 * Implement hook_requirements().
17 */
18 function simplepie_requirements($phase) {
19 $requirements = array();
20 // Ensure translations don't break at install time.
21 $t = get_t();
22
23 switch ($phase) {
24 case 'runtime':
25 $requirements['simplepie'] = array('title' => $t('SimplePie library'));
26
27 $library = simplepie_get_library_path();
28 if (file_exists($library)) {
29 simplepie_require();
30 }
31
32 if (defined('SIMPLEPIE_VERSION')) {
33 $requirements['simplepie']['severity'] = REQUIREMENT_OK;
34 $requirements['simplepie']['value'] = SIMPLEPIE_VERSION;
35 }
36 else {
37 $requirements['simplepie']['description'] = $t('The <a href="@url" target="_blank">SimplePie</a> library was not found.', array('@url' => 'http://simplepie.org'));
38 $requirements['simplepie']['severity'] = REQUIREMENT_WARNING;
39 $requirements['simplepie']['value'] = $t('Not installed.');
40 }
41 }
42 return $requirements;
43 }

  ViewVC Help
Powered by ViewVC 1.1.2