]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/fixup_hashtags.php
$longurl->url is just the same $canon we fed to File_redirection::where()
[quix0rs-gnu-social.git] / scripts / fixup_hashtags.php
index 87bbecfb44ed57fbcfa21b4d9d4203fd39048efa..b5cdb764982a223f89b8db5ccd9e4f48b53f338e 100755 (executable)
@@ -25,8 +25,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
 }
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
-define('LACONICA', true); // compatibility
+define('GNUSOCIAL', true);
+define('STATUSNET', true);  // compatibility
 
 require_once(INSTALLDIR . '/lib/common.php');
 
@@ -39,7 +39,9 @@ while ($notice->fetch()) {
     common_log(LOG_INFO, 'Getting tags for notice #' . $notice->id);
     $notice->saveTags();
     $original = clone($notice);
-    $notice->rendered = common_render_content($notice->content, $notice);
+    $notice->rendered = common_render_content($notice->content,
+                                              $notice->getProfile(),
+                                              $notice->hasParent() ? $notice->getParent() : null);
     $result = $notice->update($original);
     if (!$result) {
         common_log_db_error($notice, 'UPDATE', __FILE__);