From c4b7977a4272e7e7dedc2adc7d2b2e18867ef27a Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 1 Feb 2016 10:52:07 +0100 Subject: [PATCH 01/30] next version is 2.8.0RC2 --- include/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants.php b/include/constants.php index 8363f0d69..ab7c067c3 100644 --- a/include/constants.php +++ b/include/constants.php @@ -22,7 +22,7 @@ // +-----------------------------------------------------------------------+ // Default settings -define('PHPWG_VERSION', '2.8.0RC1'); +define('PHPWG_VERSION', '2.8.0RC2'); define('PHPWG_DEFAULT_LANGUAGE', 'en_UK'); define('PHPWG_DEFAULT_TEMPLATE', 'elegant'); From 6af4590f01c7ea249c6d03b37fb1001ce96b7f4c Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 3 Feb 2016 10:21:36 +0100 Subject: [PATCH 02/30] fixes #410, add param thumbnail_size to pwg.categories.getList --- include/ws_functions/pwg.categories.php | 9 +++++++-- ws.php | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/ws_functions/pwg.categories.php b/include/ws_functions/pwg.categories.php index 5bafaf5da..f55a7a773 100644 --- a/include/ws_functions/pwg.categories.php +++ b/include/ws_functions/pwg.categories.php @@ -181,6 +181,11 @@ function ws_categories_getList($params, &$service) { global $user, $conf; + if (!in_array($params['thumbnail_size'], array_keys(ImageStdParams::get_defined_type_map()))) + { + return new PwgError(WS_ERR_INVALID_PARAM, "Invalid thumbnail_size"); + } + $where = array('1=1'); $join_type = 'INNER'; $join_user = $user['id']; @@ -366,7 +371,7 @@ SELECT id, path, representative_ext, level { if ($row['level'] <= $user['level']) { - $thumbnail_src_of[$row['id']] = DerivativeImage::thumb_url($row); + $thumbnail_src_of[$row['id']] = DerivativeImage::url($params['thumbnail_size'], $row); } else { @@ -411,7 +416,7 @@ SELECT id, path, representative_ext while ($row = pwg_db_fetch_assoc($result)) { - $thumbnail_src_of[ $row['id'] ] = DerivativeImage::thumb_url($row); + $thumbnail_src_of[ $row['id'] ] = DerivativeImage::url($params['thumbnail_size'], $row); } } } diff --git a/ws.php b/ws.php index 66e6a707d..16695b697 100644 --- a/ws.php +++ b/ws.php @@ -193,6 +193,10 @@ function ws_addDefaultMethods( $arr ) 'type'=>WS_TYPE_BOOL), 'fullname' => array('default'=>false, 'type'=>WS_TYPE_BOOL), + 'thumbnail_size' => array( + 'default' => 'thumb', + 'info' => 'square, thumb, 2small, xsmall, small, medium, large, xlarge, xxlarge' + ), ), 'Returns a list of categories.', $ws_functions_root . 'pwg.categories.php' From c67bf030d1e99c8c0ddbce9e3d84336a333597bd Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 4 Feb 2016 10:14:44 +0100 Subject: [PATCH 03/30] feature #410, use constant as default value --- ws.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ws.php b/ws.php index 16695b697..44e34b3a6 100644 --- a/ws.php +++ b/ws.php @@ -194,7 +194,7 @@ function ws_addDefaultMethods( $arr ) 'fullname' => array('default'=>false, 'type'=>WS_TYPE_BOOL), 'thumbnail_size' => array( - 'default' => 'thumb', + 'default' => IMG_THUMB, 'info' => 'square, thumb, 2small, xsmall, small, medium, large, xlarge, xxlarge' ), ), From 0909717c37cdf2ddadcddaf92d610f5243ec3c17 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 10 Feb 2016 12:37:12 +0100 Subject: [PATCH 04/30] if php version is less than 7.0.3 and session_id exists do nothing --- include/functions_user.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index ac85d1b47..f0d30ea49 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -945,10 +945,13 @@ function log_user($user_id, $remember_me) { // make sure we clean any remember me ... setcookie($conf['remember_me_name'], '', 0, cookie_path(),ini_get('session.cookie_domain')); } - if ( session_id()!="" and (version_compare(PHP_VERSION, '7') <= 0 or version_compare(PHP_VERSION, '7.0.3') >= 0)) + if ( session_id()!="" ) { // we regenerate the session for security reasons // see http://www.acros.si/papers/session_fixation.pdf - session_regenerate_id(true); + if ((version_compare(PHP_VERSION, '7') <= 0 or version_compare(PHP_VERSION, '7.0.3') >= 0)) + { + session_regenerate_id(true); + } } else { From 08fe998dd10fbf3fe79e8722df891b9496228b4a Mon Sep 17 00:00:00 2001 From: plg Date: Wed, 10 Feb 2016 15:19:40 +0100 Subject: [PATCH 05/30] session_regenerate_id() still fails with PHP 7.0.3 fix indentation --- include/functions_user.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index f0d30ea49..2591929b4 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -948,10 +948,10 @@ function log_user($user_id, $remember_me) if ( session_id()!="" ) { // we regenerate the session for security reasons // see http://www.acros.si/papers/session_fixation.pdf - if ((version_compare(PHP_VERSION, '7') <= 0 or version_compare(PHP_VERSION, '7.0.3') >= 0)) - { - session_regenerate_id(true); - } + if (version_compare(PHP_VERSION, '7') <= 0) + { + session_regenerate_id(true); + } } else { From 718fe065f7cd342b8f5e3fb069aec63138d5b3e8 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 12 Feb 2016 14:09:29 +0100 Subject: [PATCH 06/30] feature #360, add CSS class on navigation links navPrevNext and navFirstLast, to make it possible to hide them. --- themes/default/template/navigation_bar.tpl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/themes/default/template/navigation_bar.tpl b/themes/default/template/navigation_bar.tpl index 82c66bd15..0e1e0fea7 100644 --- a/themes/default/template/navigation_bar.tpl +++ b/themes/default/template/navigation_bar.tpl @@ -1,10 +1,10 @@ From 6290be46f2307e8b47937af153dcf2b66bba2e4e Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 12 Feb 2016 14:56:00 +0100 Subject: [PATCH 07/30] fixes #419, an admin can't change webmaster password --- admin/themes/default/template/user_list.tpl | 4 +++- admin/user_list.php | 12 ++++++++++-- include/ws_functions/pwg.users.php | 21 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl index 54b8b936e..dedf59cf6 100644 --- a/admin/themes/default/template/user_list.tpl +++ b/admin/themes/default/template/user_list.tpl @@ -28,6 +28,7 @@ var selection = [{$selection}]; var pwg_token = "{$PWG_TOKEN}"; var protectedUsers = [{$protected_users}]; +var passwordProtectedUsers = [{$password_protected_users}]; var guestUser = {$guest_user}; var truefalse = { @@ -247,6 +248,7 @@ jQuery(document).ready(function() { user.isGuest = (parseInt(userId) == guestUser); user.isProtected = (protectedUsers.indexOf(parseInt(userId)) != -1); + user.isPasswordProtected = (passwordProtectedUsers.indexOf(parseInt(userId)) != -1); user.registeredOn_string = sprintf( registeredOn_pattern, @@ -1051,7 +1053,7 @@ span.infos, span.errors {background-image:none; padding:2px 5px; margin:0;border