Skip to content

Commit

Permalink
Remove all etherpad.com references, mentions, and uses.
Browse files Browse the repository at this point in the history
The etherpad repository is mostly a direct copy of their site and
infrastructure at the time of the Google acquisition.  There are
a lot of hard-coded etherpad.com references throughout the code.

This changeset removes all etherpad.com specificities in forms of:
  - URLs
  - email addresses (both To and From)
  - corporate specific data (support forum mentions, crazy javascript email
    obfuscator)

Email addresses are now configured in the property file
instead of being hard-coded throughout 40 different files.

A new config value is introduced to specifiy a global To address.
(A config value for a global From address was introduced previously, but
it wasn't used throughout the codebase until now.)

The global To address is used to send automated notices about signups, new
orders, lead gen questions, and exceptional exceptions.
  • Loading branch information
mattsta committed Dec 27, 2009
1 parent 3427e45 commit 95ed1cf
Show file tree
Hide file tree
Showing 46 changed files with 86 additions and 145 deletions.
9 changes: 7 additions & 2 deletions README
Expand Up @@ -9,6 +9,9 @@ This repository is EtherPad with a few goals:
* Rip out all etherpad.com specific mentions (URLs, email addresses,
support links) and cleanup unused parts (like .gitignore files being put
in a mercurial repo).
* Investigate corporate legacy portions (payment infrastructure, recurring
billing queues, lead gen) and either remove or generalize portions
for greater uses.

The original EtherPad repository on Google Code had a crappy directory layout
so I fixed it in the initial commit of this repository. As a consequence,
Expand All @@ -18,17 +21,19 @@ most likely dead.

Potential future goals after learning the code further:
* Add git hooks to create a branchy revisioned live-editable pasteboard.
* Add embeddable <textarea> and <input> zero-signup collaboration fields.

%%%----------------------------------------------------------------------
%%% Current Status: 2009/12/25
%%% Current Status: 2009/12/27
%%%----------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Project | Status | When
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove MySQL Support | Complete | 2009/12/19-24
PostgreSQL Support | Complete | 2009/12/24
Simplify install procedure | Complete | 2009/12/24
Remove etherpad.com specific parts | In-progress |
Remove etherpad.com specific mentions | Complete | 2009/12/27
Cleanup/generalize corporate legacy parts | Not Started |
Find missing parts of blog infrastructure | Not Started |

%%%----------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions etherpad/etc/etherpad.localdev-default.properties.in
Expand Up @@ -13,6 +13,7 @@ etherpad.SQL_USERNAME = etherpad
etherpad.SQL_PASSWORD = password
etherpad.skipHostnameCheck = true
etherpad.email.fromAddr = EMAIL_FROM_ADDR
etherpad.email.toAddr = EMAIL_TO_ADDR
#etherpad.soffice=/opt/openoffice.org3/program/soffice.bin
#etherpad.sofficeConversionServer=localhost:8100
debugSQL = false
Expand All @@ -23,3 +24,5 @@ modulePath = ./src
transportPrefix = /comet
transportUseWildcardSubdomains = true
useVirtualFileRoot = ./src
# Certain URLs will automatically reference https://. You can turn it off:
disableHttps = false
8 changes: 4 additions & 4 deletions etherpad/src/etherpad/billing/team_billing.js
Expand Up @@ -401,7 +401,7 @@ function sendReceiptEmail(subscription, invoice) {
globals: globals
});
var address = paymentInfo.email;
checkout.salesEmail(address, "sales@etherpad.com", "EtherPad: Receipt for "+paymentInfo.fullname,
checkout.salesEmail(address, appjet.config['etherpad.email.fromAddr'], "EtherPad: Receipt for "+paymentInfo.fullname,
{}, emailText);
}

Expand All @@ -414,9 +414,9 @@ function sendFailureEmail(subscription, invoice, failureMessage) {
billingError: failureMessage,
balance: "US $"+checkout.dollars(billing.centsToDollars(invoice.amt)),
suspensionDate: checkout.formatDate(new Date(subscription.paidThrough.getTime()+GRACE_PERIOD_DAYS*86400*1000)),
billingAdminLink: "https://"+subDomain+".etherpad.com/ep/admin/billing/"
billingAdminLink: "https://"+subDomain+"."+appjet.config['fromDomain']+"/ep/admin/billing/"
});
var address = paymentInfo.email;
checkout.salesEmail(address, "sales@etherpad.com", "EtherPad: Payment Failure for "+paymentInfo.fullname,
checkout.salesEmail(address, appjet.config['etherpad.email.fromAddr'], "EtherPad: Payment Failure for "+paymentInfo.fullname,
{}, emailText);
}
}
6 changes: 3 additions & 3 deletions etherpad/src/etherpad/control/aboutcontrol.js
Expand Up @@ -198,11 +198,11 @@ function render_eepnet_pricing_contact_post() {
"This record has automatically been added to SalesForce. See the salesforce lead page for more details.",
"", "Session Referer: "+ref, ""
].join("\n");
var toAddr = 'sales@etherpad.com';
var toAddr = appjet.config['etherpad.email.toAddr'];
if (isTestEmail(data.email)) {
toAddr = 'blackhole@appjet.com';
toAddr = 'blackhole';
}
sendEmail(toAddr, 'sales@etherpad.com', subject, {}, body);
sendEmail(toAddr, appjet.config['etherpad.email.fromAddr'], subject, {}, body);

// all done!
response.write("OK");
Expand Down
2 changes: 1 addition & 1 deletion etherpad/src/etherpad/control/historycontrol.js
Expand Up @@ -86,7 +86,7 @@ function _do_stat(padId) {

function _censorText(text) {
// may not change length of text
return text.replace(/(http:\/\/etherpad.com\/)(\w+)/g, function(url, u1, u2) {
return text.replace(/(http:\/\/.*?\/)(\w+)/g, function(url, u1, u2) {
return u1 + u2.replace(/\w/g, '-');
});
}
Expand Down
4 changes: 2 additions & 2 deletions etherpad/src/etherpad/control/pad/pad_control.js
Expand Up @@ -637,8 +637,8 @@ function render_feedback_post() {
feedback: request.params.feedback});

sendEmail(
'feedback@etherpad.com',
'feedback@etherpad.com',
appjet.config['etherpad.email.toAddr'],
appjet.config['etherpad.email.fromAddr'],
subject,
{},
feedback
Expand Down
Expand Up @@ -270,7 +270,7 @@ function render_recover_padtext_get() {
if (showPadHelp) {
d.push(P({style: "font-size: 1em; color: #555;"},
'The pad ID is the same as the URL to the pad, without the leading "/".',
' For example, if the pad lives at http://etherpad.com/foobar,',
' For example, if the pad lives at /foobar,',
' then the pad ID is "foobar" (without the quotes).'))
}

Expand Down
10 changes: 5 additions & 5 deletions etherpad/src/etherpad/control/pro/admin/team_billing_control.js
Expand Up @@ -250,7 +250,7 @@ function _attemptAuthorization(success_f) {
_validationError('', "A temporary error has prevented processing of your payment. Please try again later.");
} else {
billing.log({'type': 'FATAL', value: "Unknown error: "+result.status+" - debug: "+result.debug});
sendEmail('support@etherpad.com', 'urgent@etherpad.com', 'UNKNOWN ERROR WARNING!', {},
sendEmail(appjet.config['etherpad.email.toAddr'], appjet.config['etherpad.email.fromAddr'], 'UNKNOWN ERROR WARNING!', {},
"Hey,\n\nThis is a billing system error. Some unknown error occurred. "+
"This shouldn't ever happen. Probably good to let J.D. know. <grin>\n\n"+
fastJSON.stringify(cart));
Expand Down Expand Up @@ -284,7 +284,7 @@ function _processNewSubscription() {
});

if (globals.isProduction()) {
sendEmail('sales@etherpad.com', 'sales@etherpad.com', "EtherPad: New paid pro account for "+fullName, {},
sendEmail(appjet.config['etherpad.email.toAddr'], appjet.config['etherpad.email.fromAddr'], "EtherPad: New paid pro account for "+fullName, {},
"This is an automatic notification.\n\n"+fullName+" ("+email+") successfully set up "+
"a billing profile for domain: "+domainName+".");
}
Expand Down Expand Up @@ -363,10 +363,10 @@ function _processInvoicePurchase() {
"\nEmail: ",
pro_accounts.getSessionProAccount().email
].join("\n");
var recipient = (globals.isProduction() ? 'sales@etherpad.com' : 'jd@appjet.com');
var recipient = appjet.config['etherpad.email.toAddr'];
sendEmail(
recipient,
'sales@etherpad.com',
appjet.config['etherpad.email.fromAddr'],
'Invoice payment request - '+pro_utils.getProRequestSubdomain(),
{},
"Hi there,\n\nA pro user tried to pay by invoice. Their information follows."+
Expand Down Expand Up @@ -444,4 +444,4 @@ function render_invoices() {
centsToDollars: billing.centsToDollars
});
}
}
}
2 changes: 1 addition & 1 deletion etherpad/src/etherpad/control/pro_beta_control.js
Expand Up @@ -121,7 +121,7 @@ function sendInvite(recordId) {
signupCode: code,
activationUrl: "http://"+httpHost(request.host)+"/ep/pro-signup/?sc="+code
});
sendEmail(record.email, "EtherPad <support@etherpad.com>",
sendEmail(record.email, appjet.config['etherpad.email.fromAddr'],
"Your EtherPad Professional Beta Account", {}, body);
});

Expand Down
6 changes: 3 additions & 3 deletions etherpad/src/etherpad/control/statscontrol.js
Expand Up @@ -101,7 +101,7 @@ var statDisplays = {

// free pad usage
{ name: "free pad usage, 1 day",
description: "Free etherpad.com users, total over a %t period",
description: "Free etherpad users, total over a %t period",
type: "compare",
stats: [ {stat: "active_user_ids",
description: "All users",
Expand All @@ -113,7 +113,7 @@ var statDisplays = {
description: "Users returning after 30 days",
color: "FF0000"} ] },
{ name: "free pad usage, 7 day",
description: "Free etherpad.com users over the last 7 days",
description: "Free etherpad users over the last 7 days",
type: "compare",
options: { hideLive: true, latestUseHistorical: true},
stats: [ {stat: "active_user_ids_7days",
Expand All @@ -126,7 +126,7 @@ var statDisplays = {
description: "Users returning after 30 days",
color: "FF0000"} ] },
{ name: "free pad usage, 30 day",
description: "Free etherpad.com users over the last 30 days",
description: "Free etherpad users over the last 30 days",
type: "compare",
options: { hideLive: true, latestUseHistorical: true},
stats: [ {stat: "active_user_ids_30days",
Expand Down
Expand Up @@ -671,16 +671,15 @@ function _performCreditCardPurchase() {
billing.log({'type': 'FATAL', value: "Direct purchase failed on paypal.", cart: cart, paypal: paypalResult});
if (result.errorField.permanentErrors[0] == 'invoiceId') {
// repeat invoice id. damnit, this is bad.
sendEmail('support@etherpad.com', 'urgent@etherpad.com', 'DUPLICATE INVOICE WARNING!', {},
sendEmail(appjet.config['etherpad.email.toAddr'], appjet.config['etherpad.email.fromAddr'], 'DUPLICATE INVOICE WARNING!', {},
"Hey,\n\nThis is a billing system error. The EEPNET checkout tried to make a "+
"purchase with PayPal and got a duplicate invoice error on invoice ID "+cart.invoiceId+
".\n\nUnless you're expecting this (or recently ran a selenium test, or have reason to "+
"believe this isn't an exceptional condition, please look into this "+
"and get back to the user ASAP!\n\n"+fastJSON.stringify(cart));
_validationError('', "Your payment was processed, but we cannot proceed. "+
"You will hear from us shortly via email. (If you don't hear from us "+
"within 24 hours, please email <a href='mailto:sales@etherpad.com'>"+
"sales@etherpad.com</a>.)");
"within 24 hours, please email " + appjet.config['etherpad.email.toAddr'] + ")");
}
checkout.validateErrorFields(function(x, y) { _validationError(x, y, 'billing-info') }, "There seems to be an error in your billing information."+
" Please verify and correct your ",
Expand All @@ -690,7 +689,7 @@ function _performCreditCardPurchase() {
_validationError('', "A temporary error has prevented processing of your payment. Please try again later.");
} else {
billing.log({'type': 'FATAL', value: "Unknown error: "+result.status+" - debug: "+result.debug});
sendEmail('support@etherpad.com', 'urgent@etherpad.com', 'UNKNOWN ERROR WARNING!', {},
sendEmail(appjet.config['etherpad.email.toAddr'], appjet.config['etherpad.email.fromAddr'], 'UNKNOWN ERROR WARNING!', {},
"Hey,\n\nThis is a billing system error. Some unknown error occurred. "+
"This shouldn't ever happen. Probably good to let J.D. know. <grin>\n\n"+
fastJSON.stringify(cart));
Expand Down
5 changes: 0 additions & 5 deletions etherpad/src/etherpad/helpers.js
Expand Up @@ -193,11 +193,6 @@ function cssIncludes() {
}
}

function oemail(username) {
return '&lt;<a class="obfuscemail" href="mailto:'+username+'@e***rp*d.com">'+
username+'@e***rp*d.com</a>&gt;';
}

function googleAnalytics() {
// GA disabled always now.
return '';
Expand Down
2 changes: 1 addition & 1 deletion etherpad/src/etherpad/legacy_urls.js
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* legacy URLs only apply to the public etherpad.com site. (not Pro or PNE). */
/* legacy URLs only apply to the public site. (not Pro or PNE). */

var _legacyURLs = {
'/ep/beta-signup': '/',
Expand Down
4 changes: 2 additions & 2 deletions etherpad/src/etherpad/licensing.js
Expand Up @@ -16,8 +16,8 @@


/*
* This file used to control access restrictions for various sites like
* etherpad.com or on-prem installations of etherpad, or evaluation
* This file used to control access restrictions for various
* public sites or on-prem installations of etherpad, or evaluation
* editions. For the open-source effort, I have gutted out the
* restrictions. --aiba
*/
Expand Down
7 changes: 4 additions & 3 deletions etherpad/src/etherpad/metrics/metrics.js
Expand Up @@ -327,10 +327,11 @@ function getOrigins(startDate, endDate, useReferer, shouldAggregatePads) {
}
});
});


var fromBase = "http://" + appjet.config['fromDomain'];
if (useReferer) {
flowFirsts = flowFirsts.filter(function(x) { return ! startsWith(x, "http://etherpad.com"); });
sessionKeyFirsts = sessionKeyFirsts.filter(function(x) { return ! startsWith(x, "http://etherpad.com"); });
flowFirsts = flowFirsts.filter(function(x) { return ! startsWith(x, fromBase); });
sessionKeyFirsts = sessionKeyFirsts.filter(function(x) { return ! startsWith(x, fromBase); });
}

return {
Expand Down
1 change: 0 additions & 1 deletion etherpad/src/etherpad/pad/pad_migrations.js
Expand Up @@ -31,7 +31,6 @@ function onStartup() {
appjet.cache.pad_migrations = {};
}

// this part can be removed when all pads are migrated on etherpad.com
//if (! pne_utils.isPNE()) {
// System.out.println("Building cache for live migrations...");
// initLiveMigration();
Expand Down
1 change: 0 additions & 1 deletion etherpad/src/etherpad/pad/padutils.js
Expand Up @@ -97,7 +97,6 @@ function getGlobalPadId(localPadId) {
if (pro_utils.isProDomainRequest()) {
return makeGlobalId(domains.getRequestDomainId(), localPadId);
} else {
// etherpad.com pads
return localPadId;
}
}
Expand Down
2 changes: 1 addition & 1 deletion etherpad/src/etherpad/pne/pne_utils.js
Expand Up @@ -167,7 +167,7 @@ function pneTrackerHtml() {
}

function trackData(name, value) {
var imgurl = "http://etherpad.com/ep/tpne/t?";
var imgurl = "http://" + appjet.config['fromDomain'] + "/ep/tpne/t?";
if (key) {
imgurl += ("k="+key+"&");
}
Expand Down
2 changes: 1 addition & 1 deletion etherpad/src/etherpad/pro/pro_accounts.js
Expand Up @@ -468,7 +468,7 @@ function getEtherpadAdminAccount() {
id: 0,
isAdmin: true,
fullName: "ETHERPAD ADMIN",
email: "support@etherpad.com",
email: appjet.config['etherpad.email.toAddr'],
domainId: domains.getRequestDomainId(),
isDeleted: false
};
Expand Down
6 changes: 3 additions & 3 deletions etherpad/src/etherpad/quotas.js
Expand Up @@ -29,7 +29,7 @@ function getMaxSimultaneousPadEditors(globalPadId) {
return 1e6;
}
} else {
// etherpad.com public pads
// public pads
if (globalPadId && stringutils.startsWith(globalPadId, "conf-")) {
return 64;
} else {
Expand All @@ -41,9 +41,9 @@ function getMaxSimultaneousPadEditors(globalPadId) {

function getMaxSavedRevisionsPerPad() {
if (isProDomainRequest()) {
return 1e3;
return 1e6;
} else {
// free public etherpad.com
// free public pads
return 100;
}
}
Expand Down
4 changes: 2 additions & 2 deletions etherpad/src/etherpad/store/checkout.js
Expand Up @@ -295,6 +295,6 @@ function formatDate(date) {
function salesEmail(to, from, subject, headers, body) {
sendEmail(to, from, subject, headers, body);
if (globals.isProduction()) {
sendEmail("sales@etherpad.com", from, subject, headers, body);
sendEmail(appjet.config['etherpad.email.toAddr'], from, subject, headers, body);
}
}
}
6 changes: 3 additions & 3 deletions etherpad/src/etherpad/store/eepnet_checkout.js
Expand Up @@ -87,15 +87,15 @@ function licenseEmailText(userName, licenseKey) {
function sendReceiptEmail(cart) {
var receipt = cart.receiptEmail || receiptEmailText(cart);

salesEmail(cart.email, "sales@etherpad.com",
salesEmail(cart.email, appjet.config['etherpad.email.fromAddr'],
"EtherPad: Receipt for "+cart.ownerName+" ("+cart.orgName+")",
{}, receipt);
}

function sendLicenseEmail(cart) {
var licenseEmail = licenseEmailText(cart.ownerName, cart.licenseKey);

salesEmail(cart.email, "sales@etherpad.com",
salesEmail(cart.email, appjet.config['etherpad.email.fromAddr'],
"EtherPad: License Key for "+cart.ownerName+" ("+cart.orgName+")",
{}, licenseEmail);
}
}
12 changes: 6 additions & 6 deletions etherpad/src/etherpad/store/eepnet_trial.js
Expand Up @@ -38,7 +38,7 @@ function getTrialUserQuota() {
function mailLicense(data, licenseKey, expiresDate) {
var toAddr = data.email;
if (isTestEmail(toAddr)) {
toAddr = "blackhole@appjet.com";
toAddr = "blackhole";
}
var subject = ('EtherPad: Trial License Information for '+
data.firstName+' '+data.lastName+' ('+data.orgName+')');
Expand All @@ -52,7 +52,7 @@ function mailLicense(data, licenseKey, expiresDate) {

sendEmail(
toAddr,
'sales@etherpad.com',
appjet.config['etherpad.email.fromAddr'],
subject,
{},
emailBody
Expand Down Expand Up @@ -157,7 +157,7 @@ function getWeb2LeadData(data, ip, ref) {

if (!isProduction()) {
// w2ldata.debug = "1";
// w2ldata.debugEmail = "aaron@appjet.com";
// w2ldata.debugEmail = "aaron@something.com";
}

return w2ldata;
Expand Down Expand Up @@ -188,13 +188,13 @@ function _sendSalesNotification(data, ip, ref) {
""
].join("\n");

var toAddr = 'sales@etherpad.com';
var toAddr = appjet.config['etherpad.email.toAddr'];
if (isTestEmail(data.email)) {
toAddr = 'blackhole@appjet.com';
toAddr = 'blackhole';
}
sendEmail(
toAddr,
'sales@etherpad.com',
appjet.config['etherpad.email.fromAddr'],
subject,
{'Reply-To': data.email},
body
Expand Down

0 comments on commit 95ed1cf

Please sign in to comment.