Skip to content

Commit

Permalink
Tidied up variable naming and fixed deleting and ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljamesscott committed Jun 1, 2009
1 parent e7c240d commit b9e5fdc
Show file tree
Hide file tree
Showing 15 changed files with 721 additions and 772 deletions.
10 changes: 5 additions & 5 deletions admin/controllers/albums.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function edit()
function save()
{
$post = JRequest::get('post');
$album_id = JRequest::getVar( 'album_id', array(0), 'post', 'array' );
$album_id = JRequest::getVar( 'cid', array(0), 'post', 'array' );
$post['id'] = (int) $album_id[0];

$model = $this->getModel('album');
Expand All @@ -76,7 +76,7 @@ function remove()
{
global $mainframe;

$album_id = JRequest::getVar( 'album_id', array(), 'post', 'array' );
$album_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($album_id);

if (count( $album_id ) < 1) {
Expand All @@ -96,7 +96,7 @@ function publish()
{
global $mainframe;

$album_id = JRequest::getVar( 'album_id', array(), 'post', 'array' );
$album_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($album_id);

if (count( $album_id ) < 1) {
Expand All @@ -116,7 +116,7 @@ function unpublish()
{
global $mainframe;

$album_id = JRequest::getVar( 'album_id', array(), 'post', 'array' );
$album_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($album_id);

if (count( $album_id ) < 1) {
Expand Down Expand Up @@ -159,7 +159,7 @@ function orderdown()

function saveorder()
{
$album_id = JRequest::getVar( 'album_id', array(), 'post', 'array' );
$album_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
$order = JRequest::getVar( 'order', array(), 'post', 'array' );
JArrayHelper::toInteger($album_id);
JArrayHelper::toInteger($order);
Expand Down
10 changes: 5 additions & 5 deletions admin/controllers/artists.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function edit()
function save()
{
$post = JRequest::get('post');
$artist_id = JRequest::getVar( 'artist_id', array(0), 'post', 'array' );
$artist_id = JRequest::getVar( 'cid', array(0), 'post', 'array' );
$post['id'] = (int) $artist_id[0];

$model = $this->getModel('artist');
Expand All @@ -76,7 +76,7 @@ function remove()
{
global $mainframe;

$artist_id = JRequest::getVar( 'artist_id', array(), 'post', 'array' );
$artist_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($artist_id);

if (count( $artist_id ) < 1) {
Expand All @@ -96,7 +96,7 @@ function publish()
{
global $mainframe;

$artist_id = JRequest::getVar( 'artist_id', array(), 'post', 'array' );
$artist_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($artist_id);

if (count( $artist_id ) < 1) {
Expand All @@ -116,7 +116,7 @@ function unpublish()
{
global $mainframe;

$artist_id = JRequest::getVar( 'artist_id', array(), 'post', 'array' );
$artist_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($artist_id);

if (count( $artist_id ) < 1) {
Expand Down Expand Up @@ -159,7 +159,7 @@ function orderdown()

function saveorder()
{
$artist_id = JRequest::getVar( 'artist_id', array(), 'post', 'array' );
$artist_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
$order = JRequest::getVar( 'order', array(), 'post', 'array' );
JArrayHelper::toInteger($artist_id);
JArrayHelper::toInteger($order);
Expand Down
12 changes: 6 additions & 6 deletions admin/controllers/songs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Music
* @subpackage Songs
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @copyright Copyright (C) 2009 Daniel Scott (http://danieljamesscott.org). All rights reserved.
* @copyright Copyright (C) 2009 Daniel Scott (http://danieljamesscott.org). All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant to the
* GNU General Public License, and as distributed it includes or is derivative
Expand Down Expand Up @@ -54,7 +54,7 @@ function edit()
function save()
{
$post = JRequest::get('post');
$song_id = JRequest::getVar( 'song_id', array(0), 'post', 'array' );
$song_id = JRequest::getVar( 'cid', array(0), 'post', 'array' );
$post['id'] = (int) $song_id[0];

$model = $this->getModel('song');
Expand All @@ -75,7 +75,7 @@ function remove()
{
global $mainframe;

$song_id = JRequest::getVar( 'song_id', array(), 'post', 'array' );
$song_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($song_id);

if (count( $song_id ) < 1) {
Expand All @@ -95,7 +95,7 @@ function publish()
{
global $mainframe;

$song_id = JRequest::getVar( 'song_id', array(), 'post', 'array' );
$song_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($song_id);

if (count( $song_id ) < 1) {
Expand All @@ -115,7 +115,7 @@ function unpublish()
{
global $mainframe;

$song_id = JRequest::getVar( 'song_id', array(), 'post', 'array' );
$song_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
JArrayHelper::toInteger($song_id);

if (count( $song_id ) < 1) {
Expand Down Expand Up @@ -158,7 +158,7 @@ function orderdown()

function saveorder()
{
$song_id = JRequest::getVar( 'song_id', array(), 'post', 'array' );
$song_id = JRequest::getVar( 'cid', array(), 'post', 'array' );
$order = JRequest::getVar( 'order', array(), 'post', 'array' );
JArrayHelper::toInteger($song_id);
JArrayHelper::toInteger($order);
Expand Down
Loading

0 comments on commit b9e5fdc

Please sign in to comment.