Browse Source

Typos and other silly bugs

Signed-off-by: Suki <suki@missallsunday.com>
Suki 11 years ago
parent
commit
a5b354cfd5
2 changed files with 5 additions and 5 deletions
  1. 2 2
      Sources/Subs-Themes.php
  2. 3 3
      Sources/Themes.php

+ 2 - 2
Sources/Subs-Themes.php

@@ -123,12 +123,12 @@ function theme_install($to_install = array())
 
 	// Defaults.
 	$context['to_install'] = array(
-		'theme_url' => $boardurl . '/Themes/' . basename($context['to_install']['dir']),
+		'theme_url' => $themeurl . '/' . basename($context['to_install']['dir']),
 	);
 
 	// This vars could have been set, it all depends from where are we coming.
 	if (empty($context['to_install']['images_url']))
-		$context['to_install']['images_url'] = $boardurl . '/Themes/' . basename($context['to_install']['dir']) . '/images';
+		$context['to_install']['images_url'] = $themeurl . '/' . basename($context['to_install']['dir']) . '/images';
 
 	// Perhaps they are trying to install a mod, lets tell them nicely this is the wrong function.
 	if (file_exists($context['to_install']['dir'] . '/package-info.xml'))

+ 3 - 3
Sources/Themes.php

@@ -1336,7 +1336,7 @@ function InstallFile()
 		fatal_lang_error('theme_install_error_file_'. $_FILES['theme_gz']['error'], false);
 
 	// Get the theme's name.
-	$theme_name = strtok(basename($_FILES['theme_gz']['name']);
+	$theme_name = strtok(basename($_FILES['theme_gz']['name']));
 	$theme_name = preg_replace(array('/\s/', '/\.[\.]+/', '/[^\w_\.\-]/'), array('_', '.', ''), $theme_name);
 
 	// Start setting some vars.
@@ -1481,10 +1481,10 @@ function InstallDir()
 	global $themedir;
 
 	// Cannot use the theme dir as a theme dir.
-	elseif (!isset($_REQUEST['theme_dir']) || empty($_REQUEST['theme_dir']) || rtrim(realpath($_REQUEST['theme_dir']), '/\\') == realpath($themedir))
+	if (!isset($_REQUEST['theme_dir']) || empty($_REQUEST['theme_dir']) || rtrim(realpath($_REQUEST['theme_dir']), '/\\') == realpath($themedir))
 		fatal_lang_error('theme_install_invalid_dir', false);
 
-	// Check is there is "somthing" on the dir.
+	// Check is there is "something" on the dir.
 	elseif (!is_dir($_REQUEST['theme_dir']) || !file_exists($_REQUEST['theme_dir'] . '/theme_info.xml'))
 		fatal_lang_error('theme_install_error', false);