Re: [fw-general] SQL_CALC_FOUND_ROWS with Zend_Db_Select

2009-01-26 Thread Dennis Becker
This is slower in comparison with a 2nd "SELCT COUNT(PRIMARY_KEY_COLUMN)
FROM blah" - look at
http://www.mysqlperformanceblog.com/2007/08/28/to-sql_calc_found_rows-or-not-to-sql_calc_found_rows/

Regards,
Dennis

On Mon, Jan 26, 2009 at 11:12 AM, Colin Guthrie wrote:

> Hi,
>
> Is there a way to inject this into SELECT statements?
>
> This is typically very useful when paging and getting the correct number of
> results without having to re-run the query twice once with and once without
> the LIMIT/OFFSET components.
>
> e.g. SELECT SQL_CALC_FOUND_ROWS * from blah LIMIT 10 OFFSET 10;
>
> then SELECT FOUND_ROWS();
>
>
>
> If this is something that would be accepted into ZF upstream, then I'll
> happily code it. It's more or less the same as $select->distinct($flag)
> function call. The select found rows things could be left to the user.
>
> So, I'm just asking if this would be accepted? If not I'll try and work out
> another way of achieving the same result without hacking ZF.
>
> Col
>
>
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mandriva Linux Contributor [http://www.mandriva.com/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
>


-- 
Dennis Becker   bec...@sipgate.de
Telefon:+49 (0) 211-63 55 55-97
Telefax:+49 (0) 211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.at - www.sipgate.co.uk


[fw-general] Zend_Locale::getCountryTranslationList - sort by countryname instead of key?

2007-12-19 Thread Dennis Becker
Hi *,

is there a function how I can easily sort the array of
Zend_Locale::getCountryTranslationList by countryname instead of the
array-key? I thought I can use a something like
getCountryTranslationList ([bool
$sortByCountryName = false], [string $locale = null])? The only solution I
see is fist array_flip(), then natsort() and array_flip() again ...

Hope someone can help me.


Greetings
Dennis


Re: [fw-general] Zend_Locale::getCountryTranslationList - sort by countryname instead of key?

2007-12-19 Thread Dennis Becker
This does not work, because with sort() you loose the array-keys and
characters like Ä Ö or Ü from germany are at the end and not for example for
Ö after OE.

2007/12/19, Andries Seutens <[EMAIL PROTECTED]>:
>
>
> sort($countryList, SORT_LOCALE_STRING);
>
> ?
>
> Andries Seutens
> http://andries.systray.be
>
>
>
> Dennis Becker schreef:
> > Hi *,
> >
> > is there a function how I can easily sort the array of
> > Zend_Locale::getCountryTranslationList by countryname instead of the
> > array-key? I thought I can use a something like
> > getCountryTranslationList ([bool $sortByCountryName = false],
> > [string $locale = null])? The only solution I see is fist
> > array_flip(), then natsort() and array_flip() again ...
> >
> > Hope someone can help me.
> >
> >
> > Greetings
> > Dennis
> > 
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.503 / Virus Database: 269.17.4/1189 - Release Date:
> 18/12/2007 21:40
> >
>
> Gecontroleerd op virussen door de JOJO Secure Gateway.
>
>


Re: [fw-general] Zend_Locale::getCountryTranslationList - sort by countryname instead of key?

2007-12-19 Thread Dennis Becker
Ok, then I use it as follows:

$locale = new Zend_Locale();
$countries = array_flip($locale->getCountryTranslationList());
natsort($countries);
$countries = array_flip($countries);

I think this is the easiest way.


Greetings
Dennis

2007/12/19, Thomas Weidner <[EMAIL PROTECTED]>:
>
> Sorting for data content is actually not supported.
> Use the standard php array functions for this.
>
> Greetings
> Thomas
> I18N Team Leader
>
> ----- Original Message -
> From: "Dennis Becker" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, December 19, 2007 3:31 PM
> Subject: [fw-general] Zend_Locale::getCountryTranslationList - sort by
> countryname instead of key?
>
>
> > Hi *,
> >
> > is there a function how I can easily sort the array of
> > Zend_Locale::getCountryTranslationList by countryname instead of the
> > array-key? I thought I can use a something like
> > getCountryTranslationList ([bool
> > $sortByCountryName = false], [string $locale = null])? The only solution
> I
> > see is fist array_flip(), then natsort() and array_flip() again ...
> >
> > Hope someone can help me.
> >
> >
> > Greetings
> > Dennis
> >
>
>


Re: [fw-general] Zend_Locale::getCountryTranslationList - sort by countryname instead of key?

2007-12-19 Thread Dennis Becker
Ok, I don't loose the keys but characters like Ö are still at the end ...
natsort() does not support those flags - that would help a lot.

2007/12/19, Andries Seutens <[EMAIL PROTECTED]>:
>
>
> asort that is, my bad.
>
> Andries Seutens
> http://andries.systray.be
>
>
>
> Andries Seutens schreef:
> > sort($countryList, SORT_LOCALE_STRING);
> >
> > ?
> >
> > Andries Seutens
> > http://andries.systray.be
> >
> >
> >
> > Dennis Becker schreef:
> >> Hi *,
> >>
> >> is there a function how I can easily sort the array of
> >> Zend_Locale::getCountryTranslationList by countryname instead of the
> >> array-key? I thought I can use a something like
> >> getCountryTranslationList ([bool $sortByCountryName = false], [string
> >> $locale = null])? The only solution I see is fist array_flip(), then
> >> natsort() and array_flip() again ...
> >>
> >> Hope someone can help me.
> >>
> >>
> >> Greetings
> >> Dennis
> >>
> 
> >>
> >> No virus found in this incoming message.
> >> Checked by AVG Free Edition. Version: 7.5.503 / Virus Database:
> >> 269.17.4/1189 - Release Date: 18/12/2007 21:40
> >>
> >
>
> Gecontroleerd op virussen door de JOJO Secure Gateway.
>
>


RE: [fw-general] Zend Framework 1.5 Preview Release schedule

2008-01-11 Thread Dennis Becker
Hi Rob an all others reading this,

may it possible to create once a day a 7z / Zip package from SVN
automatically? Or just provide to download a complete folder out of the SVN
repository from the web. At reactos.org
 you can download each revision (ok, they have to build them before,
but it is possible).


Regards
Dennis Becker


[fw-general] Where is a list of classes for each component?

2008-01-16 Thread Dennis Becker
Hi *,

I want to know if there is a website where I can see, which classes belong
to which component? I want to use Zend_Layout with ZF 1.0.3 and I cannot
find a present site where all classes are listed. If there is not such a
website I would recommend to create one. That helps also others, who only
want to use some parts of ZF for their website.


Regards
Dennis


[fw-general] Problem with Zend_Layout and exceptions in Plugins

2008-01-16 Thread Dennis Becker
Hi *,

I have a demo app created with the Zend Framework, SVN Version 7459.
Primarily, I wanted to try out Zend_Layout. For a small test, I also created
a Plugin, which throw's an Zend_Exception. Now the problem begins ...

- while throwing an exception within dispatchLoopStartup(), I see the error
page from ErrorController => errorAction, and inside the page I requestet (
www.example.com/)
- while throwing an exception within preDispatch() or postDispatch(), I see
the exception, but not the error page:

exception 'Zend_Exception' in
/var/www/dlm/application/plugins/ExceptionPlugin.php:6
Stack trace:
#0 /var/www/dlm/library/Zend/Controller/Plugin/Broker.php(316):
ExceptionPlugin->preDispatch(Object(Zend_Controller_Request_Http))
#1 /var/www/dlm/library/Zend/Controller/Front.php(914):
Zend_Controller_Plugin_Broker->preDispatch(Object(Zend_Controller_Request_Http))
#2 /var/www/dlm/public/index.php(20): Zend_Controller_Front->dispatch()
#3 {main}


I haven't tried the other methods for a plugin, but as you can see, there
seems to be a bug with Zend_Layout or one of it's dependencies ... Can
someone else try to throw exceptions within a plugin?



Regards
Dennis Becker


RE: [fw-general] New Site Powered By Zend Framework

2008-01-23 Thread Dennis Becker
Hi John,

the website looks nice to me, but there is a main bug which you should fix:
On Debian Etch I cannot see the navigation when the cursor is over an
element because the flash is above it. This happens with Opera 9.25 &
Firefox 2.0.0.11!



For a website about motosports you should dramatically change the design of
the driver's profiles ( just look at
http://www.redbullindianapolisgp.com/rider/343-Loris_Capirossi ) - my eyes
will thank you!


Regards
Dennis Becker


[fw-general] Zend_Form - Problem with 'submit' button

2008-02-19 Thread Dennis Becker
Hi *,

I have created a small form for testing the new Zend_Form component. Can
anyone tell me, why I cannot set the "value" property for a 'submit' button?
Instead, the 'submit' button uses the value for 'label' and I cannot
deactive the label for 'submit'. For me it looks like a bug, but I'm not
sure.

Please look at http://paste2.org/p/13808 for my form definition.


Regards,
Radhad


Re: [fw-general] Zend_Form - Problem with 'submit' button

2008-02-19 Thread Dennis Becker
But what if I don't want to use 'label' at the submit button? I only want to
use 'value'.

2008/2/19, Matthew Weier O'Phinney <[EMAIL PROTECTED]>:
> -- Dennis Becker <[EMAIL PROTECTED]> wrote
> (on Tuesday, 19 February 2008, 01:54 PM +0100):
> > I have created a small form for testing the new Zend_Form component. Can
> anyone
> > tell me, why I cannot set the "value" property for a 'submit' button?
> Instead,
> > the 'submit' button uses the value for 'label' and I cannot deactive the
> label
> > for 'submit'. For me it looks like a bug, but I'm not sure.
>
> This is by design.
>
> We use the label of the element, as this is what is *displayed* to the
> end user. It also allows us to check the submitted value against the
> label to determine (a) if the given submit button was used, and/or (b)
> if somebody's potentially monkeying with the form. As an example,
> Zend_Form_Element_Submit::isChecked() checks the submitted value
> against the label, for instance; if they match, isChecked() returns
> true.
>
> --
> Matthew Weier O'Phinney
> PHP Developer| [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] Zend_Form - Problem with 'submit' button

2008-02-19 Thread Dennis Becker
That does not work, as Matthiew also said in his answer. The only way works
is to set not the decorators for all elements ats one (elementDecorators),
you have to add your own decorator for each element without the 'submit'
button. So the code expands a lot! For 5 Elements + 1 Sumbit form, you have
to declare the decorator 5 times instead of 1 time. The 'elementDecorators'
overwrite the spcific decorator of an element. Maybe you can change that
Matthiew, like the behaviour of CSS, the nearest decorator definition get's
chosen?



Regards
Dennis


2008/2/19, Jason Qi <[EMAIL PROTECTED]>:
>
> I used below two lines of code, and the button shows "Login"
>
> $this->view->form = new Zend_Form(...)
> $this->view->form->submit->setValue('Login');
>
> Do I answer your question ?
>
> Jason.
>
> *Dennis Becker <[EMAIL PROTECTED]>* wrote:
>
> But what if I don't want to use 'label' at the submit button? I only want
> to use 'value'.
>
> 2008/2/19, Matthew Weier O'Phinney <[EMAIL PROTECTED]>:
> > -- Dennis Becker <[EMAIL PROTECTED]> wrote
> > (on Tuesday, 19 February 2008, 01:54 PM +0100):
> > > I have created a small form for testing the new Zend_Form component.
> > Can anyone
> > > tell me, why I cannot set the "value" property for a 'submit' button?
> > Instead,
> > > the 'submit' button uses the value for 'label' and I cannot deactive
> > the label
> > > for 'submit'. For me it looks like a bug, but I'm not sure.
> >
> > This is by design.
> >
> > We use the label of the element, as this is what is *displayed* to the
> > end user. It also allows us to check the submitted value against the
> > label to determine (a) if the given submit button was used, and/or (b)
> > if somebody's potentially monkeying with the form. As an example,
> > Zend_Form_Element_Submit::isChecked() checks the submitted value
> > against the label, for instance; if they match, isChecked() returns
> > true.
> >
> > --
> > Matthew Weier O'Phinney
> > PHP Developer| [EMAIL PROTECTED]
> > Zend - The PHP Company   | http://www.zend.com/
>
>
> --
> Looking for last minute shopping deals? Find them fast with Yahoo! 
> Search.<http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
>
>


Re: [fw-general] Zend_Form - Problem with 'submit' button

2008-02-20 Thread Dennis Becker
How can I set "removeDecorators()" while using only 'options' from
Zend_Form? Why is it not possible like in CSS to overwrite decorators? With
this code, it may possible to show labels for all elements except for the
submit button.

$form = new Zend_Form(array(
'action' => '/user/register',
'method' => 'post',
'elements' => array(
'submit' => array(
'submit',
'decorators' => array( // overwrites elementDecorators because
the scope is nearer to the element
'ViewHelper',
),
),
),
elementDecorators => array(
'Label',
'ViewHelper',
array('HtmlTag', array('tag' => 'li')),
),
);


Regards,
Dennis

PS: Please set me CC because I'm not a subscriber of the mailing list.

2008/2/19, Matthew Weier O'Phinney <[EMAIL PROTECTED]>:

> I'm guessing you must be using setElementDecorators(). :-)
>
>  Yes, there's an easy way to remove a decorator:
>
> $form->submit->removeDecorator('Label');
>
>  will remove the Label decorator.
>
>  (BTW, Button, Reset, and Submit elements no longer use the Errors and
>  Label decorators currently, as they're typically unnecessary.)
>
>
>  --
>  Matthew Weier O'Phinney
>  PHP Developer| [EMAIL PROTECTED]
>  Zend - The PHP Company   | http://www.zend.com/


[fw-general] Zend_XmlRpc_* problem with huge data over XML-RPC

2008-04-01 Thread Dennis Becker
Hi everybody,

I think there seems to be a general memory problem with the XML-RPC classes.
I have looked around and found these two interesting articles of IBM:
http://www.ibm.com/developerworks/xml/library/x-xmlphp2.html and
http://www.ibm.com/developerworks/xml/library/x-tipbigdoc2.html

In the first article they say: "
XMLReader in action
XMLReader, as a stream parser, is well-suited to parsing large XML
documents; it is a lot easier to code than SAX and usually faster."

for example a normal response of one XML-RPC request is as PHP array 380 KB
huge (copied in a textfile). As XML-RPC Response it is about 530 KB as
XML... It needs about 8 MB of memory just for parsing and sometimes I get an
error that too much memory has been allocated by PHP. I think this small
amount of data must be able to convert from XML to PHP array. Maybe that
works with XMLReader? Or can just someone explain me why this request needs
so much memory? Other requests with about 100 KB or 200 KB of XML data does
not have any memory leak problem!


Regards
Dennis Becker


Re: [fw-general] Zend_XmlRpc_* problem with huge data over XML-RPC

2008-04-01 Thread Dennis Becker
Additional to my previous e-mail:

I have found out that the problem is in class "Zend_XmlRpc_Value" method
"_xmlStringToNativeXmlRpc" when it loops over an array of hashes of 5 types
in the hashes. At the moment I have no idea what I can do to prevent looping
over all items which does not change from hash to hash ...


[fw-general] Zend_Validate::is() runs constructor with wrong parameters

2009-09-08 Thread Dennis Becker
II have recently switched ZF Version from 1.7.4 to ZF 1.9.2 and I ran into a
problem with Zend_Validate::is() and Zend_Validate_Int. A variable should be
checked if it is an integer and between 1 and 31 - nothing special so far.
But Zend_Validate calls Zend_Validate_Int with "1" as parameter for the
constructor - which self tries to find a locale with
Zend_Locale::findLocale('1') - and then throws an exception. I know that
this worked without any problem with 1.7.4
On the SVN repository, I can see that with ZF Version 1.8.0 a constructor
was added to Zend_Validate_Int. Can anybody confirm this? I have opened a
bug report at http://framework.zend.com/issues/browse/ZF-7800

Also compare these files:

http://framework.zend.com/svn/framework/standard/tags/release-1.7.5/library/Zend/Validate/Int.php
http://framework.zend.com/svn/framework/standard/tags/release-1.8.0/library/Zend/Validate/Int.php


Has anybody a workaround for this? Or is it just a wrong behaviour in
Zend_Validate::is() static method?


Regards,
Dennis


[fw-general] Zend_Form and fields metacommand doesn't work

2009-11-25 Thread Dennis Becker
Hi all,

yesterday I have found metacommands in manual at
http://framework.zend.com/manual/en/zend.filter.input.html#zend.filter.input.metacommands.fields

I want to compare to password fields with the "Identical" validator. So I
build my form shown at http://paste2.org/p/532112

When I use this to validate through the fields metacommand, I get the
following error: "No token was provided to match against". Can someone
explain me how to use it right?



Regards,
Dennis Becker


Re: [fw-general] Zend Framework Widgets

2010-01-21 Thread Dennis Becker
Zend_View_Helper_Action is really slow, the best between easy-to-understand
& use ist the usage of Frontcontroller Plugins. You should use them like
controllers and could fill placeholders in Zend_Layout / Zend_View.

2010/1/22 Vladas Diržys 

> I think there is already a solution which handles kind of "Widgets".
>
> Then you call action('my-widget-action', 'my-widget') ?> from
> your view, you can have similar effect.
> But the downside of this solution is performance.
>
> --
> Regards,
> Vladas Diržys
>
>
> On Wed, Jan 20, 2010 at 22:11, Paul  wrote:
>
>>  I know the term Widget is a loaded concept, but was wondering what
>> everyone's thoughts on the best way to create reusable
>> Controls/Components/Widgets.
>>
>> To me a Widget is something you can drop into any controller and it would
>> be able to handle rendering itself and working with Model.  At first this
>> sounds very similar to a View Helper, which is how I have done this so far.
>> The issue comes when you need to update the Model.
>>
>> Updating a model from the view is not really good practice or allowed in
>> MVC.
>>
>> An example situation, may help paint the picture:
>>
>> A Widget photo selection widget.  This widget would fetch images from some
>> Gallery Model.  The view part of the widget would show a thumbnail grid of
>> the photos, with some sort of js lightbox modal.  When a user select one
>> photo, it would via ajax, post back and add to the image to his favorite
>> photos collection, which means we need to update a model.
>>
>>
>> If this widget was just going to be in one system, you would just create a
>> view helper, and the controller to handle the ajax.  If you want to make
>> this ajax/post reusable you could create an Action Helper.  So to me seems
>> like to be able to do this, you would need a way to create an encapsulate
>> package that includes a View Helper and Action Helper.
>>
>> What we want to be able to do, similar to modules, is to just drop a
>> widget in place.  It doesn't need to go as far as having to bootstrap itself
>> like a module.  It can work like action helper / view helpers do with
>> brokers.  The issue I have is that since the package is contained, you are
>> going to add up with a bunch of helper paths which is going to really hurt
>> performance if you have a bunch of widgets in your system.
>>
>> Thoughts? Ideas? I am thinking too much about this :)
>>
>>
>>
>


-- 
Dennis Becker   bec...@sipgate.de
Telefon:+49 (0) 211-63 55 55-97
Telefax:+49 (0) 211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.at - www.sipgate.co.uk


Re: [fw-general] ZF 1.10.0RC1 Released

2010-01-21 Thread Dennis Becker
Manual looks a bit weired at
http://framework.zend.com/manual/1.10/en/migration.110.html

On Fri, Jan 22, 2010 at 8:30 AM, Matthew Weier O'Phinney
wrote:

> Greetings!
>
> The Zend Framework team is pleased to announce the first release
> candidate of the 1.10 series, 1.10.0rc1. You can retrieve it here:
>
>http://framework.zend.com/download/latest
>
> A preview of the 1.10 manual can be found here:
>
>http://framework.zend.com/manual/1.10/en/
>
> Please test this release and report any urgent issues immediately so
> that we may correct them in the final release.
>
> Enjoy!
>
> --
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
> PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
>



-- 
Dennis Becker   bec...@sipgate.de
Telefon:+49 (0) 211-63 55 55-97
Telefax:+49 (0) 211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de - www.sipgate.at - www.sipgate.co.uk


[fw-general] ReCapctha Service broken

2011-04-12 Thread Dennis Becker
Hi all,

ReCaptcha Service is goind to shutdown the known API URLs used in
Zend_Service_ReCaptcha. This big change was announced in March and hit
today my websites (because I didn't know of this). I have added a
comment with the official announcement to an existing issue at
http://framework.zend.com/issues/browse/ZF-11136 - hopefully someone
can patch Zend_Service_ReCaptcha for the next release!

I have manually updated the API URLs, but I think the ReCaptcha
Service now forward all requests to the new URLs, but not for a long
time, as the ReCaptcha support told me per mail.



Regards,
Dennis Becker

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com