All pastes #257905 Raw Edit

Unnamed

public text v1 · immutable
#257905 ·published 2006-11-25 22:30 UTC
rendered paste body
Index: albums.php
===================================================================
--- albums.php  (revision 696)
+++ albums.php  (working copy)
@@ -74,15 +74,15 @@
        // get the Album information
         $album = new Album($_REQUEST['album_id']);

-       if (isset($_REQUEST['artist_name'])) {
-               $artist = scrub_in($_REQUEST['artist_name']);
+       if (isset($_POST['artist_name'])) {
+               $artist = scrub_in($_POST['artist_name']);
        }
        elseif ($album->artist_count == '1') {
                $artist = $album->artist;
        }

-       if (isset($_REQUEST['album_name'])) {
-               $album_name = scrub_in($_REQUEST['album_name']);
+       if (isset($_POST['album_name'])) {
+               $album_name = scrub_in($_POST['album_name']);
        }
        else {
                $album_name = $album->name;
@@ -91,11 +91,11 @@
        $search = $artist . " " . $album_name;

        //Find out if the cover url is a local filename or an url
-       if (empty($_FILES['file'])){
-               $coverurl = $_REQUEST['cover'];
+       if (empty($_FILES['file']['tmp_name'])){
+               $coverurl = $_POST['cover'];

                // Attempt to find the art with what we've got
-               $images = $album->find_art($_REQUEST['cover'], $search);
+               $images = $album->find_art($_POST['cover'], $search);
                $_SESSION['form']['images'] = $images;

                if (count($images)) {
@@ -109,8 +109,8 @@
                $artistname = $artist;

                // Remember the last typed entry, if there was one
-               if (isset($_REQUEST['album_name'])) {   $albumname = scrub_in($_REQUEST['album_name']); }
-               if (isset($_REQUEST['artist_name'])) {  $artistname = scrub_in($_REQUEST['artist_name']); }
+               if (isset($_POST['album_name'])) {   $albumname = scrub_in($_POST['album_name']); }
+               if (isset($_POST['artist_name'])) {  $artistname = scrub_in($_POST['artist_name']); }

        include(conf('prefix') . '/templates/show_get_albumart.inc.php');