Commit Graph

129 Commits

Author SHA1 Message Date
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
fd0051dab7 #2006 - Add system::mark_file_for_delete API to delete files at shutdown.
- added system::mark_file_for_delete to be called to mark a file
- added system::delete_marked_files to be called at shutdown to delete the list
- amended system::temp_filename to, by default, add the temp name to the list
- updated a few other places in code where this should be used
2013-02-17 23:19:35 +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
a1a6600457 Enable the profiler and debug output if var/PROFILE exists. This
provides a quick/easy way for server admins to provide profile output.
Fixes #1959.
2013-01-23 18:03:09 -05:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
cd46dc479c Beef up the random number generator by using Joomla's new implementation. 2012-04-01 12:39:48 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
e5175fd277 Fix the standard and REST uploaders to use a callback function to
delete temporary files during shutdown.  Fixes #1788.
2011-10-03 23:19:44 -07:00
Bharat Mediratta
c07af35a19 Oops, fix broken codex urls. For #1698. 2011-04-23 14:53:39 -07:00
Bharat Mediratta
ba20d5a500 Oops, this is the rest of the modules and themes for #1696 and #1698. 2011-04-23 14:46:07 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
b5ba61fc53 Create a way for controllers to exempty themselves from maintenance
mode and private gallery mode by setting the following constants in
the controller to true.

  ALLOW_MAINTENANCE_MODE
  ALLOW_PRIVATE_GALLERY

Fixes #1411 and the subsequent refactoring fixes #1551 as well.
2010-12-23 23:34:04 -08:00
Bharat Mediratta
161a85d3f5 Enable profiling output in the HTML output for REST. Fixes #1535. 2010-12-16 20:37:44 -08:00
Bharat Mediratta
cd48b89f31 Consolidate all the random code into a random helper that offers:
random::hash()
  random::string()
  random::percent()
  random::int()

So that we don't have lots of different ways to get random values all
over the code.  Follow-on to #1527.
2010-12-15 14:57:00 -08:00
Bharat Mediratta
45c63f4d11 Use mt_rand() instead of rand() since it provides better portability.
Fixes #1527.
2010-12-15 12:48:56 -08:00
Bharat Mediratta
554ca2e683 Take into account the core.url_suffix configuration setting when
parsing REST urls.  This fixes the problem that setting the url suffix
breaks REST.  Fixes #1500.
2010-11-22 22:01:11 -08:00
Bharat Mediratta
dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07:00
Bharat Mediratta
9f11d8ad83 Log the JSON response on errors so that we can figure out what's going
wrong.  This will help diagnose #1364 which appears to be an
ORM_Validation_Exception, except the actual output is getting eaten by
the Organize SWF so we can't see it without snooping network traffic.
2010-09-11 22:38:47 -07:00
Bharat Mediratta
70c8572ea1 Make RENAME TABLE operations idempotent so that in case there's a
failure of some kind we can restart the upgrade and it'll continue.
Fixes ticket #1325.
2010-09-01 22:19:44 -07:00
Bharat Mediratta
ff1d8aea2f We use UTF-8 everywhere. Fixes ticket #1285. 2010-08-15 01:59:54 -07:00
Bharat Mediratta
a94bb19798 Force the charset to UTF-8 when viewing the HTML form of REST output. 2010-08-09 23:01:47 -07:00
Bharat Mediratta
541a084cc1 "REST api" --> "REST API". 2010-08-08 21:51:26 -07:00
Bharat Mediratta
0014745d4a Add a button to the user profile page to let you reset your REST API
key.  This is useful if you think it's been compromised in some way.
Fixes ticket #1226.
2010-08-08 21:49:30 -07:00
Bharat Mediratta
d6f5a8a8d1 Add JSONP support. You must specify &output=jsonp?callback=<js_function>
Fixes ticket #1205.
2010-08-08 15:02:24 -07:00
Bharat Mediratta
ded9ed4df8 Create a registry of REST resources and call it "registry".. Pretty
simple, actually.  Fixes ticket #1173.
2010-08-08 11:35:36 -07:00
Tim Almdal
c3a92df6e6 Merge branch 'master' into dialog 2010-07-27 21:35:14 -07:00
Bharat Mediratta
2e52bcedcd Update the mock so that all responses return arrays, not stdClass(). 2010-07-27 10:14:52 -07:00
Tim Almdal
48c2e73048 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-23 23:05:39 -07:00
Bharat Mediratta
6ed638244a Fix internationalization of REST key. 2010-07-20 10:31:45 -07:00
Bharat Mediratta
71a32e4e24 POST requests create a new entity and should result in a 201 Created
reply with a Location field that matches the URL of the newly created
resource.  Fixes ticket #1178.
2010-07-16 14:23:03 -07:00
Bharat Mediratta
ed704e6a3b Trap 404s and return Rest_Exception instead. Fixes ticket #1213. 2010-07-16 12:16:20 -07:00
Bharat Mediratta
ab9049d531 Remove trailing ?> 2010-06-20 09:05:25 -07:00
Bharat Mediratta
f6025026eb Rename error_rest.php to error_rest.json.php so that we specify the
result type in the filename as is our convention for views.
2010-06-20 08:50:19 -07:00
Bharat Mediratta
cd96ed8873 $response is optional in the Rest_Exception constructor. 2010-06-19 14:13:34 -07:00
Bharat Mediratta
456d54ea2d Throw exceptions as appropriate, but allow the Kohana exception
handling framework to handle the exception and delegate to our
template, which will JSON encode the response.
2010-06-19 14:07:37 -07:00
Bharat Mediratta
fa404589d6 Oops. Fix up a bad instance of $user in rest::access_key() introduced
in my last change.
2010-06-19 10:24:26 -07:00
Bharat Mediratta
9b78867427 Simplify rest::get_access_key($user) to rest::access_key() that
returns just the access key string for the active user.  That's how we
use the API, so keep it simple.
2010-06-18 20:43:14 -07:00
Bharat Mediratta
295a42e0f1 change single to double quotes. 2010-06-18 20:20:05 -07:00
Bharat Mediratta
57b53e6193 Guard against relationships() not returning an array. 2010-06-15 20:21:10 -07:00
Bharat Mediratta
78186c262c Update the description. 2010-06-15 16:09:45 -07:00
Tim Almdal
938eea7fc4 Merge branch 'master' into talmdal_dev 2010-06-13 09:59:27 -07:00
Bharat Mediratta
2c1e3800ef Send back the REST API version as a header. It's on every request,
which sucks, but it's totally unobtrusive because it's a header so
that's ok.  Decided that the current version is "3.0" although it will
surely change before the final 3.0 release.

Fixes ticket #1148
2010-06-11 14:59:17 -07:00
Tim Almdal
30849d10b1 Tweak the error response for rest requests to make it easier for the client to extract error information. 2010-06-10 08:18:15 -07:00
Tim Almdal
d5b80f2944 Don't use the standard error formatting for exceptions that have occurred as part of a REST request. Format the exception as a json encoded text string so the client can extract the fault information if they so choose. 2010-06-08 14:35:35 -07:00
Tim Almdal
0aafec0e59 The status message for an HTTP 400 status should always be 'Bad Request', if I'm reading the specification right. 2010-06-08 14:32:53 -07:00
Tim Almdal
32241cd143 Merge branch 'master' into talmdal_dev 2010-06-07 07:18:20 -07:00
Tim Almdal
fef5cf9865 If the identity provider changes then delete all the rest user_access_keys, as they are no longer valid. (i.e. all the related users have been deleted.) 2010-06-07 07:09:39 -07:00
Tim Almdal
097ef934c6 Merge branch 'master' into talmdal_dev 2010-06-06 15:45:03 -07:00
Bharat Mediratta
481ef823dd Add an advanced setting to allow developers to allow guest access to
REST entities.
2010-06-05 19:45:15 -07:00