23 Commits

Author SHA1 Message Date
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
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
6544854863 Move the directory queue into the database as well, otherwise if you
have too many directories it blows out the task queue and the whole
thing falls over.  Fixes #1547.
2011-01-09 22:29:26 -08: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
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
4720e45641 Don't use "else" clauses in upgrade() -- it prevents multiple version bumps at once. 2009-07-14 12:55:03 -07:00
Bharat Mediratta
22fcb4c776 Forgot to bump the version up to 3 2009-07-11 05:14:02 -07:00
Bharat Mediratta
954ab5a505 Further simplify server_add (and bump it to version 3).
Now we don't have checkboxes, but instead we restrict you to selecting
directories and albums from only one level in the hierarchy.  This
makes it easier for us to make sure that we properly create the
hierarchy that you want and avoid confusion about what's going to wind
up where.

Modify Server_Add_File_Model to have a parent_id and item_id and then
modify them as we go so that we can build up a tree structure there
*before* we create any items.  This makes it much easier to figure out
where a new item is going to go and get rid of a bunch of probably
buggy code in the main task.
2009-07-11 05:03:36 -07:00
Bharat Mediratta
faabae5dae Rework server_add. It's smaller and leaner now, storing the list of
files out in a separate model for scalability.  Removed the "pause"
functionality.

- Server_Add_Controller extends Admin_Controller so that we don't have
  to check for admin every time.
- Task completion time now factors in the time it takes to walk the
  arbitrarily deep trees
- Moved checkbox management entirely into JS using jQuery
- Simplified the JS considerably
2009-07-07 21:20:24 -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
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
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
068c44e201 access::allow/deny/reset functions will now throw an exception if you
don't pass in a Group_Model as the argument.  This prevents us from
setting permissions on the wrong group by accidentally passing in a
User_Model.
2009-03-10 20:34:32 +00:00
Bharat Mediratta
d93e216977 Don't clean out the authorized_paths var at install time, so that uninstall/reinstall doesn't mean starting over 2009-03-05 06:25:29 +00:00
Bharat Mediratta
64b02026ed Cleanups.
- Show the "Server Add needs configuration" message whenever
  there are no paths.

- Un-ajaxify the admin code to remove complexity and allow us to
  update the status message as appropriate.

- Rename server_add_admin.html.php to admin_server_add.html.php
  for consistency.

- Fix up form to properly display error messages

- Get rid of server_add_dir_list.html.php now that we're
  non-ajaxified.

- Change delete <span> to an <a> for non-ajax world.
2009-03-05 02:26:39 +00:00
Bharat Mediratta
ca2ddb0170 Minor cleanups. 2009-03-05 01:40:18 +00:00
Tim Almdal
1fa05f1093 Clean up no authorized directoriesmessage 2009-03-05 00:50:11 +00:00
Tim Almdal
514e6658f6 Correct typo 2009-03-05 00:05:21 +00:00
Tim Almdal
705e6d62b7 Last of changes required from Bharat's 2nd review pass 2009-03-04 20:09:53 +00:00
Tim Almdal
f7d82ec52f Rename local_import module to server_add 2009-03-04 15:46:10 +00:00