aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php2
-rw-r--r--doc/Developers.md2
-rw-r--r--doc/Install.md30
-rw-r--r--include/delivery.php16
-rw-r--r--include/poller.php6
-rw-r--r--include/zotfns.php195
-rw-r--r--mod/photos.php2
-rw-r--r--mod/post.php51
-rw-r--r--view/theme/testbubble/group_edit.tpl7
-rw-r--r--view/theme/testbubble/style.css123
10 files changed, 180 insertions, 254 deletions
diff --git a/boot.php b/boot.php
index 44bfa868a..5b32e0573 100644
--- a/boot.php
+++ b/boot.php
@@ -8,7 +8,7 @@ require_once("include/pgettext.php");
require_once('include/nav.php');
-define ( 'FRIENDIKA_VERSION', '2.3.1115' );
+define ( 'FRIENDIKA_VERSION', '2.3.1116' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1092 );
diff --git a/doc/Developers.md b/doc/Developers.md
index ebfaf97c3..744a76a8b 100644
--- a/doc/Developers.md
+++ b/doc/Developers.md
@@ -7,7 +7,7 @@ doing development.
Create your own github account.
-You may fork/clone the Friendika repository from [https://github.com/friendika/friendika.git](https://github.com/friendika/friendika.git).
+You may fork/clone the Friendika repository from [https://github.com/friendika/Free-Friendika.git](https://github.com/friendika/Free-Friendika.git).
Follow the instructions provided here: [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/)
to create and use your own tracking fork on github
diff --git a/doc/Install.md b/doc/Install.md
index 3538d7bfa..b5ab1ef6f 100644
--- a/doc/Install.md
+++ b/doc/Install.md
@@ -36,14 +36,28 @@ you might have trouble getting everything to work.]
- If you are able to do so, we recommend using git to clone the source repository rather than to use a packaged tar or zip file. This makes the software much easier to update. The Linux command to clone the repository into a directory "mywebsite" would be
- `git clone http://github.com/friendika/friendika.git mywebsite`
-
- and then you can pick up the latest changes at any time with
-
- `git pull`
-
-
-
+ `git clone https://github.com/friendika/Free-Friendika.git mywebsite`
+
+ - and then you can pick up the latest changes at any time with
+
+ `git pull`
+
+ - For installing addons
+
+ - First you should be **on** your website folder
+
+ `cd mywebsite`
+
+ - Then you should clone the addon repository (separtely)
+
+ `git clone https://github.com/friendika/friendika-addons.git addon`
+
+ - For keeping the addon tree updated, you should be on you addon tree and issue a git pull
+
+ `cd mywebsite/addon`
+
+ `git pull`
+
- If you copy the directory tree to your webserver, make sure
that you also copy .htaccess - as "dot" files are often hidden
and aren't normally copied.
diff --git a/include/delivery.php b/include/delivery.php
index 706c07b3b..06cc1f679 100644
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -107,10 +107,18 @@ function delivery_run($argv, $argc){
return;
}
- $icontacts = q("SELECT * FROM `contact` WHERE `id` IN ( SELECT distinct(`contact-id`) FROM `item` where `parent` = %d ) ",
- intval($parent_id)
- );
- if(! count($icontacts))
+ $icontacts = null;
+ $contacts_arr = array();
+ foreach($items as $item)
+ if(! in_array($item['contact-id'],$contacts_arr))
+ $contacts_arr[] = intval($item['contact-id']);
+ if(count($contacts_arr)) {
+ $str_contacts = implode(',',$contacts_arr);
+ $icontacts = q("SELECT * FROM `contact`
+ WHERE `id` IN ( $str_contacts ) "
+ );
+ }
+ if( ! ($icontacts && count($icontacts)))
return;
diff --git a/include/poller.php b/include/poller.php
index fd2a0af8f..07076508f 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -38,6 +38,12 @@ function poller_run($argv, $argc){
proc_run('php',"include/queue.php");
+ // expire any expired accounts
+
+ q("UPDATE user SET `account_expired` = 1 where `account_expired` = 0
+ AND `account_expires_on` != '0000-00-00 00:00:00'
+ AND `account_expires_on` < UTC_TIMESTAMP() ");
+
// once daily run expire in background
$d1 = get_config('system','last_expire_day');
diff --git a/include/zotfns.php b/include/zotfns.php
deleted file mode 100644
index b23fce82a..000000000
--- a/include/zotfns.php
+++ /dev/null
@@ -1,195 +0,0 @@
-<?php
-
-
-require_once('include/salmon.php');
-require_once('include/crypto.php');
-
-
-function zot_get($url,$args) {
- $argstr = '';
- foreach($args as $k => $v) {
- if($argstr)
- $argstr .= '&';
- $argstr .= $k . '=' . $v;
- }
- $s = fetch_url($url . '?' . $argstr);
- if($s) {
- $j = json_decode($s);
- if($j)
- return($j);
- }
- return false;
-}
-
-function zot_post($url,$args) {
- $s = post_url($url,$args);
- if($s) {
- $j = json_decode($s);
- if($j)
- return($j);
- }
- return false;
-}
-
-
-function zot_prv_encode($s,$prvkey) {
- $x = '';
- $res = openssl_private_encrypt($s,$x,$prvkey);
- return base64url_encode($y);
-}
-function zot_pub_encode($s,$pubkey) {
- $x = '';
- $res = openssl_public_encrypt($s,$x,$pubkey);
- return base64url_encode($x);
-}
-
-function zot_prv_decode($s,$prvkey) {
- $s = base64url_decode($s);
- $x = '';
- openssl_private_decrypt($s,$x,$prvkey);
- return $x;
-}
-
-function zot_pub_decode($s,$pubkey) {
- $s = base64url_decode($s);
- $x = '';
- openssl_public_decrypt($s,$x,$pubkey);
- return $x;
-}
-
-
-function zot_getzid($url,$myaddress,$myprvkey) {
- $ret = array();
- $j = zot_get($url,array('sender' => $myaddress));
- if($j->zid_encoded)
- $ret['zid'] = zot_prv_decode($j->zid_encoded,$myprvkey);
- if($j->zkey_encoded)
- $ret['zkey'] = zot_prv_decode($j->zkey_encoded,$myprvkey);
- return $ret;
-}
-
-function zot_post_init($url,$zid,$myprvkey,$theirpubkey) {
- $ret = array();
-
- $zinit = random_string(32);
-
- $j = zot_get($url,array('zid' => $zid,'zinit' => $zinit));
-
- $a = get_app();
- if(! $a->get_curl_code())
- return ZCURL_TIMEOUT;
- if(! $j->zinit) {
- logger('zot_post_init: no zinit returned.');
- return false;
- }
- if(zot_pub_decode($j->zinit,$thierpubkey) !== $zinit) {
- logger('zot_post_init: incorrect zinit returned.');
- return false;
- }
-
- if($j->challenge) {
- $s = zot_prv_decode($j->challenge,$myprvkey);
- $s1 = substr($s,0,strpos($s,'.'));
- if($s1 != $zid) {
- logger("zot_post_init: incorrect zid returned");
- return false;
- }
- $ret['result'] = substr($s,strpos($s,'.') + 1);
- $ret['perms'] = $j->perms;
- }
- return $ret;
-}
-
-
-function zot_encrypt_data($data,&$key) {
- $key = random_string();
- return aes_encrypt($data,$key);
-}
-
-
-// encrypt the data prior to calling this function so it only need be done once per message
-// regardless of the number of recipients.
-
-function zot_post_data($url,$zid,$myprvkey,$theirpubkey,$encrypted_data,$key, $intro = false) {
- $i = zot_post_init($url,$zid,$myprvkey,$theirpubkey);
- if($i === ZCURL_TIMEOUT)
- return ZCURL_TIMEOUT;
-
- if((! $i) || (! array_key_exists('perms',$i)) || (! array_key_exists('result',$i)))
- return false;
- if((! stristr($i['perms'],'post')) && ($intro === false)) {
- logger("zot_post_data: no permission to post: url=$url zid=$zid");
- return false;
- }
- $p = array();
- $p['zid'] = $zid;
- $p['result'] = zot_pub_encode($i['result'],$theirpubkey);
- $p['aes_key'] = zot_prv_encode($key,$myprvkey);
- $p['data'] = $encrypted_data;
- $s = zot_post($url,$p);
- $a = get_app();
- if(! $a->get_curl_code())
- return ZCURL_TIMEOUT;
-
- if($s) {
- $j = json_decode($s);
- return $j;
- }
- return false;
-}
-
-function zot_deliver($recipients,$myprvkey,$data) {
-
- if(is_array($recipients) && count($recipients)) {
-
- $key = '';
- $encrypted = zot_encrypt_data($data,$key);
-
-
- foreach($recipients as $r) {
- $result = zot_post_data(
- $r['post'],
- $r['zid'],
- $myprvkey,
- $r['pubkey'],
- $encrypted,
- $key
- );
- if($result === false) {
- // post failed
- logger('zot_deliver: failed: ' . print_r($r,true));
- }
- elseif($result === ZCURL_TIMEOUT) {
- // queue for redelivery
- }
- elseif($result->error) {
- // failed at other end
- logger('zot_deliver: remote failure: ' . $result->error . ' ' . print_r($r,true));
- }
- elseif($result->success) {
- logger('zot_deliver: success ' . print_r($r,true, LOGGER_DEBUG));
- }
- else
- logger('zot_deliver: unknown failure.');
- }
- }
-}
-
-
-function zot_new_contact($user,$cc) {
-
- $zid = random_string(32);
- $zkey = random_string(32);
-
- logger("zot_new_contact: zid=$zid zkey=$zkey uid={$user['uid']} " . print_r($cc,true));
-
- $ret = array();
- $ret['zid_encoded'] = zot_pub_encode($zid,$cc['pubkey']);
- $ret['zkey_encoded'] = zot_pub_encode($zkey,$cc['pubkey']);
- return $ret;
-
-
-
-
-
-} \ No newline at end of file
diff --git a/mod/photos.php b/mod/photos.php
index cb7df15cc..90d51000e 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -34,7 +34,7 @@ function photos_init(&$a) {
$a->data['albums'] = $albums;
$o .= '<div class="vcard">';
- $o .= '<div class="fn">' . $a->data['user']['username'] . '</h4>';
+ $o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg" alt="' . $a->data['user']['username'] . '" /></div>';
$o .= '</div>';
diff --git a/mod/post.php b/mod/post.php
new file mode 100644
index 000000000..4a7e33b23
--- /dev/null
+++ b/mod/post.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Zot endpoint
+ */
+
+
+require_once('include/salmon.php');
+require_once('include/crypto.php');
+// not yet ready for prime time
+//require_once('include/zot.php');
+
+function post_post(&$a) {
+
+ $bulk_delivery = false;
+
+ if($a->argc == 1) {
+ $bulk_delivery = true;
+ }
+ else {
+ $nickname = $a->argv[2];
+ $r = q("SELECT * FROM `user` WHERE `nickname` = '%s'
+ AND `account_expired` = 0 LIMIT 1",
+ dbesc($nickname)
+ );
+ if(! count($r))
+ http_status_exit(500);
+
+ $importer = $r[0];
+ }
+
+ $xml = file_get_contents('php://input');
+
+ logger('mod-post: new zot: ' . $xml, LOGGER_DATA);
+
+ if(! $xml)
+ http_status_exit(500);
+
+ $msg = zot_decode($importer,$xml);
+
+ logger('mod-post: decoded msg: ' . print_r($msg,true), LOGGER_DATA);
+
+ if(! is_array($msg))
+ http_status_exit(500);
+
+ $ret = 0;
+ $ret = zot_incoming($bulk_delivery, $importer,$msg);
+ http_status_exit(($ret) ? $ret : 200);
+ // NOTREACHED
+}
+
diff --git a/view/theme/testbubble/group_edit.tpl b/view/theme/testbubble/group_edit.tpl
index b867568f3..a8b3f92a0 100644
--- a/view/theme/testbubble/group_edit.tpl
+++ b/view/theme/testbubble/group_edit.tpl
@@ -6,13 +6,10 @@
<div id="group-edit-name-wrapper" >
<label id="group-edit-name-label" for="group-edit-name" >$gname</label>
<input type="text" id="group-edit-name" name="groupname" value="$name" />
- <div id="group-edit-submit-wrapper" >
- <input type="submit" name="submit" value="$submit" >
- </div>
+ <input type="submit" name="submit" value="$submit">
+ $drop
</div>
<div id="group-edit-name-end"></div>
- $drop
-
<div id="group-edit-desc">$desc</div>
<div id="group-edit-select-end" ></div>
</form>
diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css
index ba3b52099..97939c45a 100644
--- a/view/theme/testbubble/style.css
+++ b/view/theme/testbubble/style.css
@@ -22,6 +22,17 @@ You can switch out the colors of the header, buttons and links by using a find a
= */
/* ========== */
+/*html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-weight: inherit;
+ font-style: inherit;
+ font-size: 100%;
+ font-family: inherit;
+ vertical-align: baseline;
+}*/
+
body {
margin: 0px;
padding: 0px;
@@ -72,16 +83,17 @@ li {
input[type=text] {
border: 2px solid #b0b0b0;
padding: 2px;
+ margin: 0px;
-webkit-border-radius: 3px 3px 3px 3px;
-moz-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
}
input[type=submit] {
- margin-top: 10px;
+ margin: 10px 2px 5px 2px;
border: none;
font-size: 0.9em;
- padding: 5px 5px 5px 5px;
+ padding: 5px;
-moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
-webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
box-shadow:inset 0px 1px 0px 0px #cfcfcf;
@@ -115,7 +127,7 @@ input[type=submit]:active {
::-moz-selection { background:#fdf795; color: #000; /* Firefox */ }
section {
- margin: 10px 11% 0px 11%;
+ margin: 20px 11% 0px 11%;
font-size: 0.9em;
line-height: 1.2em;
padding-right: 230px;
@@ -268,23 +280,22 @@ nav #user-menu {
float: right;
margin-right:15px;
margin-top: 10px;
- padding: 3px;
+ padding: 5px;
position: relative;
vertical-align: middle;
- background:-webk/* margin-right:10px;*/it-gradient( linear, left top, left bottom, color-stop(0.05, #797979), color-stop(1, #898988) );
- background:-moz-linear-gradient( center top, #797979 5%, #898988 100% );
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#797979', endColorstr='#898988');
- background-color:#898988;
+ background:-webk/* margin-right:10px;*/it-gradient( linear, left top, left bottom, color-stop(0.05, #898988), color-stop(1, #a2a2a2) );
+ background:-moz-linear-gradient( center top, #898988 5%, #a2a2a2 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#898988', endColorstr='#a2a2a2');
+ background-color:#a2a2a2;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
color:#efefef;
text-decoration:none;
text-align: center;
- border: 1px solid #9a9a9a;
}
-nav #user-menu-label:after{
+nav #user-menu-label::after {
content: url("menu-user-pin.png") no-repeat;
padding-left: 15px;
}
@@ -300,12 +311,13 @@ ul#user-menu-popup {
display: none;
position: absolute;
background:-webk/* margin-right:10px;*/it-gradient( linear, left top, left bottom, color-stop(0.05, #797979), color-stop(1, #898988) );
- background:-moz-linear-gradient( center top, #797979 5%, #898988 100% );
+ background:-moz-linear-gradient( center top, #a2a2a2 5%, #898988 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#797979', endColorstr='#898988');
background-color:#898988;
width: 100%;
padding: 10px 0px;
margin: 0px;
+ margin-top: 10px;
top: 20px;
left: 0px;
border: 1px solid #9a9a9a;
@@ -409,8 +421,11 @@ ul#user-menu-popup li a.nav-sep { border-top: 1px solid #989898; border-style:in
aside {
position: absolute;
- width: 260px;
right: 11%;
+/* float: right;
+ margin-right: 11%;*/
+ width: 260px;
+ margin-top: auto;
font-size: 0.8em;
font-style: bold;
}
@@ -511,7 +526,14 @@ aside #viewcontacts {
#netsearch-box {
background-color: #f6f6f6;
- padding: 10px 10px 10px 20px;
+ /*padding: 10px 10px 10px 20px;*/
+ padding: 10px 8px 10px 8px;
+}
+#netsearch-box input[type="text"] {
+ width: 97%;
+}
+#netsearch-box input[type="submit"] {
+ width: 48%;
}
h3#search:before {
@@ -650,9 +672,10 @@ ul .sidebar-group-li img{
margin-right: 5px;
}
-/**
-* contacts block
-*/
+/* ================== */
+/* = Contacts Block = */
+/* ================== */
+
.contact-block-img {
width: 42px;
height: 42px;
@@ -1074,7 +1097,7 @@ profile-jot-banner-wrapper {
background-position: 35px center;
}
.wall-item-outside-wrapper.comment .wall-item-info { width: 60px; }
-.wall-item-outside-wrapper.comment .wall-item-body { margin-left: 60px; max-width: 600px;}
+.wall-item-outside-wrapper.comment .wall-item-body { margin-left: 60px; max-width: 85%;}
.wall-item-outside-wrapper.comment .wall-item-author { margin-left: 60px;}
.wall-item-outside-wrapper.comment .wall-item-photo-menu {
@@ -1358,6 +1381,7 @@ div[id$="wrapper"] br { clear: left; }
#side-bar-photos-albums li {
font-size: 1.2em;
+ font-variant: none;
}
#photo-top-links {
@@ -1873,11 +1897,15 @@ margin-left: 90px;
.mail-list-subject {
clear: block;
- font-size: 1.5em;
+ font-size: 1.2em;
padding-top: 20px;
padding-right: 50px;
}
+.mail-list-subject a {
+ color: #626262;
+}
+
.mail-list-delete-wrapper { float: left; margin-right:550px; }
.mail-list-outside-wrapper-end {
clear: both;
@@ -2154,7 +2182,7 @@ margin-left: 90px;
}
#follow-sidebar input[type="text"] {
- margin-left: 30px;
+ margin-left: 10px;
margin-bottom: 10px;
}
@@ -2357,24 +2385,6 @@ margin-left: 90px;
padding-top: 10px;
}
-/*#profile-tab-status-link {
- padding: 5px 10px 5px 10px;
- margin-right: 5px;
- margin-top: 10px;
- font-style: bold;
- -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
- -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
- box-shadow:inset 0px 1px 0px 0px #cfcfcf;
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
- background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2');
- background-color:#bdbdbd;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- border-radius:5px;
- color: #efefef;
-}*/
-
#profile-tab-status-link:hover {
border: 0px;
padding: 5px 10px 5px 10px;
@@ -2555,6 +2565,41 @@ margin-left: 90px;
display: inline;
}
#group-delete-icon-11 { position: absolute; left: 360px; top: 103px; }
+.group-delete-wrapper {
+ width: 90px;
+ display: inline;
+ padding: 5px;
+ margin-bottom: 10px;
+ -moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
+ -webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
+ box-shadow:inset 0px 1px 0px 0px #cfcfcf;
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
+ background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2');
+ background-color:#bdbdbd;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ border-radius:5px;
+}
+
+.group-delete-wrapper:hover {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) );
+ background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808');
+ background-color:#b20202;
+}
+
+.group-delete-wrapper:active {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) );
+ background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808');
+ background-color:#b20202;
+}
+
+.group-delete-wrapper a {
+ color: #efefef;
+}
+
#group-edit-desc { margin: 10px 0xp; }
#group-new-text {font-size: 1.1em;}
#group-members,
@@ -2749,8 +2794,8 @@ margin-left: 90px;
}
.calendar {
+ width: 300px;
font-family: Helvetica, Arial, sans-serif;
- padding: 10px;
background-color: #f1f1f1;
border: 1px solid #dedede;
margin-bottom: 10px;
@@ -2764,8 +2809,8 @@ margin-left: 90px;
background:-moz-linear-gradient( center top, #d60808 5%, #b20202 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d60808', endColorstr='#b20202');
background-color: #b20202;
+ padding: 10px 0px 10px 0px;
width: 300px;
- padding: 10px;
color: #ffffff;
font-weight: bold;
text-align:center;