From 7919d00399e199c34a50f87fd10101d0d8f6f021 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Apr 2012 17:50:28 -0700 Subject: [PATCH 01/10] bring back the email and logging of update failures, but without the transactions --- boot.php | 44 +++++++++++++------------------ view/{ => en}/update_fail_eml.tpl | 0 2 files changed, 19 insertions(+), 25 deletions(-) rename view/{ => en}/update_fail_eml.tpl (100%) diff --git a/boot.php b/boot.php index 105180c231..7564615a5d 100644 --- a/boot.php +++ b/boot.php @@ -658,32 +658,26 @@ if(! function_exists('check_config')) { // call the specific update -// global $db; -// $db->excep(TRUE); -// try { -// $db->beginTransaction(); - $func = 'update_' . $x; - $func($a); -// $db->commit(); -// } catch(Exception $ex) { -// $db->rollback(); -// //send the administrator an e-mail -// $email_tpl = get_intltext_template("update_fail_eml.tpl"); -// $email_tpl = replace_macros($email_tpl, array( -// '$sitename' => $a->config['sitename'], -// '$siteurl' => $a->get_baseurl(), -// '$update' => $x, -// '$error' => $ex->getMessage())); -// $subject=sprintf(t('Update Error at %s'), $a->get_baseurl()); + $func = 'update_' . $x; + $retval = $func($a); + if($retval) { + //send the administrator an e-mail + $email_tpl = get_intltext_template("update_fail_eml.tpl"); + $email_tpl = replace_macros($email_tpl, array( + '$sitename' => $a->config['sitename'], + '$siteurl' => $a->get_baseurl(), + '$update' => $x, + '$error' => sprintf( t('Update %s failed. See error logs.'), $x) + )); + $subject=sprintf(t('Update Error at %s'), $a->get_baseurl()); -// mail($a->config['admin_email'], $subject, $text, -// 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" -// . 'Content-type: text/plain; charset=UTF-8' . "\n" -// . 'Content-transfer-encoding: 8bit' ); -// //try the logger -// logger('update failed: '.$ex->getMessage().EOL); -// } -// $db->excep(FALSE); + mail($a->config['admin_email'], $subject, $text, + 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + . 'Content-type: text/plain; charset=UTF-8' . "\n" + . 'Content-transfer-encoding: 8bit' ); + //try the logger + logger('CRITICAL: Update Failed: '. $x); + } } } set_config('system','build', DB_UPDATE_VERSION); diff --git a/view/update_fail_eml.tpl b/view/en/update_fail_eml.tpl similarity index 100% rename from view/update_fail_eml.tpl rename to view/en/update_fail_eml.tpl From 356bd9b04ad5378b19d4aa8b25ccab178491df34 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Apr 2012 17:53:19 -0700 Subject: [PATCH 02/10] some constants for the db update failure possibilities --- boot.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boot.php b/boot.php index 7564615a5d..cfdadcd19b 100644 --- a/boot.php +++ b/boot.php @@ -73,6 +73,14 @@ define ( 'HOOK_HOOK', 0); define ( 'HOOK_FILE', 1); define ( 'HOOK_FUNCTION', 2); +/** + * DB update return values + */ + +define ( 'UPDATE_SUCCESS', 0); +define ( 'UPDATE_FAILED', 1); + + /** * * page/profile types From 3d054341ef3c7598c12b003c0d271910b3349795 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 29 Apr 2012 04:12:04 +0200 Subject: [PATCH 03/10] diabook-themes: bug/css-fixes --- .../diabook/diabook-aerith/style-wide.css | 5 ++-- view/theme/diabook/diabook-aerith/style.css | 5 ++-- .../theme/diabook/diabook-blue/style-wide.css | 5 ++-- view/theme/diabook/diabook-blue/style.css | 5 ++-- .../diabook-green/style-network-wide.css | 6 ++--- .../diabook/diabook-green/style-network.css | 10 ++++---- .../diabook-green/style-profile-wide.css | 8 +++---- .../diabook/diabook-green/style-profile.css | 8 +++---- .../diabook/diabook-green/style-wide.css | 19 +++++++-------- view/theme/diabook/diabook-green/style.css | 21 +++++++++-------- .../diabook-pink/style-network-wide.css | 8 +++---- .../diabook/diabook-pink/style-network.css | 12 +++++----- .../diabook-pink/style-profile-wide.css | 10 ++++---- .../diabook/diabook-pink/style-profile.css | 10 ++++---- .../theme/diabook/diabook-pink/style-wide.css | 21 +++++++++-------- view/theme/diabook/diabook-pink/style.css | 23 ++++++++++--------- view/theme/diabook/diabook-red/style-wide.css | 5 ++-- view/theme/diabook/diabook-red/style.css | 5 ++-- view/theme/diabook/footer.tpl | 3 +-- view/theme/diabook/nav.tpl | 2 +- view/theme/diabook/style-wide.css | 5 ++-- view/theme/diabook/style.css | 5 ++-- view/theme/diabook/theme.php | 23 ++++++++++++++++--- 23 files changed, 126 insertions(+), 98 deletions(-) diff --git a/view/theme/diabook/diabook-aerith/style-wide.css b/view/theme/diabook/diabook-aerith/style-wide.css index b8ff1fe250..5c263154f1 100644 --- a/view/theme/diabook/diabook-aerith/style-wide.css +++ b/view/theme/diabook/diabook-aerith/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -1014,7 +1015,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1243,7 +1244,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css index 01d35b7541..e0f38aff6a 100644 --- a/view/theme/diabook/diabook-aerith/style.css +++ b/view/theme/diabook/diabook-aerith/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -1013,7 +1014,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1241,7 +1242,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/diabook-blue/style-wide.css b/view/theme/diabook/diabook-blue/style-wide.css index c8c2033473..189f4d5599 100644 --- a/view/theme/diabook/diabook-blue/style-wide.css +++ b/view/theme/diabook/diabook-blue/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -983,7 +984,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1203,7 +1204,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css index 7bf7e8eaa7..2b68afc6f5 100644 --- a/view/theme/diabook/diabook-blue/style.css +++ b/view/theme/diabook/diabook-blue/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -982,7 +983,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1201,7 +1202,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/diabook-green/style-network-wide.css b/view/theme/diabook/diabook-green/style-network-wide.css index cc598b9fe4..38e7e7ae05 100644 --- a/view/theme/diabook/diabook-green/style-network-wide.css +++ b/view/theme/diabook/diabook-green/style-network-wide.css @@ -439,7 +439,7 @@ a:hover { clear: both; } .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -1301,7 +1301,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #194719; + color: #2c9936; } /*marker*/ @@ -1840,7 +1840,7 @@ transition: all 0.2s ease-in-out; font-weight: bolder; } .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-green/style-network.css b/view/theme/diabook/diabook-green/style-network.css index 7865477112..3cd6117e13 100644 --- a/view/theme/diabook/diabook-green/style-network.css +++ b/view/theme/diabook/diabook-green/style-network.css @@ -439,7 +439,7 @@ a:hover { clear: both; } .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -493,7 +493,7 @@ code { float: right; } .tool a { - color: #194719; + color: #2c9936; } .tool a:hover { text-decoration: none; @@ -1297,7 +1297,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #194719; + color: #2c9936; } .wall-item-decor { @@ -1832,7 +1832,7 @@ transition: all 0.2s ease-in-out; font-weight: bolder; } .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1964,7 +1964,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-green/style-profile-wide.css b/view/theme/diabook/diabook-green/style-profile-wide.css index 65b7f2ba3f..e7a0fe623a 100644 --- a/view/theme/diabook/diabook-green/style-profile-wide.css +++ b/view/theme/diabook/diabook-green/style-profile-wide.css @@ -440,7 +440,7 @@ a:hover { clear: both; } .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -1276,7 +1276,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #194719; + color: #2c9936; } /*marker*/ @@ -1811,7 +1811,7 @@ transition: all 0.2s ease-in-out; cursor: pointer; } .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1945,7 +1945,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-green/style-profile.css b/view/theme/diabook/diabook-green/style-profile.css index dcc7b373a1..051aa9a351 100644 --- a/view/theme/diabook/diabook-green/style-profile.css +++ b/view/theme/diabook/diabook-green/style-profile.css @@ -440,7 +440,7 @@ a:hover { clear: both; } .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -1270,7 +1270,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #194719; + color: #2c9936; } .wall-item-decor { @@ -1801,7 +1801,7 @@ transition: all 0.2s ease-in-out; cursor: pointer; } .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1933,7 +1933,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-green/style-wide.css b/view/theme/diabook/diabook-green/style-wide.css index d85ea23a68..d98a6c3256 100644 --- a/view/theme/diabook/diabook-green/style-wide.css +++ b/view/theme/diabook/diabook-green/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -476,7 +477,7 @@ a:hover { clear: both; } .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -614,7 +615,7 @@ header #banner #logo-text { } /* messages */ #message-new { - background: #194719; + background: #2c9936; border: 1px solid #333; width: 150px; } @@ -991,7 +992,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1185,7 +1186,7 @@ aside #side-peoplefind-url { height: auto; } aside #likes a, a:visited, a:link { - color: #194719; + color: #2c9936; text-decoration: none; cursor: pointer; @@ -1220,7 +1221,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ @@ -1422,7 +1423,7 @@ body .pageheader{ padding-top: 10px; } .tread-wrapper a{ - color: #194719; + color: #2c9936; } /*marker*/ @@ -2073,7 +2074,7 @@ body .pageheader{ cursor: pointer; } .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2207,7 +2208,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2225,7 +2226,7 @@ ul.rs_tabs li { clear: both; } ul.rs_tabs li .selected { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css index c83ddd3972..6a9d8f7d0c 100644 --- a/view/theme/diabook/diabook-green/style.css +++ b/view/theme/diabook/diabook-green/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -477,7 +478,7 @@ a:hover { } /*color*/ .fakelink { - color: #194719; + color: #2c9936; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -550,7 +551,7 @@ code { } /*color*/ .tool a { - color: #194719; + color: #2c9936; } .tool a:hover { text-decoration: none; @@ -617,7 +618,7 @@ header #banner #logo-text { /*color*/ /* messages */ #message-new { - background: #194719; + background: #2c9936; border: 1px solid #333; width: 150px; } @@ -994,7 +995,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1189,7 +1190,7 @@ aside #side-peoplefind-url { } /*color*/ aside #likes a, a:visited, a:link { - color: #194719; + color: #2c9936; text-decoration: none; cursor: pointer; @@ -1224,7 +1225,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ @@ -1425,7 +1426,7 @@ body .pageheader{ } /*color*/ .tread-wrapper a{ - color: #194719; + color: #2c9936; } .wall-item-decor { position: absolute; @@ -2071,7 +2072,7 @@ body .pageheader{ } /*color*/ .button.creation2 { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2204,7 +2205,7 @@ ul.tabs li { } /*color*/ ul.tabs li .active { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2223,7 +2224,7 @@ ul.rs_tabs li { } /*color*/ ul.rs_tabs li .selected { - background-color: #194719; + background-color: #2c9936; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style-network-wide.css b/view/theme/diabook/diabook-pink/style-network-wide.css index 0a83955dfa..4bbab02c7b 100644 --- a/view/theme/diabook/diabook-pink/style-network-wide.css +++ b/view/theme/diabook/diabook-pink/style-network-wide.css @@ -439,7 +439,7 @@ a:hover { clear: both; } .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -807,7 +807,7 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -1301,7 +1301,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #996d73; + color: #D02B55; } /*marker*/ @@ -1840,7 +1840,7 @@ transition: all 0.2s ease-in-out; font-weight: bolder; } .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style-network.css b/view/theme/diabook/diabook-pink/style-network.css index 3a4f49877e..3acb608fc7 100644 --- a/view/theme/diabook/diabook-pink/style-network.css +++ b/view/theme/diabook/diabook-pink/style-network.css @@ -439,7 +439,7 @@ a:hover { clear: both; } .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -493,7 +493,7 @@ code { float: right; } .tool a { - color: #996d73; + color: #D02B55; } .tool a:hover { text-decoration: none; @@ -807,7 +807,7 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -1297,7 +1297,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #996d73; + color: #D02B55; } .wall-item-decor { @@ -1832,7 +1832,7 @@ transition: all 0.2s ease-in-out; font-weight: bolder; } .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1964,7 +1964,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style-profile-wide.css b/view/theme/diabook/diabook-pink/style-profile-wide.css index 0805518963..f4b1939ec2 100644 --- a/view/theme/diabook/diabook-pink/style-profile-wide.css +++ b/view/theme/diabook/diabook-pink/style-profile-wide.css @@ -440,7 +440,7 @@ a:hover { clear: both; } .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -807,7 +807,7 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -1276,7 +1276,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #996d73; + color: #D02B55; } /*marker*/ @@ -1811,7 +1811,7 @@ transition: all 0.2s ease-in-out; cursor: pointer; } .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1945,7 +1945,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style-profile.css b/view/theme/diabook/diabook-pink/style-profile.css index 8f37530614..610fffe3af 100644 --- a/view/theme/diabook/diabook-pink/style-profile.css +++ b/view/theme/diabook/diabook-pink/style-profile.css @@ -440,7 +440,7 @@ a:hover { clear: both; } .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -806,7 +806,7 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -1270,7 +1270,7 @@ transition: all 0.2s ease-in-out; padding-top: 10px; } .tread-wrapper a{ - color: #996d73; + color: #D02B55; } .wall-item-decor { @@ -1801,7 +1801,7 @@ transition: all 0.2s ease-in-out; cursor: pointer; } .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -1933,7 +1933,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style-wide.css b/view/theme/diabook/diabook-pink/style-wide.css index a51ca49cc2..849566aa01 100644 --- a/view/theme/diabook/diabook-pink/style-wide.css +++ b/view/theme/diabook/diabook-pink/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -476,7 +477,7 @@ a:hover { clear: both; } .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -614,7 +615,7 @@ header #banner #logo-text { } /* messages */ #message-new { - background: #996d73; + background: #D02B55; border: 1px solid #333; width: 150px; } @@ -943,7 +944,7 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -991,7 +992,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1185,7 +1186,7 @@ aside #side-peoplefind-url { height: auto; } aside #likes a, a:visited, a:link { - color: #996d73; + color: #D02B55; text-decoration: none; cursor: pointer; @@ -1220,7 +1221,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ @@ -1422,7 +1423,7 @@ body .pageheader{ padding-top: 10px; } .tread-wrapper a{ - color: #996d73; + color: #D02B55; } /*marker*/ @@ -2073,7 +2074,7 @@ body .pageheader{ cursor: pointer; } .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2207,7 +2208,7 @@ ul.tabs li { margin-left: 5px; } ul.tabs li .active { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2225,7 +2226,7 @@ ul.rs_tabs li { clear: both; } ul.rs_tabs li .selected { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css index 833e81a5f3..798d739794 100644 --- a/view/theme/diabook/diabook-pink/style.css +++ b/view/theme/diabook/diabook-pink/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -477,7 +478,7 @@ a:hover { } /*color*/ .fakelink { - color: #996d73; + color: #D02B55; /* color: #3e3e8c; */ text-decoration: none; cursor: pointer; @@ -550,7 +551,7 @@ code { } /*color*/ .tool a { - color: #996d73; + color: #D02B55; } .tool a:hover { text-decoration: none; @@ -617,7 +618,7 @@ header #banner #logo-text { /* messages */ /*color*/ #message-new { - background: #996d73; + background: #D02B55; border: 1px solid #333; width: 150px; } @@ -946,7 +947,7 @@ ul.menu-popup a { } /*color*/ ul.menu-popup a:hover { - background-color: #996d73; /*bdcdd4;*/ + background-color: #D02B55; /*bdcdd4;*/ color: #fff; } ul.menu-popup .menu-sep { @@ -994,7 +995,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1189,7 +1190,7 @@ aside #side-peoplefind-url { } /*color*/ aside #likes a, a:visited, a:link { - color: #996d73; + color: #D02B55; text-decoration: none; cursor: pointer; @@ -1224,7 +1225,7 @@ aside #likes a:hover{ margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ @@ -1425,7 +1426,7 @@ body .pageheader{ } /*color*/ .tread-wrapper a{ - color: #996d73; + color: #D02B55; } .wall-item-decor { position: absolute; @@ -2071,7 +2072,7 @@ body .pageheader{ } /*color*/ .button.creation2 { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2204,7 +2205,7 @@ ul.tabs li { } /*color*/ ul.tabs li .active { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; @@ -2223,7 +2224,7 @@ ul.rs_tabs li { } /*color*/ ul.rs_tabs li .selected { - background-color: #996d73; + background-color: #D02B55; border: 1px solid #777777; color: white; border-radius: 3px 3px 3px 3px; diff --git a/view/theme/diabook/diabook-red/style-wide.css b/view/theme/diabook/diabook-red/style-wide.css index 79c5fb1cbe..b9ea238e2e 100644 --- a/view/theme/diabook/diabook-red/style-wide.css +++ b/view/theme/diabook/diabook-red/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -1013,7 +1014,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1232,7 +1233,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css index c7cb1586d0..05c802102c 100644 --- a/view/theme/diabook/diabook-red/style.css +++ b/view/theme/diabook/diabook-red/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -1012,7 +1013,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1230,7 +1231,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/footer.tpl b/view/theme/diabook/footer.tpl index 8d3c651621..bae5e10566 100644 --- a/view/theme/diabook/footer.tpl +++ b/view/theme/diabook/footer.tpl @@ -1,4 +1,3 @@ -
-
+ \ No newline at end of file diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index ce27400f64..f611de0043 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -136,7 +136,7 @@ - +
$langselector
diff --git a/view/theme/diabook/style-wide.css b/view/theme/diabook/style-wide.css index f8dced3e69..71ed4e4720 100644 --- a/view/theme/diabook/style-wide.css +++ b/view/theme/diabook/style-wide.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -974,7 +975,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1195,7 +1196,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 9150ea8cf8..e70c72cb2b 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -21,6 +21,7 @@ .admin.linklist { border: 0px; padding: 0px; + list-style: none; } .admin.link { @@ -974,7 +975,7 @@ ul.menu-popup .empty { background-color: #bdcdd4; } #nav-notifications-menu { - width: 400px; + width: 425px !important; max-height: 550px; overflow: auto; } @@ -1198,7 +1199,7 @@ aside #side-peoplefind-url { margin-right: 20px; } #login-submit-wrapper{ - padding-top: 120px; + margin-bottom: 12px; } aside #login-submit-button{ diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index c45db9884d..fa0d47ece1 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,13 +3,13 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.022) + * Version: (Version: 1.023) * Author: */ //print diabook-version for debugging -$diabook_version = "Diabook (Version: 1.022)"; +$diabook_version = "Diabook (Version: 1.023)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -313,6 +313,20 @@ $autogrowJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.autogro $a->page['htmlhead'] .= sprintf('', $autogrowJS); //js scripts + +//check if community_home-plugin is activated and change css +$nametocheck = "communityhome"; +$r = q("select id from addon where name = '%s' and installed = 1", dbesc($nametocheck)); +if(count($r) == "1") { + +$a->page['htmlhead'] .= ' +'; +} + //comment-edit-wrapper on photo_view if ($a->argv[0].$a->argv[2] === "photos"."image"){ @@ -324,7 +338,6 @@ $a->page['htmlhead'] .= ' }); '; - } $a->page['htmlhead'] .= ' @@ -334,6 +347,10 @@ $a->page['htmlhead'] .= ' $("a.lightbox").fancybox(); // Select all links with lightbox class }); +$(document).ready(function() { + var footer_top = $(document).height() - 30; + $("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;"); + }); '; From 920d40acf43adb584a33555bfd73e2e5d5f1ebd0 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 29 Apr 2012 05:58:23 +0200 Subject: [PATCH 04/10] diabook-themes: small fix --- view/theme/diabook/footer.tpl | 2 +- view/theme/diabook/theme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/theme/diabook/footer.tpl b/view/theme/diabook/footer.tpl index bae5e10566..25058a7ff7 100644 --- a/view/theme/diabook/footer.tpl +++ b/view/theme/diabook/footer.tpl @@ -1,3 +1,3 @@ -
+ \ No newline at end of file diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index fa0d47ece1..9a1ac0f68a 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -347,7 +347,7 @@ $a->page['htmlhead'] .= ' $("a.lightbox").fancybox(); // Select all links with lightbox class }); -$(document).ready(function() { +$(window).load(function() { var footer_top = $(document).height() - 30; $("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;"); }); From b3a71e4327bbe618dbdd15428a4614f58b4e848c Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Apr 2012 21:35:14 -0700 Subject: [PATCH 05/10] indicate successful updates --- boot.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index cfdadcd19b..616e152f9b 100644 --- a/boot.php +++ b/boot.php @@ -671,7 +671,7 @@ if(! function_exists('check_config')) { if($retval) { //send the administrator an e-mail $email_tpl = get_intltext_template("update_fail_eml.tpl"); - $email_tpl = replace_macros($email_tpl, array( + $email_msg = replace_macros($email_tpl, array( '$sitename' => $a->config['sitename'], '$siteurl' => $a->get_baseurl(), '$update' => $x, @@ -679,13 +679,16 @@ if(! function_exists('check_config')) { )); $subject=sprintf(t('Update Error at %s'), $a->get_baseurl()); - mail($a->config['admin_email'], $subject, $text, + mail($a->config['admin_email'], $subject, $email_msg, 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); //try the logger logger('CRITICAL: Update Failed: '. $x); } + else + set_config('database','update_' . $x, 'success'); + } } set_config('system','build', DB_UPDATE_VERSION); @@ -727,9 +730,10 @@ if(! function_exists('check_config')) { foreach($installed as $i) { if(! in_array($i['name'],$plugins_arr)) { uninstall_plugin($i['name']); - } - else + } + else { $installed_arr[] = $i['name']; + } } } From 64060f82dc68d490f3d729f3fbe139527c831fd0 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Apr 2012 21:56:17 -0700 Subject: [PATCH 06/10] toggle to archive unfriends, though render them useless --- include/Contact.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/Contact.php b/include/Contact.php index 537850e007..2523fc0231 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -51,6 +51,21 @@ function user_remove($uid) { function contact_remove($id) { + + $r = q("select uid from contact where id = %d limit 1", + intval($id) + ); + if((! count($r)) || (! intval($r[0]['uid']))) + return; + + $archive = get_pconfig($r[0]['uid'], 'system','archive_removed_contacts'); + if($archive) { + q("update contact set `archive` = 1, `network` = 'none', `writable` = 0 where id = %d limit 1", + intval($id) + ); + return; + } + q("DELETE FROM `contact` WHERE `id` = %d LIMIT 1", intval($id) ); From 249a6814cd777e8eb9d4feb788058ec4683e9522 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Apr 2012 01:08:28 -0700 Subject: [PATCH 07/10] add db field for removed account, which will also be the first test of update error checking --- boot.php | 2 +- database.sql | 4 +++- update.php | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 616e152f9b..100662a8f8 100644 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1326' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1139 ); +define ( 'DB_UPDATE_VERSION', 1140 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 78b26922bd..80a9197fa5 100644 --- a/database.sql +++ b/database.sql @@ -1019,6 +1019,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `pwdreset` char(255) NOT NULL, `maxreq` int(11) NOT NULL DEFAULT '10', `expire` int(10) unsigned NOT NULL DEFAULT '0', + `account_removed` tinyint(1) NOT NULL DEFAULT '0', `account_expired` tinyint(1) NOT NULL DEFAULT '0', `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -1036,7 +1037,8 @@ CREATE TABLE IF NOT EXISTS `user` ( KEY `blocked` (`blocked`), KEY `verified` (`verified`), KEY `unkmail` (`unkmail`), - KEY `cntunkmail` (`cntunkmail`) + KEY `cntunkmail` (`cntunkmail`), + KEY `account_removed` (`account_removed`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/update.php b/update.php index 2758f59066..3c2ecebb6b 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Sun, 29 Apr 2012 01:42:48 -0700 Subject: [PATCH 08/10] enhanced profile reporting for single values --- mod/profiles.php | 66 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 15 deletions(-) diff --git a/mod/profiles.php b/mod/profiles.php index 7a33a03e44..478aab8a5d 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -139,21 +139,49 @@ function profiles_post(&$a) { $changes = array(); + $value = ''; if($is_default) { - if($marital != $orig[0]['marital']) $changes[] = '♥ ' . t('Marital Status'); - if($withchanged) $changes[] = '♥ ' . t('Romantic Partner'); - if($work != $orig[0]['work']) $changes[] = t('Work/Employment'); - if($religion != $orig[0]['religion']) $changes[] = t('Religion'); - if($politic != $orig[0]['politic']) $changes[] = t('Political Views'); - if($gender != $orig[0]['gender']) $changes[] = t('Gender'); - if($sexual != $orig[0]['sexual']) $changes[] = t('Sexual Preference'); - if($homepage != $orig[0]['homepage']) $changes[] = t('Homepage'); - if($interest != $orig[0]['interest']) $changes[] = t('Interests'); + if($marital != $orig[0]['marital']) { + $changes[] = '♥ ' . t('Marital Status'); + $value = $marital; + } + if($withchanged) { + $changes[] = '♥ ' . t('Romantic Partner'); + $value = strip_tags($with); + } + if($work != $orig[0]['work']) { + $changes[] = t('Work/Employment'); + } + if($religion != $orig[0]['religion']) { + $changes[] = t('Religion'); + $value = $religion; + } + if($politic != $orig[0]['politic']) { + $changes[] = t('Political Views'); + $value = $politic; + } + if($gender != $orig[0]['gender']) { + $changes[] = t('Gender'); + $value = $gender; + } + if($sexual != $orig[0]['sexual']) { + $changes[] = t('Sexual Preference'); + $value = $sexual; + } + if($homepage != $orig[0]['homepage']) { + $changes[] = t('Homepage'); + $value = $homepage; + } + if($interest != $orig[0]['interest']) { + $changes[] = t('Interests'); + $value = $interest; + } if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region'] - || $country_name != $orig[0]['country_name']) - $changes[] = t('Location'); + || $country_name != $orig[0]['country_name']) { + $changes[] = t('Location'); + } - profile_activity($changes); + profile_activity($changes,$value); } @@ -245,7 +273,7 @@ function profiles_post(&$a) { } -function profile_activity($changed) { +function profile_activity($changed, $value) { $a = get_app(); if(! local_user() || ! is_array($changed) || ! count($changed)) @@ -289,7 +317,7 @@ function profile_activity($changed) { foreach($changed as $ch) { if(strlen($changes)) { if ($z == ($t - 1)) - $changes .= ' and '; + $changes .= t(' and '); else $changes .= ', '; } @@ -299,7 +327,15 @@ function profile_activity($changed) { $prof = '[url=' . $self[0]['url'] . '?tab=profile' . ']' . t('public profile') . '[/url]'; - $arr['body'] = sprintf( t('%1$s has an updated %2$s, changing %3$s.'), $A, $prof, $changes); + if($t == 1 && strlen($value)) { + $message = sprintf( t('%1$s changed %2$s to %3$s'), $A, $changes, $value); + $message .= "\n\n" . sprintf( t(' - Visit %1$s\'s %2$s'), $A, $prof); + } + else + $message = sprintf( t('%1$s has an updated %2$s, changing %3$s.'), $A, $prof, $changes); + + + $arr['body'] = $message; $arr['object'] = '' . ACTIVITY_OBJ_PROFILE . '' . $self[0]['name'] . '' . '' . $self[0]['url'] . '/' . $self[0]['name'] . ''; From 735f518fd8547fab37ca39c7717e8d89e07e3337 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Apr 2012 01:49:54 -0700 Subject: [PATCH 09/10] fix location change notification --- mod/profiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/profiles.php b/mod/profiles.php index 478aab8a5d..d640ba1ba5 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -177,7 +177,7 @@ function profiles_post(&$a) { $value = $interest; } if($address != $orig[0]['address'] || $locality != $orig[0]['locality'] || $region != $orig[0]['region'] - || $country_name != $orig[0]['country_name']) { + || $country_name != $orig[0]['country-name']) { $changes[] = t('Location'); } From def6f0b408680c4e5f209890bbf1ad6bf40b5add Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Apr 2012 02:11:33 -0700 Subject: [PATCH 10/10] the heart should really be red. --- mod/profiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/profiles.php b/mod/profiles.php index d640ba1ba5..3a52c8fa5e 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -142,7 +142,7 @@ function profiles_post(&$a) { $value = ''; if($is_default) { if($marital != $orig[0]['marital']) { - $changes[] = '♥ ' . t('Marital Status'); + $changes[] = '[color=#ff0000]♥[/color] ' . t('Marital Status'); $value = $marital; } if($withchanged) {