54 Commits

Author SHA1 Message Date
Johan Cwiklinski
6746792bdf Drop short_tags 2018-05-19 17:01:37 +02:00
Bharat Mediratta
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
edb17db8cf Added access check - not really necesssary because we're only doing a
redirect, but it's nice to be consistent.  Follow-on for #1837.
2012-06-11 12:47:44 -07:00
Bharat Mediratta
834fb3db10 Oops, add in a file missed in 11ee6d50ac 2012-05-07 12:09:00 -07:00
Bharat Mediratta
11ee6d50ac Fix a database error caused by trying to view a non-search-result in a
search context.  Patch thanks to sermoro.  Fixes #1837.
2012-05-07 11:49:41 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
c07af35a19 Oops, fix broken codex urls. For #1698. 2011-04-23 14:53:39 -07:00
Bharat Mediratta
ba20d5a500 Oops, this is the rest of the modules and themes for #1696 and #1698. 2011-04-23 14:46:07 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
d0e78fc5cf Fix capitalization to be sentence case. 2010-12-26 23:06:09 -08:00
dmolavi
2d4d613318 Correct image block plurality, fixes 1506 2010-12-25 16:09:42 -05:00
Bharat Mediratta
6c46382fd0 Ok, do a real fix for #1499 by creating version 3 of the image_block
module and creating the image_count variable if it wasn't already set.
2010-12-02 08:38:16 -08:00
Bharat Mediratta
c3ef892126 Duh, set the image_block.image_count variable in the installer! This
issue was introduced in cdf0f7f765 which
was a follow-on for 3c523bcac6 which
fixes #1499.
2010-12-02 08:32:59 -08:00
Bharat Mediratta
cdf0f7f765 In 3c523bcac6 (fix for #1499) I left out
the install() function which should set the image_block module to
version 2.  Fix that here.
2010-11-29 21:02:19 -08:00
Bharat Mediratta
3c523bcac6 Create a module setting for the number of random images to show in the
sidebar. Fixes #1499.
2010-11-21 13:51:07 -08:00
Bharat Mediratta
4e56176f35 item::random_query() doesn't need to take a "where" clause because
it's returning a query, so the caller can add the where clause
himself.  This makes for a cleaner API.
2010-06-05 23:47:47 -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
0a6630af2d Improve likelihood that image block shows up for small photo collections by retrying the random query a few times. 2010-02-07 22:30:08 -08:00
Bharat Mediratta
409c4dcc47 Do a better job of guarding against missing images. 2010-01-19 21:27:54 -08:00
Bharat Mediratta
9864ab4b27 Move the random image functionality into the gallery REST helper since
choosing a random image is essentially a function on an item collection.
Also implemented a bunch of other query filters for item collections.

Created item::random_query() as a way of generating a reasonable
starting point for random queries.
2010-01-08 14:56:08 -08:00
Bharat Mediratta
2d8843ba4d use item::random() to get the random item. 2010-01-08 11:48:44 -08:00
Bharat Mediratta
0e3327bca7 Simplify the REST API code. Here's what I did:
1) Simplify gallery_rest to return flat models, no children and do no
   validation for now.
2) Flatten the REST replies and use HTTP codes to indicate
   success/failure instead of additional status messages.
3) Use the message and error code support in the base Exception class,
   instead of brewing our own in Rest_Exception.
4) Get rid of rest::success() and rest::fail() -- we only need
   rest::reply() since all failures are covered by throwing an
   exception.
5) Get rid of /rest/access_key and just use /rest for authentication.
6) Inline and simplify rest::normalize_request since we only use it once
7) Change rest::set_active_user to succeed or throw an exception
8) Extract Rest_Exception::sendHeaders into rest::send_headers()

Here's what's currently broken:
1) Data validation.  There currently is none
2) Logging.  That's gone too
3) image block and tag code is broken
4) Tests are broken
5) No movie support
2010-01-03 20:30:35 -08:00
Tim Almdal
bccb6fc021 Clean up validation the check for duplicate names or slugs, finish converting the rest API to Kohana 2.4 2009-12-27 08:32:12 -08:00
Tim Almdal
3060a6f662 Merge branch 'master' into talmdal_dev
Conflicts:
	modules/gallery/controllers/albums.php
	modules/gallery/controllers/movies.php
	modules/gallery/controllers/photos.php
2009-12-26 11:24:50 -08:00
Tim Almdal
a2a3741b53 Change the image block rest handler to expect the type (i.e. random) as a parameter not part of the path. 2009-12-24 11:36:00 -08:00
Tim Almdal
d0dd6650be When normalizing the rest request don't assume that the additional arguments are acutall a path. Leave it up to the handler to determine. 2009-12-23 13:13:03 -08:00
Tim Almdal
b8ee6f25bd Add a restful get random image block 2009-12-22 18:55:03 -08:00
Bharat Mediratta
0ef6994f23 ORM::orderby -> ORM::order_by 2009-11-25 19:25:34 -08:00
Tim Almdal
5b579ffdcb Remove the image_block_installer class as it does nothing, except erroneous set the version number to 2. 2009-11-18 11:14:50 -08:00
Tim Almdal
fc41d09134 Revert "Simplify the maintenance of the xss golden file by having each module contibute its own golden file to a consolidated one. This will make it easier for -contrib modules or themes to be included in the xss security test w/o having to keep modifying a central golden file."
This reverts commit 4fe5801c88.
2009-11-18 10:54:01 -08:00
Tim Almdal
4fe5801c88 Simplify the maintenance of the xss golden file by having each module contibute its own golden file to a consolidated one. This will make it easier for -contrib modules or themes to be included in the xss security test w/o having to keep modifying a central golden file. 2009-11-18 10:34:39 -08:00
Tim Almdal
64f5a98bd6 Since the activate_sidebar_blocks mentod is called from the module::install, we don't need to add the block in the image_block_installer::install method as well> Fixes ticket 874. 2009-11-09 07:34:30 -08:00
Tim Almdal
7ea13b3869 Normalize capitalization ticket #596 2009-10-28 12:15:52 -07: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
Tim Almdal
7e78d125b2 Correct version numbers for image_block and info modules, they inadvertently got set to 2, they should be 1 2009-09-30 18:05:09 -07:00
Tim Almdal
612bc3f091 Merge branch 'talmdal_dev' of git@github.com:gallery/gallery3 into talmdal_dev
Conflicts:
	modules/gallery/helpers/block_manager.php
	modules/gallery/libraries/Theme_View.php
	modules/image_block/helpers/image_block_block.php
	modules/image_block/helpers/image_block_theme.php
	modules/info/helpers/info_block.php
	modules/info/helpers/info_installer.php
2009-09-30 07:48:19 -07:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Tim Almdal
19cb27c9a4 change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach 2009-09-29 15:07:53 -07:00
Tim Almdal
39a40e49a1 Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks 2009-09-29 14:35:15 -07:00
Bharat Mediratta
9fbdcf3efd Change the module installer so that you don't need to provide your own
install() function if all you're going to do is to set the version of
the module from module.info into the database.  This means that for some
simple modules, you don't need an install.php file at all.
2009-09-05 13:39:30 -07:00
Bharat Mediratta
e2a9a1d284 Add quotes around all values that contain spaces in them, and add a
test to make sure that we continue to do so.

This makes sure that we don't have problems with 5.3 which treats the
literal "on" as a boolean.
2009-07-13 10:36:55 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
unostar
1e4bf621f1 corrected misprint
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-06-06 01:25:11 +08:00
Tim Almdal
0f987880e6 Fix for ticket #320 2009-06-02 12:08:47 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Tim Almdal
c4cdecc05f 1) Change the image block so it has the correct url in the anchor tag.
2) Change the wrapping class to gImageBlock instead of gImage so the
quick kinks aren't enabled
2009-02-27 13:44:19 +00:00
Bharat Mediratta
3193c19ca9 Remove unneeded code. 2009-02-27 05:40:29 +00:00