[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.21,1.22
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Fri Jul 25 06:44:41 EDT 2003
Update of /usr/cvs/geeklog/geeklog-1.3/system
In directory geeklog_prod:/tmp/cvs-serv24618
Modified Files:
lib-plugins.php
Log Message:
Fixed an occassional "call to member function of non-object" error message.
Index: lib-plugins.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** lib-plugins.php 16 Jul 2003 14:44:31 -0000 1.21
--- lib-plugins.php 25 Jul 2003 10:44:39 -0000 1.22
***************
*** 354,358 ****
require_once($_CONF['path_system'] . 'classes/plugin.class.php');
- $cur_plugin = new Plugin();
$result = DB_query("SELECT pi_name FROM {$_TABLES['plugins']} WHERE pi_enabled = 1");
$nrows = DB_numRows($result);
--- 354,357 ----
***************
*** 361,372 ****
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
- $cur_plugin->setExpandedSearchSupport(PLG_supportsExpandedSearch($A['pi_name']));
$function = 'plugin_dopluginsearch_' . $A['pi_name'];
if (function_exists($function)) {
! $cur_plugin->reset();
! $cur_plugin = $function($query, $datestart, $dateend, $topic, $type, $author);
! $nrows_plugins = $nrows_plugins + $cur_plugin->num_searchresults;
! $total_plugins = $total_plugins + $cur_plugin->num_itemssearched;
! $search_results[$i] = $cur_plugin;
} // no else because implementation of this API function not required
}
--- 360,369 ----
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
$function = 'plugin_dopluginsearch_' . $A['pi_name'];
if (function_exists($function)) {
! $plugin_result = $function($query, $datestart, $dateend, $topic, $type, $author);
! $nrows_plugins = $nrows_plugins + $plugin_result->num_searchresults;
! $total_plugins = $total_plugins + $plugin_result->num_itemssearched;
! $search_results[$i] = $plugin_result;
} // no else because implementation of this API function not required
}
More information about the geeklog-cvs
mailing list