I figured it out .. the thing about taking over someones code is cleaning up some of their mistakes and trying to figure out their mind set on what direction they were going.
-------------------------------
function deleteAlbum($args) {
if (is_object($login_state = authorize($args))) return $login_state;
$args = decode64($args);
$album = getAlbumForAlbumID($args['id']);
if ($album)
$album->remove();
else
return new IXR_Error(-1, 'No folder with database ID '.$args['id'].' found!');
}
but if you see anything I can do or approve on .. dont hesitate