diff --git a/_config.php b/_config.php index 03b813379..6368f6179 100644 --- a/_config.php +++ b/_config.php @@ -23,7 +23,7 @@ Director::addRules(10, array( //'Security/$Action/$ID' => 'Security', 'db//$Action' => 'DatabaseAdmin', '$Controller//$Action/$ID/$OtherID' => '*', - 'images//$Action/$Class/$ID/$Field' => 'Image_Uploader', + 'images' => 'Image_Uploader', '' => 'RootURLController', 'sitemap.xml' => 'GoogleSitemap', 'api/v1' => 'RestfulServer', diff --git a/core/control/RequestHandlingData.php b/core/control/RequestHandlingData.php index 0eb16eb2d..00ffc1aab 100644 --- a/core/control/RequestHandlingData.php +++ b/core/control/RequestHandlingData.php @@ -76,6 +76,9 @@ class RequestHandlingData extends ViewableData { foreach($this->stat('url_handlers') as $rule => $action) { if(isset($_REQUEST['debug_request'])) Debug::message("Testing '$rule' with '" . $request->remaining() . "' on $this->class"); if($params = $request->match($rule, true)) { + // FIXME: This unnecessary coupling was added to fix a bug in Image_Uploader. + if($this instanceof Controller) $this->urlParams = $request->allParams(); + if(isset($_REQUEST['debug_request'])) { Debug::message("Rule '$rule' matched to action '$action' on $this->class. Latest request params: " . var_export($request->latestParams(), true)); } diff --git a/core/model/Image.php b/core/model/Image.php index 1d75b5989..6f81131c9 100755 --- a/core/model/Image.php +++ b/core/model/Image.php @@ -453,6 +453,11 @@ class Image_Saver extends DBField { * @subpackage filesystem */ class Image_Uploader extends Controller { + static $url_handlers = array( + '$Action!/$Class!/$ID!/$Field!/$FormName!' => '$FormName', + '$Action/$Class/$ID/$Field' => 'handleAction', + ); + /** * Ensures the css is loaded for the iframe. */ diff --git a/css/SelectionGroup.css b/css/SelectionGroup.css index 08d084bfa..29018adf6 100644 --- a/css/SelectionGroup.css +++ b/css/SelectionGroup.css @@ -10,11 +10,16 @@ .SelectionGroup li input { width: 20px; float : left; - - height:100px; - overflow-y:scroll; } +.mainblock.allassets ul { + padding: 0 0 0 10px; + height:100px; + overflow-y:scroll; +} +.mainblock.allassets ul li { + width: 150px; +} .SelectionGroup li div.field { display: none; font-size: 1em;