aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-01 10:00:44 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-01 10:00:44 +0200
commitb4eb9f2a1142cf121dd41ea0ad81475d38343308 (patch)
treefa32a8f59c863564998cd149a902388dd363d605 /Zotlabs/Module
parent380f65d309a6ab01d8e804f704962d5baef9820a (diff)
parentc1039977f1d64611d2c793f3aded96d031b74183 (diff)
downloadvolse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.tar.gz
volse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.tar.bz2
volse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.zip
Merge branch 'sabre32' of https://github.com/redmatrix/hubzilla into sabre32
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Acl.php8
-rw-r--r--Zotlabs/Module/Api.php2
-rw-r--r--Zotlabs/Module/Chat.php2
-rw-r--r--Zotlabs/Module/Contactgroup.php4
-rw-r--r--Zotlabs/Module/Events.php2
-rw-r--r--Zotlabs/Module/Filer.php2
-rw-r--r--Zotlabs/Module/Filerm.php2
-rw-r--r--Zotlabs/Module/Fsuggest.php117
-rw-r--r--Zotlabs/Module/Group.php14
-rw-r--r--Zotlabs/Module/Import.php6
-rw-r--r--Zotlabs/Module/Item.php8
-rw-r--r--Zotlabs/Module/Lockview.php8
-rw-r--r--Zotlabs/Module/Network.php2
-rw-r--r--Zotlabs/Module/Photos.php2
-rw-r--r--Zotlabs/Module/Profiles.php39
-rw-r--r--Zotlabs/Module/Search.php2
-rw-r--r--Zotlabs/Module/Search_ac.php2
-rw-r--r--Zotlabs/Module/Settings.php14
-rw-r--r--Zotlabs/Module/Tagrm.php2
19 files changed, 60 insertions, 178 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index 62ac29286..7bc197a93 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -53,13 +53,13 @@ class Acl extends \Zotlabs\Web\Controller {
if ($type=='' || $type=='g'){
- $r = q("SELECT `groups`.`id`, `groups`.`hash`, `groups`.`name`
+ $r = q("SELECT `groups`.`id`, `groups`.`hash`, `groups`.`gname`
FROM `groups`,`group_member`
WHERE `groups`.`deleted` = 0 AND `groups`.`uid` = %d
AND `group_member`.`gid`=`groups`.`id`
$sql_extra
GROUP BY `groups`.`id`
- ORDER BY `groups`.`name`
+ ORDER BY `groups`.`gname`
LIMIT %d OFFSET %d",
intval(local_channel()),
intval($count),
@@ -67,11 +67,11 @@ class Acl extends \Zotlabs\Web\Controller {
);
foreach($r as $g){
- // logger('acl: group: ' . $g['name'] . ' members: ' . group_get_members_xchan($g['id']));
+ // logger('acl: group: ' . $g['gname'] . ' members: ' . group_get_members_xchan($g['id']));
$groups[] = array(
"type" => "g",
"photo" => "images/twopeople.png",
- "name" => $g['name'],
+ "name" => $g['gname'],
"id" => $g['id'],
"xid" => $g['hash'],
"uids" => group_get_members_xchan($g['id']),
diff --git a/Zotlabs/Module/Api.php b/Zotlabs/Module/Api.php
index 3e7f23b6c..e4744c29f 100644
--- a/Zotlabs/Module/Api.php
+++ b/Zotlabs/Module/Api.php
@@ -107,7 +107,7 @@ class Api extends \Zotlabs\Web\Controller {
$r = q("SELECT `clients`.*
FROM `clients`, `tokens`
WHERE `clients`.`client_id`=`tokens`.`client_id`
- AND `tokens`.`id`='%s' AND `tokens`.`scope`='request'",
+ AND `tokens`.`id`='%s' AND `tokens`.`auth_scope`='request'",
dbesc($token));
if (!count($r))
diff --git a/Zotlabs/Module/Chat.php b/Zotlabs/Module/Chat.php
index d14c32b7d..026e8369a 100644
--- a/Zotlabs/Module/Chat.php
+++ b/Zotlabs/Module/Chat.php
@@ -243,7 +243,7 @@ class Chat extends \Zotlabs\Web\Controller {
$rooms = Zlib\Chatroom::roomlist(\App::$profile['profile_uid']);
$o .= replace_macros(get_markup_template('chatrooms.tpl'), array(
- '$header' => sprintf( t('%1$s\'s Chatrooms'), \App::$profile['name']),
+ '$header' => sprintf( t('%1$s\'s Chatrooms'), \App::$profile['fullname']),
'$name' => t('Name'),
'$baseurl' => z_root(),
'$nickname' => \App::$profile['channel_address'],
diff --git a/Zotlabs/Module/Contactgroup.php b/Zotlabs/Module/Contactgroup.php
index 497442ff4..bbe56b4ad 100644
--- a/Zotlabs/Module/Contactgroup.php
+++ b/Zotlabs/Module/Contactgroup.php
@@ -41,10 +41,10 @@ class Contactgroup extends \Zotlabs\Web\Controller {
if($change) {
if(in_array($change,$preselected)) {
- group_rmv_member(local_channel(),$group['name'],$change);
+ group_rmv_member(local_channel(),$group['gname'],$change);
}
else {
- group_add_member(local_channel(),$group['name'],$change);
+ group_add_member(local_channel(),$group['gname'],$change);
}
}
}
diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php
index 2b5e239f9..3996473b7 100644
--- a/Zotlabs/Module/Events.php
+++ b/Zotlabs/Module/Events.php
@@ -171,7 +171,7 @@ class Events extends \Zotlabs\Web\Controller {
foreach($cats as $cat) {
$post_tags[] = array(
'uid' => $profile_uid,
- 'type' => TERM_CATEGORY,
+ 'ttype' => TERM_CATEGORY,
'otype' => TERM_OBJ_POST,
'term' => trim($cat),
'url' => $channel['xchan_url'] . '?f=&cat=' . urlencode(trim($cat))
diff --git a/Zotlabs/Module/Filer.php b/Zotlabs/Module/Filer.php
index 607d088db..6a57cdb2a 100644
--- a/Zotlabs/Module/Filer.php
+++ b/Zotlabs/Module/Filer.php
@@ -39,7 +39,7 @@ class Filer extends \Zotlabs\Web\Controller {
}
else {
$filetags = array();
- $r = q("select distinct(term) from term where uid = %d and type = %d order by term asc",
+ $r = q("select distinct(term) from term where uid = %d and ttype = %d order by term asc",
intval(local_channel()),
intval(TERM_FILE)
);
diff --git a/Zotlabs/Module/Filerm.php b/Zotlabs/Module/Filerm.php
index eb9a42c1e..cbf6a118d 100644
--- a/Zotlabs/Module/Filerm.php
+++ b/Zotlabs/Module/Filerm.php
@@ -22,7 +22,7 @@ class Filerm extends \Zotlabs\Web\Controller {
logger('filerm: tag ' . $term . ' item ' . $item_id);
if($item_id && strlen($term)) {
- $r = q("delete from term where uid = %d and type = %d and oid = %d and term = '%s'",
+ $r = q("delete from term where uid = %d and ttype = %d and oid = %d and term = '%s'",
intval(local_channel()),
intval(($category) ? TERM_CATEGORY : TERM_FILE),
intval($item_id),
diff --git a/Zotlabs/Module/Fsuggest.php b/Zotlabs/Module/Fsuggest.php
deleted file mode 100644
index a371f9d21..000000000
--- a/Zotlabs/Module/Fsuggest.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-
-class Fsuggest extends \Zotlabs\Web\Controller {
-
- function post() {
-
- if(! local_channel()) {
- return;
- }
-
- if(\App::$argc != 2)
- return;
-
- $contact_id = intval(\App::$argv[1]);
-
- $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($contact_id),
- intval(local_channel())
- );
- if(! count($r)) {
- notice( t('Contact not found.') . EOL);
- return;
- }
- $contact = $r[0];
-
- $new_contact = intval($_POST['suggest']);
-
- $hash = random_string();
-
- $note = escape_tags(trim($_POST['note']));
-
- if($new_contact) {
- $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($new_contact),
- intval(local_channel())
- );
- if(count($r)) {
-
- $x = q("INSERT INTO `fsuggest` ( `uid`,`cid`,`name`,`url`,`request`,`photo`,`note`,`created`)
- VALUES ( %d, %d, '%s','%s','%s','%s','%s','%s')",
- intval(local_channel()),
- intval($contact_id),
- dbesc($r[0]['name']),
- dbesc($r[0]['url']),
- dbesc($r[0]['request']),
- dbesc($r[0]['photo']),
- dbesc($hash),
- dbesc(datetime_convert())
- );
- $r = q("SELECT `id` FROM `fsuggest` WHERE `note` = '%s' AND `uid` = %d LIMIT 1",
- dbesc($hash),
- intval(local_channel())
- );
- if(count($r)) {
- $fsuggest_id = $r[0]['id'];
- q("UPDATE `fsuggest` SET `note` = '%s' WHERE `id` = %d AND `uid` = %d",
- dbesc($note),
- intval($fsuggest_id),
- intval(local_channel())
- );
- \Zotlabs\Daemon\Master::Summon(array('Notifier', 'suggest' , $fsuggest_id));
- }
-
- info( t('Friend suggestion sent.') . EOL);
- }
-
- }
-
-
- }
-
-
-
- function get() {
-
- require_once('include/acl_selectors.php');
-
- if(! local_channel()) {
- notice( t('Permission denied.') . EOL);
- return;
- }
-
- if(\App::$argc != 2)
- return;
-
- $contact_id = intval(\App::$argv[1]);
-
- $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($contact_id),
- intval(local_channel())
- );
- if(! count($r)) {
- notice( t('Contact not found.') . EOL);
- return;
- }
- $contact = $r[0];
-
- $o = '<h3>' . t('Suggest Friends') . '</h3>';
-
- $o .= '<div id="fsuggest-desc" >' . sprintf( t('Suggest a friend for %s'), $contact['name']) . '</div>';
-
- $o .= '<form id="fsuggest-form" action="fsuggest/' . $contact_id . '" method="post" >';
-
- // FIXME contact_selector deprecated, removed
- // $o .= contact_selector('suggest','suggest-select', false,
- // array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true));
-
-
- $o .= '<div id="fsuggest-submit-wrapper"><input id="fsuggest-submit" type="submit" name="submit" value="' . t('Submit') . '" /></div>';
- $o .= '</form>';
-
- return $o;
- }
-}
diff --git a/Zotlabs/Module/Group.php b/Zotlabs/Module/Group.php
index 144797baf..254ee6ef2 100644
--- a/Zotlabs/Module/Group.php
+++ b/Zotlabs/Module/Group.php
@@ -47,8 +47,8 @@ class Group extends \Zotlabs\Web\Controller {
$groupname = notags(trim($_POST['groupname']));
$public = intval($_POST['public']);
- if((strlen($groupname)) && (($groupname != $group['name']) || ($public != $group['visible']))) {
- $r = q("UPDATE `groups` SET `name` = '%s', visible = %d WHERE `uid` = %d AND `id` = %d",
+ if((strlen($groupname)) && (($groupname != $group['gname']) || ($public != $group['visible']))) {
+ $r = q("UPDATE `groups` SET `gname` = '%s', visible = %d WHERE `uid` = %d AND `id` = %d",
dbesc($groupname),
intval($public),
intval(local_channel()),
@@ -106,7 +106,7 @@ class Group extends \Zotlabs\Web\Controller {
intval(local_channel())
);
if($r)
- $result = group_rmv(local_channel(),$r[0]['name']);
+ $result = group_rmv(local_channel(),$r[0]['gname']);
if($result)
info( t('Privacy group removed.') . EOL);
else
@@ -156,10 +156,10 @@ class Group extends \Zotlabs\Web\Controller {
if($change) {
if(in_array($change,$preselected)) {
- group_rmv_member(local_channel(),$group['name'],$change);
+ group_rmv_member(local_channel(),$group['gname'],$change);
}
else {
- group_add_member(local_channel(),$group['name'],$change);
+ group_add_member(local_channel(),$group['gname'],$change);
}
$members = group_get_members($group['id']);
@@ -181,7 +181,7 @@ class Group extends \Zotlabs\Web\Controller {
$context = $context + array(
'$title' => t('Privacy group editor'),
- '$gname' => array('groupname',t('Privacy group name: '),$group['name'], ''),
+ '$gname' => array('groupname',t('Privacy group name: '),$group['gname'], ''),
'$gid' => $group['id'],
'$drop' => $drop_txt,
'$public' => array('public',t('Members are visible to other channels'), $group['visible'], ''),
@@ -209,7 +209,7 @@ class Group extends \Zotlabs\Web\Controller {
$groupeditor['members'][] = micropro($member,true,'mpgroup', $textmode);
}
else
- group_rmv_member(local_channel(),$group['name'],$member['xchan_hash']);
+ group_rmv_member(local_channel(),$group['gname'],$member['xchan_hash']);
}
$r = q("SELECT abook.*, xchan.* FROM `abook` left join xchan on abook_xchan = xchan_hash WHERE `abook_channel` = %d AND abook_self = 0 and abook_blocked = 0 and abook_pending = 0 and xchan_deleted = 0 order by xchan_name asc",
diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php
index 57ced22a3..122e27e90 100644
--- a/Zotlabs/Module/Import.php
+++ b/Zotlabs/Module/Import.php
@@ -408,8 +408,12 @@ class Import extends \Zotlabs\Web\Controller {
$saved = array();
foreach($groups as $group) {
$saved[$group['hash']] = array('old' => $group['id']);
+ if(array_key_exists('name',$group)) {
+ $group['gname'] = $group['name'];
+ unset($group['name']);
+ }
unset($group['id']);
- $group['uid'] = $channel['channel_id'];
+ $group['uid'] = $channel['channel_id'];
dbesc_array($group);
$r = dbq("INSERT INTO groups (`"
. implode("`, `", array_keys($group))
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 041939ad8..2601feb0a 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -581,7 +581,7 @@ class Item extends \Zotlabs\Web\Controller {
if($success['replaced']) {
$post_tags[] = array(
'uid' => $profile_uid,
- 'type' => $success['termtype'],
+ 'ttype' => $success['termtype'],
'otype' => TERM_OBJ_POST,
'term' => $success['term'],
'url' => $success['url']
@@ -666,7 +666,7 @@ class Item extends \Zotlabs\Web\Controller {
foreach($cats as $cat) {
$post_tags[] = array(
'uid' => $profile_uid,
- 'type' => TERM_CATEGORY,
+ 'ttype' => TERM_CATEGORY,
'otype' => TERM_OBJ_POST,
'term' => trim($cat),
'url' => $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat))
@@ -676,7 +676,7 @@ class Item extends \Zotlabs\Web\Controller {
if($orig_post) {
// preserve original tags
- $t = q("select * from term where oid = %d and otype = %d and uid = %d and type in ( %d, %d, %d )",
+ $t = q("select * from term where oid = %d and otype = %d and uid = %d and ttype in ( %d, %d, %d )",
intval($orig_post['id']),
intval(TERM_OBJ_POST),
intval($profile_uid),
@@ -688,7 +688,7 @@ class Item extends \Zotlabs\Web\Controller {
foreach($t as $t1) {
$post_tags[] = array(
'uid' => $profile_uid,
- 'type' => $t1['type'],
+ 'ttype' => $t1['type'],
'otype' => TERM_OBJ_POST,
'term' => $t1['term'],
'url' => $t1['url'],
diff --git a/Zotlabs/Module/Lockview.php b/Zotlabs/Module/Lockview.php
index 0df0dd4da..4776e1c56 100644
--- a/Zotlabs/Module/Lockview.php
+++ b/Zotlabs/Module/Lockview.php
@@ -88,10 +88,10 @@ class Lockview extends \Zotlabs\Web\Controller {
stringify_array_elms($deny_users,true);
if(count($allowed_groups)) {
- $r = q("SELECT name FROM `groups` WHERE hash IN ( " . implode(', ', $allowed_groups) . " )");
+ $r = q("SELECT gname FROM `groups` WHERE hash IN ( " . implode(', ', $allowed_groups) . " )");
if($r)
foreach($r as $rr)
- $l[] = '<li><b>' . $rr['name'] . '</b></li>';
+ $l[] = '<li><b>' . $rr['gname'] . '</b></li>';
}
if(count($allowed_users)) {
$r = q("SELECT xchan_name FROM xchan WHERE xchan_hash IN ( " . implode(', ',$allowed_users) . " )");
@@ -100,10 +100,10 @@ class Lockview extends \Zotlabs\Web\Controller {
$l[] = '<li>' . $rr['xchan_name'] . '</li>';
}
if(count($deny_groups)) {
- $r = q("SELECT name FROM `groups` WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
+ $r = q("SELECT gname FROM `groups` WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
if($r)
foreach($r as $rr)
- $l[] = '<li><b><strike>' . $rr['name'] . '</strike></b></li>';
+ $l[] = '<li><b><strike>' . $rr['gname'] . '</strike></b></li>';
}
if(count($deny_users)) {
$r = q("SELECT xchan_name FROM xchan WHERE xchan_hash IN ( " . implode(', ', $deny_users) . " )");
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 238df3593..87ed326e2 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -223,7 +223,7 @@ class Network extends \Zotlabs\Web\Controller {
if($x) {
$title = replace_macros(get_markup_template("section_title.tpl"),array(
- '$title' => t('Privacy group: ') . $x['name']
+ '$title' => t('Privacy group: ') . $x['gname']
));
}
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index 7186209ba..ecf966032 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -440,7 +440,7 @@ class Photos extends \Zotlabs\Web\Controller {
if($success['replaced']) {
$post_tags[] = array(
'uid' => $profile_uid,
- 'type' => $success['termtype'],
+ 'ttype' => $success['termtype'],
'otype' => TERM_OBJ_POST,
'term' => $success['term'],
'url' => $success['url']
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 54780499b..06e5cfd7b 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -67,16 +67,16 @@ class Profiles extends \Zotlabs\Web\Controller {
$name = t('Profile-') . ($num_profiles + 1);
- $r1 = q("SELECT `name`, `photo`, `thumb` FROM `profile` WHERE `uid` = %d AND `is_default` = 1 LIMIT 1",
+ $r1 = q("SELECT `fullname`, `photo`, `thumb` FROM `profile` WHERE `uid` = %d AND `is_default` = 1 LIMIT 1",
intval(local_channel()));
- $r2 = q("INSERT INTO `profile` (`aid`, `uid` , `profile_guid`, `profile_name` , `name`, `photo`, `thumb`)
+ $r2 = q("INSERT INTO `profile` (`aid`, `uid` , `profile_guid`, `profile_name` , `fullname`, `photo`, `thumb`)
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s' )",
intval(get_account_id()),
intval(local_channel()),
dbesc(random_string()),
dbesc($name),
- dbesc($r1[0]['name']),
+ dbesc($r1[0]['fullname']),
dbesc($r1[0]['photo']),
dbesc($r1[0]['thumb'])
);
@@ -277,14 +277,14 @@ class Profiles extends \Zotlabs\Web\Controller {
$name = escape_tags(trim($_POST['name']));
- if($orig[0]['name'] != $name) {
+ if($orig[0]['fullname'] != $name) {
$namechanged = true;
$v = validate_channelname($name);
if($v) {
notice($v);
$namechanged = false;
- $name = $orig[0]['name'];
+ $name = $orig[0]['fullname'];
}
}
@@ -350,7 +350,7 @@ class Profiles extends \Zotlabs\Web\Controller {
$withchanged = false;
if(strlen($with)) {
- if($with != strip_tags($orig[0]['with'])) {
+ if($with != strip_tags($orig[0]['partner'])) {
$withchanged = true;
$prf = '';
$lookup = $with;
@@ -382,7 +382,7 @@ class Profiles extends \Zotlabs\Web\Controller {
}
}
else
- $with = $orig[0]['with'];
+ $with = $orig[0]['partner'];
}
$profile_fields_basic = get_profile_fields_basic();
@@ -439,7 +439,7 @@ class Profiles extends \Zotlabs\Web\Controller {
$changes[] = t('Dislikes');
$value = $dislikes;
}
- if($work != $orig[0]['work']) {
+ if($work != $orig[0]['employment']) {
$changes[] = t('Work/Employment');
}
if($religion != $orig[0]['religion']) {
@@ -486,7 +486,7 @@ class Profiles extends \Zotlabs\Web\Controller {
$r = q("UPDATE `profile`
SET `profile_name` = '%s',
- `name` = '%s',
+ `fullname` = '%s',
`pdesc` = '%s',
`gender` = '%s',
`dob` = '%s',
@@ -496,7 +496,7 @@ class Profiles extends \Zotlabs\Web\Controller {
`postal_code` = '%s',
`country_name` = '%s',
`marital` = '%s',
- `with` = '%s',
+ `partner` = '%s',
`howlong` = '%s',
`sexual` = '%s',
`homepage` = '%s',
@@ -515,7 +515,7 @@ class Profiles extends \Zotlabs\Web\Controller {
`tv` = '%s',
`film` = '%s',
`romance` = '%s',
- `work` = '%s',
+ `employment` = '%s',
`education` = '%s',
`hide_friends` = %d
WHERE `id` = %d AND `uid` = %d",
@@ -591,7 +591,7 @@ class Profiles extends \Zotlabs\Web\Controller {
}
- function get() {
+ function get() {
$o = '';
@@ -627,8 +627,6 @@ class Profiles extends \Zotlabs\Web\Controller {
}
$editselect = 'none';
- // if(feature_enabled(local_channel(),'richtext'))
- // $editselect = 'textareas';
\App::$page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
'$baseurl' => z_root(),
@@ -712,7 +710,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$is_default' => $is_default,
'$default' => t('This is your default profile.') . EOL . translate_scope(map_scope($channel['channel_r_profile'])),
'$advanced' => $advanced,
- '$name' => array('name', t('Your full name'), $r[0]['name'], t('Required'), '*'),
+ '$name' => array('name', t('Your full name'), $r[0]['fullname'], t('Required'), '*'),
'$pdesc' => array('pdesc', t('Title/Description'), $r[0]['pdesc']),
'$dob' => dob($r[0]['dob']),
'$hide_friends' => $hide_friends,
@@ -725,7 +723,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$gender_min' => gender_selector_min($r[0]['gender']),
'$marital' => marital_selector($r[0]['marital']),
'$marital_min' => marital_selector_min($r[0]['marital']),
- '$with' => array('with', t("Who (if applicable)"), $r[0]['with'], t('Examples: cathy123, Cathy Williams, cathy@example.com')),
+ '$with' => array('with', t("Who (if applicable)"), $r[0]['partner'], t('Examples: cathy123, Cathy Williams, cathy@example.com')),
'$howlong' => array('howlong', t('Since (date)'), ($r[0]['howlong'] === NULL_DATE ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong']))),
'$sexual' => sexpref_selector($r[0]['sexual']),
'$sexual_min' => sexpref_selector_min($r[0]['sexual']),
@@ -743,7 +741,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$film' => array('film', t('Film/Dance/Culture/Entertainment'), $r[0]['film']),
'$interest' => array('interest', t('Hobbies/Interests'), $r[0]['interest']),
'$romance' => array('romance',t('Love/Romance'), $r[0]['romance']),
- '$work' => array('work', t('Work/Employment'), $r[0]['work']),
+ '$work' => array('work', t('Work/Employment'), $r[0]['employment']),
'$education' => array('education', t('School/Education'), $r[0]['education']),
'$contact' => array('contact', t('Contact information and social networks'), $r[0]['contact']),
'$channels' => array('channels', t('My other channels'), $r[0]['channels']),
@@ -759,7 +757,7 @@ class Profiles extends \Zotlabs\Web\Controller {
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
local_channel());
- if(count($r)) {
+ if($r) {
$tpl = get_markup_template('profile_entry.tpl');
foreach($r as $rr) {
@@ -780,10 +778,7 @@ class Profiles extends \Zotlabs\Web\Controller {
'$cr_new' => t('Create New'),
'$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new"),
'$profiles' => $profiles
- ));
-
-
-
+ ));
}
return $o;
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index fcc2506fc..402a27d40 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -79,7 +79,7 @@ class Search extends \Zotlabs\Web\Controller {
return $o;
if($tag) {
- $sql_extra = sprintf(" AND `item`.`id` IN (select `oid` from term where otype = %d and type in ( %d , %d) and term = '%s') ",
+ $sql_extra = sprintf(" AND `item`.`id` IN (select `oid` from term where otype = %d and ttype in ( %d , %d) and term = '%s') ",
intval(TERM_OBJ_POST),
intval(TERM_HASHTAG),
intval(TERM_COMMUNITYTAG),
diff --git a/Zotlabs/Module/Search_ac.php b/Zotlabs/Module/Search_ac.php
index 78bcf374d..4e936d97b 100644
--- a/Zotlabs/Module/Search_ac.php
+++ b/Zotlabs/Module/Search_ac.php
@@ -46,7 +46,7 @@ class Search_ac extends \Zotlabs\Web\Controller {
}
}
- $r = q("select distinct term, tid, url from term where type in ( %d, %d ) $tag_sql_extra group by term order by term asc",
+ $r = q("select distinct term, tid, url from term where ttype in ( %d, %d ) $tag_sql_extra group by term order by term asc",
intval(TERM_HASHTAG),
intval(TERM_COMMUNITYTAG)
);
diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php
index 5687ce84b..875004fae 100644
--- a/Zotlabs/Module/Settings.php
+++ b/Zotlabs/Module/Settings.php
@@ -78,7 +78,7 @@ class Settings extends \Zotlabs\Web\Controller {
$r = q("UPDATE clients SET
client_id='%s',
pw='%s',
- name='%s',
+ clname='%s',
redirect_uri='%s',
icon='%s',
uid=%d
@@ -91,7 +91,7 @@ class Settings extends \Zotlabs\Web\Controller {
intval(local_channel()),
dbesc($key));
} else {
- $r = q("INSERT INTO clients (client_id, pw, name, redirect_uri, icon, uid)
+ $r = q("INSERT INTO clients (client_id, pw, clname, redirect_uri, icon, uid)
VALUES ('%s','%s','%s','%s','%s',%d)",
dbesc($key),
dbesc($secret),
@@ -337,7 +337,7 @@ class Settings extends \Zotlabs\Web\Controller {
}
$hide_presence = 1 - (intval($role_permissions['online']));
if($role_permissions['default_collection']) {
- $r = q("select hash from groups where uid = %d and name = '%s' limit 1",
+ $r = q("select hash from groups where uid = %d and gname = '%s' limit 1",
intval(local_channel()),
dbesc( t('Friends') )
);
@@ -345,7 +345,7 @@ class Settings extends \Zotlabs\Web\Controller {
require_once('include/group.php');
group_add(local_channel(), t('Friends'));
group_add_member(local_channel(),t('Friends'),$channel['channel_hash']);
- $r = q("select hash from groups where uid = %d and name = '%s' limit 1",
+ $r = q("select hash from groups where uid = %d and gname = '%s' limit 1",
intval(local_channel()),
dbesc( t('Friends') )
);
@@ -537,7 +537,7 @@ class Settings extends \Zotlabs\Web\Controller {
dbesc(datetime_convert()),
dbesc($channel['channel_hash'])
);
- $r = q("update profile set name = '%s' where uid = %d and is_default = 1",
+ $r = q("update profile set fullname = '%s' where uid = %d and is_default = 1",
dbesc($username),
intval($channel['channel_id'])
);
@@ -562,7 +562,7 @@ class Settings extends \Zotlabs\Web\Controller {
- function get() {
+ function get() {
$o = '';
nav_set_selected('settings');
@@ -615,7 +615,7 @@ class Settings extends \Zotlabs\Web\Controller {
'$title' => t('Add application'),
'$submit' => t('Update'),
'$cancel' => t('Cancel'),
- '$name' => array('name', t('Name'), $app['name'] , ''),
+ '$name' => array('name', t('Name'), $app['clname'] , ''),
'$key' => array('key', t('Consumer Key'), $app['client_id'], ''),
'$secret' => array('secret', t('Consumer Secret'), $app['pw'], ''),
'$redirect' => array('redirect', t('Redirect'), $app['redirect_uri'], ''),
diff --git a/Zotlabs/Module/Tagrm.php b/Zotlabs/Module/Tagrm.php
index 81ae30aa5..42aa6e90f 100644
--- a/Zotlabs/Module/Tagrm.php
+++ b/Zotlabs/Module/Tagrm.php
@@ -54,7 +54,7 @@ class Tagrm extends \Zotlabs\Web\Controller {
- function get() {
+ function get() {
if(! local_channel()) {
goaway(z_root() . '/' . $_SESSION['photo_return']);