1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00
Commit graph

2596 commits

Author SHA1 Message Date
Paul Arthur
33d07e8910 Make a debug message less alarming
It's expected that reading from sessions will fail after expiry or
before login.  Remove the word 'error' from the logged message and bump
it down a few levels.
2012-07-24 16:46:21 -04:00
Paul Arthur
a22776e954 Rework debug page
We don't need to check for PCRE any more, it can't be disabled in PHP
5.3.

Try to improve the descriptions.
2012-07-11 14:47:02 -04:00
Paul Arthur
cad8d6ac86 web_path cleanup
force_ssl was broken, should be fixed now.
2012-07-11 14:37:11 -04:00
Paul Arthur
4ea8af4968 Remove more code that only ran on PHP <5.3 2012-07-01 22:30:32 -04:00
Paul Arthur
567b27954b Clean up set_memory_limit
ini_set should be passed an integer byte value; shorthand byte values
should only be used in php.ini. It's bad to assume that values are
always in megabytes; we could enforce it in our config file if we
cared, but not in PHP's.
2012-07-01 17:09:36 -04:00
Paul Arthur
3a10779e00 Drop conditional for PHP < 5.3
We require 5.3, so this code has no effect other than to throw warnings.
2012-06-25 16:49:58 -04:00
Paul Arthur
e3bc2b2f7f Clean up uses of isset in play/index.php
Among other things, guest users were able to stream songs because
isset($xml_rpc) always returned true.  That check was removed entirely;
if it breaks something, that breakage will need to be solved
differently.  Changing the access level required to do something based
on a user-controlled GET parameter is wrong.
2012-06-22 12:09:14 -04:00
Paul Arthur
263b833904 Refactor the random template
I hate ${$name} with a fiery passion.
2012-06-09 01:14:16 -04:00
Paul Arthur
408e71344a escapeshellarg's behaviour is locale-dependent
Reimplement it locally so it isn't.  Might fix FS#252.
2012-05-25 16:52:57 -04:00
Paul Arthur
09949bb20b Fix typo 2012-05-09 12:16:33 -04:00
Paul Arthur
17562c8843 Clean up the ACL UI a bit
Make it more consistent and remove outdated references to RPC keys.
2012-05-01 15:56:55 -04:00
Paul Arthur
5f2f81fa8f Use spl_autoload_register instead of __autoload
Might be useful in the future, __autoload is discouraged according to
the PHP documentation.
2012-04-18 00:54:54 -04:00
Paul Arthur
37fc03bb48 Make the CLI database installation tool more robust
Using a relative path required it to be run from the top-level
directory; we already do voodoo to figure out the correct prefix, so we
should use that.
2012-04-17 17:53:52 -04:00
Paul Arthur
e1c3a21b37 Drop old code related to mysql < 5.0 2012-04-17 14:29:50 -04:00
Paul Arthur
8a93c849e2 FS#226 - does not catch MySQL errors before passing to num_rows()
Clean up Dba::num_rows (based on a patch by Natureshadow)

We could check before every call instead, but screw that.
2012-04-15 23:32:03 -04:00
Dominik George
b64649e720 FS#225 - xml_from_array() produces runtime error
Newer versions of the PCRE library changed behaviour so we can't
replace invalid characters by listing them, since it now requires
that the characters in a pattern are valid Unicode characters. Use an
inverted character class instead.

Might work.
2012-04-15 23:31:17 -04:00
Paul Arthur
4aa37feccc Fix disk number parsing for ID3v2
According to the changelog, getID3 1.7.9 standardised on part_of_a_set
as the key for this info (pulled from TPOS or TPA, depending on the
minor version of ID3v2); we were looking for 'pos', which is wrong.
2012-04-15 03:02:29 -04:00
Paul Arthur
0ccf7d76bb Fixup CHANGELOG 2012-04-13 18:59:16 -04:00
Paul Arthur
512f77a70c Support setting a custom format for the rss feed 2012-04-13 17:59:16 -04:00
Paul Arthur
8af2544b27 Refactor getting MBIDs from ID3 tags
Just grab the info from the TXXX bit, instead of relying on a
correlation between the raw tags and the cooked ones.
2012-04-12 21:56:27 -04:00
Paul Arthur
ecdb8bc02d Add support for pulling ratings from id3 tags
Not used by anything yet, but it might work.
2012-04-12 21:42:44 -04:00
Paul Arthur
dec61fc751 Rewrite gather-messages.sh 2012-04-12 21:13:29 -04:00
Paul Arthur
a0cc08abe4 Updated changelog for i18n changes 2012-04-12 21:13:29 -04:00
Paul Arthur
46955fdec4 Reinitialise translation layer after preference update
It's very disconcerting to change the interface language and have no
immediate feedback on whether it worked.
2012-04-12 21:13:29 -04:00
Paul Arthur
774e53db7d Switch from ngettext() to T_ngettext() 2012-04-12 21:13:29 -04:00
Paul Arthur
f65076b93d Switch from _() to T_()
Even if we move away from php-gettext in the future, it's easy to
write a quick T_() as a simple wrapper; it's not so easy to rewrite
PHP to allow redeclaration of a function.
2012-04-12 21:13:29 -04:00
Paul Arthur
15457b16f1 Drop unnecessary conditional definition of gettext
php-gettext will always provide these functions.
2012-04-12 21:13:29 -04:00
Paul Arthur
5a9fba98ce Clean up gettext initialisation
Doesn't need all the conditionals. Switch to using the wrapper library.
2012-04-12 21:13:29 -04:00
Paul Arthur
fc81208797 Replace unclearly-sourced gettext emulator
php-gettext is niftier. With its autoemulation we can use native
gettext if the locale support is set up properly, or automatically
fall back to emulated if not. This should address many of the issues
people run into when trying to use different interface languages.
2012-04-12 21:13:29 -04:00
Paul Arthur
2e02f396cd Drop unused function __() 2012-04-12 21:13:28 -04:00
Paul Arthur
75fe3b0593 Fix issue with new time logic (erk) 2012-04-12 15:43:10 -04:00
Paul Arthur
50e4c54558 Fix pluralisation issue in Recently Played
Previously we would say things like "1 seconds" and "1 hours". Using
the magic of ngettext and sprintf we can get rid of the static
concatenation order and become theoretically more translatable as well
as more correct in English.

Also changed the logic a bit, since the old looping method was
unfriendly to my brain.
2012-04-12 15:33:36 -04:00
Paul Arthur
1c2de30150 Add support for parsing MBIDs in M4A files 2012-04-11 19:13:32 -04:00
Paul Arthur
91603e9800 Don't throw away data that getID3 has deigned to parse
Fixes M4A tag parsing, probably other things.
2012-04-11 18:17:54 -04:00
Brian Hasselbeck
2888851fa3 FS#224 - generated .pls playlist doesn't work in some players
Initial tag is case sensitive; we were emitting [Playlist] but some
players don't accept that. There is unfortunately no real standard to
check, but this does match what Winamp (ack, pthbbt) does.
2012-04-11 16:52:16 -04:00
Paul Arthur
ec9389f5c6 Make Art->get_from_source() static
Half the calls to it were already trying to call it as a static method
anyway.  The only time $this was referenced was to get the type, so pass
type as a parameter.
2012-04-09 16:18:13 -04:00
Paul Arthur
8b27b6aee2 Update getID3 from 1.9.1 to 1.9.3 2012-04-09 12:55:06 -04:00
Paul Arthur
bd3985e59c Make the help text for the config step more closely resemble reality 2012-04-09 11:56:18 -04:00
Paul Arthur
fe7d4080d2 Add missing <td> tag to show_install_check 2012-04-09 11:48:01 -04:00
Paul Arthur
da5992d679 Fix an off-by-one error in the execution time check 2012-04-09 11:42:25 -04:00
Paul Arthur
89084a1103 Make the install-time execution time check more better 2012-04-09 11:36:52 -04:00
Paul Arthur
2e2c0919cb Increment the correct variable during verify
Final displayed count was always 0 because we were incrementing a
different variable than we were using.
2012-03-31 22:34:37 -04:00
Paul Arthur
ac81e2b0e3 Drop mtime check during verify
It does more harm than good, by making it difficult to update records if
you've changed your metadata settings (or fixed a bug).
2012-03-31 22:32:20 -04:00
Paul Arthur
f2e01ab7d5 Increase the size of the mbid column in artist
Picard is putting multiple MBIDs in the tags now that MusicBrainz' new
schema is live.  The easiest way to deal with this is to store all of
them as an aggregate value and match against that.
2012-03-31 22:29:09 -04:00
Paul Arthur
6f8673b5c7 Don't use LIKE when looking for an artist by MBID
There's no reason to do pattern matching.
2012-03-31 21:08:44 -04:00
Paul Arthur
b685a784a6 Minor changes to the output of print_tags.inc 2012-03-31 20:48:52 -04:00
Paul Arthur
425ecbbb3a Don't run filename patterns through preg_quote twice
This would result in extra slashes, e.g.
    '/\/([0-9]+?)\s\\\-\s(.+?)\..+$/' instead of
    '/\/([0-9]+?)\s\-\s(.+?)\..+$/'

There are some unrelated cosmetic changes as well.
2012-03-31 20:44:41 -04:00
Paul Arthur
65ad781927 Fix display of logic operator in search
It could be in either $_REQUEST or a playlist object, so we need to
check the correct one.
2012-03-31 19:26:10 -04:00
Paul Arthur
ccb9edbf2d Clean up get_preferences a little bit
Don't use userid as some sort of weird flag value. Especially when
your flag value is a valid value for userid. Just...no.
2012-03-31 17:52:07 -04:00
Paul Arthur
7fad98238e Clean up the select box output for language preference 2012-03-31 17:46:28 -04:00