Skip to content

Commit

Permalink
Merge branch 'master' of github.com:web2project/web2project
Browse files Browse the repository at this point in the history
  • Loading branch information
caseysoftware committed Mar 31, 2013
2 parents 0a387b4 + fe4a816 commit 958d13d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions modules/contacts/contacts.class.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion modules/tasks/vw_log_update.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 958d13d

Please sign in to comment.