Example #1
0
 /**
  * Checks database connection
  *
  * @static
  * @param  array $store_data Array of store data
  * @return bool  True on success, false otherwise
  */
 public static function testDatabaseConnection($store_data)
 {
     $status = false;
     if (!empty($store_data['db_host']) && !empty($store_data['db_user']) && !empty($store_data['db_name'])) {
         $new_db = @General::initiateImportedDB($store_data);
         if ($new_db != null) {
             $status = true;
         }
     }
     General::connectToOriginalDB();
     return $status;
 }