issues from hubzilla:#737
This commit is contained in:
parent
b88be137ca
commit
6fcfab3488
@ -83,7 +83,7 @@ class DB_Upgrade {
|
|||||||
file_put_contents($lockfile, $x);
|
file_put_contents($lockfile, $x);
|
||||||
|
|
||||||
$r = q("select account_language from account where account_email = '%s' limit 1",
|
$r = q("select account_language from account where account_email = '%s' limit 1",
|
||||||
dbesc(App::$config['system']['admin_email'])
|
dbesc(\App::$config['system']['admin_email'])
|
||||||
);
|
);
|
||||||
push_lang(($r) ? $r[0]['account_language'] : 'en');
|
push_lang(($r) ? $r[0]['account_language'] : 'en');
|
||||||
|
|
||||||
|
@ -101,11 +101,11 @@ class NativeWiki {
|
|||||||
static public function sync_a_wiki_item($uid,$id,$resource_id) {
|
static public function sync_a_wiki_item($uid,$id,$resource_id) {
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT * from item WHERE uid = %d AND ( id = %d OR ( resource_type = '%s' and resource_id = %d )) ",
|
$r = q("SELECT * from item WHERE uid = %d AND ( id = %d OR ( resource_type = '%s' and resource_id = '%s' )) ",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
intval($id),
|
intval($id),
|
||||||
dbesc(NWIKI_ITEM_RESOURCE_TYPE),
|
dbesc(NWIKI_ITEM_RESOURCE_TYPE),
|
||||||
intval($resource_id)
|
dbesc($resource_id)
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
xchan_query($r);
|
xchan_query($r);
|
||||||
|
@ -21,12 +21,23 @@ class NativeWikiPage {
|
|||||||
$sql_extra = item_permissions_sql($channel_id,$observer_hash);
|
$sql_extra = item_permissions_sql($channel_id,$observer_hash);
|
||||||
|
|
||||||
$r = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s' and uid = %d and item_deleted = 0
|
$r = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s' and uid = %d and item_deleted = 0
|
||||||
$sql_extra group by mid order by created asc",
|
$sql_extra order by created asc",
|
||||||
dbesc($resource_id),
|
dbesc($resource_id),
|
||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
if($r) {
|
if($r) {
|
||||||
$items = fetch_post_tags($r,true);
|
$x = [];
|
||||||
|
$y = [];
|
||||||
|
|
||||||
|
foreach($r as $rv) {
|
||||||
|
if(! in_array($rv['mid'],$x)) {
|
||||||
|
$y[] = $rv;
|
||||||
|
$x[] = $rv['mid'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$items = fetch_post_tags($y,true);
|
||||||
|
|
||||||
foreach($items as $page_item) {
|
foreach($items as $page_item) {
|
||||||
$title = get_iconfig($page_item['id'],'nwikipage','pagetitle',t('(No Title)'));
|
$title = get_iconfig($page_item['id'],'nwikipage','pagetitle',t('(No Title)'));
|
||||||
if(urldecode($title) !== 'Home') {
|
if(urldecode($title) !== 'Home') {
|
||||||
|
@ -2512,8 +2512,8 @@ function update_r1187() {
|
|||||||
|
|
||||||
function update_r1188() {
|
function update_r1188() {
|
||||||
|
|
||||||
$r1 = q("alter table channel add channel_password varchar(255) not null ");
|
$r1 = q("alter table channel add channel_password varchar(255) not null default '' ");
|
||||||
$r2 = q("alter table channel add channel_salt varchar(255) not null ");
|
$r2 = q("alter table channel add channel_salt varchar(255) not null default '' ");
|
||||||
|
|
||||||
if($r1 && $r2)
|
if($r1 && $r2)
|
||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
|
Reference in New Issue
Block a user