Commit Graph

706 Commits

Author SHA1 Message Date
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
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
ad56995baf Correct a type and missed a table name 2009-02-28 03:34:03 +00:00
Tim Almdal
1328755b11 This implement table prefix for the watermark notification modules (Ticket #68) 2009-02-27 21:15:13 +00:00
Tim Almdal
fd610589ed This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
(missed this one)
2009-02-27 21:09:00 +00:00
Tim Almdal
bd15853708 This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
2009-02-27 21:07:18 +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
Bharat Mediratta
cd0f9a5d6c Optimize the code by ditching the count query; we don't need it. 2009-02-27 05:39:51 +00:00
Tim Almdal
0b055835fd Remove commented code
Correct unbalanced brackets
2009-02-27 02:50:07 +00:00