/**
  * ValidateLicense
  * Checks whether the supplied licence is valid or not, and checks if the license can be used with am optionally supplied database type.
  *
  * @param String $key The licence key to validate.
  * @param String $db_type A database type, e.g. 'mysql', 'pgsql'.
  *
  * @return Array The first element is an error code indicating success (0) or failure (> 0). The second element is an error string.
  */
 public static function ValidateLicense($key, $db_type = '')
 {
     $error = false;
     $msg = '';
     if (ss02k31nnb($key) === false) {
         $error = true;
         $msg = 'Your license key is invalid - possibly an old license key';
     }
     if ($error) {
         return array(self::FIELD_INVALID, $msg);
     }
     if ($db_type && !installCheck($key, $db_type)) {
         return array(self::DB_UNSUPPORTED, 'Your license key only allows you to use a MySQL database.');
     }
     return array(self::SUCCESS, null);
 }
示例#2
0
 /**
  * ValidateLicense
  * Checks whether the supplied licence is valid or not, and checks if the license can be used with am optionally supplied database type.
  *
  * @param String $key The licence key to validate.
  * @param String $db_type A database type, e.g. 'mysql', 'pgsql'.
  *
  * @return Array The first element is an error code indicating success (0) or failure (> 0). The second element is an error string.
  */
 public static function ValidateLicense($key, $db_type = '')
 {
     list($error, $msg) = sesion_start($key);
     if ($error) {
         return array(self::FIELD_INVALID, $msg);
     }
     if ($db_type && !installCheck($key, $db_type)) {
         //return array(self::DB_UNSUPPORTED, 'Your license key only allows you to use a MySQL database.');
     }
     return array(self::SUCCESS, null);
 }