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

Diff of /contributions/modules/asterisk/asterisk.install

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

revision 1.5, Fri Nov 9 22:10:44 2007 UTC revision 1.6, Fri May 9 17:34:35 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: asterisk.install,v 1.4 2007/02/16 05:18:04 thehunmonkgroup Exp $  // $Id: asterisk.install,v 1.5 2007/11/09 22:10:44 thehunmonkgroup Exp $
3    
4  /**  /**
5   * Implementation of hook_install()   * Implementation of hook_install()
# Line 15  Line 15 
15   * need to be removed.   * need to be removed.
16   */   */
17  function asterisk_install() {  function asterisk_install() {
18    drupal_install_schema('asterisk');    $ret = drupal_install_schema('asterisk');
19    //if ($q1 && $q2) {  
20      $failed = array();
21      foreach ($ret as $query) {
22            if (!$query['success']) {
23              $failed[] = $query['query'];
24            }
25      }
26      if (empty($failed)) {
27      drupal_set_message(t('Asterisk module installed successfully.'));      drupal_set_message(t('Asterisk module installed successfully.'));
28    //}    }
29    //else {    else {
30      //drupal_set_message(t('Table installation for the Asterisk module was unsuccessful. The tables may need to be installed by hand. See the asterisk.install file for a list of the installation queries.'), 'error');      drupal_set_message(t('Table installation for the Asterisk module was unsuccessful. The following queries failed: !queries', array('!queries' => theme('item_list', $failed))), 'error');
31    //}    }
32  }  }
33    
34  /**  /**

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2