summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/FirePHP/FirePHPPlugin.php4
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php28
-rw-r--r--plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po3
-rw-r--r--plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php2
4 files changed, 28 insertions, 9 deletions
diff --git a/plugins/FirePHP/FirePHPPlugin.php b/plugins/FirePHP/FirePHPPlugin.php
index 452f79024..9143ff69c 100644
--- a/plugins/FirePHP/FirePHPPlugin.php
+++ b/plugins/FirePHP/FirePHPPlugin.php
@@ -52,8 +52,8 @@ class FirePHPPlugin extends Plugin
{
static $firephp_priorities = array(FirePHP::ERROR, FirePHP::ERROR, FirePHP::ERROR, FirePHP::ERROR,
FirePHP::WARN, FirePHP::LOG, FirePHP::LOG, FirePHP::INFO);
- $priority = $firephp_priorities[$priority];
- $this->firephp->fb($msg, $priority);
+ $fp_priority = $firephp_priorities[$priority];
+ $this->firephp->fb($msg, $fp_priority);
}
function onPluginVersion(&$versions)
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index e33509c47..de5175427 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -538,14 +538,22 @@ class Ostatus_profile extends Memcached_DataObject
}
$shortSummary = common_shorten_links($summary);
if (Notice::contentTooLong($shortSummary)) {
- $url = common_shorten_url(common_local_url('attachment',
- array('attachment' => $attachment->id)));
+ $url = common_shorten_url($sourceUrl);
$shortSummary = substr($shortSummary,
0,
Notice::maxContent() - (mb_strlen($url) + 2));
- $shortSummary .= '… ' . $url;
- $content = $shortSummary;
- $rendered = common_render_text($content);
+ $content = $shortSummary . ' ' . $url;
+
+ // We mark up the attachment link specially for the HTML output
+ // so we can fold-out the full version inline.
+ $attachUrl = common_local_url('attachment',
+ array('attachment' => $attachment->id));
+ $rendered = common_render_text($shortSummary) .
+ '<a href="' . htmlspecialchars($attachUrl) .'"'.
+ ' class="attachment more"' .
+ ' title="'. htmlspecialchars(_m('Show more')) . '">' .
+ '&#8230;' .
+ '</a>';
}
}
@@ -1655,10 +1663,18 @@ class Ostatus_profile extends Memcached_DataObject
throw new Exception("Couldn't find a valid profile for '$addr'");
}
+ /**
+ * Store the full-length scrubbed HTML of a remote notice to an attachment
+ * file on our server. We'll link to this at the end of the cropped version.
+ *
+ * @param string $title plaintext for HTML page's title
+ * @param string $rendered HTML fragment for HTML page's body
+ * @return File
+ */
function saveHTMLFile($title, $rendered)
{
$final = sprintf("<!DOCTYPE html>\n<html><head><title>%s</title></head>".
- '<body><div>%s</div></body></html>',
+ '<body>%s</body></html>',
htmlspecialchars($title),
$rendered);
diff --git a/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
index f17dfa50a..0956d2f9b 100644
--- a/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
@@ -104,3 +104,6 @@ msgstr ""
#: actions/feedsubsettings.php:231
msgid "Previewing feed:"
msgstr ""
+
+msgid "Confirm"
+msgstr "Confirmer"
diff --git a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
index ebb0189e0..6756f1993 100644
--- a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
+++ b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
@@ -45,7 +45,7 @@ class OpenExternalLinkTargetPlugin extends Plugin
{
function onEndShowScripts($action)
{
- $action->inlineScript('$("a[rel~=external]").click(function(){ window.open(this.href); return false; });');
+ $action->inlineScript('$("a[rel~=external]:not([class~=attachment])").live("click", function(){ window.open(this.href); return false; });');
return true;
}