diff --git a/classes/script_start.php b/classes/script_start.php index 242ee830..91af630d 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -2096,7 +2096,7 @@ function update_tracker($Action, $Updates, $ToIRC = false) { send_irc("PRIVMSG #tracker :{$Attempts} {$Err} {$Get}"); if($Cache->get_value('ocelot_error_reported') === false) { send_irc("PRIVMSG ".ADMIN_CHAN." :Failed to update ocelot: ".$Err." : ".$Get); - $Cache->cache_value('ocelot_error_reported', true); + $Cache->cache_value('ocelot_error_reported', true, 900); } } return ($Return == "success"); diff --git a/sections/collages/new.php b/sections/collages/new.php index cbb6155c..fb25845a 100644 --- a/sections/collages/new.php +++ b/sections/collages/new.php @@ -2,10 +2,25 @@ show_header('Create a collage'); if (!check_perms('site_collages_renamepersonal')) { - $ChangeJS = 'OnChange="if ( this.options[this.selectedIndex].value == \'0\') { namebox.style.display = \'none\'; personal.style.display = \'inline\'; } else { namebox.style.display = \'inline\'; personal.style.display = \'none\'; }"'; + $ChangeJS = "OnChange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').hide(); $('#personal').show(); } else { $('#namebox').show(); $('#personal').hide(); }\""; +} + +$Name = $_REQUEST['name']; +$Category = $_REQUEST['cat']; +$Description = $_REQUEST['descr']; +$Tags = $_REQUEST['tags']; +$Error = $_REQUEST['err']; + +if (!check_perms('site_collages_renamepersonal') && $Category === '0') { + $NoName = true; } ?>
+ +
+
+
@@ -13,8 +28,8 @@ Name - - + + 's personal collage @@ -25,12 +40,12 @@ array_shift($CollageCats); foreach($CollageCats as $CatID=>$CatName) { ?> - + query("SELECT COUNT(ID) FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'"); list($CollageCount) = $DB->next_record(); if(($CollageCount < $LoggedUser['Permissions']['MaxCollages']) && check_perms('site_collages_personal')) { ?> - +
@@ -51,13 +66,13 @@ Description - + Tags (comma-separated) - + diff --git a/sections/collages/new_handle.php b/sections/collages/new_handle.php index c10fc3c5..30cafad9 100644 --- a/sections/collages/new_handle.php +++ b/sections/collages/new_handle.php @@ -54,8 +54,13 @@ } if($Err) { - error($Err); - header('Location: collages.php?action=new'); + //error($Err); + $Err = urlencode($Err); + $Name = urlencode($_POST['name']); + $Category = urlencode($_POST['category']); + $Tags = urlencode($_POST['tags']); + $Description = urlencode($_POST['description']); + header("Location: collages.php?action=new&err=$Err&name=$Name&cat=$Category&tags=$Tags&descr=$Description"); die(); }