verify table needs auto_increment flag
This commit is contained in:
parent
32a97d5065
commit
4c21abe533
2
boot.php
2
boot.php
@ -16,7 +16,7 @@ require_once('include/features.php');
|
|||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
|
||||||
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
define ( 'DB_UPDATE_VERSION', 1014 );
|
define ( 'DB_UPDATE_VERSION', 1015 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
BIN
images/red.png
BIN
images/red.png
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 1.2 KiB |
@ -49,7 +49,7 @@ require_once('include/html2plain.php');
|
|||||||
|
|
||||||
require_once('include/cli_startup.php');
|
require_once('include/cli_startup.php');
|
||||||
require_once('include/zot.php');
|
require_once('include/zot.php');
|
||||||
|
require_once('include/queue_fn.php');
|
||||||
|
|
||||||
function notifier_run($argv, $argc){
|
function notifier_run($argv, $argc){
|
||||||
|
|
||||||
@ -261,8 +261,8 @@ function notifier_run($argv, $argc){
|
|||||||
stringify_array_elms($recipients);
|
stringify_array_elms($recipients);
|
||||||
if(! $recipients)
|
if(! $recipients)
|
||||||
return;
|
return;
|
||||||
logger('notifier: recipients: ' . print_r($recipients,true));
|
|
||||||
|
|
||||||
|
logger('notifier: recipients: ' . print_r($recipients,true));
|
||||||
|
|
||||||
$env_recips = null;
|
$env_recips = null;
|
||||||
if($private) {
|
if($private) {
|
||||||
|
@ -805,7 +805,7 @@ CREATE TABLE IF NOT EXISTS `tokens` (
|
|||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `verify` (
|
CREATE TABLE IF NOT EXISTS `verify` (
|
||||||
`id` int(10) unsigned NOT NULL,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`channel` int(10) unsigned NOT NULL DEFAULT '0',
|
`channel` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`type` char(32) NOT NULL DEFAULT '',
|
`type` char(32) NOT NULL DEFAULT '',
|
||||||
`token` char(255) NOT NULL DEFAULT '',
|
`token` char(255) NOT NULL DEFAULT '',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1014 );
|
define( 'UPDATE_VERSION' , 1015 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -211,3 +211,11 @@ function update_r1013() {
|
|||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
return UPDATE_FAILED;
|
return UPDATE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_r1014() {
|
||||||
|
$r = q("ALTER TABLE `verify` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
|
||||||
|
if($r)
|
||||||
|
return UPDATE_SUCCESS;
|
||||||
|
return UPDATE_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
104
mod/search.php
104
mod/search.php
@ -88,6 +88,9 @@ function search_content(&$a) {
|
|||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
require_once('include/items.php');
|
require_once('include/items.php');
|
||||||
|
|
||||||
|
|
||||||
|
$observer = $a->get_observer();
|
||||||
|
|
||||||
$o = '<div id="live-search"></div>' . "\r\n";
|
$o = '<div id="live-search"></div>' . "\r\n";
|
||||||
|
|
||||||
$o .= '<h3>' . t('Search') . '</h3>';
|
$o .= '<h3>' . t('Search') . '</h3>';
|
||||||
@ -136,26 +139,90 @@ function search_content(&$a) {
|
|||||||
// OR your own posts if you are a logged in member
|
// OR your own posts if you are a logged in member
|
||||||
// No items will be shown if the member has a blocked profile wall.
|
// No items will be shown if the member has a blocked profile wall.
|
||||||
|
|
||||||
if(! get_pconfig(local_user(),'system','alt_pager')) {
|
|
||||||
$r = q("SELECT distinct(`item`.`uri`) as `total`
|
|
||||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
|
||||||
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
|
if((! $update) && (! $load)) {
|
||||||
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0)
|
|
||||||
OR `item`.`uid` = %d )
|
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
// because browser prefetching might change it on us. We have to deliver it with the page.
|
||||||
$sql_extra group by `item`.`uri` ",
|
|
||||||
intval(local_user())
|
$o .= '<div id="live-channel"></div>' . "\r\n";
|
||||||
|
$o .= "<script> var profile_uid = " . $a->profile['profile_uid']
|
||||||
|
. "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
|
||||||
|
|
||||||
|
$a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array(
|
||||||
|
'$baseurl' => z_root(),
|
||||||
|
'$pgtype' => 'search',
|
||||||
|
'$uid' => (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : '0'),
|
||||||
|
'$gid' => '0',
|
||||||
|
'$cid' => '0',
|
||||||
|
'$cmin' => '0',
|
||||||
|
'$cmax' => '0',
|
||||||
|
'$star' => '0',
|
||||||
|
'$liked' => '0',
|
||||||
|
'$conv' => '0',
|
||||||
|
'$spam' => '0',
|
||||||
|
'$nouveau' => '0',
|
||||||
|
'$wall' => '0',
|
||||||
|
'$page' => (($a->pager['page'] != 1) ? $a->pager['page'] : 1),
|
||||||
|
'$search' => (($tag) ? '#' : '') . $search,
|
||||||
|
'$order' => '',
|
||||||
|
'$file' => '',
|
||||||
|
'$cats' => '',
|
||||||
|
'$dend' => '',
|
||||||
|
'$dbegin' => ''
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(($update) && ($load)) {
|
||||||
|
|
||||||
|
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
||||||
|
|
||||||
|
if($load) {
|
||||||
|
$r = q("SELECT distinct(uri), item.* from item
|
||||||
|
WHERE item_restrict = 0
|
||||||
|
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND not ( item_flags & %d ))
|
||||||
|
OR ( `item`.`uid` = %d ))
|
||||||
|
$sql_extra
|
||||||
|
group by uri ORDER BY created DESC $pager_sql ",
|
||||||
|
intval(ITEM_PRIVATE),
|
||||||
|
intval(local_user()),
|
||||||
|
intval(ABOOK_FLAG_BLOCKED)
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$r = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
|
||||||
|
$parents_str = ids_to_querystr($r,'item_id');
|
||||||
|
|
||||||
|
$items = q("SELECT `item`.*, `item`.`id` AS `item_id`
|
||||||
|
FROM `item`
|
||||||
|
WHERE item_restrict = 0 and
|
||||||
|
$sql_extra ",
|
||||||
|
intval($a->profile['profile_uid']),
|
||||||
|
dbesc($parents_str)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(count($r))
|
xchan_query($items);
|
||||||
$a->set_pager_total(count($r));
|
$items = fetch_post_tags($items);
|
||||||
|
$items = conv_sort($items,'created');
|
||||||
|
|
||||||
if(! count($r)) {
|
} else {
|
||||||
info( t('No results.') . EOL);
|
$items = array();
|
||||||
return $o;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
|
$r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
|
||||||
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
|
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
|
||||||
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
|
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
|
||||||
@ -177,7 +244,7 @@ function search_content(&$a) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$a = fetch_post_tags($a);
|
// $a = fetch_post_tags($a);
|
||||||
|
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
info( t('No results.') . EOL);
|
info( t('No results.') . EOL);
|
||||||
@ -192,12 +259,7 @@ function search_content(&$a) {
|
|||||||
|
|
||||||
$o .= conversation($a,$r,'search',false);
|
$o .= conversation($a,$r,'search',false);
|
||||||
|
|
||||||
if(! get_pconfig(local_user(),'system','alt_pager')) {
|
|
||||||
$o .= paginate($a);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$o .= alt_pager($a,count($r));
|
$o .= alt_pager($a,count($r));
|
||||||
}
|
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user