aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-01-12 09:47:35 +0200
committerFilipp Lepalaan <f@0x00.co>2013-01-12 09:47:35 +0200
commit8578d726b575bcadfff9c1f590442e46b5069471 (patch)
tree3e226c171b3d8fa23890942083080fa722d23a66
parent9bae655376ee27e498885d2610ef3f9e341f72d1 (diff)
downloadgsxlib-8578d726b575bcadfff9c1f590442e46b5069471.tar.gz
gsxlib-8578d726b575bcadfff9c1f590442e46b5069471.tar.bz2
gsxlib-8578d726b575bcadfff9c1f590442e46b5069471.zip
Add personalized ipod match and productname to looksLike()
-rw-r--r--gsxlib.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/gsxlib.php b/gsxlib.php
index b9e81e8..b32539a 100644
--- a/gsxlib.php
+++ b/gsxlib.php
@@ -114,7 +114,7 @@ class GsxLib
'userTimeZone' => $tz,
)
);
-syslog(LOG_ERR, print_r($a, true));
+
try {
$this->session_id = $this->client
->Authenticate($a)
@@ -523,15 +523,15 @@ syslog(LOG_ERR, print_r($a, true));
{
$result = false;
$rex = array(
- 'partNumber' => '/^([a-z]{1,2})?\d{3}\-\d{4}$/i',
- 'serialNumber' => '/^[a-z0-9]{11,12}$/i',
- 'eeeCode' => '/^[A-Z0-9]{3,4}$/', // only match ALL-CAPS!
- 'returnOrder' => '/^7\d{9}$/',
- 'repairNumber' => '/^\d{12}$/',
- 'dispatchId' => '/^G\d{9}$/i',
+ 'partNumber' => '/^([A-Z]{1,2})?\d{3}\-?(\d{4}|[A-Z]{2})(/[A-Z])?$/i',
+ 'serialNumber' => '/^[a-z0-9]{11,12}$/i',
+ 'eeeCode' => '/^[A-Z0-9]{3,4}$/', // only match ALL-CAPS!
+ 'returnOrder' => '/^7\d{9}$/',
+ 'repairNumber' => '/^\d{12}$/',
+ 'dispatchId' => '/^G\d{9}$/',
'alternateDeviceId' => '/^\d{15}$/',
- 'diagnosticEventNumber' => '/^\d{23}$/'
- // 12715075303192012074604
+ 'diagnosticEventNumber' => '/^\d{23}$/',
+ 'productName' => '/^i?Mac/',
);
foreach ($rex as $k => $v) {