Changeset 9219

Show
Ignore:
Timestamp:
03/15/10 13:21:40 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 9218 via svnmerge from
http://svn.freepbx.org/modules/branches/2.8

........

r9218 | p_lindheimer | 2010-03-15 11:14:58 -0700 (Mon, 15 Mar 2010) | 1 line


add check for TEMPNOTAVAIL return message so that module properly reports that the server is not available vs. an invalid key

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.7

    • Property svnmerge-integrated changed from /modules/branches/2.6:1-8497,8589,8613,8620,8651,8672 /modules/branches/2.8:1-9044,9107,9122 to /modules/branches/2.6:1-8497,8589,8613,8620,8651,8672 /modules/branches/2.8:1-9044,9107,9122,9218
  • modules/branches/2.7/sipstation/page.sipstation.php

    r8944 r9219  
    3838  default: 
    3939} 
    40 $status = sipstation_check_key(); // nokey, valid, invalid, noserver 
     40$status = sipstation_check_key(); // nokey, valid, invalid, noserver, tempnotavail 
    4141?> 
    4242</div> 
     
    9393  case 'invalid': // nokey 
    9494  case 'noserver': 
     95  case 'tempnotavail': 
    9596?> 
    9697  <tr class="account_access_section"> 
     
    116117        <ul> 
    117118<?php 
    118   if ($status == 'invalid') { 
     119  switch ($status) { 
     120  case 'invalid': 
    119121    echo _("Your key is no longer valid. Click below to remove the current key. To obtain a new key and use this module, visit the portal at https://store.freepbx.com and log into your account."); 
    120   } else { 
     122    break; 
     123  case 'tempnotavail': 
     124    echo _("The server is currenlty unavailable and we can not process you request. Please check back with us later. We apologize for the inconvenience."); 
     125    break; 
     126  default: 
    121127    echo _("The server is currently not responding. It is either unavailable or access is being blocked. If the server is unavailable, please try again later."); 
    122128  } 
  • modules/branches/2.7/sipstation/sipstation.utility.php

    r9123 r9219  
    146146      case 'SUCCESS': 
    147147        return 'valid'; 
     148      case 'TEMPNOTAVAIL': 
     149        return 'tempnotavail'; 
    148150      case 'BADKEY': 
    149151        sipstation_remove_key(); 
     
    159161  global $db; 
    160162  $status = sipstation_confirm_key($key); 
    161   if ($status == 'valid') { 
     163  if ($status == 'valid' || $status == 'tempnotavail') { 
    162164    $data4sql = $db->escapeSimple($key); 
    163165    sql("DELETE FROM `module_xml` WHERE `id` = 'sipstation_key'"); 
     
    259261  // freepbx_debug(curl_getinfo($ch)); 
    260262 
    261   // TODO: if ($xml === false) { handle it, retry, etc.  
     263  // TODO: if ($xml === false) handle it, retry, etc.  
    262264  // TODO: or at least toss in some error xml response 
    263265  curl_close ($ch);