[ 
https://issues.apache.org/jira/browse/SHINDIG-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610655#action_12610655
 ] 

Chris Chabot commented on SHINDIG-427:
--------------------------------------

Hey Jorge, thats some great work, patch is looking really good!

A few small things that stood out is that some if blocks were missing {}'s 
(which leads to subtle bugs in the long run, so we dont do that), and a few 
small formatting errors, but nothing that wasn't easily fixable.

Also i noticed that in ContentRewriter.php it reads:
$rewriteFeature = $requires [ContentRewriteFeature::$REWRITE_TAG];
if ($rewriteFeature == null) {
    return false;
}

Which works great if you have notices turned off, but with notices turned on 
that creates an error (index not found in the array), so it's better to do:
$requires = $gadget->getRequires();
if (!isset($requires[ContentRewriteFeature::$REWRITE_TAG])) {
        return false;
}

That way it does the same, but doesn't generate any errors.

Also from that code i take it that it doesn't rewrite the content unless the 
content-rewite feature is specified in the gadget xml. Now that's a very 
reasonable thing to do, but some containers choose to always rewrite unless 
it's specifically specified not to, like Orkut forinstance:
http://orkutdeveloper.blogspot.com/2008/06/rewriting-returns-to-sandbox.html

So i guess the best choice is to make that configurable?



> Content-Rewrite
> ---------------
>
>                 Key: SHINDIG-427
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-427
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Gadget Rendering Server (PHP)
>            Reporter: Jorge Condomí
>         Attachments: content-rewrite-feature.patch
>
>
> Add the Content-Rewrite feature to the Gadget Rendering Servlet and the Proxy 
> servlet
> http://orkutdeveloper.blogspot.com/2008/06/rewriting-returns-to-sandbox.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to