Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x

This commit is contained in:
Sarven Capadisli 2009-02-12 22:14:07 +00:00
commit 579f09417b
7 changed files with 67 additions and 138 deletions

View File

@ -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);
}
}
}

View File

@ -228,27 +228,6 @@ class RegisterAction extends Action
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?
*

View File

@ -292,7 +292,8 @@ created = 142
modified = 384
[sms_carrier__keys]
id = N
id = K
name = U
[subscription]
subscriber = 129

View File

@ -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());

View File

@ -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',

63
db/sms_carrier.sql Normal file
View File

@ -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());

View File

@ -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;
}
@ -849,32 +844,6 @@ class Action extends HTMLOutputter // lawsuit
throw new ClientException($msg, $code);
}
/**
* 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
*