Re: File clean up after using CakeResponse::file()

2013-10-25 Thread Reuben
Looking at the way CakeResponse::file() works, it does not appear it is possible to clean up a particular file in the same request that generated it, because the file is send when the body is actually generated, which is after afterFilter, and after all the Dispatch Filters would have fired.

Re: File clean up after using CakeResponse::file()

2013-10-25 Thread Reuben
Just had a thought. A really short cache could also do the trick, as long as that cache content could be referenced by CakeResponse::file(). On Friday, 25 October 2013 16:34:39 UTC+10, Reuben wrote: Looking at the way CakeResponse::file() works, it does not appear it is possible to clean up

Re: problems saving datetime

2013-10-25 Thread CrotchFrog
I haven't been able to figure out why I have a set of views that aren't able to load values set in the AppController or why I have to navigate outside of the controller to refresh the CSS for those views, but what I did discover today is that I have another set of views under a different

Selecting data from DB

2013-10-25 Thread Mariya Davis
Hi All, Iam very new in cakephp. Already read the several tutorials. I have 3 tables: 1. Organziation table Id name --- 1Test 2. Event table Id org_id name --- - - 11events1 21events2 3. Event dates table Id event_id

CAKEPHP can not bake a search in view ?

2013-10-25 Thread Trần Michael
Hi Expert, Why new version, we can not bake a view that have search module ? it's dufficult to make it ? . I hope new version CAKEPHP can have it. Thks your time. I am a newbie. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Re: CAKEPHP can not bake a search in view ?

2013-10-25 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Michael, other as index, add, edit a search is more complex. I have been building search methods and forms since I started with cake and in most cases they get quite complicated very soon, because in most cases your users not only want to perform

Re: Selecting data from DB

2013-10-25 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Mariya, are you looking a) for Dates of a certain event, which has already passed or b) all Eventdates which have passed? for b you should leave out the id. Also try creating the date in your controller and add the real date in your query. And

Re: Where to place this logic?

2013-10-25 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Reuben, for the moment I opted for putting the code into a lib. So now the next question. How can I wirte tests for it? Can I do that within the CakePHP testframework? If yes, how do I call it? Is there an example anywhere? Or do I have to call

Re: Pagination Help

2013-10-25 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Dave, is this condition on your first model or on a related model? Anja Am 16.10.2013 17:59, schrieb Advantage+: Now this used to work, but now it does not.. Not sure what happened. I have standard pagination but offer the ability to

Re: Where to place this logic?

2013-10-25 Thread Reuben Helms
My experience with unit testing in CakePHP is minimal. However, I do believe it should be possible. CakePHP has nice classes for assisting with testing the specific cases of Controllers (ControllerTestCase) and creating fixtures (CakeTestFixture) for using with model testing. They also provide

RE: Pagination Help

2013-10-25 Thread Advantage+
On the model it's self. The is a field for the listings / Listings table for featured bool. Pagination $params has featured = $featured so if the listings/featured is passed then it would only paginate featured listings. -Original Message- From: cake-php@googlegroups.com

Re: CAKEPHP can not bake a search in view ?

2013-10-25 Thread euromark
See https://github.com/CakeDC/search for solid search functionality Doesn't need to be baked (even though it can easily be added to your custom bake templates), you can just add it afterwards. Am Donnerstag, 24. Oktober 2013 11:12:40 UTC+2 schrieb Trần Michael: Hi Expert, Why new version,

Defining Plugin

2013-10-25 Thread CrotchFrog
I've noticed recently some strange behavior when it comes to naming conventions and Plugins. For example if I create a link somewhere within a plugin ie. *$this-Html-link('Some Link', array('controller' = 'controller', 'action' = 'action')); * Following the link would land you on the page

Re: File clean up after using CakeResponse::file()

2013-10-25 Thread ravage1984
Hey Reuben Out of sheer curiosity (once again *g*), I gave it a try. You are right, there is no way to do this in one request/response since sending the response is the last thing the browser does. That's just how HTTP works. There are two ways though, I think (and I'm may be wrong, it 7 in