[geeklog-cvs] geeklog: Fixed a few problems with uninitialized variables and u...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 12 10:30:23 EST 2011
changeset 8097:d9c55a4c7e4c
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d9c55a4c7e4c
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 12 16:30:12 2011 +0100
description:
Fixed a few problems with uninitialized variables and undefined indexes
diffstat:
public_html/admin/plugins.php | 1 +
system/lib-admin.php | 1 +
system/lib-plugins.php | 6 ++++--
3 files changed, 6 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 78b19842f72d -r d9c55a4c7e4c public_html/admin/plugins.php
--- a/public_html/admin/plugins.php Sat Feb 12 16:02:50 2011 +0100
+++ b/public_html/admin/plugins.php Sat Feb 12 16:30:12 2011 +0100
@@ -317,6 +317,7 @@
$data_arr[] = array(
'pi_name' => $dir,
'pi_display_name' => plugin_get_pluginname($dir),
+ 'pi_gl_version' => '',
'number' => $index,
'install_link' => $url
);
diff -r 78b19842f72d -r d9c55a4c7e4c system/lib-admin.php
--- a/system/lib-admin.php Sat Feb 12 16:02:50 2011 +0100
+++ b/system/lib-admin.php Sat Feb 12 16:30:12 2011 +0100
@@ -1159,6 +1159,7 @@
if (!PLG_checkDependencies($A['pi_name'])) {
$retval = str_replace('<img ', '<img title="' . $LANG32[64] . '" ', $icon_arr['warning']);
} else {
+ $not_present = false;
if ($A['pi_enabled'] == 1) {
$switch = 'enabled';
$title = $LANG32[49];
diff -r 78b19842f72d -r d9c55a4c7e4c system/lib-plugins.php
--- a/system/lib-plugins.php Sat Feb 12 16:02:50 2011 +0100
+++ b/system/lib-plugins.php Sat Feb 12 16:30:12 2011 +0100
@@ -2761,6 +2761,7 @@
*/
function PLG_resolveDependencies() {
global $_PLUGINS, $_TABLES;
+ $retval = '';
$flag = true; // false means that all dependencies are resolved
while ($flag) { // loop until ALL dependencies are satisfied
$flag = false; // set this if any plugin has been disabled during the loop
@@ -2829,8 +2830,9 @@
*/
function PLG_printDependencies($pi_name, $pi_gl_version='') {
global $LANG32;
+ $retval = '';
$params = PLG_getParams($pi_name);
- if (count($params['requires']) > 0) { // new autoinstall type
+ if (isset($params['requires']) && count($params['requires']) > 0) { // new autoinstall type
foreach ($params['requires'] as $key => $value) {
$op = '>='; // set the default
if (!empty($value['operator'])) { // optional operator included
@@ -2879,7 +2881,7 @@
global $_TABLES;
$retval = true;
$params = PLG_getParams($pi_name);
- if (count($params['requires']) > 0) { // plugin exists and uses new installer
+ if (isset($params['requires']) && count($params['requires']) > 0) { // plugin exists and uses new installer
foreach ($params['requires'] as $key => $value) {
$name = $value['name'];
$ver = $value['version'];
More information about the geeklog-cvs
mailing list