diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-10 09:14:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-10 09:14:18 +0000 |
commit | d709751a3f5cf3fdf5b4036ef1486b14df6a646d (patch) | |
tree | 1e9d80ddc0f9d23c2e13181cb4fc6ed11d1afedb | |
parent | e0c75b5684693605d38c437b0d3857a87127ff04 (diff) | |
download | ampache-d709751a3f5cf3fdf5b4036ef1486b14df6a646d.tar.gz ampache-d709751a3f5cf3fdf5b4036ef1486b14df6a646d.tar.bz2 ampache-d709751a3f5cf3fdf5b4036ef1486b14df6a646d.zip |
fixed registration, show edit song title issue and added limit to xml api
-rwxr-xr-x | docs/CHANGELOG | 5 | ||||
-rw-r--r-- | lib/class/xmldata.class.php | 13 | ||||
-rw-r--r-- | register.php | 11 | ||||
-rw-r--r-- | server/xml.server.php | 27 | ||||
-rw-r--r-- | templates/show_edit_song_row.inc.php | 2 |
5 files changed, 46 insertions, 12 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index f971dccf..893e7cc7 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,11 @@ -------------------------------------------------------------------------- v.3.4-Beta2 + - Added limit option to the XML API + - Fixed an issue where inline song editing wouldn't update the song + title (Thx profner) + - Fixed conf error on registration confirmation and made it + aware of greylisting - Fixed Admin Preference Level updates - Fixed incorrect command for skip to on HttpQ (Thx usaf_pride) - Fixed problem with gif and png resize diff --git a/lib/class/xmldata.class.php b/lib/class/xmldata.class.php index 6d5baa26..491d4074 100644 --- a/lib/class/xmldata.class.php +++ b/lib/class/xmldata.class.php @@ -28,7 +28,7 @@ class xmlData { // This is added so that we don't pop any webservers - public static $limit = '5000'; + private static $limit = '5000'; private static $offset = '0'; /** @@ -53,6 +53,17 @@ class xmlData { } // set_offset /** + * set_limit + * This sets the limit for any ampache transactions + */ + public static function set_limit($limit) { + + $limit = intval($limit); + self::$limit = $limit; + + } // set_limit + + /** * error * This generates a standard XML Error message * nothing fancy here... diff --git a/register.php b/register.php index c0a31127..f0b3fc4b 100644 --- a/register.php +++ b/register.php @@ -110,7 +110,7 @@ switch ($_REQUEST['action']) { $attempt++; } - if ($validate_results[0]) { + if ($validate_results[0] OR strstr($validate_results[1],"greylist")) { $mmsg = "MAILOK"; } else { @@ -164,15 +164,8 @@ switch ($_REQUEST['action']) { $validation = md5(uniqid(rand(), true)); $client->update_validation($validation); - $message = 'Your account has been created. However, this application requires account activation.' . - ' An activation key has been sent to the e-mail address you provided. ' . - 'Please check your e-mail for further information'; - Registration::send_confirmation($username, $fullname, $email, $pass1, $validation); - ?> - <link rel="stylesheet" href="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/templates/default.css" type="text/css" /> - <?php - show_confirmation(_('Registration Complete'),$message,'/login.php'); + require_once Config::get('prefix') . '/templates/show_registration_confirmation.inc.php'; break; case 'show_add_user': default: diff --git a/server/xml.server.php b/server/xml.server.php index 18bf91df..5ea8f3af 100644 --- a/server/xml.server.php +++ b/server/xml.server.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) 2001 - 2008 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -85,6 +85,7 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); $artists = Browse::get_objects(); // echo out the resulting xml document @@ -98,6 +99,7 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); ob_end_clean(); echo xmlData::albums($albums); break; @@ -107,6 +109,7 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); ob_end_clean(); echo xmlData::songs($songs); break; @@ -122,6 +125,7 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); ob_end_clean(); echo xmlData::albums($albums); break; @@ -131,6 +135,8 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::songs($songs); break; @@ -146,24 +152,38 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::genres($genres); break; case 'genre_artists': $genre = new Genre($_REQUEST['filter']); $artists = $genre->get_artists(); + + xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::artists($artists); break; case 'genre_albums': $genre = new Genre($_REQUEST['filter']); $albums = $genre->get_albums(); + + xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::albums($albums); break; case 'genre_songs': $genre = new Genre($_REQUEST['filter']); $songs = $genre->get_songs(); + + xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::songs($songs); break; @@ -179,6 +199,8 @@ switch ($_REQUEST['action']) { // Set the offset xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::songs($songs); break; @@ -194,6 +216,8 @@ switch ($_REQUEST['action']) { $playlist_ids = Browse::get_objects(); xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); + ob_end_clean(); echo xmlData::playlists($playlist_ids); break; @@ -208,6 +232,7 @@ switch ($_REQUEST['action']) { } // end foreach xmlData::set_offset($_REQUEST['offset']); + xmlData::set_limit($_REQUEST['limit']); ob_end_clean(); echo xmlData::songs($songs); break; diff --git a/templates/show_edit_song_row.inc.php b/templates/show_edit_song_row.inc.php index cbab7739..28f95b7a 100644 --- a/templates/show_edit_song_row.inc.php +++ b/templates/show_edit_song_row.inc.php @@ -23,7 +23,7 @@ <form method="post" id="edit_song_<?php echo $song->id; ?>"> <table cellpadding="3" cellspacing="0"> <td> - <input type="textbox" name="name" value="<?php echo scrub_out($song->title); ?>" /> + <input type="textbox" name="title" value="<?php echo scrub_out($song->title); ?>" /> </td> <td> <?php show_artist_select('artist',$song->artist,true,$song->id); ?> |