Ver Fonte

! clean up various things, none of them worth their own commit ... txt stings, spacing, {}'s, etc

Spuds há 12 anos atrás
pai
commit
24b04b10af

+ 9 - 0
Sources/ManageSettings.php

@@ -2346,6 +2346,7 @@ function get_files_recursive($dir_path)
 	if ($dh = opendir($dir_path))
 	{
 		while (($file = readdir($dh)) !== false)
+		{
 			if ($file != '.' && $file != '..')
 			{
 				if (is_dir($dir_path . '/' . $file))
@@ -2353,6 +2354,7 @@ function get_files_recursive($dir_path)
 				else
 					$files[] = array('dir' => $dir_path, 'name' => $file);
 			}
+		}
 	}
 	closedir($dh);
 
@@ -2368,6 +2370,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 
 	$files = get_files_recursive($sourcedir);
 	if (!empty($files))
+	{
 		foreach ($files as $file)
 		{
 			if (is_file($file['dir'] . '/' . $file['name']) && substr($file['name'], -4) === '.php')
@@ -2401,6 +2404,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 				}
 			}
 		}
+	}
 
 	$sort_types = array(
 		'hook_name' => array('hook', SORT_ASC),
@@ -2425,6 +2429,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 		{
 			$enabled = strstr($function, ']') === false;
 			$function = str_replace(']', '', $function);
+			
 			// This is a not an include and the function is included in a certain file (if not it doesn't exists so don't care)
 			if (substr($hook, -8) !== '_include' && isset($hook_status[$hook][$function]['in_file']))
 			{
@@ -2451,6 +2456,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 	foreach ($hooks as $hook => $functions)
 	{
 		if (empty($context['filter']) || (!empty($context['filter']) && $context['filter'] == $hook))
+		{
 			foreach ($functions as $function)
 			{
 				$enabled = strstr($function, ']') === false;
@@ -2471,6 +2477,7 @@ function get_integration_hooks_data($start, $per_page, $sort)
 					'can_be_disabled' => !isset($hook_status[$hook][$function]['enabled']),
 				);
 			}
+		}
 	}
 
 	array_multisort($sort, $sort_options[1], $temp_data);
@@ -2503,8 +2510,10 @@ function get_integration_hooks_count()
 		$context['filter'] = $_GET['filter'];
 
 	foreach ($hooks as $hook => $functions)
+	{
 		if (empty($context['filter']) || (!empty($context['filter']) && $context['filter'] == $hook))
 			$hooks_count += count($functions);
+	}
 
 	return $hooks_count;
 }

+ 8 - 0
Sources/Profile-Modify.php

@@ -2878,18 +2878,21 @@ function profileValidateSignature(&$value)
 		$disabledTags = !empty($sig_bbc) ? explode(',', $sig_bbc) : array();
 
 		$unparsed_signature = strtr(un_htmlspecialchars($value), array("\r" => '', '&#039' => '\''));
+		
 		// Too many lines?
 		if (!empty($sig_limits[2]) && substr_count($unparsed_signature, "\n") >= $sig_limits[2])
 		{
 			$txt['profile_error_signature_max_lines'] = sprintf($txt['profile_error_signature_max_lines'], $sig_limits[2]);
 			return 'signature_max_lines';
 		}
+		
 		// Too many images?!
 		if (!empty($sig_limits[3]) && (substr_count(strtolower($unparsed_signature), '[img') + substr_count(strtolower($unparsed_signature), '<img')) > $sig_limits[3])
 		{
 			$txt['profile_error_signature_max_image_count'] = sprintf($txt['profile_error_signature_max_image_count'], $sig_limits[3]);
 			return 'signature_max_image_count';
 		}
+		
 		// What about too many smileys!
 		$smiley_parsed = $unparsed_signature;
 		parsesmileys($smiley_parsed);
@@ -2901,6 +2904,7 @@ function profileValidateSignature(&$value)
 			$txt['profile_error_signature_max_smileys'] = sprintf($txt['profile_error_signature_max_smileys'], $sig_limits[4]);
 			return 'signature_max_smileys';
 		}
+		
 		// Maybe we are abusing font sizes?
 		if (!empty($sig_limits[7]) && preg_match_all('~\[size=([\d\.]+)?(px|pt|em|x-large|larger)~i', $unparsed_signature, $matches) !== false && isset($matches[2]))
 		{
@@ -2924,6 +2928,7 @@ function profileValidateSignature(&$value)
 				}
 			}
 		}
+		
 		// The difficult one - image sizes! Don't error on this - just fix it.
 		if ((!empty($sig_limits[5]) || !empty($sig_limits[6])))
 		{
@@ -3008,6 +3013,7 @@ function profileValidateSignature(&$value)
 					$value = str_replace(array_keys($replaces), array_values($replaces), $value);
 			}
 		}
+		
 		// Any disabled BBC?
 		$disabledSigBBC = implode('|', $disabledTags);
 		if (!empty($disabledSigBBC))
@@ -3022,6 +3028,7 @@ function profileValidateSignature(&$value)
 	}
 
 	preparsecode($value);
+	
 	// Too long?
 	if (!allowedTo('admin_forum') && !empty($sig_limits[1]) && $smcFunc['strlen'](str_replace('<br />', "\n", $value)) > $sig_limits[1])
 	{
@@ -3064,6 +3071,7 @@ function profileValidateEmail($email, $memID = 0)
 			'email_address' => $email,
 		)
 	);
+	
 	if ($smcFunc['db_num_rows']($request) > 0)
 		return 'email_taken';
 	$smcFunc['db_free_result']($request);

+ 1 - 0
Sources/Profile-View.php

@@ -536,6 +536,7 @@ function showAttachments($memID)
 
 	// OBEY permissions!
 	$boardsAllowed = boardsAllowedTo('view_attachments');
+	
 	// Make sure we can't actually see anything...
 	if (empty($boardsAllowed))
 		$boardsAllowed = array(-1);

+ 2 - 0
Sources/Security.php

@@ -786,6 +786,7 @@ function createToken($action, $type = 'post')
 
 /**
  * Only patrons with valid tokens can ride this ride.
+ *
  * @param string $action
  * @param string $type = 'post' (get, request, or post)
  * @param bool $reset = true
@@ -858,6 +859,7 @@ function cleanTokens($complete = false)
  * Depending on the value of is_fatal shows an error or returns true or false.
  * Frees a sequence number from the stack after it's been checked.
  * Frees a sequence number without checking if action == 'free'.
+ *
  * @param string $action
  * @param bool $is_fatal = true
  * @return bool

+ 1 - 1
Themes/default/Display.template.php

@@ -492,7 +492,7 @@ function template_main()
 		// Can the user modify the contents of this post?  Show the modify inline image.
 		if ($message['can_modify'])
 			echo '
-							<img src="', $settings['images_url'], '/icons/modify_inline.png" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', (isBrowser('is_ie5') || isBrowser('is_ie5.5') ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
+							<img src="', $settings['images_url'], '/icons/modify_inline.png" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: pointer; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
 
 		// Assuming there are attachments...
 		if (!empty($message['attachment']))

+ 1 - 1
Themes/default/css/admin.css

@@ -3,7 +3,7 @@
 
 #quick_search form, h3.catbg #quick_search form
 {
-	padding: 7px;
+	padding: .8em;
 	line-height: 0.9em;
 	font-size: 0.8em !important;
 }

+ 1 - 1
Themes/default/languages/Admin.english.php

@@ -649,7 +649,7 @@ $txt['hooks_field_hook_exists'] = 'Status';
 $txt['hooks_active'] = 'Exists';
 $txt['hooks_disabled'] = 'Disabled';
 $txt['hooks_missing'] = 'Not found';
-$txt['hooks_no_hooks'] = 'There are not any hooks setup.';
+$txt['hooks_no_hooks'] = 'There are currenty no hooks in the system.';
 $txt['hooks_button_remove'] = 'Remove';
 $txt['hooks_disable_instructions'] = 'Click on the status icon to enable or disable the hook';
 $txt['hooks_disable_legend'] = 'Legend';

+ 1 - 1
Themes/default/languages/Themes.english.php

@@ -64,7 +64,7 @@ $txt['enable_random_news'] = 'Enable random news line in the forum header';
 $txt['show_group_key'] = 'Show group key on board index';
 $txt['additional_options_collapsable'] = 'Enable collapsible additional post options';
 $txt['message_index_preview'] = 'Show post previews on the message index';
-$txt['message_index_preview_first'] = 'When show post previews, Show the text of the first post';
+$txt['message_index_preview_first'] = 'When using post previews, Show the text of the first post';
 $txt['message_index_preview_first_desc'] = 'Leave un-checked to show the text of the last post instead';
 $txt['allow_no_censored'] = 'Allow users to turn off word censoring';
 $txt['who_display_viewing'] = 'Show who is viewing the board index and posts';