Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:web2project/web2project

  • Loading branch information...
commit 958d13df301fd68cbc8051445914ebf7d1693bd0 2 parents 0a387b4 + fe4a816
@caseysoftware caseysoftware authored
View
10 modules/contacts/contacts.class.php
@@ -468,12 +468,12 @@ public static function searchContacts($AppUI = null, $where = '', $searchString
)');
//TODO: We need to convert this from static to use ->overrideDatabase() for testing.
- $q2 = new w2p_Database_Query();
$company = new CCompany;
- $company->setAllowedSQL($AppUI->user_id, $q2);
- $q2->addWhere('company_id IS NULL');
- $q->addWhere('(' . implode(' OR ', $q2->where) . ')');
-
+ $allow_where = $company->getAllowedSQL($AppUI->user_id,'contact_company');
+ if (count($allow_where)) {
+ $q->addWhere('contact_company = 0 OR contact_company IS NULL OR (' . implode(' AND ', $allow_where). ')');
+ }
+
//TODO: We need to convert this from static to use ->overrideDatabase() for testing.
$department = new CDepartment;
$department->setAllowedSQL($AppUI->user_id, $q);
View
2  modules/tasks/vw_log_update.php
@@ -10,7 +10,7 @@
$task_log_id = (int) w2PgetParam($_GET, 'task_log_id', 0);
$log = new CTask_Log();
-$log->task_log_id = $task_log_id;
+$log->load($task_log_id);
$canAuthor = $log->canCreate();
if (!$canAuthor && !$task_id) {
Please sign in to comment.
Something went wrong with that request. Please try again.