summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorZach Copley <zcopley@mekong.(none)>2009-06-17 14:36:33 -0700
committerZach Copley <zcopley@mekong.(none)>2009-06-17 14:36:33 -0700
commitcd1361fe960eb3afbbdb34b14061b8475dea60c8 (patch)
treec043f10b3e73865985f3ce2f9252925e004a46f0 /classes
parent8992e8fa7a3c694cc9d424b3e50cf4d87519fa28 (diff)
parentb58dc5e96117bdb4de899d37c6eb94ebf1c3dfe6 (diff)
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
Diffstat (limited to 'classes')
-rw-r--r--classes/File.php2
-rw-r--r--classes/File_oembed.php2
-rw-r--r--classes/Notice.php8
3 files changed, 7 insertions, 5 deletions
diff --git a/classes/File.php b/classes/File.php
index 24ab11b8e..08320faf8 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -79,7 +79,6 @@ class File extends Memcached_DataObject
&& ('text/html' === substr($redir_data['type'], 0, 9))
&& ($oembed_data = File_oembed::_getOembed($given_url))
&& isset($oembed_data['json'])) {
-
File_oembed::saveNew($oembed_data['json'], $file_id);
}
return $x;
@@ -98,7 +97,6 @@ class File extends Memcached_DataObject
if ($redir_url === $given_url) {
$x = File::saveNew($redir_data, $given_url);
$file_id = $x->id;
-
} else {
$x = File::processNew($redir_url, $notice_id);
$file_id = $x->id;
diff --git a/classes/File_oembed.php b/classes/File_oembed.php
index f1b2cb13c..6bf972f8f 100644
--- a/classes/File_oembed.php
+++ b/classes/File_oembed.php
@@ -53,7 +53,7 @@ class File_oembed extends Memcached_DataObject
function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') {
- $cmd = 'http://oohembed.com/oohembed/?url=' . urlencode($url);
+ $cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url);
if (is_int($maxwidth)) $cmd .= "&maxwidth=$maxwidth";
if (is_int($maxheight)) $cmd .= "&maxheight=$maxheight";
if (is_string($format)) $cmd .= "&format=$format";
diff --git a/classes/Notice.php b/classes/Notice.php
index 6c5558d88..18f3f654e 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -223,6 +223,12 @@ class Notice extends Memcached_DataObject
$notice->addToInboxes();
$notice->saveGroups();
$notice->saveUrls();
+ $orig2 = clone($notice);
+ $notice->rendered = common_render_content($final, $notice);
+ if (!$notice->update($orig2)) {
+ common_log_db_error($notice, 'UPDATE', __FILE__);
+ return _('Problem saving notice.');
+ }
$notice->query('COMMIT');
@@ -242,8 +248,6 @@ class Notice extends Memcached_DataObject
* follow redirects and save all available file information
* (mimetype, date, size, oembed, etc.)
*
- * @param class $notice Notice to pull URLs from
- *
* @return void
*/
function saveUrls() {