[geeklog-cvs] geeklog-1.3/public_html/admin/install install.php,1.67,1.68
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sun Aug 22 13:53:24 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html/admin/install
In directory www:/tmp/cvs-serv22007/public_html/admin/install
Modified Files:
install.php
Log Message:
Changes so that the links for the What's Related block are stored in the database again, instead of having to parse the story every time it is rendered.
Index: install.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/install/install.php,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** install.php 11 Aug 2004 18:36:18 -0000 1.67
--- install.php 22 Aug 2004 17:53:22 -0000 1.68
***************
*** 115,126 ****
}
! if($globals_off || $old_php) {
$retval .= '<h1>Important!</h1>' . LB;
! if($old_php) {
$retval .= '<p><font color="red"><strong>Note:</strong> Geeklog requires PHP 4.1.0 or newer to run. Please upgrade your PHP or ask your hosting service to do it (this is actually in your own interest, as old versions of PHP have security issues).</font></p>' . LB;
}
! if($globals_off) {
$retval .= '<p><font color="red"><strong>Warning:</strong> You have <code>register_globals = Off</code> in your <tt>php.ini</tt>. However, Geeklog requires <code>register_globals</code> to be <strong>on</strong>. Before you continue, please set it to <strong>on</strong> and restart your web server.</font></p>' . LB;
}
--- 115,126 ----
}
! if ($globals_off || $old_php) {
$retval .= '<h1>Important!</h1>' . LB;
! if ($old_php) {
$retval .= '<p><font color="red"><strong>Note:</strong> Geeklog requires PHP 4.1.0 or newer to run. Please upgrade your PHP or ask your hosting service to do it (this is actually in your own interest, as old versions of PHP have security issues).</font></p>' . LB;
}
! if ($globals_off) {
$retval .= '<p><font color="red"><strong>Warning:</strong> You have <code>register_globals = Off</code> in your <tt>php.ini</tt>. However, Geeklog requires <code>register_globals</code> to be <strong>on</strong>. Before you continue, please set it to <strong>on</strong> and restart your web server.</font></p>' . LB;
}
***************
*** 622,625 ****
--- 622,637 ----
commentsToPreorderTree();
+ $result = DB_query ("SELECT sid,introtext,bodytext FROM {$_TABLES['stories']}");
+ $numStories = DB_numRows ($result);
+ for ($i = 0; $i < $numStories; $i++) {
+ $A = DB_fetchArray ($result);
+ $related = addslashes (implode ("\n", UPDATE_extractLinks ($A['introtext'] . ' ' . $A['bodytext'])));
+ if (empty ($related)) {
+ DB_query ("UPDATE {$_TABLES['stories']} SET related = NULL WHERE sid = '{$A['sid']}'");
+ } else {
+ DB_query ("UPDATE {$_TABLES['stories']} SET related = '$related' WHERE sid = '{$A['sid']}'");
+ }
+ }
+
$spversion = get_SP_ver ();
if ($spversion > 0) {
More information about the geeklog-cvs
mailing list