Skip to content

Commit

Permalink
Issue scoumbourdis#6 Fix, unique_hash issue (not unique when having s…
Browse files Browse the repository at this point in the history
…ame method name in 2 diff. controllers).
  • Loading branch information
scoumbourdis committed Jan 5, 2012
1 parent d0d9008 commit e149cb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/libraries/grocery_crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@ private function get_state_info_from_url()

protected function get_method_hash()
{
return md5($this->get_method_name());
return md5($this->get_controller_name().$this->get_method_name());
}

protected function get_method_name()
Expand All @@ -1834,6 +1834,12 @@ protected function get_method_name()
return $ci->router->method;
}

protected function get_controller_name()
{
$ci = &get_instance();
return $ci->router->class;
}

public function getState()
{
return $this->states[$this->getStateCode()];
Expand Down
1 change: 1 addition & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ v.1.1.7
Multilingual functionality, adding languages: Bulgarian, French, Portuguese, Spanish, Thai.
Fixing issue #3, replace mysql_escape_string() with str_replace. This function has been DEPRECATED as of PHP 5.3.0.
Fixing issue #5, set_relation with multiple fields don't work with NULL-able fields.
Fixing issue #6, unique_hash issue (not unique when having same method name in 2 diff. controllers).
Changing license. Grocery CRUD is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).
v.1.1.6
New feature: Multilingual functionality.
Expand Down

0 comments on commit e149cb8

Please sign in to comment.