dotProject Forums
Google
 

Go Back   dotProject Forums > DOTPROJECT VERSION 2 > Latest Development Snapshot
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

Latest Development Snapshot Forum to be used for discussing any issues or questions to do with the latest CVS snapshot. Will obviously cover multiple iterations of this snapshot but should serve as a central location to look for all issues.

Reply
 
Thread Tools Display Modes
  #11  
Old 16-06-05, 11:41 PM
GoD_AbovE GoD_AbovE is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 15-06-05
Posts: 5
Default Re: Current CVS: "how to set owner filter default to 'All'

Will this work on dp 2.0 and up?

Reply With Quote
  #12  
Old 12-07-10, 03:20 AM
davidcasey davidcasey is offline
Junior Member
Return Visitor
dotProject Version: 2.1.3
php Version: 5.2
MySQL Version: 5.1
Operating System Version: Other
Browser: Firefox
 
Join Date: 10-07-10
Posts: 3
Default Re: Current CVS: "how to set owner filter default to 'All'

I wanted a user default view to remain set to their company, but users in my company (the first company in the database) would default to all.

I am running version 2.1.3.
In /modules/companies/index.php on line 26 I changed to:
PHP Code:
if ($AppUI->user_company == || $owner_filter_id !== 0) {
    
$AppUI->setState('owner_filter_id'$owner_filter_id_pre);
} else {
    
$owner_filter_id $AppUI->getState('owner_filter_id'$AppUI->user_id);

If you wanted everyone to default to all, you could change the if conditional to
PHP Code:
if (true || $owner_filter_id !== 0) { 

Reply With Quote
  #13  
Old 23-08-10, 09:20 AM
darkmatter darkmatter is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 16-11-07
Posts: 20
Default Re: Current CVS: "how to set owner filter default to 'All'

Won't this:

PHP Code:
if (true || $owner_filter_id !== 0) { 
always be true? What's the point of the 'or' part?

Reply With Quote
  #14  
Old 24-08-10, 01:37 AM
davidcasey davidcasey is offline
Junior Member
Return Visitor
dotProject Version: 2.1.3
php Version: 5.2
MySQL Version: 5.1
Operating System Version: Other
Browser: Firefox
 
Join Date: 10-07-10
Posts: 3
Default Re: Current CVS: "how to set owner filter default to 'All'

It does always result true. It doesn't destroy the original code. In case you ever want to do something different, you still have the context to figure out how to achieve other permissions...or to fix it should you ever update the code and overwrite your changes.

If you don't care about that, you could easily remove the entire if statement and replace it with:
PHP Code:
$AppUI->setState('owner_filter_id'$owner_filter_id_pre); 

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 08:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.