From 182582eed8672b0c75aae747413be2cc6ce0709f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 5 Jun 2011 02:09:31 -0700 Subject: load hooks inside queue --- include/queue.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/queue.php b/include/queue.php index cc36b2f62..79f656017 100644 --- a/include/queue.php +++ b/include/queue.php @@ -24,6 +24,8 @@ function queue_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); + load_hooks(); + $deadguys = array(); logger('queue: start'); -- cgit v1.2.3 From 7b02e178a4dd56e7658af5f01a50a778d3212573 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 5 Jun 2011 02:18:18 -0700 Subject: more work on facebook re-queue --- include/queue.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/queue.php b/include/queue.php index 79f656017..cbda196da 100644 --- a/include/queue.php +++ b/include/queue.php @@ -55,7 +55,11 @@ function queue_run($argv, $argc){ require_once('include/salmon.php'); foreach($r as $q_item) { - $qi = q("SELECT * FROM `queue` WHERE `id` = %d LIMIT 1", + + // queue_predeliver hooks may have changed the queue db details, + // so check again if this entry still needs processing + + $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ", intval($q_item['id']) ); if(! count($qi)) -- cgit v1.2.3 From 4284c6f9ee471d253354b8ba9508281b98976f52 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 5 Jun 2011 17:32:56 -0700 Subject: use icon for language selector instead of hotkey --- include/main.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/main.js b/include/main.js index 0d68c2b2b..34045f57f 100644 --- a/include/main.js +++ b/include/main.js @@ -47,18 +47,18 @@ $('#pause').html(''); } } - // F8 - show/hide language selector - if(event.keyCode == '119') { - if(langSelect) { - langSelect = false; - $('#language-selector').hide(); - } - else { - langSelect = true; - $('#language-selector').show(); - } - } - +// // F8 - show/hide language selector +// if(event.keyCode == '119') { +// if(langSelect) { +// langSelect = false; +// $('#language-selector').hide(); +// } +// else { +// langSelect = true; +// $('#language-selector').show(); +// } +// } +// // this is shift-home on FF, but $ on IE, disabling until I figure out why the diff. // update: incompatible usage of onKeyDown vs onKeyPress // if(event.keyCode == '36' && event.shiftKey == true) { -- cgit v1.2.3 From 4c629e274bbf368e79e47133869c923a2e6dd4a9 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 5 Jun 2011 23:10:07 -0700 Subject: begin event module --- include/event.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/event.php b/include/event.php index 06239b2ab..21817086f 100644 --- a/include/event.php +++ b/include/event.php @@ -31,4 +31,7 @@ function format_event_html($ev) { $o .= ''; return $o; -} \ No newline at end of file +} + + + -- cgit v1.2.3 From c0094aa4f865defe8be63963b32f69d05e258f48 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 6 Jun 2011 16:26:11 -0700 Subject: strict privacy mode (Friendika-Z) - refuse to talk to networks with privacy issues --- include/notifier.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/notifier.php b/include/notifier.php index db2542849..98e38fb11 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -27,6 +27,8 @@ function notifier_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); + $prv = get_config('system','strict_privacy'); + logger('notifier: invoked: ' . print_r($argv,true)); $cmd = $argv[1]; @@ -329,6 +331,10 @@ function notifier_run($argv, $argc){ } break; case 'stat': + + if($prv) + break; + if($followup && $contact['notify']) { logger('notifier: slapdelivery: ' . $contact['name']); $deliver_status = slapper($owner,$contact['notify'],$slap); @@ -373,7 +379,7 @@ function notifier_run($argv, $argc){ } break; case 'mail': - + // WARNING: does not currently convert to RFC2047 header encodings, etc. $addr = $contact['addr']; @@ -459,7 +465,7 @@ function notifier_run($argv, $argc){ if($slap && count($url_recipients) && $followup && $notify_hub && (! $expire)) { foreach($url_recipients as $url) { - if($url) { + if($url && (! $prv)) { logger('notifier: urldelivery: ' . $url); $deliver_status = slapper($owner,$url,$slap); // TODO: redeliver/queue these items on failure, though there is no contact record -- cgit v1.2.3 From 452245d9883c29640fb1bd3a9e0d7cefaed77f23 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 6 Jun 2011 19:59:20 -0700 Subject: more events framework --- include/datetime.php | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/datetime.php b/include/datetime.php index f7be5bdb1..67c4f42fa 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -108,9 +108,17 @@ function datesel($pre,$ymin,$ymax,$allow_blank,$y,$m,$d) { $o .= ""; } - for($x = $ymax; $x >= $ymin; $x --) { - $sel = (($x == $y) ? " selected=\"selected\" " : ""); - $o .= ""; + if($ymax > $ymin) { + for($x = $ymax; $x >= $ymin; $x --) { + $sel = (($x == $y) ? " selected=\"selected\" " : ""); + $o .= ""; + } + } + else { + for($x = $ymax; $x <= $ymin; $x ++) { + $sel = (($x == $y) ? " selected=\"selected\" " : ""); + $o .= ""; + } } $o .= " "; + for($x = 0; $x < 24; $x ++) { + $sel = (($x == $h) ? " selected=\"selected\" " : ""); + $o .= ""; + } + $o .= " : "; + return $o; +}} + + + + + + + + // implements "3 seconds ago" etc. // based on $posted_date, (UTC). // Results relative to current timezone -- cgit v1.2.3 From 9f51233451ad6392b61083cf61f5670bcce9d935 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 6 Jun 2011 20:17:36 -0700 Subject: event listings --- include/datetime.php | 4 ++-- include/event.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/datetime.php b/include/datetime.php index 67c4f42fa..8f2ec311a 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -276,7 +276,7 @@ function get_first_dim($y,$m) { if(! function_exists('cal')) { -function cal($y = 0,$m = 0, $links = false) { +function cal($y = 0,$m = 0, $links = false, $class='') { // month table - start at 1 to match human usage. @@ -306,7 +306,7 @@ function cal($y = 0,$m = 0, $links = false) { $tddate = intval(datetime_convert('UTC',date_default_timezone_get(),'now','j')); $str_month = day_translate($mtab[$m]); - $o = ''; + $o = '
'; $o .= ""; for($a = 0; $a < 7; $a ++) $o .= ''; diff --git a/include/event.php b/include/event.php index 21817086f..ecaa9213a 100644 --- a/include/event.php +++ b/include/event.php @@ -3,12 +3,14 @@ function format_event_html($ev) { + require_once('include/bbcode.php'); + if(! ((is_array($ev)) && count($ev))) return ''; $o = '
'; - $o .= '

' . $ev['desc'] . '

'; + $o .= '

' . bbcode($ev['desc']) . '

'; $o .= '

' . t('Starts: ') . '' - . $ev['location'] + . bbcode($ev['location']) . '

'; $o .= '
'; -- cgit v1.2.3 From fcb4316c2943d881eeb4d77bb6e3e51815bb59d6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 6 Jun 2011 21:49:07 -0700 Subject: tinymce for event fields --- include/datetime.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/datetime.php b/include/datetime.php index 8f2ec311a..a5b388e76 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -122,14 +122,14 @@ function datesel($pre,$ymin,$ymax,$allow_blank,$y,$m,$d) { } $o .= "
$str_month $y
' . mb_substr(day_translate($dn[$a]),0,3,'UTF-8') . '