Commit Graph

61 Commits

Author SHA1 Message Date
Bharat Mediratta
9cc5d05814 Don't throw up a warning if we can't detect whether or not the logs dir is writable. 2009-05-07 00:29:55 +00:00
Bharat Mediratta
6b4fa9105f Disable automatic session id regeneration because ajax requests cause it to bomb. 2009-04-23 00:49:35 +00:00
Bharat Mediratta
8141fd5088 Set the default logging to 'notice' to make it more user friendly. 2009-04-22 19:32:24 +00:00
Bharat Mediratta
a89541545f Remove automatic load of atom module. 2009-03-15 22:54:19 +00:00
Tim Almdal
7786bb09d3 Implement a Maintenance mode as per ticket: #15 2009-03-05 00:32:33 +00:00
Andy Staudacher
c2eee47465 Move site default_locale into DB (vars) and add a per user locale preference.
There's no UI to select the locale yet.
2009-02-10 02:37:16 +00:00
Tim Almdal
41dbe5cf6c Changed the Sendmail library to allow the separator between mail
headers to be specified as a parameter.  The documents say that it
should be "\r\n".  Some sendmail programs seem to violate the
specification and get confused.  In these cases the header separator
is just "\n".

This change allows the header separator to be set by the a
configuration parameter.
2009-02-02 02:58:12 +00:00
Tim Almdal
d49484c9a6 Update the handling of the to field if the input field is an array 2009-02-01 03:55:40 +00:00
Bharat Mediratta
33d7fa8cf6 Make the application home page the scaffolding. 2009-01-29 01:38:40 +00:00
Tim Almdal
66fae63558 Create a sendmail library to wrap the call to the system sendmail
facility. Something quirky is happening in the first test, see comment
in code, but I couldn't figure it out.  Left a @todo for now.
2009-01-28 04:22:59 +00:00
Bharat Mediratta
863e3712c7 Add atom to the implicit module list. 2008-12-24 04:04:08 +00:00
Bharat Mediratta
99f131d9ae Create module::load_themes() to load the correct theme after we do
routing and know whether we're going to an /admin page or a regular
one.
2008-12-20 00:50:37 +00:00
Bharat Mediratta
855a5928ce Create a new pattern for Site Admin controllers:
1) They must all start with "admin_".  This pattern is not directly
   routable.

2) Their urls must be /admin/xxx.

3) The Admin_Controller will take the xxx and look for Admin_Xxx_Controller
   and will delegate to that admin controller, after doing security checks.

Moved the users and dashboard views into individual modules for now.
2008-12-19 09:47:13 +00:00
Bharat Mediratta
9b6ccfc7f3 Fix some lint errors 2008-12-17 19:06:39 +00:00
Bharat Mediratta
fa5a8fde4a Switch from cookie sessions to database sessions. We can't use cookie
sessions; it encodes all the value into the cookie which means
little/no security, transfer costs, and storage limits.
2008-12-17 18:32:08 +00:00
Bharat Mediratta
8bd7afeb5b TEST_MODE always exists now, so check its value, don't rely on its existence to know that we're in test mode. 2008-12-16 05:13:04 +00:00
Bharat Mediratta
2812f34732 Rename default_admin to admin_default. 2008-12-15 01:55:07 +00:00
Felix Rabinovich
13ad40ab5c Created admin controller and made admin obey admin theme settings 2008-12-14 02:23:37 +00:00
Tim Almdal
e1f2a5d4e6 1) Begins the creation of the local import module by adding the administation component to the scaffolding Actions tab. The importing functionality will follow shortly.
2) Defines a routining pattern for module administration controllers.  URI's of the form admin/module/method/parameters gets remapped into module_admin/method/parameters. This will result in the lookup of the the controller Module_Admin_Controller
2008-12-11 17:20:55 +00:00
Bharat Mediratta
1094501251 Only add the unit_test and gallery_unit_test modules if we're in TEST_MODE 2008-12-08 08:27:17 +00:00
Bharat Mediratta
d086f31ea4 Style cleanups to make File_Structure_Test pass. 2008-12-07 07:42:02 +00:00
Tim Almdal
fb6e22e145 Implemented photo::_get_photo_add(). You need to create the var/uploads directory and make it writable by the server. The location of the temporary upload directory is specified in config/upload.php 2008-12-06 21:14:36 +00:00
Tim Almdal
6a76d6f747 Dynamically create the list of available modules. This permits new modules to be added without having to update the config.php file 2008-11-28 21:22:34 +00:00
Andy Staudacher
38e1eef547 Some code audit fixes and adding some directory separator normalization code to make it work on Windows as well. 2008-11-26 20:21:39 +00:00
Andy Staudacher
66f51f3c17 Initial commit of the translation class, I18n_Core and some tests.
- Port of Ruby's I18n gem (http://rails-i18n.org/)
- Added proper plural handling on top of that.
- Using CLDR 1.6's plural form data
- See I18n_Test for example usage.
- Not integrated into G3 templates yet. Probably adding __() as alias for I18n::instance->translate().
- No specific plan yet where localization files should live.
2008-11-26 11:46:56 +00:00
Tim Almdal
8b52d9cde4 Revert the site_title change 2008-11-24 05:58:38 +00:00
Tim Almdal
7491e3c44a Add a site-config parameter to the config.php file. Created a core_block:head method to insert the title into the head section. If the config value is false, the default Browse Photos::$item->title is used. A string value with a trailing '-' will append the config value to $item-title. Otherwise, the page title is set with the supplied value. 2008-11-23 16:51:06 +00:00
Bharat Mediratta
51ada4c2e2 Move search out into its own module and have it display its link at
the header_bottom() insertion point.
2008-11-23 08:08:12 +00:00
Jozef Selesi
6028447993 An Atom library prototype. Its purpose is to explore the cost of us supporting Atom as the default input and output format of RESTful controllers. Only the constructs necessary for representing comment feeds and entries have been implemented. Its output are valid Atom 1.0 documents. The test contains examples of how to make feeds and entries. 2008-11-22 18:22:53 +00:00
Jozef Selesi
c3fc1cb7ec * Added HTTP status constants and helper functions to REST helper.
* HTTP header setting in comment module now going through REST helper API.
* Fixed items controller test.
* Fixed user installer test.
* Fixed _create() handling in the REST controller.
* Fixed routing for edit and add forms.
* Added some tests for the REST controller.
* Set svn:eol-style to LF on a bunch of files.
* Added preamble to MY_Forge.php.
2008-11-20 01:25:29 +00:00
Bharat Mediratta
4ff0997c75 Fix a mistake in the route that let people try to get to the rest controller (it would fail, but this way they get a 404 instead of another error). 2008-11-19 04:22:17 +00:00
Bharat Mediratta
5638fc5fb6 Change the way that we do RESTful routing.
1) We now use __call() in REST_Controller to handle any requests to a controller
   that were not already handled.  In the case of RESTful controllers, this should
   be the only entry point (although they're free to break the model and add other
   ones.. nothing stops them).

   This means that we can remove all the catch-all routes in
   routes.php which greatly simplifies it.

2) Move request_method() and output_format() out of REST_Controller and into the REST
   helper in core/helpers/rest.php

3) Experiment with letting the various subclasses check the output_format and deal with
   it themselves.  This simplifies the API, but it might be a bad idea in that it might
   push too much work to the individual controllers.  It's a balancing act, time will tell,
   I'm willing to change it back later.
2008-11-19 04:20:35 +00:00
Bharat Mediratta
df4832bf6f Change Media_RSS_Controller so that it does not extend REST_Controller, since it
doesn't refer to a fixed resource or collection of resources.

Fix some minor bugs in the code so that we can actually generate a
feed.  It looks pretty cool!  Improved pagination links, but didn't actually test them.
2008-11-19 03:17:56 +00:00
Tim Almdal
693080669a fix a few minor issues 2008-11-19 02:50:11 +00:00
Jozef Selesi
b2772f5a05 * Renamed the album, item and photo controllers to albums, items and photos in order to follow the convention that controllers that refer to a collection of resources have plural names.
* Added a bug workaround to routes.php
2008-11-19 00:12:25 +00:00
Jozef Selesi
1992343c2e * Changed REST API. Now there are two separate methods for forms:
GET /form/edit/{controller}/{resource_id} -> controller::_form_edit($resource)
  GET /form/add/{controller}/{parameters}   -> controller::_form_add($parameters)
* Updated comment, user and core modules to reflect the API changes
* Cleaned up routing and handling of requests to /{controller}
2008-11-18 23:40:47 +00:00
Tim Almdal
4bf486955c The start of the slideshow module. Mostly framework stuff, no real implementation yet 2008-11-18 19:09:24 +00:00
Jozef Selesi
b63ea2cdbf - All comments of an item can now be seen /comments?item_id=
- Return proper Content-Type header for GET /comments requests
- Got rid of the query processing for index() in REST_Controller()
- Small misc fixes
2008-11-18 15:48:08 +00:00
Jozef Selesi
3ebb751cda First iteration of REST controller refactoring. RESTful controllers that refer to collections should now have plural names and there should be only one controller per resource. Updated existing classes that implement REST_Controller. The routing now works like this:
GET    /controller    -> controller::_index()
POST   /controller    -> controller::_create()
GET    /controller/id -> controller::_show()
PUT    /controller/id -> controller::_update()
DELETE /controller/id -> controller::_delete()
GET    /form/edit/controller/resource_id -> controller::_form()
GET    /form/add/controller/data         -> controller::_form()
2008-11-18 08:28:32 +00:00
Bharat Mediratta
e87a37b855 Rename 'tags' module to 'tag' for consistency of pluralization 2008-11-16 07:17:29 +00:00
Bharat Mediratta
140736a1e4 Several large changes:
1) Changed the way that we get forms.  Now, if you want to get a form
   for a REST resource you prefix /form to the resource id.  So:
    /form/photo/1    : returns a form for editing photo id 1
    /form/comments/1 : returns a form for adding a comment to photo id 1
    /form/comment/1  : returns a form for editing comment id 1

2) Changed the comment module to have two controllers:
    comment:  deals with a single comment resource
    comments: deal with collections of comments attached to an item

Related stuff:
- Moved the comments js into the theme
- Reworked Comment_Helper for clarity
- Moved form generation code down into Comment_Helper
- Cleaned up routes (eliminating new comment ones added in recent rev)
- Added form() function to all REST controllers
- Changed comment module to use a block instead of an arbitrary helper call from the theme
- Comment controller only returns HTML currently, but returns a 201 Created status
  code when a new comment is added, which the Ajax code can catch and act upon.
- Got rid of a lot of extra views in comment module
2008-11-16 07:14:12 +00:00
Jozef Selesi
f9eaa8c220 Initial add comment implementation. 2008-11-15 16:52:23 +00:00
Bharat Mediratta
87f1115113 Change REST API to use non-routable functions: _get(), _post(),
_put(), _delete().

This should make it more obvious that these are not your typical
routes, simplifies overall routing by removing a rule and removes the
possibility of accidentally leaking information if we route to one of
them by accident.
2008-11-11 07:29:48 +00:00
Bharat Mediratta
dae36c2aa4 Create REST_Controller abstract base class for all REST based resource
controllers.  Any controller that wants to act RESTful can extend this
class and implement get/post/put/delete.

Tweak default routes to disallow direct access to the REST controller
and direct access to any REST methods.
2008-11-11 06:18:45 +00:00
Jozef Selesi
24decb7fa4 Beginnings of the comment module. Install and uninstall. 2008-11-09 22:57:55 +00:00
Bharat Mediratta
1b490c5fe6 Make Gallery3 more RESTful.
Create Item_Controller as a common superclass for Album_Controller and
Photo_Controller.  Change routes to route requests to Item_Controller
for dispatching, which in turn will generate get/post/put/delete
requests to the controlller so that each controller has a RESTful
surface.

Change in_place editing to take advantage of this.
2008-11-09 19:20:23 +00:00
Tim Almdal
d025155314 The start of an authentication module. This provides the installation and a basic install test. There is no interface at the moment to do authentication. It is dependent on the install of the user module. 2008-11-08 01:56:59 +00:00
Bharat Mediratta
c526a9cd25 Move default theme up above modules so that it can override module views 2008-11-07 05:04:15 +00:00
Bharat Mediratta
3fe8cd7135 Drop the ? from the base url; we're going to count on Apache PathInfo for navigation. 2008-11-06 04:55:22 +00:00
Bharat Mediratta
fd3e21e2fd Move Google Maps block off into its own gmaps module. 2008-11-05 05:41:19 +00:00