diff options
author | Peter Martischka <pita@pitapoison.de> | 2010-04-08 14:20:23 +0200 |
---|---|---|
committer | Peter Martischka <pita@pitapoison.de> | 2010-04-08 14:20:23 +0200 |
commit | 5ff65ce80e04028fc9ff299534f92e2836c3636a (patch) | |
tree | bbe0c73d0bffc64adffecb34a9a745819c864539 /etherpad | |
parent | 9c1dfc38451a4ee70c99de16bd5799cbe0c69730 (diff) | |
parent | ef71f285a7263c4df76057baf528e943c8870efb (diff) | |
download | etherpad-5ff65ce80e04028fc9ff299534f92e2836c3636a.tar.gz etherpad-5ff65ce80e04028fc9ff299534f92e2836c3636a.tar.bz2 etherpad-5ff65ce80e04028fc9ff299534f92e2836c3636a.zip |
Merge branch 'jefferai' of git://github.com/jefferai/pad
Diffstat (limited to 'etherpad')
-rwxr-xr-x | etherpad/bin/run-local.sh | 2 | ||||
-rwxr-xr-x | etherpad/bin/setup-mysql-db.sh | 9 | ||||
-rw-r--r-- | etherpad/etc/etherpad.localdev-default.properties | 9 | ||||
-rw-r--r-- | etherpad/src/etherpad/pro/pro_accounts.js | 14 | ||||
-rw-r--r-- | etherpad/src/etherpad/pro/pro_utils.js | 9 | ||||
-rw-r--r-- | etherpad/src/etherpad/utils.js | 4 | ||||
-rw-r--r-- | etherpad/src/static/css/home-opensource.css | 18 | ||||
-rw-r--r-- | etherpad/src/templates/pro/admin/admin-template.ejs | 2 |
8 files changed, 43 insertions, 24 deletions
diff --git a/etherpad/bin/run-local.sh b/etherpad/bin/run-local.sh index 72b0cc1..67a6d57 100755 --- a/etherpad/bin/run-local.sh +++ b/etherpad/bin/run-local.sh @@ -34,7 +34,7 @@ if [ -z "$JAVA" ]; then fi # etherpad properties file -cfg_file=./data/etherpad.local.properties +cfg_file=./etc/etherpad.local.properties if [ ! -f $cfg_file ]; then cfg_file=./etc/etherpad.localdev-default.properties fi diff --git a/etherpad/bin/setup-mysql-db.sh b/etherpad/bin/setup-mysql-db.sh index d823a9e..45901ac 100755 --- a/etherpad/bin/setup-mysql-db.sh +++ b/etherpad/bin/setup-mysql-db.sh @@ -14,17 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [ `whoami` != "root" ]; then - echo "Must run as root, i.e., sudo $0" - exit 1 -fi - db="etherpad" echo "Creating etherpad ${db}..." -echo "create database ${db};" | ${mysql} -u root +echo "create database ${db};" | ${mysql} -u root -p echo "Granting priviliges..." -echo "grant all privileges on ${db}.* to 'etherpad'@'localhost' identified by 'password';" | ${mysql} -u root +echo "grant all privileges on ${db}.* to 'etherpad'@'localhost' identified by 'password';" | ${mysql} -u root -p echo "Success" diff --git a/etherpad/etc/etherpad.localdev-default.properties b/etherpad/etc/etherpad.localdev-default.properties index 1143178..07dce96 100644 --- a/etherpad/etc/etherpad.localdev-default.properties +++ b/etherpad/etc/etherpad.localdev-default.properties @@ -1,19 +1,22 @@ +alwaysHttps = false ajstdlibHome = ../infrastructure/framework-src/modules appjetHome = ./data/appjet devMode = true etherpad.adminPass = password etherpad.fakeProduction = false etherpad.isProduction = false +etherpad.proAccounts = true etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad etherpad.SQL_PASSWORD = password etherpad.SQL_USERNAME = etherpad -etherpad.proAccounts = true +hidePorts = false listen = 9000 logDir = ./data/logs modulePath = ./src +motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0 +topdomains = localhost transportPrefix = /comet transportUseWildcardSubdomains = true +useHttpsUrls = false useVirtualFileRoot = ./src -motdPage = /ep/pad/view/ro.3PfHCD0ApLc/latest?fullScreen=1&slider=0&sidebar=0 -topdomains = localhost diff --git a/etherpad/src/etherpad/pro/pro_accounts.js b/etherpad/src/etherpad/pro/pro_accounts.js index cdecd0d..54ac50c 100644 --- a/etherpad/src/etherpad/pro/pro_accounts.js +++ b/etherpad/src/etherpad/pro/pro_accounts.js @@ -511,10 +511,16 @@ function getFullNameById(id) { } function getTempSigninUrl(account, tempPass) { - return [ - 'https://', httpsHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', - 'uid=', account.id, '&tp=', tempPass - ].join(''); + if(appjet.config.listenSecurePort != 0 || appjet.config.useHttpsUrls) + return [ + 'https://', httpsHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', + 'uid=', account.id, '&tp=', tempPass + ].join(''); + else + return [ + 'http://', httpHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', + 'uid=', account.id, '&tp=', tempPass + ].join(''); } diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js index 5e8b801..2322262 100644 --- a/etherpad/src/etherpad/pro/pro_utils.js +++ b/etherpad/src/etherpad/pro/pro_utils.js @@ -47,11 +47,14 @@ function getProRequestSubdomain() { function getRequestSuperdomain() { var parts = request.domain.split('.'); - parts.reverse(); - if (parts[0] == ".") { + while (parts.length > 0) { + var domain = parts.join('.'); + if (domainEnabled[domain]) { + return domain; + } parts.shift(); } - return [parts[1], parts[0]].join('.'); + return false; } function isProDomainRequest() { diff --git a/etherpad/src/etherpad/utils.js b/etherpad/src/etherpad/utils.js index 398090c..3e35f00 100644 --- a/etherpad/src/etherpad/utils.js +++ b/etherpad/src/etherpad/utils.js @@ -388,7 +388,7 @@ function isStaticRequest() { function httpsHost(h) { h = h.split(":")[0]; // strip any existing port - if (appjet.config.listenSecurePort != "443") { + if (appjet.config.listenSecurePort != "443" && !appjet.config.hidePorts) { h = (h + ":" + appjet.config.listenSecurePort); } return h; @@ -396,7 +396,7 @@ function httpsHost(h) { function httpHost(h) { h = h.split(":")[0]; // strip any existing port - if (appjet.config.listenPort != "80") { + if (appjet.config.listenPort != "80" && !appjet.config.hidePorts) { h = (h + ":" + appjet.config.listenPort); } return h; diff --git a/etherpad/src/static/css/home-opensource.css b/etherpad/src/static/css/home-opensource.css index 82f15da..bb0201e 100644 --- a/etherpad/src/static/css/home-opensource.css +++ b/etherpad/src/static/css/home-opensource.css @@ -10,7 +10,7 @@ font-size: 3.6em; } -#home a#home-newpad, #home a#home-newteam{ +#home a#home-newpad{ display: block; padding: 1em; margin: 12px 60px; @@ -20,7 +20,21 @@ color: #fff; } -#home a#home-newpad:hover, #home a#home-newteam:hover{ +#home a#home-newpad:hover{ background: #26b; } +#home a#home-newteam { + display: block; + padding: 1em; + margin: 12px 60px; + font-size: 1.6em; + border: 1px solid black; + background: #940; + color: #fff; +} + +#home a#home-newteam:hover { + background: #b26; +} + diff --git a/etherpad/src/templates/pro/admin/admin-template.ejs b/etherpad/src/templates/pro/admin/admin-template.ejs index e1a7736..0964e33 100644 --- a/etherpad/src/templates/pro/admin/admin-template.ejs +++ b/etherpad/src/templates/pro/admin/admin-template.ejs @@ -16,11 +16,9 @@ limitations under the License. */ %><% helpers.setHtmlTitle("Etherpad Administra <div class="fpcontent"> <table id="admin-layout-table"> <tr> - <% if (validLicense) { %> <td width="1%" id="admin-leftnav"> <%= renderAdminLeftNav() %> </td> - <% } %> <td width="99%" id="admin-right"> <%= getAdminContent() %> </td> |