Commit Graph

3731 Commits

Author SHA1 Message Date
Bharat Mediratta
a8bb046209 Use readfile() instead of fopen()/fpassthru()/fclose() for brevity.
I've done some tests on a 60M flv and found that there's no difference
in memory consumption with these three approaches:

  public function test() {
    Kohana::close_buffers(false);
    $file = "/home/bharat/basketball.flv";
    if ($fd = fopen($file, "rb")) {
      while (true) {
        $bits = fread($fd, 65535);
        if (strlen($bits) == 0) {
          break;
        }
        print $bits;
        set_time_limit(30);
      }
      fclose($fd);
    }
    Kohana_Log::add("error","test: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1));
  }

  public function test2() {
    Kohana::close_buffers(false);
    $file = "/home/bharat/basketball.flv";
    $fd = fopen($file, "rb");
    fpassthru($fd);
    fclose($fd);
    Kohana_Log::add("error","test2: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1));
  }

  public function test3() {
    Kohana::close_buffers(false);
    $file = "/home/bharat/basketball.flv";
    readfile($file);
    Kohana_Log::add("error","test3: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1));
  }
2010-07-31 11:51:18 -07:00
Bharat Mediratta
7b8ed10796 Add recovery code for dupe slugs and dupe names to the general purpose Fix
task.  Fixes ticket #1260.
2010-07-29 21:49:29 -07:00
Bharat Mediratta
3f48f17e54 We don't care about the name and slug for the root album so don't bother enforcing them. 2010-07-29 19:41:03 -07:00
Bharat Mediratta
ebbb73787d Trap ORM_Validation_Exception specially and report which fields failed validation. 2010-07-29 19:37:38 -07:00
Bharat Mediratta
b3c1b4633c Combine the Fix MPTT and Fix Permissions tasks into one magical fix-it
task.
2010-07-28 22:42:04 -07:00
Bharat Mediratta
dd955781aa "public static" ==> "static" to match code conventions. 2010-07-27 19:54:41 -07:00
Bharat Mediratta
185a736ff9 Revert "Combine all the flex runtime libraries into a single downloadable file. Fixes ticket #1241."
This breaks organize on Chrome 5 (Linux) and Chrome 6 (OSX).  See ticket #1241.

This reverts commit 423fca2d5f.
2010-07-27 11:28:12 -07:00
Bharat Mediratta
bf1e1d3d1f Verified 2010-07-27 11:19:48 -07:00
Bharat Mediratta
84a50e737b Fix the "get flashplayer" button. It was throwing a JS error before.
Not sure why it was done in JS in the first place.  Fixes ticket #1256.
2010-07-27 11:18:55 -07:00
Bharat Mediratta
f9137c756e Updated 2010-07-27 10:53:31 -07:00
Bharat Mediratta
52f1c4b8c6 Don't invoke a graphics toolkit when setting the album cover from a
clean thumbnail; we can just copy it over.  Should be a decent perf
improvement in many cases.  Fixes ticket #1255.
2010-07-27 10:49:47 -07:00
Bharat Mediratta
2e52bcedcd Update the mock so that all responses return arrays, not stdClass(). 2010-07-27 10:14:52 -07:00
Bharat Mediratta
addbd6fb81 Fix ticket #1253 where the maintenance page bombs if you have already
configured your Gallery 2 import but you move your Gallery 3.
2010-07-26 21:38:40 -07:00
Bharat Mediratta
f6fb186847 Merge branch 'master' of github.com:gallery/gallery3 2010-07-25 11:12:08 -07:00
Bharat Mediratta
5be9ae3250 Add a new maintenance task that resyncs album .htaccess files with
database access intents.  Use this to fix up .htaccess files after you
relocate your Gallery. Fixes ticket #1252.
2010-07-25 11:10:42 -07:00
Bharat Mediratta
055e115b6a Move the "cancel all" running tasks button up to make it consistent with the "remove all finished" button. 2010-07-25 11:03:32 -07:00
Bharat Mediratta
075cea2a48 Don't use hardcoded id 1 as the everybody group; it won't work with alternative auth schemes. 2010-07-25 10:05:09 -07:00
Tim Almdal
9534a1c82a Merge branch 'master' of github.com:gallery/gallery3 2010-07-23 23:00:57 -07:00
Tim Almdal
f699d2b385 Fix missing quoate in the organize dialog html template. 2010-07-23 05:56:59 -07:00
Tim Almdal
423fca2d5f Combine all the flex runtime libraries into a single downloadable file. Fixes ticket #1241. 2010-07-23 05:54:50 -07:00
Bharat Mediratta
108fff735c Initialize $request in submit_translations(). Fixes ticket #1239. 2010-07-22 15:53:00 -07:00
Bharat Mediratta
663f079e85 Properly handle the case where the album_cover_item_id points to an
invalid (probably deleted) item.  Fixes ticket #1238.
2010-07-22 14:08:08 -07:00
Bharat Mediratta
adeea49e0a Catch any exceptions thrown when we try to restore the original
identity provider after we fail to set up a new one.
2010-07-21 11:43:51 -07:00
Bharat Mediratta
2cf5198353 Null out relative_path_cache and relative_url_cache after we update
the pointers in case the hierarchy was adversely affected by actions
when the MPTT pointers were desynced.  Fixes ticket #1235.
2010-07-21 11:34:19 -07:00
Bharat Mediratta
af8bb05d5d Show the old group name in the error message when we fail to modify a group. Fixes ticket #1233. 2010-07-20 15:33:48 -07:00
Bharat Mediratta
e5b1a4fc23 Fix a bunch of missing or invalid error messages. Fixes ticket #1232. 2010-07-20 15:21:44 -07:00
Bharat Mediratta
3136121989 Elide "; charset=binary" which can be returned from file::mime() from recent versions of finfo. See http://framework.zend.com/issues/browse/ZF-9383 for details. Fixes ticket #1230. 2010-07-20 13:47:11 -07:00
Bharat Mediratta
b4b2ef92ae Localize the error strings in watermark::get_add_form(). Fix for ticket #1230. 2010-07-20 13:46:38 -07:00
Bharat Mediratta
6899af367b Cleanup on the Admin > Languages page.
Hide the fieldset and legend in the theme, since they don't add any value.
Change l10n_client::_server_url() to use the short style GMC urls and make the
API a little tighter.
2010-07-20 12:45:04 -07:00
Bharat Mediratta
9db310186a Use Session::get_once() instead of Session::get() followed by Session::delete(); 2010-07-20 12:22:52 -07:00
Bharat Mediratta
112582daeb Add internationalized error messages for adding and editing groups. 2010-07-20 12:18:03 -07:00
Bharat Mediratta
6ed638244a Fix internationalization of REST key. 2010-07-20 10:31:45 -07:00
Bharat Mediratta
96bcc8146c Style and text cleanup. Parameterize the minimum flash value so that we can use it in the internationalized string. Fix capitalization. 2010-07-20 07:03:43 -07:00
Bharat Mediratta
9e9eed1187 Oops! Proper fix for #1201. My last fix just redirected back to the
main site, and didn't actually log you out.
2010-07-20 06:42:20 -07:00
Chad Kieffer
a8c629409b Fix margin: 0 auto; IE issue in the upgrader view by adding a doctype to the template. Minor code refactoring. Also seems to fix #1188. 2010-07-17 15:49:47 -06:00
Chad Kieffer
71e097e47b Fix closing ul on inactive modules list, replaced <i> with <em> in footer. 2010-07-17 15:40:41 -06: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
5fd166724b Merge branch 'master' of github.com:gallery/gallery3 2010-07-16 11:59:48 -07:00
Bharat Mediratta
583950616e Improve the fix for #1176 to use request::is_ajax() instead of tacking
on a query param to urls that appear in dialogs.  This keeps things simpler.
2010-07-16 11:58:13 -07:00
Tim Almdal
bd969a6ffa Fix for ticket #1202. Set the minimum flash version 10.0.0 and display a message and a button to download the latest version if the minimum versiion is not installed. 2010-07-16 07:37:24 -07:00
Tim Almdal
ce2b3d0001 Remove code that was inadvertently committed. 2010-07-16 06:52:18 -07:00
Bharat Mediratta
b51b49cb63 Don't show a themed 404 page if we get to a 404 via file_proxy. Just
return a simple "File not found" message, since this is a very basic
file access (thumbnail, resize, original etc)
2010-07-15 19:45:10 -07:00
Tim Almdal
993e041274 Remove the code to call the controller directly and just use redirect. Now that all the form calls actually return the form as a json object, calling the form creation controller method i no longer required. 2010-07-15 14:57:43 -07:00
Tim Almdal
155d2b809b Rename g-in-dialog to the naming standard for query parameters and give it something more representative... 'gallery_dialog_request' 2010-07-15 14:54:45 -07:00
Bharat Mediratta
86a91c11cf Redirect users away from admin to the main site if you click logout on
the admin dashboard.

Fixes ticket #1201
2010-07-15 12:51:35 -07:00
Bharat Mediratta
fe2881a22a Rename Flash_Uploader to just Uploader. Modules that want to replace
this will just replace the controller.  This makes overriding that
much easier in the future.
2010-07-15 12:37:44 -07:00
Bharat Mediratta
8065ab023d Revert "Fix for ticket #1182. Remove the trailing slash and just let it be matched by the trailing (.*) group"
This breaks adding new albums.  I get the following in my error log:

"2010-07-13 13:08:46 -07:00 --- error: Kohana_404_Exception [ 43 ]: The page you requested, form/add/albums/1?type=album&g-in-dialog, could not be found."

This reverts commit cb4e18f9dd.
2010-07-13 13:42:00 -07:00
Bharat Mediratta
297f98fcee Fix reauth authentication to use the identity helper instead of the
user helper directly.  Else it doesn't work with LDAP and other
identity systems.
2010-07-13 12:52:59 -07:00
Bharat Mediratta
887154a3b7 Merge branch 'master' of github.com:gallery/gallery3 2010-07-13 12:30:03 -07:00