From f60f82727f96c033aaff9f5b5f0767c722e25f28 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 16 Dec 2010 16:35:45 -0800 Subject: [PATCH 1/3] register/login timestamps --- boot.php | 2 +- database.sql | 2 ++ include/auth.php | 4 ++++ include/nav.php | 3 +++ include/profile_selectors.php | 2 +- mod/openid.php | 5 +++++ mod/register.php | 5 +++-- update.php | 6 ++++++ util/strings.php | 18 +++++++++++++----- 9 files changed, 38 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index 1546429c35..1870e059e9 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', "
\r\n" ); diff --git a/database.sql b/database.sql index 148a8d0d85..dab7c179d9 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 dd4afac239..fe09ef1604 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 f7c5c4e01d..1713096734 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,5 +1,8 @@ page,'nav'))) + $a->page['nav'] = ''; + $a->page['nav'] .= '' ; if(local_user()) { diff --git a/include/profile_selectors.php b/include/profile_selectors.php index 63bc22dc59..f4b30f2118 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 .= " +
+ + + +
+ +
+ +
+ + +
+ diff --git a/view/en/dfrn_request.tpl b/view/dfrn_request.tpl similarity index 60% rename from view/en/dfrn_request.tpl rename to view/dfrn_request.tpl index 4dd8c04899..9cb1e8749b 100644 --- a/view/en/dfrn_request.tpl +++ b/view/dfrn_request.tpl @@ -1,41 +1,41 @@ -

Friend/Connection Request

+

$header

-You may request a connection with this member if you have a valid profile address
-on one of the following social networks:
+$page_desc

- +

-Please answer the following: +$pls_answer

+

-Does $name know you? +$does_know

- +
- +
@@ -43,7 +43,7 @@ Does $name know you?

-Add a personal note: +$add_note

@@ -53,7 +53,7 @@ Add a personal note:
- - + +
diff --git a/view/en/auto_request.tpl b/view/en/auto_request.tpl deleted file mode 100644 index 97e750083c..0000000000 --- a/view/en/auto_request.tpl +++ /dev/null @@ -1,29 +0,0 @@ - -

Friend/Connection Request

- -

-Please enter your profile address from one of the following supported social networks:
-

-

- -
- -
- - -
-
- - -
- -
- -
- - -
-
From d1261e50c6a804d329b674dfba66574419c5f6c5 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 16 Dec 2010 20:12:23 -0800 Subject: [PATCH 3/3] don't ask --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index 2f56d54143..eac3b66df7 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);