[geeklog-hg] geeklog: Fixed rebuilding of related links for stories when the ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Fri Jun 28 13:19:19 EDT 2013
changeset 9147:518070aa96c2
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/518070aa96c2
user: Tom <websitemaster at cogeco.net>
date: Fri Jun 28 13:18:39 2013 -0400
description:
Fixed rebuilding of related links for stories when the What's Related title trim length is changed.
diffstat:
system/lib-story.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r a7f5ea25dc40 -r 518070aa96c2 system/lib-story.php
--- a/system/lib-story.php Fri Jun 28 11:40:19 2013 -0400
+++ b/system/lib-story.php Fri Jun 28 13:18:39 2013 -0400
@@ -1623,8 +1623,10 @@
if ($nrows > 0) {
for ($x = 0; $x < $nrows; $x++) {
$A = DB_fetchArray ($result);
- $fulltext = $A['introtext'] . ' ' . $A['bodytext'];
- $related = implode("\n", STORY_extractLinks($fulltext, $_CONF['whats_related_trim']));
+ // Should maybe retrieve through story service but just grab from database and apply any autotags
+ // This is all the related story column should really need
+ $fulltext = PLG_replaceTags($A['introtext']) . ' ' . PLG_replaceTags($A['bodytext']);
+ $related = DB_escapeString(implode("\n", STORY_extractLinks($fulltext, $_CONF['whats_related_trim'])));
if (!empty($related)) {
DB_query("UPDATE {$_TABLES['stories']} SET related = '$related' WHERE sid = '{$A['sid']}'");
}
More information about the geeklog-cvs
mailing list