Commit Graph

16 Commits

Author SHA1 Message Date
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08: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
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
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
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
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
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
Bharat Mediratta
3193c19ca9 Remove unneeded code. 2009-02-27 05:40:29 +00:00
Tim Almdal
d097b4fc02 Update to image_block based on bharat's feedback
1) move the rand_key column into core
2) don't do a max rand, just try to a get a random number less than
the current random number if that doesn't successd look the other way
2009-02-26 23:38:17 +00:00
Tim Almdal
f87e1de3ec Implement a random image block for the side bar. Ticket #13 2009-02-26 15:02:04 +00:00