Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
help me understand how to use fuel-nestedsets package
Shon M wrote on Saturday 13th of August 2011: I'm sure it would work if you change masterid to tree_id (default). In the example the table's "id" has been replaced by masterid, and the treenode id is still called "tree_i…
Comment by
WanWizard
August 2011
permalink
Query string ang html::anchor
Please report this as an issue at http://github.com/fuel/core/issues.
Comment by
WanWizard
September 2011
permalink
Auto checking CSRF Token
Apprearently not, because in my app it doesn't make any difference whether I autoload or not. I use fetch_token() in my forms, and check_token() in my controller, and that works as advertised. I can remember having similar issues in the beginn…
Comment by
WanWizard
September 2011
permalink
Auto checking CSRF Token
I was merely wondering why the check in _init, as the result of the check is never used. I didn't mean I was in favour of auto-failing (which is magic, and we don't want magic). I don't seem to notice any difference in application be…
Comment by
WanWizard
September 2011
permalink
Query on foreach / while in view
You should not run queries in your views. Either code it in your controller, or, if it's specific to the view and doesn't belong in the controller, use a viewmodel instead of a view.
Comment by
WanWizard
September 2011
permalink
Auto checking CSRF Token
I also check manually in my forms controller, and I don't see any difference in behaviour whether or not I've set 'csrf_autoload' in the config. false or true, the code works. As for the autoload, I think this needs to be review…
Comment by
WanWizard
September 2011
permalink
Question about routers configuration
That should work. In my case _root_, _404_ and :any all point to the same controller, as I do the 404 handling internally, I don't rely on Fuel's 404 views.
Comment by
WanWizard
September 2011
permalink
Nesting Views
There are basically two options for method 1: - pass all variables needed by the view to every view (like your solution) - pass all variables as global so they are available in all views (like I put in the docs) Both work, it depends on your impl…
Comment by
WanWizard
September 2011
permalink
Question about routers configuration
The normal approach for dynamic routing is that you route everything to your front controller, have it sort out the routing, and if something is not found, throw a \Request404Exception. The 404 exception is caught in your index.php, and hardcoded l…
Comment by
WanWizard
September 2011
permalink
Error when including external libraries
To avoid conflicts, put it in a package, in it's own namespace. For an example, look at my simplepie package, http://github.com/fuel-packages/fuel-simplepie.
Comment by
WanWizard
September 2011
permalink
Question about routers configuration
What you're saying is that you want to route all requests for controller/methods that can be resolved to a specific controller/method? Isn't that a bit strange?
Comment by
WanWizard
September 2011
permalink
Nesting Views
Method 1 will never work, since all sections of the layout (and the layout itself) are separate view objects. Variables set are not global, they are only known to the object you set them on (in this case $view). If you need global variables, you h…
Comment by
WanWizard
September 2011
permalink
auth check not workin
Time to debug that logic. An obvious candidate this the login_hash check.
Comment by
WanWizard
September 2011
permalink
Package Dependencies
I would say check the dependencies either in your package bootstrap (probably the most logical place), or in the _init() of your main class (if such a thing exists). It is a good question though, and something we need to document also for modules, …
Comment by
WanWizard
September 2011
permalink
Package Dependencies
There is curl support in the current core as part of the Rest class. You can load it directly by using $curl = new \Rest_Curl(); Maybe you can use that?
Comment by
WanWizard
September 2011
permalink
How to reproduce this query with the Orm package
Try this: $t = \Cms\Model_Comment::query() ->select(array(\Db::expr('COUNT(comm_id)'), 'count_result'), 'comm_parent_id')
Comment by
WanWizard
September 2011
permalink
RuntimeException [ Error ]
That sounds very flexible. I can absolutely live with that!
Comment by
WanWizard
September 2011
permalink
auth check not workin
Must be a logic error in your driver, there is no logic in the Auth interface or the generic login driver that deals with login/logout state. How do you set the login state? Maybe a cookie or session issue?
Comment by
WanWizard
September 2011
permalink
RuntimeException [ Error ]
Ok, you've got a valid point. To be able to easily pass an ORM model to a view, the alternative is an array ( using to_array() ), but that isn't what a lot of people want. Would it be an option to add a to_object(), that would do the same…
Comment by
WanWizard
September 2011
permalink
auth check not workin
The result of Auth::check() is produced by the perform_check() method in your own Auth driver, so I suggest you start by checking if that works as it should.
Comment by
WanWizard
September 2011
permalink
RuntimeException [ Error ]
I understand that, but that will leave the ORM object in an is_changed state, and a potential disaster when later on in your code you use the objects properties, or worse, use $object->save(), which will save the encoded properties. As ORM objec…
Comment by
WanWizard
September 2011
permalink
To use Modules or not
The Request does a lot more than loading and calling the module controller method, so it's quite logical it's not that fast. There are some optimizations possible that I'm currently looking at. For example, you can set the third para…
Comment by
WanWizard
September 2011
permalink
RuntimeException [ Error ]
Darn, I missed that. Where are they encoded automatically? And doesn't that "destroy" the ORM object ( as in "do not try to do a save() after you've passed the object to a view" )?
Comment by
WanWizard
September 2011
permalink
RuntimeException [ Error ]
You get this error when you pass an ORM object to a view. Fuel by default does output encoding for security reasons, you store raw data, en encode when you send it to the browser. However, you can not encode an ORM object, so if you want to pass th…
Comment by
WanWizard
September 2011
permalink
forum vulnerability
This site runs PyroCMS, so if you want to report an issue to the developer, http:/pyrocms.com is the best place for it.
Comment by
WanWizard
September 2011
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,368
Last Active
9:55AM
Roles
Administrator