aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Apps.php3
-rw-r--r--Zotlabs/Module/Articles.php2
-rw-r--r--Zotlabs/Module/Lang.php19
-rw-r--r--Zotlabs/Module/Setup.php11
-rw-r--r--Zotlabs/Update/_1220.php47
-rw-r--r--Zotlabs/Web/SubModule.php17
-rwxr-xr-xboot.php3
-rw-r--r--include/import.php3
-rwxr-xr-xinclude/items.php11
-rw-r--r--include/zot.php14
-rw-r--r--install/schema_mysql.sql11
-rw-r--r--install/schema_postgres.sql11
12 files changed, 136 insertions, 16 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 6b87ac6cb..aa7e2282d 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -722,6 +722,9 @@ class Apps {
);
if($r) {
+ $hookinfo = Array('uid'=>$uid,'deleted'=>$deleted,'cats'=>$cats,'apps'=>$r);
+ call_hooks('app_list',$hookinfo);
+ $r = $hookinfo['apps'];
for($x = 0; $x < count($r); $x ++) {
if(! $r[$x]['app_system'])
$r[$x]['type'] = 'personal';
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index d622b221a..7af1ab6b8 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -45,7 +45,7 @@ class Articles extends Controller {
return $o;
}
- nav_set_selected(t('Articles'));
+ nav_set_selected('Articles');
head_add_link([
'rel' => 'alternate',
diff --git a/Zotlabs/Module/Lang.php b/Zotlabs/Module/Lang.php
index 0e5d85d05..9858beecd 100644
--- a/Zotlabs/Module/Lang.php
+++ b/Zotlabs/Module/Lang.php
@@ -1,13 +1,28 @@
<?php
namespace Zotlabs\Module;
+use App;
+use Zotlabs\Lib\Apps;
+use Zotlabs\Web\Controller;
-class Lang extends \Zotlabs\Web\Controller {
+class Lang extends Controller {
function get() {
+
+ if(local_channel()) {
+ if(! Apps::system_app_installed(local_channel(), 'Language')) {
+ //Do not display any associated widgets at this point
+ App::$pdl = '';
+
+ $o = '<b>Language App (Not Installed):</b><br>';
+ $o .= t('Change UI language');
+ return $o;
+ }
+ }
+
nav_set_selected('Language');
return lang_selector();
+
}
-
}
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index a3832d156..50b40834b 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -526,14 +526,21 @@ class Setup extends \Zotlabs\Web\Controller {
$ck_funcs[0]['status'] = false;
$ck_funcs[0]['help'] = t('Error: libCURL PHP module required but not installed.');
}
- if(! function_exists('imagecreatefromjpeg')) {
+ if((! function_exists('imagecreatefromjpeg')) || (! class_exists('Imagick'))) {
$ck_funcs[1]['status'] = false;
- $ck_funcs[1]['help'] = t('Error: GD graphics PHP module with JPEG support required but not installed.');
+ $ck_funcs[1]['help'] = t('Error: GD PHP module with JPEG support or ImageMagick graphics library required but not installed.');
}
if(! function_exists('openssl_public_encrypt')) {
$ck_funcs[2]['status'] = false;
$ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.');
}
+ if(class_exists('PDO')) {
+ $x = PDO::getAvailableDrivers();
+ if((! in_array('mysql',$x)) && (! in_array('pgsql',$x))) {
+ $ck_funcs[3]['status'] = false;
+ $ck_funcs[3]['help'] = t('Error: PDO database PHP module missing a driver for either mysql or pgsql.');
+ }
+ }
if(! class_exists('PDO')) {
$ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: PDO database PHP module required but not installed.');
diff --git a/Zotlabs/Update/_1220.php b/Zotlabs/Update/_1220.php
new file mode 100644
index 000000000..adcb8c9c6
--- /dev/null
+++ b/Zotlabs/Update/_1220.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1220 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("CREATE TABLE listeners (
+ id serial NOT NULL,
+ target_id text NOT NULL,
+ portable_id text NOT NULL,
+ ltype smallint NOT NULL DEFAULT '0',
+ PRIMARY KEY (id)
+)");
+
+ $r2 = q("create index \"target_id_idx\" on listeners (\"target_id\")");
+ $r3 = q("create index \"portable_id_idx\" on listeners (\"portable_id\")");
+ $r4 = q("create index \"ltype_idx\" on listeners (\"ltype\")");
+
+ $r = $r1 && $r2 && $r3 && $r4;
+
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r = q("CREATE TABLE IF NOT EXISTS listeners (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ target_id varchar(191) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
+ portable_id varchar(191) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
+ ltype int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (id),
+ KEY target_id (target_id),
+ KEY portable_id (portable_id),
+ KEY ltype (ltype)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+
+ }
+
+ if($r) {
+ return UPDATE_SUCCESS;
+ }
+ return UPDATE_FAILED;
+
+ }
+
+}
diff --git a/Zotlabs/Web/SubModule.php b/Zotlabs/Web/SubModule.php
index 7c8404201..763a55d86 100644
--- a/Zotlabs/Web/SubModule.php
+++ b/Zotlabs/Web/SubModule.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Web;
+use Zotlabs\Extend\Route;
+
/*
* @brief
*
@@ -31,9 +33,23 @@ class SubModule {
$filename = 'Zotlabs/Module/' . ucfirst(argv(0)) . '/'. ucfirst(argv($whicharg)) . '.php';
$modname = '\\Zotlabs\\Module\\' . ucfirst(argv(0)) . '\\' . ucfirst(argv($whicharg));
+
if(file_exists($filename)) {
$this->controller = new $modname();
}
+
+ $routes = Route::get();
+
+ if($routes) {
+ foreach($routes as $route) {
+ if(is_array($route) && strtolower($route[1]) === strtolower(argv(0)) . '/' . strtolower(argv($whicharg))) {
+ include_once($route[0]);
+ if(class_exists($modname)) {
+ $this->controller = new $modname;
+ }
+ }
+ }
+ }
}
/**
@@ -43,6 +59,7 @@ class SubModule {
* @return boolean|mixed
*/
function call($method) {
+
if(! $this->controller)
return false;
diff --git a/boot.php b/boot.php
index 93963648e..e8c1355e8 100755
--- a/boot.php
+++ b/boot.php
@@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.7.3' );
define ( 'ZOT_REVISION', '6.0a' );
-define ( 'DB_UPDATE_VERSION', 1219 );
+define ( 'DB_UPDATE_VERSION', 1220 );
define ( 'PROJECT_BASE', __DIR__ );
@@ -424,6 +424,7 @@ define ( 'TERM_BOOKMARK', 8 );
define ( 'TERM_HIERARCHY', 9 );
define ( 'TERM_COMMUNITYTAG', 10 );
define ( 'TERM_FORUM', 11 );
+define ( 'TERM_EMOJI', 12 );
define ( 'TERM_OBJ_POST', 1 );
define ( 'TERM_OBJ_PHOTO', 2 );
diff --git a/include/import.php b/include/import.php
index 91a26b23b..0fc24a26f 100644
--- a/include/import.php
+++ b/include/import.php
@@ -93,7 +93,8 @@ function import_channel($channel, $account_id, $seize, $newname = '') {
'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt',
- 'channel_moved'
+ 'channel_moved', 'channel_primary', 'channel_removed', 'channel_deleted',
+ 'channel_system'
];
$clean = array();
diff --git a/include/items.php b/include/items.php
index b0f6a89cf..c817c5afb 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3997,6 +3997,7 @@ function zot_feed($uid, $observer_hash, $arr) {
$result = array();
$mindate = null;
$message_id = null;
+ $wall = true;
require_once('include/security.php');
@@ -4008,6 +4009,10 @@ function zot_feed($uid, $observer_hash, $arr) {
$message_id = $arr['message_id'];
}
+ if(array_key_exists('wall',$arr)) {
+ $wall = intval($arr['wall']);
+ }
+
if(! $mindate)
$mindate = NULL_DATE;
@@ -4036,6 +4041,10 @@ function zot_feed($uid, $observer_hash, $arr) {
$limit = '';
}
+ if($wall) {
+ $sql_extra .= " and item_wall = 1 ";
+ }
+
$items = [];
@@ -4048,7 +4057,6 @@ function zot_feed($uid, $observer_hash, $arr) {
$r = q("SELECT parent, postopts FROM item
WHERE uid IN ( %s )
- AND item_wall = 1
AND item_private = 0
$item_normal
$sql_extra ORDER BY created ASC $limit",
@@ -4058,7 +4066,6 @@ function zot_feed($uid, $observer_hash, $arr) {
else {
$r = q("SELECT parent, postopts FROM item
WHERE uid = %d
- AND item_wall = 1
$item_normal
$sql_extra ORDER BY created ASC $limit",
intval($uid)
diff --git a/include/zot.php b/include/zot.php
index e8ac2df02..b29e86dfa 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3573,13 +3573,13 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
$disallowed = [
- 'channel_id', 'channel_account_id', 'channel_primary', 'channel_prvkey',
- 'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_deleted',
- 'channel_system', 'channel_r_stream', 'channel_r_profile', 'channel_r_abook',
- 'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall',
- 'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
- 'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
- 'channel_a_delegate'
+ 'channel_id', 'channel_account_id', 'channel_primary', 'channel_prvkey',
+ 'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_deleted',
+ 'channel_system', 'channel_r_stream', 'channel_r_profile', 'channel_r_abook',
+ 'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall',
+ 'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
+ 'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
+ 'channel_a_delegate', 'channel_moved'
];
$clean = array();
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 7fd2cfea8..9b78ae8d4 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -736,6 +736,17 @@ CREATE TABLE IF NOT EXISTS `likes` (
KEY `target_id` (`target_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+CREATE TABLE IF NOT EXISTS listeners (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ target_id varchar(191) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
+ portable_id varchar(191) CHARACTER SET utf8mb4 NOT NULL DEFAULT '',
+ ltype int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (id),
+ KEY target_id (target_id),
+ KEY portable_id (portable_id),
+ KEY ltype (ltype)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`convid` int(10) unsigned NOT NULL DEFAULT 0 ,
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 68c65c830..7f118646e 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -718,6 +718,17 @@ create index "likes_i_mid" on likes ("i_mid");
create index "likes_verb" on likes ("verb");
create index "likes_target_type" on likes ("target_type");
create index "likes_target_id" on likes ("target_id");
+CREATE TABLE listeners (
+ id serial NOT NULL,
+ target_id text NOT NULL,
+ portable_id text NOT NULL,
+ ltype smallint NOT NULL DEFAULT '0',
+ PRIMARY KEY (id)
+);
+create index "target_id_idx" on listeners ("target_id");
+create index "portable_id_idx" on listeners ("portable_id");
+create index "ltype_idx" on listeners ("ltype");
+
CREATE TABLE "mail" (
"id" serial NOT NULL,
"convid" bigint NOT NULL DEFAULT '0',