Commit Graph
715 Commits
Author SHA1 Message Date
Tim Almdal e58b955d4a Bag the header("Location:", ...);exit() and replace with
url:site(url::abs_file(...))
Create a login_page.html to be used when there is no guest access to
the root album. It doesn't have a sidebar nor breadcrumb.
2009-03-11 21:07:21 +00:00
Tim Almdal 4d5679b749 Fix ticket #119. Display the full name of the user in the same block
as the Modify profile and logout links.
2009-03-11 15:00:57 +00:00
Tim Almdal a521d9177f Force a login if everybody does not have access to the root
item. ticket #118.
2009-03-11 13:58:38 +00:00
Tim Almdal 8da729cfa1 Refine the task api but removing the optional parameters on the
task::create method call
2009-03-11 03:14:52 +00:00
Tim Almdal 5c82ce33a2 Refactor the server add module to make use of the task api (Ticket
#125).  Haven't quite figured out what to do with the errors in the
context. Maybe they should show on the mainenance screen?
2009-03-10 21:30:33 +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
Tim Almdal 5da29b8837 Fix for ticket #135 2009-03-09 16:03:48 +00:00
Tim Almdal 83563ac91a Fix for ticket #133: If $max_pages is zero don't try to redirect to
max_page, just return an empty feed.
2009-03-09 15:10:22 +00:00
Bharat Mediratta caa0a6d47f Don't show the description field if there's no description 2009-03-09 07:54:37 +00:00
Bharat Mediratta 622358ebc8 Fix the progress param to be an actual boolean to resolve a JS error. 2009-03-09 07:12:04 +00:00
Bharat Mediratta f32f1697c9 Get rid of Task_Definition types: they're not necessary. This
incidentally fixes the the problem that admin/maintenance tasks have
been broken.
2009-03-09 07:02:09 +00:00
Bharat Mediratta 72c7fed975 Log the user in as admin after running the web installer, and give
them a nice "Welcome to Gallery 3" dialog.  The text in there needs a
little work but it's a start.

In the process, re-build the install.sql using the scaffolding code.
2009-03-08 21:21:09 +00:00
Bharat Mediratta 23937ff135 Avoid using default task types. Require task::get_definitions() to
specify a single type and ask for it appropriately in
admin_maintenance.  Specify a type for every existing task.
2009-03-05 06:38:11 +00:00
Bharat Mediratta 08d2fcb1f7 Fix some table names 2009-03-05 06:26:15 +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 05f22b47d8 Remove stray reference to server_add_dir_list.html.php 2009-03-05 02:29:02 +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 46b752cbc7 Change how the urls are built in the java script 2009-03-05 01:22:27 +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 2b9795ebf5 Remove addition options to the autocomplete call. No point in sending
csrf if we are not verifying it.  Remove the must match flag so
non-existent paths don't cause the input box to empty
2009-03-04 20:59:16 +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 8575e2b0d1 Continuation of the rename of jquery.autocomplete.pack.js 2009-03-04 19:50:08 +00:00
Tim Almdal c0e65b2029 move server_add styles into the theme screen.css files 2009-03-04 16:36:41 +00:00
Tim Almdal ef8c71417a Move the autocomplete js and css files to lib 2009-03-04 16:10:03 +00:00
Tim Almdal fbc650bddb Changed $uid to $tree_id, so not to confuse anyone between and acroynm
for unique identifier as opposed to user id. :-)
2009-03-04 16:01:18 +00:00
Tim Almdal f7d82ec52f Rename local_import module to server_add 2009-03-04 15:46:10 +00:00
Bharat Mediratta 23b0abb974 Redefine the batch API to be very very simple. You call
batch::start() before starting a series of events, and batch::stop()
when you're done.

In batch mode, the notification module will store up pending
notifications.  When the batch job is complete, it'll send a single
digested email to each user for all of her notifications.

Updated the scaffold and local_import to use this.  Haven't modified
SimpleUploader yet.
2009-03-04 08:51:49 +00:00
Bharat Mediratta b493a534f2 A variety of cleanups:
* Allow for the "movie" type in all of our text
* Try to follow the pattern of mainly only passing ORM objects
  to the view and let it generate its own text (this becomes
  even more important when 3rd parties want to customize notification
  messages)
* Rename _send_message to be _notify_subscribers to be more acccurate
  and have it explicitly take a subject in the API
* Use Item_Model::url() in the views instead of hand crafting URLs
* Reformat HTML in views
* Use $comment->author_xxx() functions instead of replicating that code
* Fix several places where we were encoding data by doing ucfirst($item->type)
  with conditionals where we form the text properly.  We should *never*
  be showing data types to the end user!  This is not localizable!

Note that this probably breaks the existing batch processing code.  I
am going to redo that in a subsequent pass.
2009-03-04 06:25:55 +00:00
Bharat Mediratta 3600e73282 Simplify logic a bit and tweak the visible text. 2009-03-04 05:22:42 +00:00
Bharat Mediratta 302ee07acb Indentation and whitespace tweaks. 2009-03-04 04:55:23 +00:00
Bharat Mediratta 3c015b4d5f Fix indentation. 2009-03-04 04:49:00 +00:00
Bharat Mediratta f71cbc8a71 remove unnecessary render() 2009-03-04 04:46:49 +00:00
Bharat Mediratta c487443860 Move <label> outside of <?= ?> block 2009-03-04 04:28:04 +00:00
Tim Almdal 81a6dc26cb Send 1 items added notification per batch of items 2009-03-04 03:31:01 +00:00
Tim Almdal e33ad56b99 Forgot to remove a debugging statement 2009-03-04 03:08:23 +00:00
Tim Almdal 4a5b005931 Use Directory Iterator 2009-03-04 02:03:05 +00:00
Tim Almdal 328a982546 * Validate that the source path is authorized.
* Add site warning message if local_import is installed an there is no
  authorized directories
2009-03-03 23:07:07 +00:00
Tim Almdal e291e88110 Remove csrf verification from autocomplete handler 2009-03-03 22:27:27 +00:00
Tim Almdal c864f23f2e Only show local_import head stuff (css and js) when the local_import
admin page is shown
2009-03-03 22:25:22 +00:00
Tim Almdal 08c47f28f2 Inline the admin view creation that was in helpers/local_import.php
and remove it.  Cleanup unused variables. Rename the method remove()
to remove_path()
2009-03-03 22:19:46 +00:00
Tim Almdal f58bbe0610 Improve the comment about why we skip the first path.
Change to use access::required
2009-03-03 21:43:59 +00:00
Bharat Mediratta 9775cb69e2 Fix indentation, remove unnnecessary csrf check. 2009-03-03 21:19:31 +00:00
Tim Almdal 0408a0096a Undo r20234 2009-03-03 06:29:16 +00:00
Tim Almdal 1c6384f823 Removed the === false and === true checks 2009-03-03 06:18:18 +00:00
Tim Almdal 7cadb4b21b Refactored the batch Api: 1) created a small batch helper class:
Starting a batch call batch::operation(name, item). In the case of
adding photos name = add and item is the parent of the new items.
When the operation is finished the batch::end_operation(name) is
called.
operation and end_operation events are called.  Handlers
(i.e. item_created) can call batch::in_progress(name) to determine if
a batch is being processed.
2009-03-03 05:59:38 +00:00
Tim Almdal 7bcab31f5d Fix issue identified by security review... some table names where not
being translated.
2009-03-03 03:52:21 +00:00
Tim Almdal 512a532650 Simplify the batch api by having the core event handlers for
start_batch and end_batch add and remove the batch id from the
session.  Modules wishing to do batch processing, just need to fire
the start_batch and end_batch events.  Other modules that need to be
aware of batches (i.e. notifications) just check the session for "batch_id".
2009-03-01 19:11:01 +00:00
Tim Almdal bed1bb48f3 The scaffolding, simple_uploader and local_import now call two new
events: start_add_batch and end_add_batch.  The parameter is a batch
id which is generated on the first add request.  The protocol is call
the add_photo as many times as required and then call finish when
done.
Also renamed the add method in local_import to add_photo so it is
consistent with simple_uploader
2009-02-28 20:12:54 +00:00