aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@diekershoff.homeunix.net>2010-12-17 11:53:05 +0100
committerroot <root@diekershoff.homeunix.net>2010-12-17 11:53:05 +0100
commitf6ee615a79eaab03adc540704ab17b8a44a3d9e8 (patch)
treec92b91abd9e84d32bcfebda77529b68887b16c9b
parent79ab5b2ff87ef171a9baf604179080861d64d788 (diff)
parentd1261e50c6a804d329b674dfba66574419c5f6c5 (diff)
downloadvolse-hubzilla-f6ee615a79eaab03adc540704ab17b8a44a3d9e8.tar.gz
volse-hubzilla-f6ee615a79eaab03adc540704ab17b8a44a3d9e8.tar.bz2
volse-hubzilla-f6ee615a79eaab03adc540704ab17b8a44a3d9e8.zip
Merge branch 'master' of git://github.com/friendika/friendika
-rw-r--r--boot.php2
-rw-r--r--database.sql2
-rw-r--r--include/auth.php4
-rw-r--r--include/nav.php3
-rw-r--r--include/profile_selectors.php2
-rw-r--r--index.php5
-rw-r--r--mod/dfrn_request.php14
-rw-r--r--mod/openid.php5
-rw-r--r--mod/register.php5
-rw-r--r--update.php6
-rw-r--r--util/strings.php18
-rw-r--r--view/auto_request.tpl29
-rw-r--r--view/dfrn_request.tpl (renamed from view/en/dfrn_request.tpl)26
-rw-r--r--view/en/auto_request.tpl29
14 files changed, 99 insertions, 51 deletions
diff --git a/boot.php b/boot.php
index 1546429c3..1870e059e 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1023 );
+define ( 'BUILD_ID', 1024 );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "<br />\r\n" );
diff --git a/database.sql b/database.sql
index 148a8d0d8..dab7c179d 100644
--- a/database.sql
+++ b/database.sql
@@ -357,6 +357,8 @@ CREATE TABLE IF NOT EXISTS `user` (
`email` char(255) NOT NULL,
`openid` char(255) NOT NULL,
`timezone` char(128) NOT NULL,
+ `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`default-location` char(255) NOT NULL,
`allow_location` tinyint(1) NOT NULL DEFAULT '0',
`theme` char(255) NOT NULL,
diff --git a/include/auth.php b/include/auth.php
index dd4afac23..fe09ef160 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -162,6 +162,10 @@ else {
$a->cid = $r[0]['id'];
$_SESSION['cid'] = $a->cid;
}
+ q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($_SESSION['uid'])
+ );
header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
if(($a->module !== 'home') && isset($_SESSION['return_url']))
diff --git a/include/nav.php b/include/nav.php
index f7c5c4e01..171309673 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -1,5 +1,8 @@
<?php
+ if(!(x($a->page,'nav')))
+ $a->page['nav'] = '';
+
$a->page['nav'] .= '<div id="panel" style="display: none;"></div>' ;
if(local_user()) {
diff --git a/include/profile_selectors.php b/include/profile_selectors.php
index 63bc22dc5..f4b30f211 100644
--- a/include/profile_selectors.php
+++ b/include/profile_selectors.php
@@ -3,7 +3,7 @@
function gender_selector($current="",$suffix="") {
$o = '';
- $select = array('', t('Male'), t('Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Currently Male'), t('Currently Female'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided'));
+ $select = array('', t('Male'), t('Female'), t('Currently Male'), t('Currently Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided'));
$o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
foreach($select as $selection) {
diff --git a/index.php b/index.php
index 2f56d5414..eac3b66df 100644
--- a/index.php
+++ b/index.php
@@ -131,6 +131,11 @@ if(strlen($a->module)) {
$a->module_loaded = true;
}
else {
+ if((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) {
+ logger('index.php: dreamhost_error_hack invoked');
+ goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']);
+ }
+
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
notice( t('Page not found.' ) . EOL);
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 65a2c771e..9c8064db5 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -535,6 +535,20 @@ function dfrn_request_content(&$a) {
else
$tpl = load_view_file('view/auto_request.tpl');
$o .= replace_macros($tpl,array(
+ '$header' => t('Friend/Connection Request'),
+ '$pls_answer' => t('Please answer the following:'),
+ '$does_know' => t('Does $name know you?'),
+ '$yes' => t('Yes'),
+ '$no' => t('No'),
+ '$add_note' => t('Add a personal note:'),
+ '$page_desc' => t('Please enter your profile address from one of the following supported social networks:'),
+ '$friendika' => t('Friendika'),
+ '$statusnet' => t('StatusNet/Federated Social Web'),
+ '$private_net' => t("Private \x28secure\x29 network"),
+ '$public_net' => t("Public \x28insecure\x29 network"),
+ '$your_address' => t('Your profile address:'),
+ '$submit' => t('Submit Request'),
+ '$cancel' => t('Cancel'),
'$nickname' => $a->argv[1],
'$name' => $a->profile['name'],
'$myaddr' => $myaddr
diff --git a/mod/openid.php b/mod/openid.php
index 84d4bf4bf..91efbbbc4 100644
--- a/mod/openid.php
+++ b/mod/openid.php
@@ -83,6 +83,11 @@ function openid_content(&$a) {
$_SESSION['cid'] = $a->cid;
}
+ q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($_SESSION['uid'])
+ );
+
header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
if(($a->module !== 'home') && isset($_SESSION['return_url']))
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
diff --git a/mod/register.php b/mod/register.php
index 7ad7ef211..d9dae49a2 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -138,8 +138,8 @@ function register_post(&$a) {
$spubkey = $spkey["key"];
$r = q("INSERT INTO `user` ( `username`, `password`, `email`, `openid`, `nickname`,
- `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `verified`, `blocked` )
- VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
+ `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked` )
+ VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
dbesc($username),
dbesc($new_password_encoded),
dbesc($email),
@@ -149,6 +149,7 @@ function register_post(&$a) {
dbesc($prvkey),
dbesc($spubkey),
dbesc($sprvkey),
+ dbesc(datetime_convert()),
intval($verified),
intval($blocked)
);
diff --git a/update.php b/update.php
index b3fab6720..c5aa56194 100644
--- a/update.php
+++ b/update.php
@@ -237,3 +237,9 @@ function update_1022() {
`v` MEDIUMTEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci ");
}
+
+function update_1023() {
+ q("ALTER TABLE `user` ADD `register_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `timezone` ,
+ ADD `login_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `register_date` ");
+}
+
diff --git a/util/strings.php b/util/strings.php
index 43139b0a0..62211918e 100644
--- a/util/strings.php
+++ b/util/strings.php
@@ -28,6 +28,13 @@ $a->strings['No contacts'] = 'No contacts';
$a->strings['Contacts'] = 'Contacts';
$a->strings['View Contacts'] = 'View Contacts';
$a->strings['Search'] = 'Search';
+$a->strings['No profile'] = 'No profile';
+$a->strings['Connect'] = 'Connect';
+$a->strings['Location:'] = 'Location:';
+$a->strings[', '] = ', ';
+$a->strings['Gender:'] = 'Gender:';
+$a->strings['Status:'] = 'Status:';
+$a->strings['Homepage:'] = 'Homepage:';
$a->strings["Invite Friends"] = "Invite Friends";
$a->strings['Connect/Follow [profile address]'] = 'Connect/Follow [profile address]';
$a->strings['Example: bob@example.com, http://example.com/barbara'] = 'Example: bob@example.com, http://example.com/barbara';
@@ -86,6 +93,7 @@ $a->strings['Unable to update your contact profile details on our system'] = 'Un
$a->strings["Connection accepted at "] = "Connection accepted at ";
$a->strings['Administrator'] = 'Administrator';
$a->strings['New mail received at '] = 'New mail received at ';
+$a->strings[' commented on an item at '] = ' commented on an item at ';
$a->strings[" commented on an item at "] = " commented on an item at ";
$a->strings[' welcomes '] = ' welcomes ';
$a->strings["This introduction has already been accepted."] = "This introduction has already been accepted.";
@@ -163,7 +171,7 @@ $a->strings['Your message:'] = 'Your message:';
$a->strings['Please join my social network on '] = 'Please join my social network on ';
$a->strings["\r\n"] = "\r\n";
$a->strings['To accept this invitation, please visit:'] = 'To accept this invitation, please visit:';
-$a->strings['Once you have registered, please make an introduction via my profile page at:'] = 'Once you have registered, please make an introduction via my profile page at:';
+$a->strings['Once you have registered, please connect with me via my profile page at:'] = 'Once you have registered, please connect with me via my profile page at:';
$a->strings['Unable to locate original post.'] = 'Unable to locate original post.';
$a->strings['Empty post discarded.'] = 'Empty post discarded.';
$a->strings[" commented on your item at "] = " commented on your item at ";
@@ -173,6 +181,7 @@ $a->strings['status'] = 'status';
$a->strings['likes'] = 'likes';
$a->strings['doesn\'t like'] = 'doesn\'t like';
$a->strings['\'s'] = '\'s';
+$a->strings['Remote privacy information not available.'] = 'Remote privacy information not available.';
$a->strings['Visible to:'] = 'Visible to:';
$a->strings['Password reset requested at '] = 'Password reset requested at ';
$a->strings['No recipient selected.'] = 'No recipient selected.';
@@ -246,7 +255,6 @@ $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #cam
$a->strings['Recent Photos'] = 'Recent Photos';
$a->strings['Upload New Photos'] = 'Upload New Photos';
$a->strings['View Album'] = 'View Album';
-$a->strings['No profile'] = 'No profile';
$a->strings['Image uploaded but image cropping failed.'] = 'Image uploaded but image cropping failed.';
$a->strings['Image size reduction [175] failed.'] = 'Image size reduction [175] failed.';
$a->strings['Image size reduction [80] failed.'] = 'Image size reduction [80] failed.';
@@ -265,7 +273,7 @@ $a->strings['Age: '] = 'Age: ';
$a->strings['Please enter the required information.'] = 'Please enter the required information.';
$a->strings['Please use a shorter name.'] = 'Please use a shorter name.';
$a->strings['Name too short.'] = 'Name too short.';
-$a->strings['That doesn\'t appear to be your full name.'] = 'That doesn\'t appear to be your full name.';
+$a->strings["That doesn\'t appear to be your full \x28First Last\x29 name."] = "That doesn\'t appear to be your full \x28First Last\x29 name.";
$a->strings['Your email domain is not among those allowed on this site.'] = 'Your email domain is not among those allowed on this site.';
$a->strings['Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.'] = 'Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.';
$a->strings['Nickname is already registered. Please choose another.'] = 'Nickname is already registered. Please choose another.';
@@ -354,14 +362,14 @@ $a->strings['Settings'] = 'Settings';
$a->strings['Profiles'] = 'Profiles';
$a->strings['Male'] = 'Male';
$a->strings['Female'] = 'Female';
+$a->strings['Currently Male'] = 'Currently Male';
+$a->strings['Currently Female'] = 'Currently Female';
$a->strings['Mostly Male'] = 'Mostly Male';
$a->strings['Mostly Female'] = 'Mostly Female';
$a->strings['Transgender'] = 'Transgender';
$a->strings['Intersex'] = 'Intersex';
$a->strings['Transsexual'] = 'Transsexual';
$a->strings['Hermaphrodite'] = 'Hermaphrodite';
-$a->strings['Currently Male'] = 'Currently Male';
-$a->strings['Currently Female'] = 'Currently Female';
$a->strings['Neuter'] = 'Neuter';
$a->strings['Non-specific'] = 'Non-specific';
$a->strings['Other'] = 'Other';
diff --git a/view/auto_request.tpl b/view/auto_request.tpl
new file mode 100644
index 000000000..b8d2d1a72
--- /dev/null
+++ b/view/auto_request.tpl
@@ -0,0 +1,29 @@
+
+<h1>$header</h1>
+
+<p id="dfrn-request-intro">
+$page_desc<br />
+<ul id="dfrn-request-networks">
+<li><a href="http://friendika.com" title="$private_net">$friendika</a> <img src="images/lock_icon.gif" alt="$private_net" title="$private_net" /></li>
+<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a> <img src="images/unlock_icon.gif" alt="$public_net" title="$public_net"/></li>
+</ul>
+</p>
+
+<form action="dfrn_request/$nickname" method="post" />
+
+<div id="dfrn-request-url-wrapper" >
+ <label id="dfrn-url-label" for="dfrn-url" >$your_address</label>
+ <input type="text" name="dfrn_url" id="dfrn-url" size="32" value="$myaddr" />
+ <div id="dfrn-request-url-end"></div>
+</div>
+
+
+<div id="dfrn-request-info-wrapper" >
+
+</div>
+
+ <div id="dfrn-request-submit-wrapper">
+ <input type="submit" name="submit" id="dfrn-request-submit-button" value="$submit" />
+ <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="$cancel" />
+ </div>
+</form>
diff --git a/view/en/dfrn_request.tpl b/view/dfrn_request.tpl
index 4dd8c0489..9cb1e8749 100644
--- a/view/en/dfrn_request.tpl
+++ b/view/dfrn_request.tpl
@@ -1,41 +1,41 @@
-<h1>Friend/Connection Request</h1>
+<h1>$header</h1>
<p id="dfrn-request-intro">
-You may request a connection with this member if you have a valid profile address<br />
-on one of the following social networks:<br />
+$page_desc<br />
<ul id="dfrn-request-networks">
-<li><a href="http://friendika.com" title="Private (secure) network">Friendika</a> <img src="images/lock_icon.gif" alt="Private (secure) network" title="Private (secure) network" /></li>
-<li><a href="http://ostatus.org" title="Public (insecure) network" >StatusNet/Federated Social Web</a> <img src="images/unlock_icon.gif" alt="Public (insecure) network" title="Public (insecure) network"/></li>
+<li><a href="http://friendika.com" title="$private_net">$friendika</a> <img src="images/lock_icon.gif" alt="$private_net" title="$private_net" /></li>
+<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a> <img src="images/unlock_icon.gif" alt="$public_net" title="$public_net"/></li>
</ul>
</p>
<form action="dfrn_request/$nickname" method="post" />
<div id="dfrn-request-url-wrapper" >
- <label id="dfrn-url-label" for="dfrn-url" >Your profile address:</label>
+ <label id="dfrn-url-label" for="dfrn-url" >$your_address</label>
<input type="text" name="dfrn_url" id="dfrn-url" size="32" value="$myaddr" />
<div id="dfrn-request-url-end"></div>
</div>
<p id="dfrn-request-options">
-Please answer the following:
+$pls_answer
</p>
<div id="dfrn-request-info-wrapper" >
+
<p id="doiknowyou">
-Does $name know you?
+$does_know
</p>
<div id="dfrn-request-know-yes-wrapper">
- <label id="dfrn-request-knowyou-yes-label" for="dfrn-request-knowyouyes">Yes</label>
+ <label id="dfrn-request-knowyou-yes-label" for="dfrn-request-knowyouyes">$yes</label>
<input type="radio" name="knowyou" id="knowyouyes" value="1" />
<div id="dfrn-request-knowyou-break" ></div>
</div>
<div id="dfrn-request-know-no-wrapper">
- <label id="dfrn-request-knowyou-no-label" for="dfrn-request-knowyouno">No</label>
+ <label id="dfrn-request-knowyou-no-label" for="dfrn-request-knowyouno">$no</label>
<input type="radio" name="knowyou" id="knowyouno" value="0" checked="checked" />
<div id="dfrn-request-knowyou-end"></div>
@@ -43,7 +43,7 @@ Does $name know you?
<p id="dfrn-request-message-desc">
-Add a personal note:
+$add_note
</p>
<div id="dfrn-request-message-wrapper">
<textarea name="dfrn-request-message" rows="4" cols="64" ></textarea>
@@ -53,7 +53,7 @@ Add a personal note:
</div>
<div id="dfrn-request-submit-wrapper">
- <input type="submit" name="submit" id="dfrn-request-submit-button" value="Submit Request" />
- <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="Cancel" />
+ <input type="submit" name="submit" id="dfrn-request-submit-button" value="$submit" />
+ <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="$cancel" />
</div>
</form>
diff --git a/view/en/auto_request.tpl b/view/en/auto_request.tpl
deleted file mode 100644
index 97e750083..000000000
--- a/view/en/auto_request.tpl
+++ /dev/null
@@ -1,29 +0,0 @@
-
-<h1>Friend/Connection Request</h1>
-
-<p id="dfrn-request-intro">
-Please enter your profile address from one of the following supported social networks:<br />
-<ul id="dfrn-request-networks">
-<li><a href="http://friendika.com" title="Private (secure) network">Friendika</a> <img src="images/lock_icon.gif" alt="Private (secure) network" title="Private (secure) network" /></li>
-<li><a href="http://ostatus.org" title="Public (insecure) network" >StatusNet/Federated Social Web</a> <img src="images/unlock_icon.gif" alt="Public (insecure) network" title="Public (insecure) network"/></li>
-</ul>
-</p>
-
-<form action="dfrn_request/$nickname" method="post" />
-
-<div id="dfrn-request-url-wrapper" >
- <label id="dfrn-url-label" for="dfrn-url" >Your profile address:</label>
- <input type="text" name="dfrn_url" id="dfrn-url" size="32" value="$myaddr" />
- <div id="dfrn-request-url-end"></div>
-</div>
-
-
-<div id="dfrn-request-info-wrapper" >
-
-</div>
-
- <div id="dfrn-request-submit-wrapper">
- <input type="submit" name="submit" id="dfrn-request-submit-button" value="Submit Request" />
- <input type="submit" name="cancel" id="dfrn-request-cancel-button" value="Cancel" />
- </div>
-</form>