fix image= parameter for hostgator

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@653 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-09-01 08:50:11 +00:00
parent 05c863cfe6
commit 17532c2d92
3 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ if($referer && isset($_SESSION['threadid'])) {
mysql_close($link);
}
$image = verifyparam("image","/^\w+$/", "webim");
$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "webim");
$lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", "");
if(!$lang || !locale_exists($lang)) {
$lang = $current_locale;

View File

@ -45,7 +45,7 @@ foreach($allLocales as $curr) {
}
}
$image = verifyparam("image","/^\w+$/", "webim");
$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "webim");
$image_locales = $imageLocales[$image];
$stylelist = array("" => getlocal("page.preview.style_default"));
@ -87,7 +87,7 @@ if( !$lang || !in_array($lang,$image_locales) )
$file = "../locales/${lang}/button/${image}_on.gif";
$size = get_gifimage_size($file);
$imagehref = get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang";
$imagehref = get_app_location($showhost,$forcesecure)."/button.php?i=$image&lang=$lang";
if($groupid) {
$imagehref .= "&group=$groupid";
}

View File

@ -47,7 +47,7 @@ require_once('inc_errors.php');
<div class="field">
<div class="flabel"><?php echo getlocal("page.gen_button.choose_image") ?></div>
<div class="fvaluenodesc">
<select name="image" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select name="i" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>