From cdd2e9cd953394adfd6331c946466f3165606e29 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Mar 2014 20:05:23 -0800 Subject: layout export to file --- mod/layouts.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/layouts.php b/mod/layouts.php index cbbef4fea..0dcaba361 100644 --- a/mod/layouts.php +++ b/mod/layouts.php @@ -40,6 +40,20 @@ function layouts_content(&$a) { return; } + if((argc() > 3) && (argv(2) === 'share') && (argv(3))) { + $r = q("select sid, service, mimetype, title, body from item_id left join item on item.id = item_id.iid where item_id.uid = %d and item.mid = '%s' and service = 'PDL' order by sid asc", + intval($owner), + dbesc(argv(3)) + ); + if($r) { + header('Content-type: application/x-redmatrix-layout'); + header('Content-disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"'); + echo json_encode($r); + killme(); + + } + } + $tabs = array( array( 'label' => t('Layout Help'), @@ -75,7 +89,7 @@ function layouts_content(&$a) { // Get a list of blocks. We can't display all them because endless scroll makes that unusable, so just list titles and an edit link. // TODO - this should be replaced with pagelist_widget - $r = q("select * from item_id where uid = %d and service = 'PDL' order by sid asc", + $r = q("select iid, sid, mid from item_id left join item on item.id = item_id.iid where item_id.uid = %d and service = 'PDL' order by sid asc", intval($owner) ); @@ -84,7 +98,7 @@ function layouts_content(&$a) { if($r) { $pages = array(); foreach($r as $rr) { - $pages[$rr['iid']][] = array('url' => $rr['iid'],'title' => $rr['sid']); + $pages[$rr['iid']][] = array('url' => $rr['iid'],'title' => $rr['sid'], 'mid' => $rr['mid']); } } @@ -92,9 +106,10 @@ function layouts_content(&$a) { //Build the base URL for edit links $url = z_root() . "/editlayout/" . $which; - return $o . replace_macros(get_markup_template("webpagelist.tpl"), array( + return $o . replace_macros(get_markup_template("layoutlist.tpl"), array( '$baseurl' => $url, '$edit' => t('Edit'), + '$share' => t('Share'), '$pages' => $pages, '$channel' => $which, '$view' => t('View'), -- cgit v1.2.3 From 3d49bf0320cd6a35e34da9694d3eb957053845a3 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Mar 2014 21:00:42 -0800 Subject: directory sync issues --- mod/dirsearch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 59a1d448d..7b83b8a46 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -159,7 +159,12 @@ function dirsearch_content(&$a) { ); if($r) { foreach($r as $rr) { - $flags = (($rr['ud_flags'] & UPDATE_FLAGS_DELETED) ? array('deleted') : array()); + $flags = array(); + if($rr['ud_flags'] & UPDATE_FLAGS_DELETED) + $flags[] = 'deleted'; + if($rr['ud_flags'] & UPDATE_FLAGS_FORCED) + $flags[] = 'forced'; + $spkt['transactions'][] = array( 'hash' => $rr['ud_hash'], 'address' => $rr['ud_addr'], -- cgit v1.2.3 From 66f754c4c730bbea46faac2c61bb5195246d7233 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 01:43:39 -0800 Subject: !@#$% pay~!@#$pal --- mod/siteinfo.php | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'mod') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 7fdb892d2..bdf9b1af6 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -90,24 +90,6 @@ function siteinfo_content(&$a) { $admininfo = bbcode(get_config('system','admininfo')); - $project_donate = t('Project Donations'); - $donate_text = t('

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better, freer, and privacy respecting web. Select the following option for a one-time donation of your choosing

'); - $alternatively = t('

or

'); - $recurring = t('Recurring Donation Options'); - - $donate = <<< EOT -

{$project_donate}

-$donate_text -

-$alternatively -

- - -
$recurring
-

-

-EOT; - if(file_exists('doc/site_donate.html')) $donate .= file_get_contents('doc/site_donate.html'); -- cgit v1.2.3