Sfoglia il codice sorgente

Merge pull request #1460 from MissAllSunday/quick-fixes

Quick fixes
Jessica González 10 anni fa
parent
commit
1e57aeb4ef

+ 1 - 1
Sources/Load.php

@@ -1940,7 +1940,7 @@ function loadTemplate($template_name, $style_sheets = array(), $fatal = true)
 			loadLanguage('Errors');
 			echo '
 <div class="alert errorbox">
-	<a href="', $scripturl . '?action=admin;area=theme;sa=list;th=1;' . $context['session_var'] . '=' . $context['session_id'], '" class="alert">', $txt['theme_dir_wrong'], '</a>
+	<a href="', $scripturl . '?action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id'], '" class="alert">', $txt['theme_dir_wrong'], '</a>
 </div>';
 		}
 

+ 6 - 0
Sources/PackageGet.php

@@ -170,6 +170,12 @@ function PackageServers()
 			$ftp->close();
 		}
 	}
+
+	addInlineJavascript('
+	$(\'.new_package_content\').hide();
+	$(\'.download_new_package\').on(\'click\', function() {
+		$(\'.new_package_content\').css(\'display\') == \'none\' ? $(\'.new_package_content\').show(\'slow\') : $(\'.new_package_content\').hide(\'slow\'); 
+	});', true);
 }
 
 /**

+ 1 - 0
Sources/Recent.php

@@ -1016,6 +1016,7 @@ function UnreadTopics()
 				SELECT t.id_topic, t.id_board, t.id_last_msg, IFNULL(lmr.id_msg, 0) AS id_msg' . (!in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? ', ' . $_REQUEST['sort'] . ' AS sort_key' : '') . '
 				FROM {db_prefix}messages AS m
 					INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
+					LEFT JOIN {db_prefix}log_topics_unread AS lt ON (lt.id_topic = t.id_topic)
 					LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = t.id_board AND lmr.id_member = {int:current_member})' . (isset($sortKey_joins[$_REQUEST['sort']]) ? $sortKey_joins[$_REQUEST['sort']] : '') . '
 				WHERE m.id_member = {int:current_member}' . (!empty($board) ? '
 					AND t.id_board = {int:current_board}' : '') . ($modSettings['postmod_active'] ? '

+ 101 - 99
Themes/default/Packages.template.php

@@ -690,139 +690,141 @@ function template_servers()
 	echo '
 	<div id="admin_form_wrapper">
 		<div class="cat_bar">
-			<h3 class="catbg">', $txt['download_new_package'], '</h3>
-		</div>';
-
-	if ($context['package_download_broken'])
-	{
-		echo '
-		<div class="cat_bar">
-			<h3 class="catbg">', $txt['package_ftp_necessary'], '</h3>
+			<h3 class="catbg">' . $txt['package_upload_title'] . '</h3>
 		</div>
 		<div class="windowbg">
 			<div class="content">
-				<p>
-					', $txt['package_ftp_why_download'], '
-				</p>
-				<form action="', $scripturl, '?action=admin;area=packages;get" method="post" accept-charset="', $context['character_set'], '">
+				<form action="' . $scripturl . '?action=admin;area=packages;get;sa=upload" method="post" accept-charset="', $context['character_set'], '" enctype="multipart/form-data" style="margin-bottom: 0;">
 					<dl class="settings">
 						<dt>
-							<label for="ftp_server">', $txt['package_ftp_server'], ':</label>
-						</dt>
-						<dd>
-							<input type="text" size="30" name="ftp_server" id="ftp_server" value="', $context['package_ftp']['server'], '" class="input_text">
-							<label for="ftp_port">', $txt['package_ftp_port'], ':&nbsp;</label> <input type="text" size="3" name="ftp_port" id="ftp_port" value="', $context['package_ftp']['port'], '" class="input_text">
-						</dd>
-						<dt>
-							<label for="ftp_username">', $txt['package_ftp_username'], ':</label>
-						</dt>
-						<dd>
-							<input type="text" size="50" name="ftp_username" id="ftp_username" value="', $context['package_ftp']['username'], '" style="width: 99%;" class="input_text">
-						</dd>
-						<dt>
-							<label for="ftp_password">', $txt['package_ftp_password'], ':</label>
-						</dt>
-						<dd>
-							<input type="password" size="50" name="ftp_password" id="ftp_password" style="width: 99%;" class="input_password">
-						</dd>
-						<dt>
-							<label for="ftp_path">', $txt['package_ftp_path'], ':</label>
+							<strong>' . $txt['package_upload_select'] . ':</strong>
 						</dt>
 						<dd>
-							<input type="text" size="50" name="ftp_path" id="ftp_path" value="', $context['package_ftp']['path'], '" style="width: 99%;" class="input_text">
+							<input type="file" name="package" size="38" class="input_file">
 						</dd>
 					</dl>
-					<div class="righttext">
-						<input type="submit" value="', $txt['package_proceed'], '" class="button_submit">
-					</div>
+					<hr class="hrcolor">
+					<input type="submit" value="' . $txt['package_upload'] . '" class="button_submit">
+					<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
 				</form>
 			</div>
-		</div>';
-	}
+		</div>
+		<br>
+		<div class="cat_bar">
+			<h3 class="catbg"><a class="download_new_package">', $txt['download_new_package'], '</a></h3>
+		</div>
+		<div class="new_package_content">';
 
-	echo '
-		<div class="windowbg2">
-			<div class="content">
-				<fieldset>
-					<legend>' . $txt['package_servers'] . '</legend>
-					<ul class="package_servers">';
-	foreach ($context['servers'] as $server)
+	if ($context['package_download_broken'])
+	{
 		echo '
-						<li class="flow_auto">
-							<span class="floatleft">' . $server['name'] . '</span>
-							<span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=remove;server=' . $server['id'] . ';', $context['session_var'], '=', $context['session_id'], '">[ ' . $txt['delete'] . ' ]</a></span>
-							<span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=browse;server=' . $server['id'] . '">[ ' . $txt['package_browse'] . ' ]</a></span>
-						</li>';
-	echo '
-					</ul>
-				</fieldset>
-				<fieldset>
-					<legend>' . $txt['add_server'] . '</legend>
-					<form action="' . $scripturl . '?action=admin;area=packages;get;sa=add" method="post" accept-charset="', $context['character_set'], '">
+			<div class="cat_bar">
+				<h3 class="catbg">', $txt['package_ftp_necessary'], '</h3>
+			</div>
+			<div class="windowbg">
+				<div class="content">
+					<p>
+						', $txt['package_ftp_why_download'], '
+					</p>
+					<form action="', $scripturl, '?action=admin;area=packages;get" method="post" accept-charset="', $context['character_set'], '">
 						<dl class="settings">
 							<dt>
-								<strong>' . $txt['server_name'] . ':</strong>
+								<label for="ftp_server">', $txt['package_ftp_server'], ':</label>
 							</dt>
 							<dd>
-								<input type="text" name="servername" size="44" value="SMF" class="input_text">
+								<input type="text" size="30" name="ftp_server" id="ftp_server" value="', $context['package_ftp']['server'], '" class="input_text">
+								<label for="ftp_port">', $txt['package_ftp_port'], ':&nbsp;</label> <input type="text" size="3" name="ftp_port" id="ftp_port" value="', $context['package_ftp']['port'], '" class="input_text">
 							</dd>
 							<dt>
-								<strong>' . $txt['serverurl'] . ':</strong>
+								<label for="ftp_username">', $txt['package_ftp_username'], ':</label>
 							</dt>
 							<dd>
-								<input type="text" name="serverurl" size="44" value="http://" class="input_text">
+								<input type="text" size="50" name="ftp_username" id="ftp_username" value="', $context['package_ftp']['username'], '" style="width: 99%;" class="input_text">
 							</dd>
-						</dl>
-						<div class="righttext">
-							<input type="submit" value="' . $txt['add_server'] . '" class="button_submit">
-							<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
-						</div>
-					</form>
-				</fieldset>
-				<fieldset>
-					<legend>', $txt['package_download_by_url'], '</legend>
-					<form action="', $scripturl, '?action=admin;area=packages;get;sa=download;byurl;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
-						<dl class="settings">
 							<dt>
-								<strong>' . $txt['serverurl'] . ':</strong>
+								<label for="ftp_password">', $txt['package_ftp_password'], ':</label>
 							</dt>
 							<dd>
-								<input type="text" name="package" size="44" value="http://" class="input_text">
+								<input type="password" size="50" name="ftp_password" id="ftp_password" style="width: 99%;" class="input_password">
 							</dd>
 							<dt>
-								<strong>', $txt['package_download_filename'], ':</strong>
+								<label for="ftp_path">', $txt['package_ftp_path'], ':</label>
 							</dt>
 							<dd>
-								<input type="text" name="filename" size="44" class="input_text"><br>
-								<span class="smalltext">', $txt['package_download_filename_info'], '</span>
+								<input type="text" size="50" name="ftp_path" id="ftp_path" value="', $context['package_ftp']['path'], '" style="width: 99%;" class="input_text">
 							</dd>
 						</dl>
 						<div class="righttext">
-							<input type="submit" value="', $txt['download'], '" class="button_submit">
+							<input type="submit" value="', $txt['package_proceed'], '" class="button_submit">
 						</div>
 					</form>
-				</fieldset>
-			</div>
-		</div>
-		<br>
-		<div class="cat_bar">
-			<h3 class="catbg">' . $txt['package_upload_title'] . '</h3>
-		</div>
-		<div class="windowbg">
-			<div class="content">
-				<form action="' . $scripturl . '?action=admin;area=packages;get;sa=upload" method="post" accept-charset="', $context['character_set'], '" enctype="multipart/form-data" style="margin-bottom: 0;">
-					<dl class="settings">
-						<dt>
-							<strong>' . $txt['package_upload_select'] . ':</strong>
-						</dt>
-						<dd>
-							<input type="file" name="package" size="38" class="input_file">
-						</dd>
-					</dl>
-					<hr class="hrcolor">
-					<input type="submit" value="' . $txt['package_upload'] . '" class="button_submit">
-					<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
-				</form>
+				</div>
+			</div>';
+	}
+
+	echo '
+			<div class="windowbg2">
+				<div class="content">
+					<fieldset>
+						<legend>' . $txt['package_servers'] . '</legend>
+						<ul class="package_servers">';
+	foreach ($context['servers'] as $server)
+		echo '
+							<li class="flow_auto">
+								<span class="floatleft">' . $server['name'] . '</span>
+								<span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=remove;server=' . $server['id'] . ';', $context['session_var'], '=', $context['session_id'], '">[ ' . $txt['delete'] . ' ]</a></span>
+								<span class="package_server floatright"><a href="' . $scripturl . '?action=admin;area=packages;get;sa=browse;server=' . $server['id'] . '">[ ' . $txt['package_browse'] . ' ]</a></span>
+							</li>';
+	echo '
+						</ul>
+					</fieldset>
+					<fieldset>
+						<legend>' . $txt['add_server'] . '</legend>
+						<form action="' . $scripturl . '?action=admin;area=packages;get;sa=add" method="post" accept-charset="', $context['character_set'], '">
+							<dl class="settings">
+								<dt>
+									<strong>' . $txt['server_name'] . ':</strong>
+								</dt>
+								<dd>
+									<input type="text" name="servername" size="44" value="SMF" class="input_text">
+								</dd>
+								<dt>
+									<strong>' . $txt['serverurl'] . ':</strong>
+								</dt>
+								<dd>
+									<input type="text" name="serverurl" size="44" value="http://" class="input_text">
+								</dd>
+							</dl>
+							<div class="righttext">
+								<input type="submit" value="' . $txt['add_server'] . '" class="button_submit">
+								<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '">
+							</div>
+						</form>
+					</fieldset>
+					<fieldset>
+						<legend>', $txt['package_download_by_url'], '</legend>
+						<form action="', $scripturl, '?action=admin;area=packages;get;sa=download;byurl;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
+							<dl class="settings">
+								<dt>
+									<strong>' . $txt['serverurl'] . ':</strong>
+								</dt>
+								<dd>
+									<input type="text" name="package" size="44" value="http://" class="input_text">
+								</dd>
+								<dt>
+									<strong>', $txt['package_download_filename'], ':</strong>
+								</dt>
+								<dd>
+									<input type="text" name="filename" size="44" class="input_text"><br>
+									<span class="smalltext">', $txt['package_download_filename_info'], '</span>
+								</dd>
+							</dl>
+							<div class="righttext">
+								<input type="submit" value="', $txt['download'], '" class="button_submit">
+							</div>
+						</form>
+					</fieldset>
+				</div>
 			</div>
 		</div>
 	</div>';

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

@@ -440,7 +440,7 @@ $txt['split_after_and_this_post'] = 'Split topic after and including this post.'
 $txt['select_split_posts'] = 'Select posts to split.';
 $txt['new_topic'] = 'New Topic';
 $txt['split_successful'] = 'Topic successfully split into two topics.';
-$txt['origin_topic'] = 'Origin Topic';
+$txt['origin_topic'] = 'Original Topic';
 $txt['please_select_split'] = 'Please select which posts you wish to split.';
 $txt['merge_successful'] = 'Topics successfully merged.';
 $txt['new_merged_topic'] = 'Newly Merged Topic';