Bläddra i källkod

Merge pull request #365 from emanuele45/query_fix

Fix for a broken query when titlesEnable is set to false - Thanks Wancho...
Oldiesmann 11 år sedan
förälder
incheckning
e03801f991
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      Sources/Load.php
  2. 1 1
      Sources/Profile-Modify.php

+ 1 - 1
Sources/Load.php

@@ -929,7 +929,7 @@ function loadMemberData($users, $is_name = false, $set = 'normal')
 			mem.karma_good, mem.id_post_group, mem.karma_bad, mem.lngfile, mem.id_group, mem.time_offset, mem.show_online,
 			mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,
 			pg.online_color AS post_group_color, IFNULL(pg.group_name, {string:blank_string}) AS post_group,
-			mem.is_activated, mem.warning' . (!empty($modSettings['titlesEnable']) ? ', mem.usertitle, ' : '') . '
+			mem.is_activated, mem.warning, ' . (!empty($modSettings['titlesEnable']) ? 'mem.usertitle, ' : '') . '
 			CASE WHEN mem.id_group = 0 OR mg.icons = {string:blank_string} THEN pg.icons ELSE mg.icons END AS icons';
 	$select_tables = '
 			LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)

+ 1 - 1
Sources/Profile-Modify.php

@@ -639,7 +639,7 @@ function loadProfileFields($force_reload = false)
 			'input_validate' => create_function('&$value', '
 				global $smcFunc;
 
-				if ($smcFunc[\'strlen\'] > 50)
+				if ($smcFunc[\'strlen\']($value) > 50)
 					return \'user_title_too_long\';
 
 				return true;