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
8243
Activity
OrmAuth database structure
You only need to flush groups if you changed a group (added/modified/deleted), not if you only changed permissions. Same for roles. If you delete a group or a role, you should flush the permissions, as effective rights may have changed. And after a…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
You can't have a dot in the area. has_access() will split that into area="product", permission="size", causing this not to match.
Comment by
WanWizard
October 2013
permalink
Use Lang from Modules
Yes, from a controller in that module. From outside the module you should be able to use Lang::load("mymodule::langfile"), but it is not considered good practice to introduce tight coupling with a module. It is better to do an HMVC reques…
Comment by
WanWizard
October 2013
permalink
Problem with setting own Redis database name
If you mean a specific key or set of keys, use Cache::delete('mybase'); It will delete all keys starting with "mybase"...
Comment by
WanWizard
October 2013
permalink
Default 404 routing
Then you'll get the frameworks internal 404 page, which is created by fuel/core/views/404.php. It is generated because HttpNotFoundException is thrown, and that class has a response method that loads and returns that view. HttpServerErrorExcep…
Comment by
WanWizard
October 2013
permalink
Confusion for using namespace
Correct. And to prevent mistakes, it's good practice to just always prefix, even if your controller doesn't live in a namespace.
Comment by
WanWizard
October 2013
permalink
Problem with setting own Redis database name
Bug found. In fuel/core/classes/cache/storage/redis.php, in _validate_config(), the switch should read: case 'database': // do we have a database config if (empty($value) or ! is_string($value)…
Comment by
WanWizard
October 2013
permalink
Problem with setting own Redis database name
if you change it in there, then probably your default values in the environment db file will overwrite it. Never add anything in a global config file unless it is valid for all environments. And if so, make sure an environment config will not overw…
Comment by
WanWizard
October 2013
permalink
Problem with setting own Redis database name
what is app/cache/db.php? app/config//db.php I hope you mean?
Comment by
WanWizard
October 2013
permalink
Confusion for using namespace
It is the same as with directories in a file system: "cd /this/that" is a fully qualified path from the root, "cd this/that" is relative to the current directory. If you are in the global namespace (i.e. your php file doesn…
Comment by
WanWizard
October 2013
permalink
Session clears it self when set in different "windows"
Some browsers fetch the favicon automatically, outside your control. As to the other issues, those could well be due to the session bugs in 1.5 that Kenjis mentioned.
Comment by
WanWizard
October 2013
permalink
Is there a way to hardcode REST route variables
I would put it in the URI for a GET, in the post body for a POST.
Comment by
WanWizard
October 2013
permalink
Orm\Observer_UpdatedAt before_update? before_save?
You're welcome. Happy coding!
Comment by
WanWizard
October 2013
permalink
Is there a way to hardcode REST route variables
I hardly ever use the query string, selection parameters (like your 1234) are URI segments, the rest is in the request payload, in JSON. A GET request is used for reading, a POST for updating. There is also PUT, PATCH and DELETE that you could use …
Comment by
WanWizard
October 2013
permalink
Session clears it self when set in different "windows"
Should have asked sooner. ;-) This has nothting to do with sessions, but with the fact that the Auth library doesn't support multiple login, courtesy of the login_hash column in the users table. For a different browser it will generate a new h…
Comment by
WanWizard
October 2013
permalink
Multi word controllers/models
That would be best, yes. If you have tables like that, it would be unlikely you want your controllers to be named like this?
Comment by
WanWizard
October 2013
permalink
how to access controller method from views
Ok, thanks for the feedback.
Comment by
WanWizard
October 2013
permalink
Is there a way to hardcode REST route variables
I would do it the other way around, not have a 'comment' controller, but have a controller per object, and then use api.domain/photo/comment/1234 ( or api.domain/user/comment/1234 ) so a photo and a user controller, both having a post_co…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
There is only one permissions table, 'users_permissions' (by default). It contains an area, permission and a possible array of actions, which together define the permission. For example: area=finance, permission=invoice, action=array(…
Comment by
WanWizard
October 2013
permalink
OrmAuth database structure
What do you mean by "custom permissions"?
Comment by
WanWizard
October 2013
permalink
Orm\Observer_UpdatedAt before_update? before_save?
You can just copy the observer file from the 1.6.1. repo to make it work. 1.7 will be released one of these days, you can also wait and upgrade to that.
Comment by
WanWizard
October 2013
permalink
Orm\Observer_UpdatedAt before_update? before_save?
Which version of Fuel are you using? "before_update" support was added in 1.6.1.
Comment by
WanWizard
October 2013
permalink
how to access controller method from views
How did you install it? What is your DocumentRoot? How did you setup your rewriting?
Comment by
WanWizard
October 2013
permalink
FuelPHP 2.0 Queue package
If its your package, you should pick the provider name. "Fuel" is reserved for FuelPHP packages.
Comment by
WanWizard
October 2013
permalink
FuelPHP 2.0 Queue package
The event queue is in the Fuel\Event namespace, how does that collide with something you make yourself? In 2.0 you no longer alias to global, it's not confirmed the current facades will stay, some or all might move to a 1.x compatibility packa…
Comment by
WanWizard
October 2013
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,389
Last Active
1:03AM
Roles
Administrator