From bca4d540e06151e074022e9cd8e129198585023b Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Oct 2014 15:15:20 -0700 Subject: disable email notifications when bulk importing content. --- mod/import.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod') diff --git a/mod/import.php b/mod/import.php index e5a22a26e..3cf114d66 100644 --- a/mod/import.php +++ b/mod/import.php @@ -378,7 +378,10 @@ function import_post(&$a) { } } + $saved_notification_flags = notifications_off($channel['channel_id']); + if($import_posts && array_key_exists('item',$data) && $data['item']) { + foreach($data['item'] as $i) { $item = get_item_elements($i); @@ -404,6 +407,8 @@ function import_post(&$a) { } + notifications_on($channel['channel_id'],$saved_notification_flags); + if(array_key_exists('item_id',$data) && $data['item_id']) { foreach($data['item_id'] as $i) { $r = q("select id from item where mid = '%s' and uid = %d limit 1", -- cgit v1.2.3 From ddcc0ad5676e0bf3775453cd89ef64fcff1c602a Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Oct 2014 16:47:30 -0700 Subject: dav issue --- mod/cloud.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod') diff --git a/mod/cloud.php b/mod/cloud.php index 28c59872d..149a6da5d 100644 --- a/mod/cloud.php +++ b/mod/cloud.php @@ -138,7 +138,6 @@ function cloud_init(&$a) { require_once('include/RedDAV/RedBrowser.php'); // provide a directory view for the cloud in Red Matrix $browser = new RedDAV\RedBrowser($auth); - $auth->setBrowserPlugin($browser); $server->addPlugin($browser); -- cgit v1.2.3 From 9ac12d6f328c50a46f487da501ee775fdf9b58f8 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Oct 2014 20:37:46 -0700 Subject: oembed issues --- mod/oembed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/oembed.php b/mod/oembed.php index a053a8c98..d4a4424f5 100644 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -19,9 +19,10 @@ function oembed_init(&$a){ else { echo ""; - $j = oembed_fetch_url(base64url_decode(argv(1))); + $src = base64url_decode(argv(1)); + $j = oembed_fetch_url($src); echo $j->html; -// logger('mod-oembed ' . $j->html, LOGGER_ALL); +// logger('mod-oembed ' . $h, LOGGER_ALL); echo ""; } } -- cgit v1.2.3 From e06c3e5a911176bd2afc5d9d391e629f282122b8 Mon Sep 17 00:00:00 2001 From: Jeroen Date: Thu, 9 Oct 2014 14:54:04 +0000 Subject: Added and changed on some places div class generic-content-wrapper. And added to redbasic. Other thems can now also theme backgrounds of a lot of pages. I'm not completely done, but till now - this is it. --- mod/bookmarks.php | 4 +++- mod/profiles.php | 3 +++ mod/webpages.php | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/bookmarks.php b/mod/bookmarks.php index 9ccc171fe..6225c0980 100644 --- a/mod/bookmarks.php +++ b/mod/bookmarks.php @@ -55,6 +55,8 @@ function bookmarks_content(&$a) { $o = profile_tabs($a,true,$channel['channel_address']); + $o .= '
'; + $o .= '

' . t('My Bookmarks') . '

'; $x = menu_list(local_user(),'',MENU_BOOKMARK); @@ -78,7 +80,7 @@ function bookmarks_content(&$a) { } } - + $o .= '
'; return $o; diff --git a/mod/profiles.php b/mod/profiles.php index 063e714e7..cde768b1e 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -766,6 +766,9 @@ logger('extra_fields: ' . print_r($extra_fields,true)); : '' . t('Edit visibility') . '') )); } + + $o .= ''; + } return $o; } diff --git a/mod/webpages.php b/mod/webpages.php index efaf3c4bf..341e75a0c 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -81,6 +81,8 @@ function webpages_content(&$a) { require_once('include/conversation.php'); $o = profile_tabs($a,true); + $o .= '
'; + $o .= '

' . t('Webpages') . '

'; $x = array( @@ -95,7 +97,7 @@ function webpages_content(&$a) { 'mimetype' => $mimetype, 'layout' => $layout, ); - + if($_REQUEST['title']) $x['title'] = $_REQUEST['title']; if($_REQUEST['body']) @@ -105,7 +107,6 @@ function webpages_content(&$a) { $o .= status_editor($a,$x); - // Get a list of webpages. 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 @@ -142,5 +143,6 @@ function webpages_content(&$a) { )); + $o .= '
'; } -- cgit v1.2.3 From 4e9bd8b8f0a2629cf1ad7c7274369e795852a8ab Mon Sep 17 00:00:00 2001 From: marijus Date: Fri, 10 Oct 2014 15:52:56 +0200 Subject: This is a fix to not interfere the ongoing adding of .generic-content-wrapper with the ongoing styling of redbasic theme. adding of .generic-content-wrapper is needed and useful for derivative themes but it should not contain any styling information for redbasic theme. therefor i added .generic-content-wrapper-styled as a quickfix for spots where redbasic is not finished yet. Sidenote: please avoid opening a div in one *.tpl and close it in another or (even worse) open a div in a *.tpl and close it in an already templatified mod/*.php. This will really make the code and templates very, very confusing. --- mod/bookmarks.php | 2 +- mod/profiles.php | 2 -- mod/webpages.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/bookmarks.php b/mod/bookmarks.php index 6225c0980..6b2476a8e 100644 --- a/mod/bookmarks.php +++ b/mod/bookmarks.php @@ -55,7 +55,7 @@ function bookmarks_content(&$a) { $o = profile_tabs($a,true,$channel['channel_address']); - $o .= '
'; + $o .= '
'; $o .= '

' . t('My Bookmarks') . '

'; diff --git a/mod/profiles.php b/mod/profiles.php index cde768b1e..5d0416e9a 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -767,8 +767,6 @@ logger('extra_fields: ' . print_r($extra_fields,true)); )); } - $o .= '
'; - } return $o; } diff --git a/mod/webpages.php b/mod/webpages.php index 341e75a0c..2c3cc36ea 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -81,7 +81,7 @@ function webpages_content(&$a) { require_once('include/conversation.php'); $o = profile_tabs($a,true); - $o .= '
'; + $o .= '
'; $o .= '

' . t('Webpages') . '

'; -- cgit v1.2.3 From 3d0d36b2bc6d134e1140b9fc8c40206be5bd7d2d Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Oct 2014 19:14:37 -0700 Subject: fix diaspora reshare tags --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/item.php b/mod/item.php index 2364e6abf..ac15e50e8 100644 --- a/mod/item.php +++ b/mod/item.php @@ -979,7 +979,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { } } // if the tag is already replaced... - elseif(strpos($tag,'[zrl=')) { + elseif((strpos($tag,'[zrl=')) || (strpos($tag,'[url='))) { //...do nothing return $replaced; } -- cgit v1.2.3 From d132646915a3cf500215e7323b29a3e26670be10 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 11 Oct 2014 15:42:31 +0100 Subject: Unbreak webpages --- mod/webpages.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/webpages.php b/mod/webpages.php index 2c3cc36ea..6fee8b414 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -81,9 +81,6 @@ function webpages_content(&$a) { require_once('include/conversation.php'); $o = profile_tabs($a,true); - $o .= '
'; - - $o .= '

' . t('Webpages') . '

'; $x = array( 'webpage' => ITEM_WEBPAGE, @@ -129,6 +126,7 @@ function webpages_content(&$a) { $url = z_root() . "/editwebpage/" . $which; // This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM). return $o . replace_macros(get_markup_template("webpagelist.tpl"), array( + '$listtitle = t('Webpages'), '$baseurl' => $url, '$edit' => t('Edit'), '$pages' => $pages, -- cgit v1.2.3 From d46fd7917f248c105ca44d2d15878d79b358fdfd Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 11 Oct 2014 16:18:15 +0100 Subject: Fix webpages. Sycning between too many codebases... --- mod/webpages.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/webpages.php b/mod/webpages.php index 6fee8b414..f1be648ff 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -35,6 +35,8 @@ function webpages_content(&$a) { $ob_hash = (($observer) ? $observer['xchan_hash'] : ''); $perms = get_all_perms($owner,$ob_hash); + if ($which == 'sys' && is_site_admin()) + $perms['write_pages'] = 1; if(! $perms['write_pages']) { notice( t('Permission denied.') . EOL); @@ -126,7 +128,7 @@ function webpages_content(&$a) { $url = z_root() . "/editwebpage/" . $which; // This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM). return $o . replace_macros(get_markup_template("webpagelist.tpl"), array( - '$listtitle = t('Webpages'), + '$listtitle' => t('Webpages'), '$baseurl' => $url, '$edit' => t('Edit'), '$pages' => $pages, -- cgit v1.2.3 From b84b2d5aa50a58e0ca85d56e02a83bdfbc3d9cde Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 11 Oct 2014 16:19:36 +0100 Subject: FFS, another oops --- mod/webpages.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'mod') diff --git a/mod/webpages.php b/mod/webpages.php index f1be648ff..a5cfd00e6 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -35,8 +35,6 @@ function webpages_content(&$a) { $ob_hash = (($observer) ? $observer['xchan_hash'] : ''); $perms = get_all_perms($owner,$ob_hash); - if ($which == 'sys' && is_site_admin()) - $perms['write_pages'] = 1; if(! $perms['write_pages']) { notice( t('Permission denied.') . EOL); -- cgit v1.2.3 From 82232c6916ba6a657bbae524ada3c4ba21001156 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 11 Oct 2014 17:24:58 +0100 Subject: Show tag in siteinfo. Not useful for us, quite useful for admins. --- mod/siteinfo.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index c1d65fadd..a58f17c53 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -88,8 +88,10 @@ function siteinfo_content(&$a) { if(! get_config('system','hidden_version_siteinfo')) { $version = sprintf( t('Version %s'), RED_VERSION ); - if(@is_dir('.git') && function_exists('shell_exec')) + if(@is_dir('.git') && function_exists('shell_exec')) { $commit = @shell_exec('git log -1 --format="%h"'); + $tag = @shell_exec('git describe --tags --abbrev=0'); + } if(! isset($commit) || strlen($commit) > 16) $commit = ''; } @@ -130,6 +132,7 @@ function siteinfo_content(&$a) { '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralized privacy enhanced websites.'), '$version' => $version, + '$tag' => $tag, '$commit' => $commit, '$web_location' => t('Running at web location') . ' ' . z_root(), '$visit' => t('Please visit GetZot.com to learn more about the Red Matrix.'), -- cgit v1.2.3