~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to lib/eventum/class.project.php

  • Committer: Elan Ruusamäe
  • Date: 2014-01-22 19:44:44 UTC
  • mfrom: (4033.1.203 eventum-skysql)
  • Revision ID: glen@delfi.ee-20140122194444-g7my5zcwob0gq0a7
merge bryan changes, try 2

pending merges:
  Bryan Alsdorf 2013-12-04 Fix for new issue message
    Bryan Alsdorf 2013-12-03 Fixed permission checking on email alias page
    Bryan Alsdorf 2013-12-03 [merge] Merged from trunk
    Bryan Alsdorf 2013-12-03 Misc fixes merged from trunk
    Bryan Alsdorf 2013-11-19 More draft fixes
    Bryan Alsdorf 2013-11-19 Fix bugs with drafts
    Bryan Alsdorf 2013-10-28 Show current filters to customers
    Bryan Alsdorf 2013-10-22 Set history when inserting new product, not just updating old ones
    Bryan Alsdorf 2013-10-22 Added updating products back to update page.
    Bryan Alsdorf 2013-10-02 Added lock to run bot program
    Bryan Alsdorf 2013-10-02 Suppress errors in stats chart
    Bryan Alsdorf 2013-09-30 Fix bugs with issue auto creation from emails
    Bryan Alsdorf 2013-09-29 Convert issue auto creation manage to new template system
    Bryan Alsdorf 2013-09-29 prevent PHP error
    Bryan Alsdorf 2013-09-29 Suppress errors in IRC lib
    Bryan Alsdorf 2013-09-25 Allow workflow IRC notice method to change category
    Bryan Alsdorf 2013-09-25 Fix bug with assignments being displayed in reminder emails
    Bryan Alsdorf 2013-09-25 Changed restart script
    Bryan Alsdorf 2013-09-25 Fixed bug with group edit page
    Bryan Alsdorf 2013-09-24 Fixed colspan on manage users page.
    Bryan Alsdorf 2013-09-24 Improved layout of select project
    Bryan Alsdorf 2013-09-24 Show project chooser if user can access multiple projects
    Bryan Alsdorf 2013-09-24 Properly show backend list
    Bryan Alsdorf 2013-09-24 Added class names to custom fields
    Bryan Alsdorf 2013-09-24 Added classes to list issue columns
    Bryan Alsdorf 2013-09-23 Fixed template errors
    Bryan Alsdorf 2013-09-23 Fixed bug with access
    Bryan Alsdorf 2013-09-18 Fixed typo in CLI
    Bryan Alsdorf 2013-09-18 Misc fixes
    Bryan Alsdorf 2013-09-17 Added some aliases for kolbe
    Bryan Alsdorf 2013-09-14 Fix bug with blocking contacts
    Bryan Alsdorf 2013-09-12 Fix bug with forgot password email
    Bryan Alsdorf 2013-09-12 compat fix
    Bryan Alsdorf 2013-09-12 Updated init.php
    Bryan Alsdorf 2013-09-12 Fixed misc bugs
    Bryan Alsdorf 2013-09-11 [merge] Merged from CRM branch
    Bryan Alsdorf 2013-09-09 Fixed bug with close window button when replying to issue
    Bryan Alsdorf 2013-09-09 Updated CLI to work with new CRM
    Bryan Alsdorf 2013-09-09 Typo
    Bryan Alsdorf 2013-09-09 Compat fix
    Bryan Alsdorf 2013-09-05 Hopefully this works
    Bryan Alsdorf 2013-08-23 Tweaked method name
    Bryan Alsdorf 2013-08-22 Initial commit of CRM migration
    Bryan Alsdorf 2013-09-05 Test
    Bryan Alsdorf 2013-08-27 Made severity required again
    Bryan Alsdorf 2013-08-14 Split navigation menu out from base template.
    Bryan Alsdorf 2013-08-12 [merge] Merge from trunk
    Bryan Alsdorf 2013-08-06 Fix template bug
    Bryan Alsdorf 2013-08-12 Fix bug with products (Frackin PHP)
    Bryan Alsdorf 2013-08-01 Fix favicon
    Bryan Alsdorf 2013-08-01 Gracefully handle LDAP failure.
    Bryan Alsdorf 2013-08-01 Fixed bug with updating password
    Bryan Alsdorf 2013-07-31 Re-enable auto refresh on list issues
    Bryan Alsdorf 2013-07-30 Added account manager, currency and amount to crm
    Bryan Alsdorf 2013-07-29 Auto select the status when closing issue.
    Bryan Alsdorf 2013-07-29 Updated UI for some pages
    Bryan Alsdorf 2013-07-29 Added missing force view link back
    Bryan Alsdorf 2013-07-26 Removed references to footer.tpl.html
    eventum 2013-07-26 Adam's template change
    eventum 2013-07-26 Adam's template changes
    Bryan Alsdorf 2013-07-25 More UI fixes.
    Bryan Alsdorf 2013-07-25 More UI fixes
    Bryan Alsdorf 2013-07-25 Fixed bug in UI migration
    Bryan Alsdorf 2013-07-25 Fixed mail queue
    Bryan Alsdorf 2013-07-24 Fixed bug with converting notes
    Bryan Alsdorf 2013-07-22 Fixed bug with issue listing and hide closed.
    Bryan Alsdorf 2013-07-11 Fixed product and severities
    Bryan Alsdorf 2013-07-10 Added missing JS function
    Bryan Alsdorf 2013-07-10 Fixes for issues fount in testing
    Bryan Alsdorf 2013-07-08 [merge] Merge from UI tree
    Bryan Alsdorf 2013-07-02 [merge] Remove debug
    Bryan Alsdorf 2013-07-02 [merge] Merge
    Bryan Alsdorf 2013-06-27 [merge] Make buttons smaller
    Bryan Alsdorf 2013-06-27 [merge] Merge
    Bryan Alsdorf 2013-06-27 ui tweaks
    Bryan Alsdorf 2013-06-27 [merge] Merge from UI branch.
    Bryan Alsdorf 2013-06-24 [merge] Merge UI tweaks
    Bryan Alsdorf 2013-06-24 [merge] Merge UI tweaks from trunk
    Bryan Alsdorf 2013-06-23 [merge] Merge from branch
    Bryan Alsdorf 2013-06-21 Added "extra header" template so local templates can override and add extra data to headers
    Bryan Alsdorf 2013-06-20 [merge] Merge from main UI branch
    Bryan Alsdorf 2013-06-20 [merge] Merged from ui branch
    Bryan Alsdorf 2013-06-18 Fixed formatting on quick filter page
    Bryan Alsdorf 2013-06-18 Merged ldap changes
    Bryan Alsdorf 2013-06-18 Remove extra "c"
    Bryan Alsdorf 2013-06-14 Added blockui.js back
    Bryan Alsdorf 2013-06-11 [merge] First merge
    Bryan Alsdorf 2013-05-30 LDAP tweaks:
    Bryan Alsdorf 2013-05-30 Fix bug with inserting users
    Bryan Alsdorf 2013-05-30 Validation tweak
    Bryan Alsdorf 2013-04-22 Show update form after "add self to notification list
    Bryan Alsdorf 2013-04-12 Fix bug with array merging
    Bryan Alsdorf 2013-02-08 Added Resolution::getID()
    Bryan Alsdorf 2013-01-29 [merge] Merge changes
    Bryan Alsdorf 2012-12-21 revert changes
    Bryan Alsdorf 2012-12-21 Tweak to partner backends
    Bryan Alsdorf 2012-12-21 ignore abstract partner backends
    Bryan Alsdorf 2013-01-29 Added "Interested Parties" to customer account manager feature.
    Bryan Alsdorf 2012-12-07 Bug fixes and updating example partner backend
    Bryan Alsdorf 2012-12-06 [merge] merge from internal
    Bryan Alsdorf 2012-12-04 Add permission check for converting notes
    Bryan Alsdorf 2012-12-03 Added edit reports to issue access / partner backend
    Bryan Alsdorf 2012-12-03 Update group column
    Bryan Alsdorf 2012-11-28 Display description on edit custom fields
    Bryan Alsdorf 2012-12-06 Remove check for project group
    Bryan Alsdorf 2012-12-03 Fix bug with redirecting from sub directory when user is logged in but doesn't have a project ...
    Bryan Alsdorf 2012-11-05 Fixed bug with searching by assignee
    Bryan Alsdorf 2012-09-27 Added "Product" filter to adv search page
    Bryan Alsdorf 2012-09-27 [merge] Merge from trunk
    Bryan Alsdorf 2012-09-27 [merge] Merge from trunk
    Bryan Alsdorf 2012-09-27 Send notification on private file uploads to internal users (Bryan)
    Bryan Alsdorf 2012-09-13 Added sorting by severity and group
    Bryan Alsdorf 2012-08-27 [merge] Merge from trunk
    Bryan Alsdorf 2012-08-14 Fixed tab order for custom fields
    Bryan Alsdorf 2012-08-24 Changed the way nosave on the list issues page works. Previously it would delete the search pr...
    Bryan Alsdorf 2012-08-08 Made current filters clickable to remove that individual filter
    Bryan Alsdorf 2012-07-17 Fixed bug where customers couldn't see attachments
    Bryan Alsdorf 2012-07-09 Don't send notes to partners that don't have access to them.
    Bryan Alsdorf 2012-06-29 [merge] Merging from internal
    Bryan Alsdorf 2012-06-29 Added new smarty modifier
    Bryan Alsdorf 2012-06-29 Added new customer_all view
    Bryan Alsdorf 2012-06-04 Tweak schema file
    Bryan Alsdorf 2012-06-04 Bug fixes and tweaks for customer API
    Bryan Alsdorf 2012-06-26 Automatically uncompress gzip files when using the "view" link
    Bryan Alsdorf 2012-06-11 Fix duplicate field
    Bryan Alsdorf 2012-05-29 Fix problem with logging in with aliases
    Bryan Alsdorf 2012-05-21 [merge] Merge from trunk
    Bryan Alsdorf 2012-05-11 [merge] Merging
    Bryan Alsdorf 2012-04-18 Reminders:
    Bryan Alsdorf 2012-05-10 [merge] Merge from trunk
    Bryan Alsdorf 2012-03-30 [merge] Merged from main
    Bryan Alsdorf 2012-02-28 Fix bugs with "receive copy of own actions" not working.
    Bryan Alsdorf 2012-02-27 Fixed bug with processing emails
    Bryan Alsdorf 2012-02-15 Allow partners to email issues they are assigned too.
    Bryan Alsdorf 2012-02-13 Updated example backend
    Bryan Alsdorf 2012-02-13 Partner API
    Bryan Alsdorf 2012-02-12 Partner API:
    Bryan Alsdorf 2012-01-01 Fixed bug with "Receive emails when all issues are created" preference not working
    Bryan Alsdorf 2011-12-28 Added new access class to control access to centralize permission checking.
    Bryan Alsdorf 2011-12-19 Check both To and CC fields when routing emails
    Bryan Alsdorf 2011-12-13 Added Partner API to help make Eventum integrate with partners / external systems
    Bryan Alsdorf 2011-12-08 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-20 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-16 [merge] Merged from trunk
    Bryan Alsdorf 2011-09-15 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-15 ORder products by rank
    Bryan Alsdorf 2011-09-14 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-14 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-14 Fix bug with quick filter
    Bryan Alsdorf 2011-09-14 [merge] Merge
    Bryan Alsdorf 2011-09-12 Added missing method
    Bryan Alsdorf 2011-09-14 [merge] Merged from trunk
    Bryan Alsdorf 2011-09-14 [merge] Merged sphinx search changes from trunk
    Bryan Alsdorf 2011-09-14 [merge] Merged from trunk
    Bryan Alsdorf 2011-09-08 [merge] Merge fixes from trunk
    Bryan Alsdorf 2011-09-08 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-07 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-06 [merge] Merged from trunk
    Bryan Alsdorf 2011-09-06 Added method back to class.misc.php
    Bryan Alsdorf 2011-09-05 Pass the user closing the issue to Workflow::handleIssueClosed()
    Bryan Alsdorf 2011-09-01 [merge] Merge from trunk
    Bryan Alsdorf 2011-09-01 [merge] Merged changes from trunk
    Bryan Alsdorf 2011-08-25 Added severity back to list page
    Bryan Alsdorf 2011-08-18 [merge] Merged from trunk
    Bryan Alsdorf 2011-08-17 [merge] merge from trunk
    Bryan Alsdorf 2011-08-17 [merge] Merged from trunk
    Bryan Alsdorf 2011-08-17 [merge] CHanges from truunk
    Bryan Alsdorf 2011-08-17 [merge] Merge changes from trunk
    Bryan Alsdorf 2011-08-17 Added "force view" link to attachments
    Bryan Alsdorf 2011-08-17 Increased note reply size
    Bryan Alsdorf 2011-08-17 Resized note popup window.
    Bryan Alsdorf 2011-08-17 [merge] Merge from trunk
    Bryan Alsdorf 2011-08-16 Renamed severity upgrade patch so it doesn't conflict
    Bryan Alsdorf 2011-08-16 Few bug fixes
    Bryan Alsdorf 2011-08-16 [merge] Merged changes from trunk
    Bryan Alsdorf 2011-08-03 Added $options param to Customer::lookup
    Bryan Alsdorf 2011-07-06 [merge] Merged from trunk.
    Bryan Alsdorf 2011-07-06 [merge] Merges from trunk.
    Bryan Alsdorf 2011-06-08 Changed HTTP Basic Auth handling in Auth::checkAuthentication() so it does not redirect
    Bryan Alsdorf 2011-06-08 Added some "public static" to method definitions
    Bryan Alsdorf 2011-05-27 Fixed declarations
    Bryan Alsdorf 2011-05-27 Fixed declaration
    Bryan Alsdorf 2011-05-27 Fixed Declaration
    Bryan Alsdorf 2011-05-27 Initial framework for new customer/CRM backend
    Bryan Alsdorf 2011-05-19 Updated PEAR Net_SMTP
    Bryan Alsdorf 2011-05-19 Make getBackend public again since some backends need it sometime.
    Bryan Alsdorf 2011-05-05 Changed close issue to default to sending to all users instead of internal only
    Bryan Alsdorf 2011-04-20 [merge] Merging changes
    Bryan Alsdorf 2011-04-20 [merge] Merged changes from MPAB trunk
    Bryan Alsdorf 2011-04-19 [merge] Merge changes from trunk
    Bryan Alsdorf 2011-04-19 Fixed PHP error
    Bryan Alsdorf 2011-04-19 [merge] Merge changes from MPAB trunk
    Bryan Alsdorf 2011-01-21 [merge] Merge changes
    Bryan Alsdorf 2011-01-20 [merge] Merge changes
    Bryan Alsdorf 2011-01-20 Don't require account id when looking up emails.
    Bryan Alsdorf 2011-01-20 Fixed typo in documentation
    Bryan Alsdorf 2011-04-19 Added "hasFeature" to Customer backend
    Bryan Alsdorf 2011-04-19 Made labels bold
    Bryan Alsdorf 2011-02-25 Changed SMS reminder alert text
    Bryan Alsdorf 2011-02-10 Fix FAQ for internal users
    Bryan Alsdorf 2011-02-10 Final batch of FAQ fixes hopefully.
    Bryan Alsdorf 2011-02-10 Another FAQ fix
    Bryan Alsdorf 2011-02-10 Modified FAQ to support varchar support level ids
    Bryan Alsdorf 2011-02-07 Call Workflow::shouldEmailAddress() from Notification::notifySubscribers()
    Bryan Alsdorf 2011-01-20 [merge] Merging changes
    Bryan Alsdorf 2011-01-20 Added new "preNoteInsert" method to workflow.
    Bryan Alsdorf 2011-01-20 Updated jquery version
    Bryan Alsdorf 2011-01-20 Added correct line break between mail queue headers and body
    Bryan Alsdorf 2011-01-20 Added "Spaced" table css
    Bryan Alsdorf 2011-01-17 Fixed reminder bugs
    Bryan Alsdorf 2011-01-17 Fixed bug in displaying reminder sql queries
    Bryan Alsdorf 2011-01-17 Typo fix
    Bryan Alsdorf 2011-01-17 Allow support level ID to be a string
    Bryan Alsdorf 2011-01-06 Fixed bug with updating hidden fields.
    Bryan Alsdorf 2010-12-21 Added new bool template modifier
    Bryan Alsdorf 2010-12-21 Added some modern styles to CSS
    Bryan Alsdorf 2010-12-17 [merge] Merged changes
    Bryan Alsdorf 2010-12-10 Have form post to whatever page it is included in
    Bryan Alsdorf 2010-12-10 [merge] Merge changes
    Bryan Alsdorf 2010-12-10 [merge] Merging more changes
    Bryan Alsdorf 2010-12-10 [merge] merging changes
    Bryan Alsdorf 2010-12-10 Added method to convert an array into a querystring
    Bryan Alsdorf 2010-12-10 Call Workflow::canSendNote() when routing notes
    Bryan Alsdorf 2010-12-10 Fixed typo
    Bryan Alsdorf 2010-12-10 Added Workflow::canSendNote() method
    Bryan Alsdorf 2010-12-10 Fix JS error if there are no products defined.
    Bryan Alsdorf 2010-12-10 Remove single contract ID since most backends should support multiple
    Bryan Alsdorf 2010-12-10 [merge] merged changes from skysql into tree
    Bryan Alsdorf 2010-12-08 Fixed bug with escaping characters
    Bryan Alsdorf 2010-12-05 Added 'Product' field. Eventually multiple products per issue will be supported.
    Bryan Alsdorf 2010-12-02 Made "Active Group" reminder condition work with 'equal' and 'not equal'.
    Bryan Alsdorf 2010-12-02 [merge] Merging changes
    Bryan Alsdorf 2010-12-02 - Added "getActiveGroup" to workflow (Bryan)
    Bryan Alsdorf 2010-12-02 Changed FAQ entries to not popup in new windows
    Bryan Alsdorf 2010-12-02 Allow aliases to be used when requesting new password
    Bryan Alsdorf 2010-11-18 [merge] Merging changes from trunk
    Bryan Alsdorf 2010-11-15 Put the contract id field in the customer backend template, not the main new.tpl.html page.
    Bryan Alsdorf 2010-11-13 Template fix
    Bryan Alsdorf 2010-11-13 Allow ordering of resolutions
    Bryan Alsdorf 2010-11-13 Added "Group" to reminder conditions
    Bryan Alsdorf 2010-11-13 Added workflow method to control if a user has access to update an issue
    Bryan Alsdorf 2010-11-12 [merge] Merging changes
    Bryan Alsdorf 2010-11-12 Deprecated workflow "handleAssignment" in favor of "handleAssignmentChange"
    Bryan Alsdorf 2010-10-10 Changed "Custom Fields" to "Additional Details" on view issues page
    Bryan Alsdorf 2010-10-10 Allow more fields to be hidden on view issue page by workflow:
    Bryan Alsdorf 2010-10-08 Fixed permission check problem for close issue page
    Bryan Alsdorf 2010-10-08 Another fix for getRandomTips
    Bryan Alsdorf 2010-10-05 Include severity info in notification data
    Bryan Alsdorf 2010-10-05 Look for templates in local directory before main directory so installations can be customized
    Bryan Alsdorf 2010-10-05 [merge] Merge changes
    Bryan Alsdorf 2010-10-01 Tweaks to pages to better support customer backends.
    Bryan Alsdorf 2010-10-01 Add local directory to template path.
    Bryan Alsdorf 2010-10-01 Added flag to Auth::getCurrentProject() to control if a user should be redirected to login if ...
    Bryan Alsdorf 2010-10-01 FIxed infinite recursion error when template directory was an array.
    Bryan Alsdorf 2010-10-01 Fixed error in displaying issues when logged in as customer.
    Bryan Alsdorf 2010-09-28 [merge] Merging revisions.
    Bryan Alsdorf 2010-09-28 Show internal custom fields with a different color background.
    Bryan Alsdorf 2010-09-24 - Added "Severity" field, this can be used with or instead of "Priority" (Bryan)
    Bryan Alsdorf 2010-09-24 Fixed bug with "getStatusByEmail()" not checking aliases
    Bryan Alsdorf 2010-09-22 Check if session is already started before calling session_start()
    Bryan Alsdorf 2010-09-21 Fixed color of Priority field if it was internal only
    Bryan Alsdorf 2010-09-21 Modified custom field class to look for backends in /local/ first
    Bryan Alsdorf 2010-09-16 Added 'close_popup_windows' to Prefs::getDefaults()
    Bryan Alsdorf 2010-12-10 [merge] Merge changes from trunk
    Bryan Alsdorf 2010-12-09 Extracted core part of the new template form to a separate template.
    Bryan Alsdorf 2010-12-09 Added method to unsubscribe users by email address
    Bryan Alsdorf 2010-12-09 Added basic auth support to Auth::checkAuthentication()
    Bryan Alsdorf 2010-12-09 Added local path and local/include/ to include path
    Bryan Alsdorf 2010-12-09 Add local directory to templates path.
    Bryan Alsdorf 2010-12-09 Fixed bug with session initialization
    Bryan Alsdorf 2010-08-30 Made update form include customer template from /local directory
    Bryan Alsdorf 2010-08-11 Automatically restart irc bot
    Bryan Alsdorf 2010-08-11 Disable built in IRC notification for new issue so customer details aren't shared.
    Bryan Alsdorf 2010-08-11 Add contract id to new issue page
    Bryan Alsdorf 2010-08-10 Fixed PHP warnings relating to assign by reference being deprecated
    Bryan Alsdorf 2010-08-10 Changed ereg to preg
    Bryan Alsdorf 2010-08-10 Fix for expired contract message
    Bryan Alsdorf 2010-08-06 Remove debug statement
    Bryan Alsdorf 2010-08-06 Allow customers to use the quick filters
    Bryan Alsdorf 2010-07-22 [merge] Merged from main branch
    Bryan Alsdorf 2010-03-29 Really fix bug with this customer method
    Bryan Alsdorf 2010-03-29 Fix use of $this
    Bryan Alsdorf 2010-03-24 Added routing file so customer web files can be outside of webroot
    Bryan Alsdorf 2010-03-24 Updates to make the customer API work better
    Bryan Alsdorf 2010-03-15 Fixed typo in formatting
    Bryan Alsdorf 2010-03-15 Added script to sort incoming emails/notes/drafts and route to correct method (Bryan)
    Bryan Alsdorf 2010-03-15 [merge] Merging from main tree
    Bryan Alsdorf 2010-02-02 [merge] Merging from main tree
    Bryan Alsdorf 2010-02-02 Set SQL_MODE to '' in setup
    Bryan Alsdorf 2010-02-02 Made workflow class also look in /local/workflow/ for backends
    Bryan Alsdorf 2010-02-02 Made workflow class also look in /local/workflow/ for backends
    Bryan Alsdorf 2010-02-02 Fixed problem with auth redirects failing in subdirectories
    Bryan Alsdorf 2010-02-01 Added APP_LOCAL_PATH constant

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
     * @param   integer $prj_id The project ID
47
47
     * @return  array The outgoing sender information
48
48
     */
49
 
    function getOutgoingSenderAddress($prj_id)
 
49
    public static function getOutgoingSenderAddress($prj_id)
50
50
    {
51
51
        $stmt = "SELECT
52
52
                    prj_outgoing_sender_name,
86
86
     * @param   integer $prj_id The project ID
87
87
     * @return  integer The status ID
88
88
     */
89
 
    function getInitialStatus($prj_id)
 
89
    public static function getInitialStatus($prj_id)
90
90
    {
91
91
        $stmt = "SELECT
92
92
                    prj_initial_sta_id
112
112
     * @param   integer $prj_id The project ID
113
113
     * @return  array The anonymous posting options
114
114
     */
115
 
    function getAnonymousPostOptions($prj_id)
 
115
    public static function getAnonymousPostOptions($prj_id)
116
116
    {
117
117
        $stmt = "SELECT
118
118
                    prj_anonymous_post_options
140
140
     * @param   integer $prj_id The project ID
141
141
     * @return  integer 1 if the update worked, -1 otherwise
142
142
     */
143
 
    function updateAnonymousPost($prj_id)
 
143
    public static function updateAnonymousPost($prj_id)
144
144
    {
145
145
        $stmt = "UPDATE
146
146
                    " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project
166
166
     * @access  public
167
167
     * @return  array The list of projects
168
168
     */
169
 
    function getAnonymousList()
 
169
    public static function getAnonymousList()
170
170
    {
171
171
        $stmt = "SELECT
172
172
                    prj_id,
194
194
     * @param   integer $prj_id The project ID
195
195
     * @return  boolean
196
196
     */
197
 
    function exists($prj_id)
 
197
    public static function exists($prj_id)
198
198
    {
199
199
        $stmt = "SELECT
200
200
                    COUNT(*) AS total
223
223
     * @param   string $prj_title The project title
224
224
     * @return  integer The project ID
225
225
     */
226
 
    function getID($prj_title)
 
226
    public static function getID($prj_title)
227
227
    {
228
228
        $stmt = "SELECT
229
229
                    prj_id
248
248
     * @param   integer $prj_id The project ID
249
249
     * @return  string The project title
250
250
     */
251
 
    function getName($prj_id)
 
251
    public static function getName($prj_id)
252
252
    {
253
253
        static $returns;
254
254
 
280
280
     * @param   integer $prj_id The project ID
281
281
     * @return  boolean If reporters should be segregated
282
282
     */
283
 
    function getSegregateReporters($prj_id)
 
283
    public static function getSegregateReporters($prj_id)
284
284
    {
285
285
        static $returns;
286
286
 
317
317
     * @param   integer $prj_id The project ID
318
318
     * @return  array The project details
319
319
     */
320
 
    function getDetails($prj_id)
 
320
    public static function getDetails($prj_id)
321
321
    {
322
322
        $stmt = "SELECT
323
323
                    *
343
343
     * @access  public
344
344
     * @return  boolean
345
345
     */
346
 
    function remove()
 
346
    public static function remove()
347
347
    {
348
348
        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
349
349
        $stmt = "DELETE FROM
406
406
     * @access  public
407
407
     * @return  integer 1 if the update worked, -1 otherwise
408
408
     */
409
 
    function update()
 
409
    public static function update()
410
410
    {
411
411
        if (Validation::isWhitespace($_POST["title"])) {
412
412
            return -2;
463
463
     * @param   integer $role The role of the user
464
464
     * @return  boolean
465
465
     */
466
 
    function associateUser($prj_id, $usr_id, $role)
 
466
    public static function associateUser($prj_id, $usr_id, $role)
467
467
    {
468
468
        $prj_id = Misc::escapeInteger($prj_id);
469
469
        $usr_id = Misc::escapeInteger($usr_id);
511
511
     * @access  public
512
512
     * @return  integer 1 if the update worked, -1 or -2 otherwise
513
513
     */
514
 
    function insert()
 
514
    public static function insert()
515
515
    {
516
516
        if (Validation::isWhitespace($_POST["title"])) {
517
517
            return -2;
577
577
     * @access  public
578
578
     * @return  array The list of projects
579
579
     */
580
 
    function getList()
 
580
    public static function getList()
581
581
    {
582
582
        $stmt = "SELECT
583
583
                    prj_id,
669
669
     * @param   integer $role The role ID of the user
670
670
     * @return  array The list of users
671
671
     */
672
 
    function getUserAssocList($prj_id, $status = NULL, $role = NULL)
 
672
    public static function getUserAssocList($prj_id, $status = NULL, $role = NULL)
673
673
    {
674
674
        $stmt = "SELECT
675
675
                    usr_id,
708
708
     * @param   integer $prj_id The project ID
709
709
     * @return  array The list of user IDs
710
710
     */
711
 
    function getUserColList($prj_id)
 
711
    public static function getUserColList($prj_id)
712
712
    {
713
713
        $stmt = "SELECT
714
714
                    usr_id
738
738
     * @param   boolean $include_no_customer_association Whether to include in the results projects with customer integration or not
739
739
     * @return  array List of projects
740
740
     */
741
 
    function getAll($include_no_customer_association = TRUE)
 
741
    public static function getAll($include_no_customer_association = TRUE)
742
742
    {
743
743
        $stmt = "SELECT
744
744
                    prj_id,
770
770
     * @param   integer $issue_id The issue ID
771
771
     * @return  array List of emails
772
772
     */
773
 
    function getAddressBookEmails($prj_id, $issue_id)
 
773
    public static function getAddressBookEmails($prj_id, $issue_id)
774
774
    {
775
775
        $list = self::getAddressBook($prj_id, $issue_id);
776
776
        $emails = array();
790
790
     * @param   integer $issue_id The issue ID
791
791
     * @return  array List of names and emails
792
792
     */
793
 
    function getAddressBook($prj_id, $issue_id = FALSE)
 
793
    public static function getAddressBook($prj_id, $issue_id = FALSE)
794
794
    {
795
795
        static $returns;
796
796
 
822
822
     * @param   integer $issue_id The issue ID
823
823
     * @return  array List of names and emails
824
824
     */
825
 
    function getAddressBookAssocList($prj_id, $issue_id = FALSE)
 
825
    public static function getAddressBookAssocList($prj_id, $issue_id = FALSE)
826
826
    {
827
827
        if ($issue_id) {
828
828
            $customer_id = Issue::getCustomerID($issue_id);
865
865
     * @access  public
866
866
     * @return  array The list of projects
867
867
     */
868
 
    function getRemoteAssocList()
 
868
    public static function getRemoteAssocList()
869
869
    {
870
870
        $stmt = "SELECT
871
871
                    prj_id,
895
895
     * @param   boolean $only_customer_projects Whether to only include projects with customer integration or not
896
896
     * @return  array The list of projects
897
897
     */
898
 
    function getRemoteAssocListByUser($usr_id, $only_customer_projects = FALSE)
 
898
    public static function getRemoteAssocListByUser($usr_id, $only_customer_projects = FALSE)
899
899
    {
900
900
        static $returns;
901
901
 
941
941
     * @param   string $status The desired user status
942
942
     * @return  array The list of users
943
943
     */
944
 
    function getUserEmailAssocList($prj_id, $status = NULL, $role = NULL)
 
944
    public static function getUserEmailAssocList($prj_id, $status = NULL, $role = NULL)
945
945
    {
946
946
        static $returns;
947
947
 
986
986
     * @param   string $status The desired user status
987
987
     * @return  array The list of users
988
988
     */
989
 
    function getReporters($prj_id)
 
989
    public static function getReporters($prj_id)
990
990
    {
991
991
 
992
992
        $stmt = "SELECT
1021
1021
     * @param   array $settings An array of fields and role is required to view them.
1022
1022
     * @return  integer 1 if the update worked, -1 otherwise.
1023
1023
     */
1024
 
    function updateFieldDisplaySettings($prj_id, $settings)
 
1024
    public static function updateFieldDisplaySettings($prj_id, $settings)
1025
1025
    {
1026
1026
        // delete current settings
1027
1027
        $stmt = "DELETE FROM
1064
1064
     * @param   integer $prj_id The project ID
1065
1065
     * @return  array An associative array of minimum role required to access a field.
1066
1066
     */
1067
 
    function getFieldDisplaySettings($prj_id)
 
1067
    public static function getFieldDisplaySettings($prj_id)
1068
1068
    {
1069
1069
        $stmt = "SELECT
1070
1070
                    pfd_field,
1094
1094
     * @access  public
1095
1095
     * @return  array
1096
1096
     */
1097
 
    function getDisplayFields()
 
1097
    public static function getDisplayFields()
1098
1098
    {
1099
1099
        return array(
1100
1100
            "category"  =>  ev_gettext("Category"),
1101
1101
            "priority"  =>  ev_gettext("Priority"),
 
1102
            "severity"  =>  ev_gettext("Severity"),
1102
1103
            "assignment"    =>  ev_gettext("Assignment"),
1103
1104
            "release"   =>  ev_gettext("Scheduled Release"),
1104
1105
            "estimated_dev_time"    =>  ev_gettext("Estimated Dev. Time"),
1105
1106
            "group"     =>  ev_gettext("Group"),
1106
1107
            "file"  =>  ev_gettext("File"),
1107
 
            "private"   =>  ev_gettext("Private")
 
1108
            "private"   =>  ev_gettext("Private"),
 
1109
            "product"   =>  ev_gettext("Product"),
1108
1110
        );
1109
1111
    }
1110
1112
}