summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-02-12 22:14:07 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-02-12 22:14:07 +0000
commit579f09417bcd80bcf1921ebd8104f648d49413a6 (patch)
treed3e10ebc02b96734066a6ab53b7e3a3842c09415
parent033503dc84c5a31408345f61cd6c8ca79239e25b (diff)
parent3b5fd8fb6bbfa95efe3294ea77ae809dab071f99 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r--actions/emailsettings.php22
-rw-r--r--actions/register.php23
-rwxr-xr-xclasses/laconica.ini3
-rw-r--r--db/carrier.sql61
-rw-r--r--db/laconica.sql2
-rw-r--r--db/sms_carrier.sql63
-rw-r--r--lib/action.php31
7 files changed, 67 insertions, 138 deletions
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 0a86aa66d..b84acb214 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -487,26 +487,4 @@ class EmailsettingsAction extends AccountSettingsAction
return $other->id != $user->id;
}
}
-
- /**
- * Handle old fashioned PEAR_Error msgs coming from DB_DataObject
- *
- * In this case email don't exist in the DB yet, so DB_DataObject
- * throws an error. Overrided from Action.
- *
- * @param PEAR_Error
- *
- * @return nothing
- */
-
- function handleError($error) {
- if ($error->getCode() == DB_DATAOBJECT_ERROR_NODATA) {
-
- // Do nothing.
-
- } else {
- parent::handleError($error);
- }
- }
-
}
diff --git a/actions/register.php b/actions/register.php
index aafb54ebb..5d7a8ce69 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -223,31 +223,10 @@ class RegisterAction extends Action
*/
function nicknameExists($nickname)
- {
+ {
$user = User::staticGet('nickname', $nickname);
return ($user !== false);
}
-
- /**
- * Handle old fashioned PEAR_Error msgs coming from DB_DataObject
- *
- * In this case nickname and email don't exist in the DB yet,
- * so DB_DataObject throws an error. Overrided from Action.
- *
- * @param PEAR_Error
- *
- * @return nothing
- */
-
- function handleError($error) {
- if ($error->getCode() == DB_DATAOBJECT_ERROR_NODATA) {
-
- // Do nothing.
-
- } else {
- parent::handleError($error);
- }
- }
/**
* Does the given email address already exist?
diff --git a/classes/laconica.ini b/classes/laconica.ini
index 255122a97..19267f268 100755
--- a/classes/laconica.ini
+++ b/classes/laconica.ini
@@ -292,7 +292,8 @@ created = 142
modified = 384
[sms_carrier__keys]
-id = N
+id = K
+name = U
[subscription]
subscriber = 129
diff --git a/db/carrier.sql b/db/carrier.sql
deleted file mode 100644
index 932f7c8bb..000000000
--- a/db/carrier.sql
+++ /dev/null
@@ -1,61 +0,0 @@
-insert into sms_carrier
- (name, email_pattern, created)
-values
- ('3 River Wireless', '%s@sms.3rivers.net', now()),
- ('7-11 Speakout', '%s@cingularme.com', now()),
- ('Airtel (Karnataka, India)', '%s@airtelkk.com', now()),
- ('Alaska Communications Systems', '%s@msg.acsalaska.com', now()),
- ('Alltel Wireless', '%s@message.alltel.com', now()),
- ('AT&T Wireless', '%s@txt.att.net', now()),
- ('Bell Mobility (Canada)', '%s@txt.bell.ca', now()),
- ('Boost Mobile', '%s@myboostmobile.com', now()),
- ('Cellular One (Dobson)', '%s@mobile.celloneusa.com', now()),
- ('Cincinnati Bell Wireless', '%s@gocbw.com', now()),
- ('Cingular (Postpaid)', '%s@cingularme.com', now()),
- ('Centennial Wireless', '%s@cwemail.com', now()),
- ('Cingular (GoPhone prepaid)', '%s@cingularme.com', now()),
- ('Claro (Nicaragua)', '%s@ideasclaro-ca.com', now()),
- ('Comcel', '%s@comcel.com.co', now()),
- ('Cricket', '%s@sms.mycricket.com', now()),
- ('CTI', '%s@sms.ctimovil.com.ar', now()),
- ('Emtel (Mauritius)', '%s@emtelworld.net', now()),
- ('Fido (Canada)', '%s@fido.ca', now()),
- ('General Communications Inc.', '%s@msg.gci.net', now()),
- ('Globalstar', '%s@msg.globalstarusa.com', now()),
- ('Helio', '%s@myhelio.com', now()),
- ('Illinois Valley Cellular', '%s@ivctext.com', now()),
- ('i wireless', '%s.iws@iwspcs.net', now()),
- ('Meteor (Ireland)', '%s@sms.mymeteor.ie', now()),
- ('Mero Mobile (Nepal)', '%s@sms.spicenepal.com', now()),
- ('MetroPCS', '%s@mymetropcs.com', now()),
- ('Movicom', '%s@movimensaje.com.ar', now()),
- ('Mobitel (Sri Lanka)', '%s@sms.mobitel.lk', now()),
- ('Movistar (Colombia)', '%s@movistar.com.co', now()),
- ('MTN (South Africa)', '%s@sms.co.za', now()),
- ('MTS (Canada)', '%s@text.mtsmobility.com', now()),
- ('Nextel (Argentina)', '%s@nextel.net.ar', now()),
- ('Orange (Poland)', '%s@orange.pl', now()),
- ('Orange (UK)', '%s@orange.net', now()),
- ('Personal (Argentina)', '%s@personal-net.com.ar', now()),
- ('Plus GSM (Poland)', '%s@text.plusgsm.pl', now()),
- ('President''s Choice (Canada)', '%s@txt.bell.ca', now()),
- ('Qwest', '%s@qwestmp.com', now()),
- ('Rogers (Canada)', '%s@pcs.rogers.com', now()),
- ('Sasktel (Canada)', '%s@sms.sasktel.com', now()),
- ('Setar Mobile email (Aruba)', '%s@mas.aw', now()),
- ('Solo Mobile', '%s@txt.bell.ca', now()),
- ('Sprint (PCS)', '%s@messaging.sprintpcs.com', now()),
- ('Sprint (Nextel)', '%s@page.nextel.com', now()),
- ('Suncom', '%s@tms.suncom.com', now()),
- ('T-Mobile', '%s@tmomail.net', now()),
- ('T-Mobile (Austria)', '%s@sms.t-mobile.at', now()),
- ('Telus Mobility (Canada)', '%s@msg.telus.com', now()),
- ('Thumb Cellular', '%s@sms.thumbcellular.com', now()),
- ('Tigo (Formerly Ola)', '%s@sms.tigo.com.co', now()),
- ('Unicel', '%s@utext.com', now()),
- ('US Cellular', '%s@email.uscc.net', now()),
- ('Verizon', '%s@vtext.com', now()),
- ('Virgin Mobile (Canada)', '%s@vmobile.ca', now()),
- ('Virgin Mobile (USA)', '%s@vmobl.com', now()),
- ('Vodafone NZ (txt ''R'' to 901 to enable first)', '%s@sms.vodafone.net.nz', now()),
- ('YCC', '%s@sms.ycc.ru', now());
diff --git a/db/laconica.sql b/db/laconica.sql
index 16f482134..15f03a978 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -31,7 +31,7 @@ create table avatar (
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
create table sms_carrier (
- id integer auto_increment primary key comment 'primary key for SMS carrier',
+ id integer primary key comment 'primary key for SMS carrier',
name varchar(64) unique key comment 'name of the carrier',
email_pattern varchar(255) not null comment 'sprintf pattern for making an email address from a phone number',
created datetime not null comment 'date this record was created',
diff --git a/db/sms_carrier.sql b/db/sms_carrier.sql
new file mode 100644
index 000000000..6879f2089
--- /dev/null
+++ b/db/sms_carrier.sql
@@ -0,0 +1,63 @@
+INSERT INTO sms_carrier
+ (id, name, email_pattern, created)
+VALUES
+ (100056, '3 River Wireless', '%s@sms.3rivers.net', now()),
+ (100057, '7-11 Speakout', '%s@cingularme.com', now()),
+ (100058, 'Airtel (Karnataka, India)', '%s@airtelkk.com', now()),
+ (100059, 'Alaska Communications Systems', '%s@msg.acsalaska.com', now()),
+ (100060, 'Alltel Wireless', '%s@message.alltel.com', now()),
+ (100061, 'AT&T Wireless', '%s@txt.att.net', now()),
+ (100062, 'Bell Mobility (Canada)', '%s@txt.bell.ca', now()),
+ (100063, 'Boost Mobile', '%s@myboostmobile.com', now()),
+ (100064, 'Cellular One (Dobson)', '%s@mobile.celloneusa.com', now()),
+ (100065, 'Cingular (Postpaid)', '%s@cingularme.com', now()),
+ (100066, 'Centennial Wireless', '%s@cwemail.com', now()),
+ (100067, 'Cingular (GoPhone prepaid)', '%s@cingularme.com', now()),
+ (100068, 'Claro (Nicaragua)', '%s@ideasclaro-ca.com', now()),
+ (100069, 'Comcel', '%s@comcel.com.co', now()),
+ (100070, 'Cricket', '%s@sms.mycricket.com', now()),
+ (100071, 'CTI', '%s@sms.ctimovil.com.ar', now()),
+ (100072, 'Emtel (Mauritius)', '%s@emtelworld.net', now()),
+ (100073, 'Fido (Canada)', '%s@fido.ca', now()),
+ (100074, 'General Communications Inc.', '%s@msg.gci.net', now()),
+ (100075, 'Globalstar', '%s@msg.globalstarusa.com', now()),
+ (100076, 'Helio', '%s@myhelio.com', now()),
+ (100077, 'Illinois Valley Cellular', '%s@ivctext.com', now()),
+ (100078, 'i wireless', '%s.iws@iwspcs.net', now()),
+ (100079, 'Meteor (Ireland)', '%s@sms.mymeteor.ie', now()),
+ (100080, 'Mero Mobile (Nepal)', '%s@sms.spicenepal.com', now()),
+ (100081, 'MetroPCS', '%s@mymetropcs.com', now()),
+ (100082, 'Movicom', '%s@movimensaje.com.ar', now()),
+ (100083, 'Mobitel (Sri Lanka)', '%s@sms.mobitel.lk', now()),
+ (100084, 'Movistar (Colombia)', '%s@movistar.com.co', now()),
+ (100085, 'MTN (South Africa)', '%s@sms.co.za', now()),
+ (100086, 'MTS (Canada)', '%s@text.mtsmobility.com', now()),
+ (100087, 'Nextel (Argentina)', '%s@nextel.net.ar', now()),
+ (100088, 'Orange (Poland)', '%s@orange.pl', now()),
+ (100089, 'Personal (Argentina)', '%s@personal-net.com.ar', now()),
+ (100090, 'Plus GSM (Poland)', '%s@text.plusgsm.pl', now()),
+ (100091, 'President\'s Choice (Canada)', '%s@txt.bell.ca', now()),
+ (100092, 'Qwest', '%s@qwestmp.com', now()),
+ (100093, 'Rogers (Canada)', '%s@pcs.rogers.com', now()),
+ (100094, 'Sasktel (Canada)', '%s@sms.sasktel.com', now()),
+ (100095, 'Setar Mobile email (Aruba)', '%s@mas.aw', now()),
+ (100096, 'Solo Mobile', '%s@txt.bell.ca', now()),
+ (100097, 'Sprint (PCS)', '%s@messaging.sprintpcs.com', now()),
+ (100098, 'Sprint (Nextel)', '%s@page.nextel.com', now()),
+ (100099, 'Suncom', '%s@tms.suncom.com', now()),
+ (100100, 'T-Mobile', '%s@tmomail.net', now()),
+ (100101, 'T-Mobile (Austria)', '%s@sms.t-mobile.at', now()),
+ (100102, 'Telus Mobility (Canada)', '%s@msg.telus.com', now()),
+ (100103, 'Thumb Cellular', '%s@sms.thumbcellular.com', now()),
+ (100104, 'Tigo (Formerly Ola)', '%s@sms.tigo.com.co', now()),
+ (100105, 'Unicel', '%s@utext.com', now()),
+ (100106, 'US Cellular', '%s@email.uscc.net', now()),
+ (100107, 'Verizon', '%s@vtext.com', now()),
+ (100108, 'Virgin Mobile (Canada)', '%s@vmobile.ca', now()),
+ (100109, 'Virgin Mobile (USA)', '%s@vmobl.com', now()),
+ (100110, 'YCC', '%s@sms.ycc.ru', now()),
+ (100111, 'Orange (UK)', '%s@orange.net', now()),
+ (100112, 'Cincinnati Bell Wireless', '%s@gocbw.com', now()),
+ (100113, 'T-Mobile Germany', '%s@t-mobile-sms.de', now()),
+ (100114, 'Vodafone Germany', '%s@vodafone-sms.de', now()),
+ (100115, 'E-Plus', '%s@smsmail.eplus.de', now());
diff --git a/lib/action.php b/lib/action.php
index 926fe93fb..bd38bf79c 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -82,11 +82,6 @@ class Action extends HTMLOutputter // lawsuit
*/
function prepare($argarray)
{
-
- // For PEAR_Errors comming from DB_DataObject
- PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,
- array($this, "handleError"));
-
$this->args =& common_copy_args($argarray);
return true;
}
@@ -850,32 +845,6 @@ class Action extends HTMLOutputter // lawsuit
}
/**
- * Handle old fashioned PEAR_Error msgs coming from DB_DataObject
- *
- * Logs the DB_DataObject error. Override to do something else.
- *
- * @param PEAR_Error
- *
- * @return nothing
- */
-
- function handleError($error) {
-
- common_log(LOG_ERR, "PEAR error: " . $error->getMessage());
- $msg = sprintf(_('The database for %s isn\'t responding correctly, '.
- 'so the site won\'t work properly. '.
- 'The site admins probably know about the problem, '.
- 'but you can contact them at %s to make sure. '.
- 'Otherwise, wait a few minutes and try again.'),
- common_config('site', 'name'),
- common_config('site', 'email'));
-
- $dac = new DBErrorAction($msg, 500);
- $dac->showPage();
- exit(-1);
- }
-
- /**
* Returns the current URL
*
* @return string current URL