Commit Graph

101 Commits

Author SHA1 Message Date
Andy Lindeman
6f916e49d5 Allow timezone to be configurable
* Fixes #1637
* New advanced setting gallery/timezone
* Default setting comes from PHP
2011-04-22 18:15:17 -04:00
Chad Kieffer
3bce5d00ee Renamed apple_touch_url to apple_touch_icon_url. 2011-04-22 12:50:21 -04:00
Chad Kieffer
4a9b45c9c3 Created apple-touch-icon and added to wind and admin_wind themes. 2011-04-22 12:37:28 -04:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
45caba09f8 Move the code that clears the upgrade_check site status message to the
upgrader so that it's cleared any time we run an upgrade.  Part of
2011-01-17 20:03:11 -08:00
Bharat Mediratta
66bb496b6c If the logged in user is an admin and it's been more than 7 days since
the last check and auto upgrade checking is enabled, fire off an XHR
to check for a possible upgrade.  Finishes off #1605.
2011-01-16 23:14:57 -08:00
Bharat Mediratta
70abfb2a20 Upgrade checking code is now here, along with a bump of the Gallery
module to v46.  There's a new block in the admin dashboard which
controls whether automatic checking happens, and lets you check
immediately.  If a newer version is detected, a site status message
appears for admins providing upgrade instructions.

Automatic checking is not yet implemented (even though the UI claims
that it exists).  This is all for #1605.
2011-01-16 22:16:09 -08:00
Bharat Mediratta
84d576606d Change the value column of the messages table from a varchar(255) to a
text.  Fixes #1612.
2011-01-16 21:46:03 -08:00
Joe7
0020f87d6a Fixed paging for albums ordered by random.
MySql has problems when comparing float values against -seemingly same- float input, see http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html for details.
Fixes #1610
2011-01-16 16:58:58 -08:00
Bharat Mediratta
d74aad072d Some small follow on fixes for #1559 and #1568:
1) Make database changes in gallery_installer::install() instead of
   in installer/install.ql
2) Bump the version number in modules/gallery/module.info
2011-01-03 12:25:51 -08:00
Joe7
e6a5f39b91 case fix 2011-01-03 11:10:31 -08:00
Joe7
b26eff7f23 Bugfix: input validation validates description up to length of 65535 chars, but DB trimmed data over 2048 chars. Converting column into TEXT type.
Note: The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.
In contrast to CHAR, VARCHAR values are stored as a one-byte or two-byte length prefix plus data. The length prefix indicates the number of bytes in the value. A column uses one length byte if values require no more than 255 bytes, two length bytes if values may require more than 255 bytes.
2011-01-03 11:08:21 -08:00
Joe7
869bba5e13 Truncating table first againt collides when converting INDEX into Unique 2010-12-28 23:14:04 -08:00
Joe7
440597356d Added changes to installer and upgrader scripts to support INSERT ON DUPLICATE KEY UPDATE SYNTAX in cache lib 2010-12-28 23:14:04 -08:00
Bharat Mediratta
b42fcb9cda Use db::expr instead of "new Database_Expression". Resolves #1560. 2010-12-28 23:10:05 -08:00
Bharat Mediratta
cd48b89f31 Consolidate all the random code into a random helper that offers:
random::hash()
  random::string()
  random::percent()
  random::int()

So that we don't have lots of different ways to get random values all
over the code.  Follow-on to #1527.
2010-12-15 14:57:00 -08:00
Bharat Mediratta
45c63f4d11 Use mt_rand() instead of rand() since it provides better portability.
Fixes #1527.
2010-12-15 12:48:56 -08:00
Bharat Mediratta
f84782d620 Stop caching all module variables in the vars table using the
name=_cache row.  If that overflows, it will cause us to be unable to
load variables, and we can't recover from that.

Instead, use the Cache table.  Bump the gallery module to v40.  Fixes
ticket #1405.
2010-09-29 20:47:43 -07:00
Bharat Mediratta
3e1743b21f Add a module variable containing extra paths to search for binaries.
Fixes ticket #1384.
2010-09-16 20:43:48 -07:00
Bharat Mediratta
5e316f78c6 Restrict viewing user profile pages to registered users only, but
provide a "show_user_profiles_to" setting to allow admins to open it
up to everybody (choices there are "registered_users", "admin_users"
or "everybody").  Fixes ticket #1378.
2010-09-16 15:17:00 -07:00
Tim Almdal
545177c648 Merge branch 'master' of git@github.com:gallery/gallery3 2010-09-01 23:19:50 -07:00
Tim Almdal
04f6646b06 Hopefully the third and final patch for #1216. Set the default from and reply-to addresses to an empty string. The first time the user model is saved, set the sendmail from and reply-to addresses. Requires an update to gallery version 38. 2010-09-01 23:19:43 -07:00
Bharat Mediratta
70c8572ea1 Make RENAME TABLE operations idempotent so that in case there's a
failure of some kind we can restart the upgrade and it'll continue.
Fixes ticket #1325.
2010-09-01 22:19:44 -07:00
Bharat Mediratta
78c590ebae Don't use HTTP_HOST to get the hostname. We force that to
"example.com" when we are using the CLI so we'll get inconsistent
behavior between CLI and the web interface.

For now hardcode it to be example.com so that it's clear.  But to do
it right we need an after_install step which actually fixes it up.
And probably an after_upgrade step as well.
2010-08-31 21:07:43 -07:00
Tim Almdal
e09c6dbd5e Patch for ticket #1216. Move the values that were in the sendmail config file and store them as gallery module variables. Requires a version number bump to 37. 2010-08-31 20:45:09 -07:00
Bharat Mediratta
4c8445852d Bump gallery module to v36 and add a favicon_url variable, which we
expose in Admin > Appearance > Theme Options and defaults to
lib/images/favicon.ico.

Thix fixes ticket #1312.
2010-08-29 16:27:32 -07:00
Bharat Mediratta
a08cd0db4e Add a "visible_title_length" variable that defaults to 15 and use that
as the max title length when we do title truncation in the wind theme.
Bump the gallery module to 35.
2010-08-28 21:58:28 -07:00
Bharat Mediratta
50e3230d79 Add a key on access_caches.item_id. Without this, the Fix task query
to find missing access_caches is very slow.  Bump Gallery module to v34.
2010-08-14 15:10:07 -07:00
Bharat Mediratta
779d91cca0 Add an index for left_ptr, since we use that in ORM_MPTT::parents()
which is on every album page.  Bump Gallery module version to 33.
2010-08-07 12:18:43 -07:00
Bharat Mediratta
16ae65464c Oops. Fix the upgrader path to add the weight column to the modules table. 2010-08-07 10:57:18 -07:00
Bharat Mediratta
1b2da1ff70 Add a "weight" column to the module table. This allows us to specify
module ordering, which is currently being done in the moduleorder
contrib module.

By default, the weight will be the same as the id of the row which
means that new modules will get added at the end of the list.  This is
covered in the upgrade case as well.

The one gotcha is that we need to make sure that we don't try to sort
by the weight column if the gallery module version is < 32, which is
something we haven't done before.

Fixes ticket #1272.
2010-08-06 20:19:00 -07:00
Bharat Mediratta
c33b24c9fa Make maintenance mode a variable instead of a config. Then create
links on the Admin > Maintenance page to allow you to turn it on and
off.  This should be efficient since we cache all vars and look them
up on every request anyway.

This also allows us to have the Fix task enable maintenance mode while
it's running which greatly reduces the chances that somebody will come
along and hork the database while we're tinkering with MPTT pointers.

Fixes ticket #1259.
2010-08-01 21:00:30 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
6ce0132842 Fix for ticket #1027: Add index on cache key column.
(and fix the packager to truncate the cache table before packaging)
2010-02-22 00:30:54 -08:00
Andy Staudacher
dcddc68f58 Never assign a SafeString instance to a Model member (or hell will break loose). 2010-02-15 13:12:38 -08:00
Andy Staudacher
667d65aea4 Fix for ticket 901: Wrap Gallery version string into bdo tag to override the BiDi algorithm. Also, properly marking the "Powere by" string for translation.
See: http://www.w3.org/International/tutorials/bidi-xhtml/#Slide0420
2010-02-14 18:33:38 -08:00
Andy Staudacher
13cfe2d61d Change admin area timeout from 20 to 90 minutes 2010-02-08 22:15:38 -08:00
Andy Staudacher
370e0e2f32 Fix installer code for version 27, and introduce new module variable in version 28 as a preparation for admin area compartmentalization. 2010-02-07 15:02:41 -08:00
Bharat Mediratta
aff5d1cef4 Create the concept of a "failed authentication" as semantically
separate from a successful or failed login.

1) Rename user_login_failed event to user_authenticate_failed

2) Rename failed_logins table to failed_auth (bump Gallery module to
   v27 to rename the table)

3) auth::too_many_failed_logins -> auth::too_many_failures

4) auth::record_failed_auth_attempts -> auth::record_failed_attempts
   auth::clear_failed_auth_attempts  -> auth::clear_failed_attempts
2010-02-07 08:45:10 -08:00
Bharat Mediratta
225fe81ce0 Add an upgrade path to prevent the item title field from being empty. 2010-02-02 20:50:34 -08:00
Bharat Mediratta
c2a7a6a4e7 Lock down web access to var/uploads, var/tmp and var/logs using .htaccess
Fixes ticket #587.
2010-01-30 21:07:03 -08:00
Bharat Mediratta
2bfcec9620 Prevent brute force login attacks by reducing login attempts to 1 per
minute after there have been 5 consecutive failed login attempts.

Fix for ticket #589.
2010-01-30 19:48:57 -08:00
Bharat Mediratta
d4998e37d8 Don't forget to flush the relative_url_cache when updating the slug. 2010-01-29 14:25:57 -08:00
Bharat Mediratta
98bcb95b10 Go through all slugs and make them legal values.
Upgrade gallery3 module to version 23
2010-01-29 14:20:34 -08:00
Bharat Mediratta
45cdac973d Oops, somebody (me?) forgot to update the gallery module version
number in gallery_installer::install() so the install.sql was out of
sync.
2010-01-29 14:06:36 -08:00
Bharat Mediratta
4b32a71afc Convert back to using ORM::factory(..., $id) instead of calling where(). 2010-01-27 22:34:11 -08:00
Bharat Mediratta
cfb27dde02 Adjust installers to work with model based validation. 2010-01-17 13:28:24 -08:00
Tim Almdal
284e14d50e Remove the automatically marking the resizes dirty line as this could cause alot of pain to some installations 2010-01-11 10:48:27 -08:00
Tim Almdal
3ab6c4915a Fixes ticket #671.
In the graphics_rules table height and width set the maximum height and width
values and should be equal.  Initially, the height on the resize target rule was
less than the height, which artificially constrained images in portrait mode.

**Note"" this fix requires an upgrade to version 22.  All the resizes will be flagged
dirty.
2010-01-11 10:42:39 -08:00
Bharat Mediratta
1f3567ec04 Update the gallery module to version 21 in the installer. 2009-12-05 21:08:10 -08:00