1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-20 12:52:58 +00:00

Move formatphonenumber.php to proper dir and rename.

* fix some coding styles
* Add contributor
This commit is contained in:
Loic Blot
2014-11-27 14:04:25 +00:00
parent 2211252004
commit 5f0263f71e
4 changed files with 21 additions and 18 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ use \OCP\IDb;
use \OCP\AppFramework\Db\Mapper;
use \OCA\OcSms\AppInfo\OcSmsApp;
use \OCA\OcSms\AppInfo\FormatPhoneNumber;
use \OCA\OcSms\Lib\PhoneNumberFormatter;
class SmsMapper extends Mapper {
/*
@@ -97,7 +97,7 @@ class SmsMapper extends Mapper {
$phoneList = array();
while($row = $result->fetchRow()) {
$pn = $row["sms_address"];
$fmtPN = FormatPhoneNumber::formatPhoneNumber($pn);
$fmtPN = PhoneNumberFormatter::format($pn);
if (!isset($phoneList[$fmtPN])) {
$phoneList[$fmtPN] = array();
}
@@ -106,7 +106,7 @@ class SmsMapper extends Mapper {
}
$phoneList[$fmtPN][$pn] += 1;
}
$fpn = FormatPhoneNumber::formatPhoneNumber($phoneNumber);
$fpn = PhoneNumberFormatter::format($phoneNumber);
if(isset($phoneList[$fpn])){
return $phoneList[$fpn];
}