[pLog-svn] r4502 - in plog/trunk: class/view templates/admin

Jon Daley plogworld at jon.limedaley.com
Fri Jan 5 03:53:49 GMT 2007


 	That's nice.  It has always annoyed me having all the phpsniff 
stuff in the session data, and sometimes duplicate copies, I think, or at 
least there is a lot of information in it.

  On Thu, 4 Jan 2007, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2007-01-04 23:04:47 +0000 (Thu, 04 Jan 2007)
> New Revision: 4502
>
> Modified:
>   plog/trunk/class/view/view.class.php
>   plog/trunk/templates/admin/newpost.template
>   plog/trunk/templates/admin/newresource.template
> Log:
> it really is a waste of resources to use phpSniff just to detect whether a browser supports XmlHttpRequest and DOM, all modern browsers do anyway.
>
>
> Modified: plog/trunk/class/view/view.class.php
> ===================================================================
> --- plog/trunk/class/view/view.class.php	2007-01-04 22:53:56 UTC (rev 4501)
> +++ plog/trunk/class/view/view.class.php	2007-01-04 23:04:47 UTC (rev 4502)
> @@ -315,22 +315,12 @@
>          * By default does nothing and it has no parameters
>          */
>         function render()
> -        {
> -	        lt_include( PLOG_CLASS_PATH."class/net/http/phpsniff/phpSniff.class.php" );
> -
> +        {
>             // send the headers we've been assigned if any, alognside the conten-type header
>             foreach( $this->_headers as $header )
>             header( $header );
>
> -            $this->sendContentType();
> -
> -            // 'browser' object that all views will have, so that we can gather information
> -            // about the client...
> -            if ($this->getSessionValue("phpSniff") == "") {
> -                // as long as we're part of a session, the client won't change :)
> -                $this->setSessionValue( "phpSniff", serialize(new phpSniff()) );
> -            }
> -            $this->setValue( "browser", unserialize($this->getSessionValue("phpSniff")) );
> +            $this->sendContentType();
>         }
>     }
> ?>
>
> Modified: plog/trunk/templates/admin/newpost.template
> ===================================================================
> --- plog/trunk/templates/admin/newpost.template	2007-01-04 22:53:56 UTC (rev 4501)
> +++ plog/trunk/templates/admin/newpost.template	2007-01-04 23:04:47 UTC (rev 4502)
> @@ -206,9 +206,7 @@
> 	</div>
> 	</fieldset>
>     <div class="buttons">
> -		{if $browser->has_feature("xmlhttpreq")}
> 		<input type="button" name="saveDraftAndContinue" value="{$locale->tr("save_draft_and_continue")}" onclick="javascript:saveDraftArticleAjax()" />
> -		{/if}
> 		<input type="submit" name="previewPost" value="{$locale->tr("preview")}" onClick="preview=true"/>
> 		<input type="submit" name="addPost" value="{$locale->tr("add_post")}" onClick="preview=false" />
> 		<input type="hidden" name="isDraft" value="" />
>
> Modified: plog/trunk/templates/admin/newresource.template
> ===================================================================
> --- plog/trunk/templates/admin/newresource.template	2007-01-04 22:53:56 UTC (rev 4501)
> +++ plog/trunk/templates/admin/newresource.template	2007-01-04 23:04:47 UTC (rev 4502)
> @@ -10,17 +10,9 @@
>     <label for="resourceFile_1">{$locale->tr("file")}</label>
> 	<span class="required">*</span>
> 	<div class="formHelp">{$locale->tr("resource_file_help")}</div>
> -    {if $browser->has_feature("dom")}
> -      <input type="file" id="resourceFile_1" name="resourceFile_1" />
> -      <div id="marker" style="clear:none;"></div>
> -      <a href="javascript:addElementToForm('fileFields','file','resourceFile','')">{$locale->tr("add_field")}</a>
> -    {else}
> -      <input type="file" name="resourceFile_1" id="resourceFile_1" />
> -      <input type="file" name="resourceFile_2" id="resourceFile_2" />
> -      <input type="file" name="resourceFile_3" id="resourceFile_3" />
> -      <input type="file" name="resourceFile_4" id="resourceFile_4" />
> -      <input type="file" name="resourceFile_5" id="resourceFile_5" />
> -    {/if}
> +    <input type="file" id="resourceFile_1" name="resourceFile_1" />
> +    <div id="marker" style="clear:none;"></div>
> +    <a href="javascript:addElementToForm('fileFields','file','resourceFile','')">{$locale->tr("add_field")}</a>
>     {include file="$admintemplatepath/validate.template" field=albumName message=$locale->tr("error_no_resource_uploaded")}
>   </div>
>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Music: A principal means of glorifying our merciful Creator.
-- Henry Peacham


More information about the pLog-svn mailing list