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
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
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
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
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
Paul Arthur
f2e3668528
Fix regex for parsing rules
...
ID can be multiple digits, so we should capture all of them.
2012-03-19 12:21:22 -04:00
Paul Arthur
23e5775f34
Add another undocumented debug level
2012-03-14 11:21:10 -04:00
Paul Arthur
f03fe15918
Rename lib/install.php to lib/install.lib.php
2012-03-14 11:15:19 -04:00
Paul Arthur
f47e8e7f7d
Remove unused mysql_* values
2012-03-13 18:32:57 -04:00
Paul Arthur
fe5d18095e
Refactor similar init code into new init-tiny.php
...
Several places were doing operations that were practically the same
(loading core libraries and setting some variables), with varying
levels of success in remembering to do the right things in the right
order. Making a separate minimal init.php that doesn't worry about
some of the sanity checks and session bumpf makes this cleaner and
easier to maintain.
2012-03-13 17:57:07 -04:00
Paul Arthur
e8f4577d9a
Clean JSON output of user-controlled strings
...
JSON has some strict rules about what can be escaped, and we should have
been scrubbing to entities all along.
2012-03-09 14:02:50 -05:00
Paul Arthur
ca60de30bc
Add CLI tool for running database updates
2012-03-06 16:42:04 -05:00
Paul Arthur
7983182503
Use a flag to determine whether an outdated database is OK
...
This matches the handling of NO_SESSION and gives us some needed leeway
for the CLI tools.
2012-03-06 15:32:56 -05:00
Paul Arthur
f40866b6d5
Use '$a ?: $b' instead of '$a ? $a : $b' in vainfo
...
Now that we require PHP 5.3, we can use the more compact format.
2012-03-06 12:55:17 -05:00
Paul Arthur
34b0eaf233
Clean up uses of Config::set and Config::set_by_array
...
Consistently pass in a boolean instead of a string or an int for the
clobber flag.
2012-03-06 12:18:57 -05:00
Paul Arthur
08a4f848be
Clean up Config::set and Config::set_by_array
...
Boolean parameters should be boolean.
2012-03-06 12:18:10 -05:00
Paul Arthur
585382422c
Allow multiple valid forms of the same type
...
Use the SID for the primary key, instead of the non-unique form name.
Also add some debugging to the form functions in Core.
2012-03-06 10:58:07 -05:00
Paul Arthur
3389d513fe
Explicitly load vauth in init.php
...
As there are some code paths that do session manipulation without any
calls to vauth first, relying on autoload may result in our custom
session handler not being used.
2012-03-02 09:45:43 -05:00
Paul Arthur
3d8e3ac86c
Minor clean up of vauth::session_extend
2012-03-02 00:08:57 -05:00
Paul Arthur
69ec29517d
Move session extension outside the auth block in init.php
...
This might help ensure that we're always extending the session when we
should.
2012-03-01 23:58:35 -05:00
Paul Arthur
dd3d42d644
FS#198 - Export To CSV - Blank Genre
...
Clean up Catalog->export. Genre doesn't exist any more.
2012-03-01 14:24:26 -05:00
Paul Arthur
40e8484a57
FS#213 - User Registration
...
Add an option to have newly registered accounts disabled by default.
2012-03-01 14:06:03 -05:00
Paul Arthur
55ed43c332
Clean up xmlData::songs
...
Drop call to Song->format(); two of the values that we use are exposed
via public getters anyway, and it's not particularly ugly to call
Tag::get_top_tags instead of relying on Song to do that for us.
Remove genre cruft.
Based on a patch by lotan_rm in FS#215
2012-03-01 13:36:41 -05:00
Paul Arthur
6b33ec9be8
Clean up xmlData::tags_string
...
Drop unused parameters. Make sure $tags is an array before we treat it
as one. Correct count value.
Based on a patch by lotan_rm in FS#215
2012-03-01 13:14:42 -05:00
Paul Arthur
bac2618846
Cosmetics: clean up SQL statement in Tag::get_top_tags
2012-03-01 13:03:36 -05:00
Paul Arthur
b5965d2513
Add Art cache to the caches built by Song::build_cache
2012-03-01 12:48:11 -05:00
lotan_rm
500b6cbdb3
Avoid unnecessary work in Song::play_url
...
The only thing we're using that's set by format() is f_artist_full,
which is exactly the same as what's returned by get_artist_name().
2012-03-01 12:45:20 -05:00
Paul Arthur
3bd110181c
Add some caching to the Art class
...
Based on a patch by lotan_rm in FS#215
2012-03-01 12:39:55 -05:00
Paul Arthur
6f0c651075
FS#216 - Cannot add music to catalog with 21 February commit
...
The wrong version of this change got pushed, somehow. Fix parse errors.
2012-02-21 19:19:19 -05:00
Paul Arthur
82d0fb5518
Refactor the initial checks in init.php
...
Reduce the amount of code duplication.
2012-02-21 12:33:21 -05:00
Paul Arthur
295f406fc5
Redirect to /test.php for PHP <5.3 on all platforms
...
5.3 is now required on all platforms, not just Windows.
2012-02-21 12:08:53 -05:00
Paul Arthur
e9e350b71e
Lengthen varchar for tmp_playlist
.session
...
Sessions can be longer than 32 characters. Bump to 64.
2012-02-21 00:08:20 -05:00
Paul Arthur
18314188c1
Merge commit 'refs/merge-requests/16' of git://gitorious.org/ampache/ampache
2012-02-20 23:52:52 -05:00
lotan_rm
073f49c3e8
FS#212 - Incorrect album art uri
...
Missing ampersand.
2012-02-20 23:38:48 -05:00
Paul Arthur
e36d29434e
vainfo: unset disk if totaldiscs is 1
...
ID3 should only set disk if it's part of a set, but the same is not true
of other metadata sources.
Also drop no-op attempted cleanup of disk; we've already run intval, so
it won't contain a slash.
2012-02-20 23:11:48 -05:00
Paul Arthur
a40824a96b
Drop unnecessary case branch.
2012-02-20 22:50:41 -05:00