aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2016-01-07 10:47:11 +0100
committermrjive <mrjive@mrjive.it>2016-01-07 10:47:11 +0100
commit0fa34c6880853e64b88749bcf9cc9b9e8c9a198b (patch)
treed66f296749a44506c27f852e3efb261f88adb187
parentdcb5f624137f43e382e529d1484f2b66a85a088c (diff)
parent761afd029d97703f2f7609d546b7b5f3d257c601 (diff)
downloadvolse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.tar.gz
volse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.tar.bz2
volse-hubzilla-0fa34c6880853e64b88749bcf9cc9b9e8c9a198b.zip
Merge pull request #12 from redmatrix/master
updating from original codebase
-rwxr-xr-xboot.php4
-rw-r--r--doc/database/db_term.bb22
-rw-r--r--doc/fr/main.bb12
-rw-r--r--doc/hidden_configs.bb2
-rw-r--r--include/features.php28
-rw-r--r--include/poller.php2
-rw-r--r--include/widgets.php1
-rw-r--r--mod/admin.php74
-rw-r--r--mod/connedit.php12
-rw-r--r--version.inc2
-rwxr-xr-xview/tpl/admin_aside.tpl1
-rw-r--r--view/tpl/admin_settings_features.tpl31
12 files changed, 159 insertions, 32 deletions
diff --git a/boot.php b/boot.php
index a3e35f63c..4c2cff09b 100755
--- a/boot.php
+++ b/boot.php
@@ -47,8 +47,8 @@ require_once('include/AccessList.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
-define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H');
-define ( 'STD_VERSION', '1.0.1' );
+define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
+define ( 'STD_VERSION', '1.1' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1161 );
diff --git a/doc/database/db_term.bb b/doc/database/db_term.bb
index c0546cc6a..e1f6415fa 100644
--- a/doc/database/db_term.bb
+++ b/doc/database/db_term.bb
@@ -1,27 +1,27 @@
[table]
[tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra
[/th][/tr]
-[tr][td]tid[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment
+[tr][td]tid[/td][td]sequential index[/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment
[/td][/tr]
-[tr][td]aid[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
+[tr][td]aid[/td][td]channel_account_id of the controlling channel[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
-[tr][td]uid[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
+[tr][td]uid[/td][td]channel_id of the controlling channel[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td]
[/td][/tr]
-[tr][td]oid[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
+[tr][td]oid[/td][td]DB index of linked thing[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]otype[/td][td][/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
+[tr][td]otype[/td][td]type of linked thing[/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]type[/td][td][/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
+[tr][td]type[/td][td]taxonomy type (See Tag/term types in boot.php)[/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]term[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
+[tr][td]term[/td][td]the actual taxonomy term[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]url[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td]NULL[/td][td]
+[tr][td]url[/td]relevant link (for tags and mentions, a link to the associated resource)[td][/td][td]char(255)[/td][td]NO[/td][td][/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]imgurl[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
+[tr][td]imgurl[/td][td]rarely used - an image associated with this taxonomy term[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td]NULL[/td][td]
[/td][/tr]
-[tr][td]term_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
+[tr][td]term_hash[/td][td]unique hash for this entry[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr]
-[tr][td]parent_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
+[tr][td]parent_hash[/td][td]for hierarchical taxonomies, the hash of the relevant parent[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td]
[/td][/tr]
[/table]
diff --git a/doc/fr/main.bb b/doc/fr/main.bb
new file mode 100644
index 000000000..e46d0440a
--- /dev/null
+++ b/doc/fr/main.bb
@@ -0,0 +1,12 @@
+
+[zrl=[baseurl]/help/about][b]$Projectname c'est quoi ?[/b][/zrl]
+$Projectname est un logiciel de publication et de communication décentralisé qui vous permet de garder le contrôle de vos besoins et de vos données. C'est vous et seulement vous qui décidez qui vous autorisez à voir vos publications.
+
+
+[zrl=[baseurl]/help/features][b]$Projectname fonctionalités[/b][/zrl]
+$Projectname est un réseau global distribué qui est souple et peut monter en puissance depuis un petit site d'une personne jusqu'à pouvant héberger une communauté de nombreuses personnes.
+
+$Projectname fonctionne en tant que réseau global distribué. Il est souple et peut monter en puissance. On peut l'utiliser pour une famille, pour une communauté en ligne, pour des forums, des blogs et des pages web.
+
+[zrl=[baseurl]/help/what_is_zot][b]Zot c'est quoi ?[/b][/zrl]
+Zot est un protocole de communication inventé spécialement pour $Projectname. En tant que membre vous n'êtes plus lié à un site web unique ou à un hub grâce à l'identité nomade. Vous pouvez migrer facilement sur d'autres serveurs et garder vos contacts. Vous pouvez aussi cloner votre cannal et il se trouvera sur plusieurs serveurs. Au cas ou un serveur ne fonctionnerait plus, vous ne perdrez pas vos données. En plus si vous êtes dans $Projectname vous n'aurez plus besoin de vous identifier plusieurs fois même pour accéder à l'autres site $Projectname site. Zot est donc le coeur de $Projectname.
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index 3c7f3d42c..8376187d1 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -159,7 +159,7 @@ This document assumes you're an administrator.
[b]system > hide_help[/b]
Don't display help documentation link in nav bar
[b]system > expire_delivery_reports[/b]
- Expiration in days for delivery reports - default 30
+ Expiration in days for delivery reports - default 10
[b]Directory config[/b]
[b]Directory search defaults[/b]
diff --git a/include/features.php b/include/features.php
index b02d912cf..3cbbf5b7d 100644
--- a/include/features.php
+++ b/include/features.php
@@ -36,7 +36,7 @@ function get_feature_default($feature) {
}
-function get_features() {
+function get_features($filtered = true) {
$arr = array(
@@ -98,20 +98,22 @@ function get_features() {
// removed any locked features and remove the entire category if this makes it empty
- foreach($arr as $k => $x) {
- $has_items = false;
- for($y = 0; $y < count($arr[$k]); $y ++) {
- if(is_array($arr[$k][$y])) {
- if($arr[$k][$y][4] === false) {
- $has_items = true;
- }
- else {
- unset($arr[$k][$y]);
+ if($filtered) {
+ foreach($arr as $k => $x) {
+ $has_items = false;
+ for($y = 0; $y < count($arr[$k]); $y ++) {
+ if(is_array($arr[$k][$y])) {
+ if($arr[$k][$y][4] === false) {
+ $has_items = true;
+ }
+ else {
+ unset($arr[$k][$y]);
+ }
}
}
- }
- if(! $has_items) {
- unset($arr[$k]);
+ if(! $has_items) {
+ unset($arr[$k]);
+ }
}
}
diff --git a/include/poller.php b/include/poller.php
index 031fb4533..808b54ee5 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -205,7 +205,7 @@ function poller_run($argv, $argc){
$keep_reports = intval(get_config('system','expire_delivery_reports'));
if($keep_reports === 0)
- $keep_reports = 30;
+ $keep_reports = 10;
q("delete from dreport where dreport_time < %s - INTERVAL %s",
db_utcnow(),
diff --git a/include/widgets.php b/include/widgets.php
index 0f170fd52..a7d06d39e 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1217,6 +1217,7 @@ function widget_admin($arr) {
'site' => array(z_root() . '/admin/site/', t('Site'), 'site'),
'users' => array(z_root() . '/admin/users/', t('Accounts'), 'users'),
'channels' => array(z_root() . '/admin/channels/', t('Channels'), 'channels'),
+ 'features' => array(z_root() . '/admin/features/', t('Features'), 'features'),
'plugins' => array(z_root() . '/admin/plugins/', t('Plugins'), 'plugins'),
'themes' => array(z_root() . '/admin/themes/', t('Themes'), 'themes'),
'queue' => array(z_root() . '/admin/queue', t('Inspect queue'), 'queue'),
diff --git a/mod/admin.php b/mod/admin.php
index 85ab3627c..c175a4a61 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -62,6 +62,9 @@ function admin_post(&$a){
case 'hubloc':
admin_page_hubloc_post($a);
break;
+ case 'features':
+ admin_page_features_post($a);
+ break;
case 'dbsync':
admin_page_dbsync_post($a);
break;
@@ -113,6 +116,9 @@ function admin_content(&$a) {
// case 'hubloc':
// $o = admin_page_hubloc($a);
// break;
+ case 'features':
+ $o = admin_page_features($a);
+ break;
case 'logs':
$o = admin_page_logs($a);
break;
@@ -530,6 +536,74 @@ function admin_page_hubloc_post(&$a){
goaway($a->get_baseurl(true) . '/admin/hubloc' );
}
+
+function admin_page_features_post(&$a) {
+
+ check_form_security_token_redirectOnErr('/admin/features', 'admin_manage_features');
+
+ logger('postvars: ' . print_r($_POST,true));
+
+ $arr = array();
+ $features = get_features(false);
+
+ foreach($features as $fname => $fdata) {
+ foreach(array_slice($fdata,1) as $f) {
+ $feature = $f[0];
+
+ if(array_key_exists('feature_' . $feature,$_POST))
+ $val = intval($_POST['feature_' . $feature]);
+ else
+ $val = 0;
+ set_config('feature',$feature,$val);
+
+ if(array_key_exists('featurelock_' . $feature,$_POST))
+ set_config('feature_lock',$feature,$val);
+ else
+ del_config('feature_lock',$feature);
+ }
+ }
+
+ goaway(z_root() . '/admin/features' );
+
+}
+
+function admin_page_features(&$a) {
+
+ if((argc() > 1) && (argv(1) === 'features')) {
+ $arr = array();
+ $features = get_features(false);
+
+ foreach($features as $fname => $fdata) {
+ $arr[$fname] = array();
+ $arr[$fname][0] = $fdata[0];
+ foreach(array_slice($fdata,1) as $f) {
+
+ $set = get_config('feature',$f[0]);
+ if($set === false)
+ $set = $f[3];
+ $arr[$fname][1][] = array(
+ array('feature_' .$f[0],$f[1],$set,$f[2],array(t('Off'),t('On'))),
+ array('featurelock_' .$f[0],sprintf( t('Lock feature %s'),$f[1]),(($f[4] !== false) ? 1 : 0),'',array(t('Off'),t('On')))
+ );
+ }
+ }
+
+ $tpl = get_markup_template("admin_settings_features.tpl");
+ $o .= replace_macros($tpl, array(
+ '$form_security_token' => get_form_security_token("admin_manage_features"),
+ '$title' => t('Manage Additional Features'),
+ '$features' => $arr,
+ '$submit' => t('Submit'),
+ ));
+
+ return $o;
+ }
+}
+
+
+
+
+
function admin_page_hubloc(&$a) {
$hubloc = q("SELECT hubloc_id, hubloc_addr, hubloc_host, hubloc_status FROM hubloc");
diff --git a/mod/connedit.php b/mod/connedit.php
index 9c46fa999..77b54d262 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -397,7 +397,6 @@ function connedit_content(&$a) {
}
if($cmd === 'update') {
-
// pull feed and consume it, which should subscribe to the hub.
proc_run('php',"include/poller.php","$contact_id");
goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
@@ -405,8 +404,15 @@ function connedit_content(&$a) {
}
if($cmd === 'refresh') {
- if(! zot_refresh($orig_record[0],get_app()->get_channel()))
- notice( t('Refresh failed - channel is currently unavailable.') );
+ if($orig_record[0]['xchan_network'] === 'zot') {
+ if(! zot_refresh($orig_record[0],get_app()->get_channel()))
+ notice( t('Refresh failed - channel is currently unavailable.') );
+ }
+ else {
+
+ // if you are on a different network we'll force a refresh of the connection basic info
+ proc_run('php','include/notifier.php','permission_update',$contact_id);
+ }
goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
}
diff --git a/version.inc b/version.inc
index 8a363fc45..be2d3de4a 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2016-01-04.1268H
+2016-01-06.1270H
diff --git a/view/tpl/admin_aside.tpl b/view/tpl/admin_aside.tpl
index 57ac7f3e1..0a77ef73c 100755
--- a/view/tpl/admin_aside.tpl
+++ b/view/tpl/admin_aside.tpl
@@ -19,6 +19,7 @@
<li><a href='{{$admin.queue.0}}'>{{$admin.queue.1}}</a></li>
<li><a href='{{$admin.plugins.0}}'>{{$admin.plugins.1}}</a></li>
<li><a href='{{$admin.themes.0}}'>{{$admin.themes.1}}</a></li>
+ <li><a href='{{$admin.features.0}}'>{{$admin.features.1}}</a></li>
<li><a href='{{$admin.dbsync.0}}'>{{$admin.dbsync.1}}</a></li>
</ul>
</div>
diff --git a/view/tpl/admin_settings_features.tpl b/view/tpl/admin_settings_features.tpl
new file mode 100644
index 000000000..2d5cf7e0b
--- /dev/null
+++ b/view/tpl/admin_settings_features.tpl
@@ -0,0 +1,31 @@
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+ <form action="admin/features" method="post" autocomplete="off">
+ <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+ <div class="panel-group" id="settings" role="tablist" aria-multiselectable="true">
+ {{foreach $features as $g => $f}}
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title">
+ <h3>
+ <a data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-collapse">
+ {{$f.0}}
+ </a>
+ </h3>
+ </div>
+ <div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} in{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
+ <div class="section-content-tools-wrapper">
+ {{foreach $f.1 as $fcat}}
+ {{include file="field_checkbox.tpl" field=$fcat.0}}
+ {{include file="field_checkbox.tpl" field=$fcat.1}}
+ {{/foreach}}
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/foreach}}
+ </div>
+</div>