1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 10:19:25 +02:00
Commit graph

1295 commits

Author SHA1 Message Date
Paul Arthur
96d0d4533c Drop validateEmail
PHPMailer will validate the format of the address, and that's all we
really want.
2013-05-30 18:34:53 -04:00
Paul Arthur
228717d350 Clean up Core::autoload() 2013-05-30 14:57:51 -04:00
Paul Arthur
69dcc79e94 Add and use Core::is_readable()
bea34c42 fixed one use of is_readable, but Windows users encountering
this issue would still be affected in other cases. This commit fixes
all of the important is_readable calls within Ampache; I'm not going
to hack this into external modules, so if they're broken people will
have to live with it.
2013-05-30 14:42:33 -04:00
Paul Arthur
53aff101bf Work on remote clean 2013-05-30 14:34:08 -04:00
thinca
2fa6899f94 Rating::build_cache: cache the correct value
The structure of the temporary $ratings array changed a while ago, but
we were still trying to pull the global rating from the old structure.
2013-05-30 13:14:24 -04:00
thinca
c394d51581 Use the correct operator for 'before date' rules 2013-05-30 13:04:27 -04:00
Paul Arthur
78d220fbd5 Register session_write_close shutdown function
http://php.net/manual/en/function.session-set-save-handler.php:
    When using objects as session save handlers, it is important
    to register the shutdown function with PHP to avoid unexpected
    side-effects from the way PHP internally destroys objects on
    shutdown and may prevent the write and close from being called.
    Typically you should register 'session_write_close' using the
    register_shutdown_function() function.

We're not using objects as session save handlers, but some people
(notably, Synology users) seem to be encountering a similar issue
related to the timing of object destruction. Closing the session
earlier in the shutdown process is a perfectly sane thing to do, so
let's do it.
2013-05-30 12:55:00 -04:00
Paul Arthur
ee85e4d08d Change Dba::error() and audit its callers
Will hopefully return more useful information during installation, which
is the only place it's actually used and useful.
2013-05-27 20:32:02 -04:00
randomessence
c311581b5c Dba: Add support for MySQL sockets 2013-05-27 19:30:18 -04:00
Paul Arthur
f56dd055b2 Unify debugging output to a single file
Splitting some things off to ampache-catalog doesn't really make sense
to me and makes it harder to see the entire process during catalog
operations.
2013-05-27 19:18:48 -04:00
Paul Arthur
47f140a8b1 Clean up Song->_get_info() and constructor
Return false and unset the id if the song isn't in the database.
2013-05-13 22:32:54 -04:00
Paul Arthur
ecf095fc06 Fix Rating::gc()
The join was incorrect, sometimes resulting in loss of ratings.

Fixes GH #22
2013-05-13 22:13:06 -04:00
Paul Arthur
9a62b49341 Make Catalog::count_songs use the correct variable
Fixes GH#23
2013-05-13 21:36:12 -04:00
Paul Arthur
f22ceb42c2 Add support for nonstandard MySQL ports 2013-05-13 17:33:12 -04:00
Toilal
1d881ae018 Stream::start_transcode: Fix typo in query 2013-05-06 15:23:34 -04:00
Paul Arthur
cf5a674965 Update the stream_playlist table to use MyISAM
InnoDB's performance is unacceptable out of the box, and there's no
clean way to batch these insertions into transactions, and stuff.

Benchmarks for 1000 inserts:
InnoDB: 54.826
MyISAM: 0.091
InnoDB transaction: 0.159

Fixes GH #14
2013-04-29 15:18:35 -04:00
Paul Arthur
323554838d Correct debug output for Stream_Playlist adds 2013-04-29 15:18:24 -04:00
Paul Arthur
df92e52dd3 Clean up Random::play_url()
Include the correct type parameter in the URL and rename the random
type parameter to random_type.

Remove unused parameters from the function call.

Should fix issue #11
2013-04-23 14:43:37 -04:00
Paul Arthur
a45b564d02 Fix Stream_URL::parse()
Also fixes democratic voting.
2013-04-13 15:07:33 -04:00
Paul Arthur
9acabf8b97 Fix democratic playlist display 2013-04-13 15:06:33 -04:00
Paul Arthur
cb3484865e Fix song downloads
'download' wasn't in the list of allowed types for Stream_Playlist, so
download attempts were processed as M3U playlists.
2013-04-11 18:19:54 -04:00
Paul Arthur
61b7300908 GH#4: Tagging artist incorrectly
We should only look up by MBID if we actually have an MBID.  Might fix
this issue.
2013-04-02 15:44:39 -04:00
Paul Arthur
d728c76ed0 Drop nonworking Dba::check_database_exists()
It didn't work.
2013-03-29 03:54:00 -04:00
Paul Arthur
415880faad Fix infinite loop in Dba
Strong and stupid indeed.
2013-03-29 03:37:38 -04:00
Paul Arthur
42ac1b0d19 Fix User::count() 2013-03-28 16:56:22 -04:00
Paul Arthur
1197b3a03e Fix Rating::gc() 2013-03-28 16:56:22 -04:00
Paul Arthur
58ba28b0d3 Don't store plaintext passwords
http://dbareactions.tumblr.com/post/41455377237/when-i-see-app-passwords-stored-in-clear-text-in
2013-03-28 16:56:22 -04:00
Paul Arthur
4b4e7decf6 Try to fix remote streaming 2013-03-28 16:56:21 -04:00
Paul Arthur
744e6bb994 Make remote catalogs actually work 2013-03-28 16:56:21 -04:00
Paul Arthur
eee48871e9 Try to be more robust in Dba 2013-03-28 16:56:21 -04:00
Paul Arthur
b3e78cc4b7 Remove sole use of Dba::seek
Can't be cleanly supported by PDO, so it was removed from Dba's
interface. This change was supposed to be done then, but was missed.
2013-02-11 17:33:24 -05:00
Paul Arthur
05498397f3 Dba: return false on errors
I'm pretty sure this is the correct thing to do.
2013-02-11 17:24:17 -05:00
Paul Arthur
f29e416e04 Fix setting ACLs
_verify_range should be static.
2013-02-11 17:23:35 -05:00
Paul Arthur
5bc48fd3b2 Fix xml.server.php after changes to session
It was calling the wrong method in Session, which is entirely my fault.
Also, the correct method was broken. Gah.
2013-02-11 17:23:33 -05:00
Paul Arthur
3a8feaeeff FS#272 - Adding songs to democratic playlist
This is more likely to fix democratic handling.  Untested.
2013-02-07 22:42:44 -05:00
Paul Arthur
453a161a78 Scrub user data in User->update()
Fixes another persistent XSS vulnerability.
2013-02-07 16:36:44 -05:00
Paul Arthur
79b6eb98e7 Fix scrub_in to be safer 2013-02-07 15:17:24 -05:00
Paul Arthur
46cb6c81c5 FS#272 - Adding songs to democratic playlist
This might fix democratic handling.  Untested.
2013-02-07 14:35:03 -05:00
Paul Arthur
239ea81fdf Some cleanup of play URL handling
Move parsing from Song into Stream_URL and make it parse more things.
Add the type parameter to all generated URLs instead of adding video to
Video URLs.
2013-02-07 14:24:40 -05:00
Paul Arthur
31afde9fc0 Drop Dba::escape in vainfo 2013-02-05 11:48:31 -05:00
Paul Arthur
0905271377 Clean up vainfo somewhat
Handling of unknown tags was wrong (we should just pass them through and
hope for the best, not do some weird-ass id3v2 thing).  Add matroska to
the list of known tags. Switch the video types to a generic cleanup
function and move the several-times-duplicated general information
gathering into the general information gathering function where it
belongs.  Treat the general information as another tag type instead of
special-casing it as a complete override through array_merge. Drop the
useless iconv stuff (getID3 already translates tags to our requested
charset). Rename some functions to more closely match their purpose.
Fix some private functions that were marked public. Fix encoding
detection, which has been completely broken for a while.
2013-02-05 11:42:56 -05:00
Paul Arthur
02286a12b8 Add fallback title to filename metadata source
If we didn't parse anything out, set it to the filename.
2013-02-05 01:41:39 -05:00
Paul Arthur
860b7d3ed3 Parameterise query in Api 2013-02-04 17:56:11 -05:00
Paul Arthur
287ddc4345 Dba: fix more things
Check that things are things before thing.
2013-02-03 04:03:35 -05:00
Paul Arthur
ab18569013 UI: Fix $hover_name 'Undefined variable' warnings 2013-02-02 20:51:26 -05:00
Paul Arthur
544aae5431 Fix Dba::quote()
It's still ugly, but it won't get too greedy.
2013-02-02 18:56:14 -05:00
Paul Arthur
4cbb5db6df Make Dba::query() a bit more correct
Check the DB handle and the statement handle before we try to use them.
2013-02-02 18:53:02 -05:00
Paul Arthur
4acffa613d Add $target back
No being lazy for us.  interfaces are interfaces, not abstract classes.
2013-01-31 16:00:03 -05:00
Paul Arthur
0cf02f8590 Remove $target from media->get_transcode_settings() 2013-01-31 15:55:27 -05:00
Paul Arthur
205ce073b5 Fix the session type exception for use_auth=false
The table definition changed slightly and the old workaround didn't
work.  If auth is disabled, we really don't care that much, so just drop
the attempt to constrain type in that case.
2013-01-31 15:37:19 -05:00