Commit Graph

65 Commits

Author SHA1 Message Date
shadlaws
4b28478776 #2040 - Deactivate modules that no longer exist.
- added module::deactivate_missing_modules()
- revised module::deactivate() to change log message if the module is missing
- added call to new function in module::get_obsolete_modules_message()
- added call to new function when loading admin/maintenance menu
2013-03-05 16:54:41 +01:00
shadlaws
9b9f1a7b07 #2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
2013-03-02 13:25:10 +01:00
shadlaws
94aadf03da #2008 - Add warnings if some active modules are obsolete.
- added module::get_obsolete_modules_message function
- put message on admin/dashboard
- put message on admin/modules
- put message on upgrader
- updated unit test golden file xss_data
2013-02-20 17:30:27 +01: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
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
e4daa42830 Rename the comparator to something that makes more sense (to me), and make it static.
Follow-on to 5d9e717417 for #1859.
2012-06-11 14:02:23 -07:00
Bharat Mediratta
5d9e717417 Sort modules by visible name, not id. Fixes #1859. 2012-05-11 17:14:41 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
c1df782a75 Use an absolute url for the upgrader link. Also, clear the upgrade_now
site status message every time we go to Admin > Modules.
Fixes #1695.
2011-04-23 13:04:48 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
e1e1e860cd Use the code version when installing a module that has no installer,
instead of hardcoding version 1.  Fixes #1589.
2011-01-08 16:51:25 -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
eb010554ff Replace self::func() with <helper_name>::func() for all public APIs
and constants to make overloading easier.  Fixes #1510.
2010-11-28 11:27:25 -08:00
Bharat Mediratta
853a3acc9b Implement module::clear_all_vars($module_name)
Also switch from using ORM to Database_Builder for the SQL because it's
cleaner, and clean up the test.  Fixes #1479.
2010-11-08 11:45:14 -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
cbb6967405 Detect out-of-date modules and put up a message for site admins.
Fixes ticket #1353.
2010-09-08 20:59:40 -07:00
Bharat Mediratta
391a90e3ce Detect when a module fails to upgrade properly and put up an
informative message to help the user know that she needs to get a
newer copy of the module.  Fixes ticket #1189.
2010-09-08 20:36:22 -07:00
Bharat Mediratta
afeb3bb8c4 Fix typo. 2010-09-07 22:13:30 -07:00
Bharat Mediratta
b3b6021b0a Don't bomb on the race condition when we're trying to create the
gallery/_cache row and it already exists.  Fixes ticket #1338.
2010-09-06 12:41:27 -07:00
Bharat Mediratta
d3a161ca1b 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.
2010-08-06 10:41:38 -07:00
Bharat Mediratta
10895ca529 Undo the change added in e4eedbce22
which deactivates modules on upgrade.  No idea why we did that, but it
breaks upgrading because it deactivates any module that's been
upgraded.
2010-06-05 23:04:23 -07:00
Bharat Mediratta
0350cf3cd8 Fix a comment typo. 2010-06-05 22:50:20 -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
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
Tim Almdal
c9ea1a64de Remove the one last remaining reference to "no_module_admin". 2010-01-24 15:40:56 -08:00
Tim Almdal
df313cac56 Change the check_environment method in the module helper and the module installers to can_activate to reflect that it is doing more than just checking the environment. 2010-01-22 12:30:17 -08:00
Tim Almdal
0da5d9e606 Internationalize all strings in admin_modules.hmtl and corrected comments. 2010-01-21 20:33:26 -08:00
Tim Almdal
d59c6ed4f1 The admin module controller allows modules to provide a check_environment method
which is called prior to installation.  The method allows the module to provide
an error message or warnings if the module can not be installed or activated
without issues.  The admin module controller also will fire a pre_deactivate
event, which allows modules to indicate issues that may arise be deactivating the
specified module.

These messages are displayed in a dialog box prior to installation in order to
allow the gallery administrator to determine the appropriate action before proceeding.

Lays the foundation for implementing a fix for ticket #937
2010-01-21 12:57:45 -08:00
Bharat Mediratta
7118f84aa9 ORM::factory() in K24 does not allow you to specify an alternate key
for lookup.  So instead of doing:
  ORM::factory("foo", array("some_key" => "some_value"))

you have to do:
  ORM::factory("foo"->where("some_key", "=" "some_value")->find()
2009-12-22 13:32:02 -08:00
Bharat Mediratta
9d19e272d6 Convert some database queries. 2009-12-17 21:16:51 -08:00
Bharat Mediratta
5a7449f315 Update more database calls. 2009-12-06 19:51:25 -08:00
Bharat Mediratta
53df0df0a4 Update a few more occurrences of ORM/Database -> Database_Builder 2009-11-29 02:48:42 -08:00
Bharat Mediratta
3f63e1c521 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/helpers/theme.php
	modules/gallery/libraries/Admin_View.php
	modules/gallery/libraries/Theme_View.php
2009-11-29 02:45:39 -08:00
Bharat Mediratta
f3981bbaa9 Rework the theme loading code to allow themes to be treated as Gallery
modules, and have an admin subdirectory that is treated like a Kohana
module (as distinct from a Gallery module).

The main advantage of creating the separate admin subdirectory is that
we will not load an admin theme and a site theme at the same time.
We'll only load a few specialized bits of the site theme while the
admin theme is active.

Concrete examples. A site theme named "xxx":
- will receive events at themes/xxx/helpers/xxx_event.php
- will have working controllers at themes/xxx/controllers/xxx.php

If theme xxx has an admin subdir, then in admin mode it:
- will receive events at themes/xxx/admin/helpers/xxx_event.php
- will have working controllers at themes/xxx/admin/controllers/xxx.php
2009-11-28 23:25:07 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
79f700ef9f Change the keys of the block arrays in block manager to be a md5 hash of module_name:block_id. This allows easier lookup of blocks to remove when modules
are being deactivated. Change the module activation/deactivation to call (activate|deactivate)_blocks instead of just the sidebar blocks.  This insures
that when a module is deactivated any admin dashboard blocks are removed as well the site sideboard blocks. Fix for ticket #876.
2009-11-12 13:13:34 -08:00
Tim Almdal
514915438b Add a flag in the module.info (no_module_admin) to indicate that this module shouldn't be managed by the default module administration screen. This module will always be locked on that screen. 2009-10-27 07:57:51 -07:00
Tim Almdal
e4eedbce22 Change the upgrader so that it never deactivactes the gallery nor the current identity provider modules. Call module::deactive to truly deactivate the module. 2009-10-26 09:35:41 -07:00
Tim Almdal
b74b131e25 Change Identity adminstration to use the uninstall/install methods when changing providers. 2009-10-22 22:30:25 -07:00
Tim Almdal
89ca1590e4 When uninstalling a module call graphics:remove_rules instead of graphics remove_rule. 2009-10-22 22:30:24 -07:00
Tim Almdal
090c4d016b Merge branch 'master' into talmdal_dev
Conflicts:
	lib/gallery.common.css
	themes/admin_wind/views/admin.html.php
	themes/night_wind/views/sidebar.html.php
	themes/wind/views/sidebar.html.php
2009-10-18 09:28:48 -07:00
Tim Almdal
4949a2ce0b Optimize the get method to retrieve the module information from the loaded modules. In addition add a method "info" to return the module information contained in the module.info file 2009-10-18 09:23:59 -07:00
Tim Almdal
6d5c12e13e Move the default identity config into the users module and change the Identity constructor to look in module::get_var(gallery, identity_provider) for the current identity driver.
In addition, don't just arbitrarily lock the use module.  Only lock gallery and the module that is referenced by "user_driver_module" variable.
2009-10-18 08:00:33 -07:00
Tim Almdal
2634a683b3 Revert "Create a gallery::plugin_path which returns the appropriate path to the module or theme. This checks for the existence of an application/modules or application/themes first."
This reverts commit e1e1461a77caf5bff457927f098366497de6ffff.
2009-10-04 10:12:22 -07:00
Tim Almdal
aa0529d557 Create a gallery::plugin_path which returns the appropriate path to the module or theme. This checks for the existence of an application/modules or application/themes first. 2009-10-04 10:12:21 -07:00
Tim Almdal
81eaf1e46c Add functionality to activate sidebar blocks when the module is activated and deactivate the sidebar blocks when the module is deactivated. 2009-09-30 17:30:01 -07:00
Tim Almdal
39cd84d86c Remove a debugging log statement 2009-09-29 09:11:43 -07:00
Tim Almdal
e6f6239611 Remove the @todo and optimize the gallery_event call for 3 and 4 arguments... context menu events have 4 arguments. 2009-09-29 09:10:41 -07:00