Commit Graph

51 Commits

Author SHA1 Message Date
Bharat Mediratta
9345dde83e Fix autocomplete for admin_g2_import. 2013-02-17 00:39:30 -05:00
Bharat Mediratta
3b9eb29d89 Merge pull request #143 from mikeage/g2_import
Replace = with ==
2013-02-13 13:55:27 -08:00
Mike Miller
d3ca2617f2 Replace = with ==
This was my mistake; I didn't test it thoroughly. It results in all g2 mappings being broken!
2013-02-13 23:11:32 +02:00
Mike Miller
6e757f9988 #1987 g2_import module should redirect with a 301, not 302
As the g2_import process is generally assumed to be permanent, the
redirect should be a 301, and not a 302.
2013-02-01 15:36:49 +02:00
Bharat Mediratta
6e609c249a Merge pull request #110 from mikeage/g2_import
#1973 Handle redirected G2 URLs for tags, including g2_itemId passed
2013-01-30 07:53:56 -08:00
Mike Miller
91acf812a1 #1973 Handle redirected G2 URLs for tags, including g2_itemId passed 2013-01-30 05:59:08 +02:00
shadlaws
48bd19808c #1956 - Escape LIKE queries (for _ and %).
In MySQL queries, _ and % characters are treated as wildcards (similar to ? and *, respectively).
- Added escape_for_like function to MY_Database.php
- Added unit test to Database_Test
- Corrected the five unescaped instances in the code using this function.
2013-01-25 08:47:29 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Mike Miller
f92982c59c Tags by name (includes a G2 mapping) 2013-01-13 05:36:50 +02:00
Bharat Mediratta
b416d7e3d5 Follow on to a9be0691d9 for #1872. 2012-06-05 21:15:21 -07:00
Bharat Mediratta
a9be0691d9 Create an ajax response framework that inserts <meta> tags to guard
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's
autocomplete that expects the first line to be a <meta> tag and
discards it.  More complete fix for #1871.
2012-05-19 11:31:25 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Andy Lindeman
784c429070 [Fixes #1757] Redirect to root album if path comes in as main.php or index.php 2011-06-27 07:24:37 -04:00
Bharat Mediratta
784ebe7532 Leave the "updated" field alone when importing comments so that if
Akismet marks them as spam, we don't immediately flush them out of the
database on the next visit to Admin > Content > Comments.

Also warn the user about Akismet, and fix up the G2 import code to
reimport deleted comments.
2011-05-22 21:24:27 -07:00
Bharat Mediratta
229bfc5c7c Track and redirect core.DownloadItem requests properly. This can
happen if the G2 was imported with rewrite on, so the g2_url in the
g2_map table has a shortened url, but then rewrite is disabled and the
.htaccess mod_rewrite rules are sending over a &g2_view=core.DownloadItem
request.  Fixes #1728.
2011-05-02 21:37:04 -07:00
Bharat Mediratta
9e080efff3 Differentiate between invalid, missing and broken G2 configs and
present the user with feedback in the form.  Fixes #1727.
2011-04-30 15:44:24 -07:00
Bharat Mediratta
8533420f5d Look for and return embed.php files in the autocomplete list if we can
find them.  Fixes #1708.
2011-04-24 22:55:08 -07:00
Bharat Mediratta
07c266b973 Enable autocomplete for the embed path. Fixes #1687. 2011-04-23 07:20:58 -07:00
Bharat Mediratta
5040adebb5 Totally revamp the G2 Import UI to make it sexxxy. Fixes #1683. 2011-04-22 16:30:37 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
a1b1d323af When looking for G2 urls in the g2_map, try also swapping spaces for +
in case the url had spaces in it.  Fixes ticket #1388.
2010-09-18 16:46:15 -07:00
Bharat Mediratta
6bb75f623e Fix a bug in that last commit where I was treating resource_type as a function. 2010-09-18 16:34:48 -07:00
Bharat Mediratta
77ec061663 Redirect to the root album when there's an empty path and empty id.
Fixes ticket #1387.
2010-09-18 15:12:43 -07:00
Bharat Mediratta
fcd4f77bb4 Reformat comment. 2010-08-29 21:26:25 -07:00
Bharat Mediratta
3feb561054 Internationalize the "Gallery 2 path saved." message and remove the trailing period. Fixes ticket #1171. 2010-07-03 11:40:56 -07:00
Bharat Mediratta
b2afba1db1 The fact that we have a path to a G2 embed file doesn't mean that it's still
valid so check to see that it's ok before proceeding.  This should resolve #458.
2010-06-15 09:14:10 -07:00
ckieffer
f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06: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
c0a598417c Change access::can to access::required in g2 redirect, to please the controller auth code audit test. 2010-02-09 13:54:14 -08:00
Andy Staudacher
7232b6c026 Fixing G2 url mapping for G2 default style URLs (where ShowItem and DownloadItem URLs aren't rewritten in G2).
Note: For a perfect solution, we should add 2 map entries for each of G2's ShowItem and DownloadItem URLs, one for short and one for long style URLs.
E.g. A G2 installation might have been using short style URLs not for its complete lifetime. And long style URLs are supposed to work in G2 even when short style URLs are enabled (and its used that way in bbcode / as a way to get permenant, id based URLs from G2).
2010-02-06 16:29:51 -08:00
Andy Staudacher
33b39efb49 Add core.DownloadItem redirect for G2's Photo and Movie items (was previously omitted, but we already had core.DownloadItem redirects for derivatives) 2010-02-06 15:46:13 -08:00
Andy Staudacher
d069155228 Fix g2 redirects for non-admins. The g2 URL mapping controller was accidentally declared as admin controller.
(The previous attempt to fix this isn't a bad change either, thus keeping the external permenant redirect).
2010-02-06 15:08:10 -08:00
Andy Staudacher
9bede5763a Fix g2_import admin screen: It wouldn't work if it didn't know the location of G2 yet. 2010-02-06 13:15:02 -08:00
Bharat Mediratta
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -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
80e35affcb Improve the PHPdoc for map()
We now expect to either get query parameters from the Gallery2 url so
we can pick off g2_itemId, or we'll get the rewrite url in the path
query param.
2010-01-01 21:56:29 -08:00
Bharat Mediratta
161366e51d New controller for remapping Gallery 2 urls to Gallery 3 urls. 2010-01-01 21:02:52 -08:00
Tim Almdal
9b16537e2c Revert "Revert "Revert "Use call_user_func instead of call_user_func_array as we don't need to pass the parameters by reference."""
This reverts commit 05b5a2c9ed.
2009-11-19 15:18:15 -08:00
Tim Almdal
05b5a2c9ed Revert "Revert "Use call_user_func instead of call_user_func_array as we don't need to pass the parameters by reference.""
This reverts commit 6300993645.
2009-11-19 11:56:05 -08:00
Tim Almdal
6300993645 Revert "Use call_user_func instead of call_user_func_array as we don't need to pass the parameters by reference."
This reverts commit 75cc4962a2.

Revert "Make sure that calls to the theme::get_var() have sane defaults in the event that the theme does not supply them."
This reverts commit 51f2b54767.

Revert "Update the installer to reflect the new location of the theme related options."
This reverts commit 678e22996d.

Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme.  Change all refrences to theme options to use these methods.  Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.

Revert "Currently Admin_Theme_Options controller assumes that all the themes will provide the same values. This change corrects that assumption and moves the management of the theme options, including creating the form and updating the theme options into the theme."
This reverts commit 1692ee1308.
2009-11-19 11:55:46 -08:00
Tim Almdal
e97617750d Make sure that calls to the theme::get_var() have sane defaults in the event that the theme does not supply them. 2009-11-19 11:55:45 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Bharat Mediratta
2a190660ba Gracefully handle the case when the gallery2 instances moves somewhere
else (or gets deleted).

Fixes ticket #458
2009-06-23 17:09:37 -07:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
7c6276adb9 Deal with the user-entered g2 embed.php path a little more sanely so that if the user enters the path to G2 itself, we find the embed.php path from there. 2009-05-12 21:48:29 +00:00
Bharat Mediratta
6b00aa70e0 Don't try to put g2_stats and g2_size into the view if g2 is not initialized. 2009-05-09 20:18:24 +00:00
Bharat Mediratta
1bfbae15f6 Usability and performance improvements
Significantly speed up the process by copying Gallery2 thumbnails and
resizes wherever possible instead of regenerating them.  This requires
us to figure out the dimensions of the original G2 derivative and make
sure that it matches in some reasonable way.

To allow users to take advantage of this, calculate the optimal thumb
and resize size to set in G3 to match what was used in G2.  While
we're at it, give the user some idea of how much data is available in
G2 to import.
2009-05-09 19:03:00 +00:00