Created
May 17, 2012 02:55
-
-
Save suzuki/2715870 to your computer and use it in GitHub Desktop.
CandyCane with PostgreSQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff app/Model/Project.php | |
diff --git a/app/Model/Project.php b/app/Model/Project.php | |
index af47298..fa9c98e 100755 | |
--- a/app/Model/Project.php | |
+++ b/app/Model/Project.php | |
@@ -329,7 +329,7 @@ class Project extends AppModel { | |
$enabledModuleTable = $this->EnabledModule->tablePrefix . $this->EnabledModule->table; | |
$emName = $perm['project_module']; | |
- $base_statement[] = array("EXISTS (SELECT em.id FROM $enabledModuleTable em WHERE em.name='$emName' AND em.project_id=$projectTable.id)" => true); | |
+ $base_statement[] = array("EXISTS (SELECT em.id FROM $enabledModuleTable em WHERE em.name='$emName' AND em.project_id=\"$projectTable\".\"id\")" => true); | |
} | |
if(!empty($options['project'])) { | |
$project_statement = array(); | |
@@ -380,7 +380,7 @@ class Project extends AppModel { | |
$perm = $Permission->findByName($permission); | |
if(!empty($perm['project_module'])) { | |
# If the permission belongs to a project module, make sure the module is enabled | |
- $base_statement .= " AND EXISTS (SELECT em.id FROM {$enabled_module_table_name} em WHERE em.name='{$perm['project_module']}' AND em.project_id=Project.id)"; | |
+ $base_statement .= " AND EXISTS (SELECT em.id FROM {$enabled_module_table_name} em WHERE em.name='{$perm['project_module']}' AND em.project_id=\"Project\".\"id\")"; | |
} | |
// TimelogController not specify $options | |
# if(isset($options['project'])) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment