Thread: [Cs-project-svn_notify] SF.net SVN: cs-project: [626] trunk/lib
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-20 16:54:14
|
Revision: 626 http://cs-project.svn.sourceforge.net/cs-project/?rev=626&view=rev Author: crazedsanity Date: 2007-11-20 08:54:11 -0800 (Tue, 20 Nov 2007) Log Message: ----------- added svn:eol-style (native) Property Changed: ---------------- trunk/lib/adminUserClass.php trunk/lib/attributeClass.php trunk/lib/globalFunctions.php trunk/lib/logsClass.php trunk/lib/mainRecordClass.php trunk/lib/noteClass.php trunk/lib/prefClass.php trunk/lib/projectClass.php trunk/lib/recordContactLink.class.php trunk/lib/sessionCacheClass.php trunk/lib/session_class.php trunk/lib/site_config.php trunk/lib/tagClass.php trunk/lib/todoClass.php trunk/lib/upgradeClass.php trunk/lib/userClass.php Property changes on: trunk/lib/adminUserClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/attributeClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/globalFunctions.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/logsClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/mainRecordClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/noteClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/prefClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/projectClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/recordContactLink.class.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/sessionCacheClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/session_class.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/site_config.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/tagClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/todoClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/upgradeClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/userClass.php ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-11-20 16:57:24
|
Revision: 627 http://cs-project.svn.sourceforge.net/cs-project/?rev=627&view=rev Author: crazedsanity Date: 2007-11-20 08:55:40 -0800 (Tue, 20 Nov 2007) Log Message: ----------- added svn:eol-style (native) Property Changed: ---------------- trunk/lib/_unitTests_/cs-arrayToPath_tests.php trunk/lib/_unitTests_/cs-content_tests.php trunk/lib/_unitTests_/cs-phpxml_tests.php trunk/lib/_unitTests_/data/test.xml trunk/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE trunk/lib/simpletest/LICENSE trunk/lib/simpletest/README trunk/lib/simpletest/VERSION trunk/lib/simpletest/authentication.php trunk/lib/simpletest/autorun.php trunk/lib/simpletest/browser.php trunk/lib/simpletest/collector.php trunk/lib/simpletest/compatibility.php trunk/lib/simpletest/cookies.php trunk/lib/simpletest/default_reporter.php trunk/lib/simpletest/detached.php trunk/lib/simpletest/docs/en/authentication_documentation.html trunk/lib/simpletest/docs/en/browser_documentation.html trunk/lib/simpletest/docs/en/docs.css trunk/lib/simpletest/docs/en/expectation_documentation.html trunk/lib/simpletest/docs/en/form_testing_documentation.html trunk/lib/simpletest/docs/en/group_test_documentation.html trunk/lib/simpletest/docs/en/index.html trunk/lib/simpletest/docs/en/mock_objects_documentation.html trunk/lib/simpletest/docs/en/overview.html trunk/lib/simpletest/docs/en/partial_mocks_documentation.html trunk/lib/simpletest/docs/en/reporter_documentation.html trunk/lib/simpletest/docs/en/unit_test_documentation.html trunk/lib/simpletest/docs/en/web_tester_documentation.html trunk/lib/simpletest/docs/fr/authentication_documentation.html trunk/lib/simpletest/docs/fr/browser_documentation.html trunk/lib/simpletest/docs/fr/docs.css trunk/lib/simpletest/docs/fr/expectation_documentation.html trunk/lib/simpletest/docs/fr/form_testing_documentation.html trunk/lib/simpletest/docs/fr/group_test_documentation.html trunk/lib/simpletest/docs/fr/index.html trunk/lib/simpletest/docs/fr/mock_objects_documentation.html trunk/lib/simpletest/docs/fr/overview.html trunk/lib/simpletest/docs/fr/partial_mocks_documentation.html trunk/lib/simpletest/docs/fr/reporter_documentation.html trunk/lib/simpletest/docs/fr/server_stubs_documentation.html trunk/lib/simpletest/docs/fr/unit_test_documentation.html trunk/lib/simpletest/docs/fr/web_tester_documentation.html trunk/lib/simpletest/dumper.php trunk/lib/simpletest/eclipse.php trunk/lib/simpletest/encoding.php trunk/lib/simpletest/errors.php trunk/lib/simpletest/exceptions.php trunk/lib/simpletest/expectation.php trunk/lib/simpletest/extensions/pear_test_case.php trunk/lib/simpletest/extensions/phpunit_test_case.php trunk/lib/simpletest/extensions/testdox/test.php trunk/lib/simpletest/extensions/testdox.php trunk/lib/simpletest/form.php trunk/lib/simpletest/frames.php trunk/lib/simpletest/http.php trunk/lib/simpletest/invoker.php trunk/lib/simpletest/mock_objects.php trunk/lib/simpletest/page.php trunk/lib/simpletest/parser.php trunk/lib/simpletest/reflection_php4.php trunk/lib/simpletest/reflection_php5.php trunk/lib/simpletest/remote.php trunk/lib/simpletest/reporter.php trunk/lib/simpletest/scorer.php trunk/lib/simpletest/selector.php trunk/lib/simpletest/shell_tester.php trunk/lib/simpletest/simpletest.php trunk/lib/simpletest/socket.php trunk/lib/simpletest/tag.php trunk/lib/simpletest/test_case.php trunk/lib/simpletest/unit_tester.php trunk/lib/simpletest/url.php trunk/lib/simpletest/user_agent.php trunk/lib/simpletest/web_tester.php trunk/lib/simpletest/xml.php Property changes on: trunk/lib/_unitTests_/cs-arrayToPath_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/_unitTests_/cs-content_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/_unitTests_/cs-phpxml_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/_unitTests_/data/test.xml ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/LICENSE ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/README ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/VERSION ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/authentication.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/autorun.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/browser.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/collector.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/compatibility.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/cookies.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/default_reporter.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/detached.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/authentication_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/browser_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/docs.css ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/expectation_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/form_testing_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/group_test_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/index.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/mock_objects_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/overview.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/partial_mocks_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/reporter_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/unit_test_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/en/web_tester_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/authentication_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/browser_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/docs.css ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/expectation_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/form_testing_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/group_test_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/index.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/mock_objects_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/overview.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/partial_mocks_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/reporter_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/server_stubs_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/unit_test_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/docs/fr/web_tester_documentation.html ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/dumper.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/eclipse.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/encoding.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/errors.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/exceptions.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/expectation.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/extensions/pear_test_case.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/extensions/phpunit_test_case.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/extensions/testdox/test.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/extensions/testdox.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/form.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/frames.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/http.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/invoker.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/mock_objects.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/page.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/parser.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/reflection_php4.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/reflection_php5.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/remote.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/reporter.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/scorer.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/selector.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/shell_tester.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/simpletest.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/socket.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/tag.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/test_case.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/unit_tester.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/url.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/user_agent.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/web_tester.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/lib/simpletest/xml.php ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-11-20 18:57:50
|
Revision: 644 http://cs-project.svn.sourceforge.net/cs-project/?rev=644&view=rev Author: crazedsanity Date: 2007-11-20 10:57:45 -0800 (Tue, 20 Nov 2007) Log Message: ----------- Fix new user creation problems. /lib/adminUserClass.php: * create_user(): -- store unencrypted password for the "new user" email. -- sends an email to the new user with their username, password, etc. /lib/contactClass.php: * create_contact(): -- no longer creates a copy of itself... (?) -- once the email is created, update the main contact record so the transaction doesn't get aborted at the very end. Modified Paths: -------------- trunk/lib/adminUserClass.php trunk/lib/contactClass.php Modified: trunk/lib/adminUserClass.php =================================================================== --- trunk/lib/adminUserClass.php 2007-11-20 18:32:35 UTC (rev 643) +++ trunk/lib/adminUserClass.php 2007-11-20 18:57:45 UTC (rev 644) @@ -3,11 +3,11 @@ /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:adminUserClass.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/adminUserClass.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ class adminUserClass extends userClass { @@ -85,6 +85,7 @@ ); //good to go: encrypt the password. + $originalPassword = $data['password']; $data['password'] = $this->encrypt_pass($data['password'], $contactId); $sql = "INSERT INTO user_table ". string_from_array($data, 'insert', NULL, $cleanStringArr, TRUE, TRUE); @@ -107,6 +108,14 @@ //now add the user to the specified group. $this->add_user_to_group($uid, $data['group_id']); + + //now send an email out to the user to let 'em know. + $templateContents = html_file_to_string('email/new_user.tmpl'); + $repArr = $data; + $repArr['uid'] = $retval; + $repArr['password'] = $originalPassword; + $subject = 'Registration Confirmation ['. $repArr['username'] .']'; + send_email($data['email'], $subject, $templateContents, $repArr); } else { $details = "Created new user (". $data['username'] .") [NEW ID QUERY FAILED, numrows=(". $this->lastNumrows ."), DBERROR::: ". $this->lastError ."]"; Modified: trunk/lib/contactClass.php =================================================================== --- trunk/lib/contactClass.php 2007-11-20 18:32:35 UTC (rev 643) +++ trunk/lib/contactClass.php 2007-11-20 18:57:45 UTC (rev 644) @@ -447,15 +447,24 @@ $retval = $data[0]; //before completing, let's create the primary email address. - $contactObj = new contactClass($this->db); - $contactObj->set_contact_id($retval); - $contactObj->create_contact_email($email, TRUE); - $this->db->commitTrans(); - - //set the internal contactId. $this->set_contact_id($retval); + $contactEmailId = $this->create_contact_email($email, TRUE); - $this->logsObj->log_by_class("Created new contact (". $retval .")"); + //update the contact_email_id on their contact record. + $sql = "UPDATE contact_table SET contact_email_id=". $contactEmailId ." WHERE contact_id=". $retval; + if(is_numeric($contactEmailId) && $this->run_sql($sql)) { + $this->db->commitTrans(); + + //set the internal contactId. + $this->set_contact_id($retval); + + $this->logsObj->log_by_class("Created new contact (". $retval .")"); + } + else { + $this->db->rollbackTrans(); + + $this->logsObj->log_by_class(__METHOD__ .": failed to create email for new contact (". $contactEmailId .")"); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-11-21 18:59:57
|
Revision: 661 http://cs-project.svn.sourceforge.net/cs-project/?rev=661&view=rev Author: crazedsanity Date: 2007-11-21 10:59:54 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Fix problem with displaying tags on existing issues. FIXES ISSUE::: #118: Helpdesk tag list shows "Array" /lib/helpdeskClass.php: * get_category_list(): -- pass TRUE to the call to tagClass::get_tag_list(). /lib/tagClass.php: * get_tag_list(): -- ARG CHANGE: NEW ARG: #1 ($getAllData=FALSE) -- option to retrieve all data vs. the traditional tag_name_id + name. Modified Paths: -------------- trunk/lib/helpdeskClass.php trunk/lib/tagClass.php Modified: trunk/lib/helpdeskClass.php =================================================================== --- trunk/lib/helpdeskClass.php 2007-11-21 18:08:22 UTC (rev 660) +++ trunk/lib/helpdeskClass.php 2007-11-21 18:59:54 UTC (rev 661) @@ -413,7 +413,7 @@ function get_category_list($selectThis=NULL) { //create a list of tags. $object = new tagClass($this->db); - $mainTagList = $object->get_tag_list(); + $mainTagList = $object->get_tag_list(TRUE); //create the "replacement array" and such. $tagList = array(); Modified: trunk/lib/tagClass.php =================================================================== --- trunk/lib/tagClass.php 2007-11-21 18:08:22 UTC (rev 660) +++ trunk/lib/tagClass.php 2007-11-21 18:59:54 UTC (rev 661) @@ -53,7 +53,7 @@ * @return (array) PASS: contains tag_name_id=>name array. * @return (exception) database error or no rows. */ - public function get_tag_list() { + public function get_tag_list($getAllData=FALSE) { $sql = "SELECT * FROM tag_name_table ORDER BY modifier, lower(name)"; $numrows = $this->db->exec($sql); $dberror = $this->db->errorMsg(); @@ -67,7 +67,12 @@ } else { //good to go! - $data = $this->db->farray_fieldnames("tag_name_id", NULL, 0); + if($getAllData) { + $data = $this->db->farray_fieldnames("tag_name_id", NULL, 0); + } + else { + $data = $this->db->farray_nvp('tag_name_id', 'name'); + } return($data); } }//end get_tag_list() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-12 23:03:58
|
Revision: 687 http://cs-project.svn.sourceforge.net/cs-project/?rev=687&view=rev Author: crazedsanity Date: 2007-12-12 15:03:52 -0800 (Wed, 12 Dec 2007) Log Message: ----------- New invoice classes, for creating invoices. Yay! Added Paths: ----------- trunk/lib/invoice.class.php trunk/lib/invoiceItem.class.php Copied: trunk/lib/invoice.class.php (from rev 686, trunk/lib/authToken.class.php) =================================================================== --- trunk/lib/invoice.class.php (rev 0) +++ trunk/lib/invoice.class.php 2007-12-12 23:03:52 UTC (rev 687) @@ -0,0 +1,37 @@ +<?php +/* + * + * SVN INFORMATION::: + * ------------------ + * SVN Signature::::::: $Id$ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + * + */ + +//TODO: log everything! + +class invoice extends dbAbstract { + + protected $gfObj; + protected $logsObj; + + //========================================================================= + public function __construct(cs_phpDB $db) { + $this->db = $db; + $this->gfObj = new cs_globalFunctions; + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; + $this->logsObj = new logsClass($this->db, 'Authentication Token'); + }//end __construct() + //========================================================================= + + + + //========================================================================= + public function add_item(invoiceItem $item) { + }//end add_item() + //========================================================================= +} +?> Copied: trunk/lib/invoiceItem.class.php (from rev 686, trunk/lib/authToken.class.php) =================================================================== --- trunk/lib/invoiceItem.class.php (rev 0) +++ trunk/lib/invoiceItem.class.php 2007-12-12 23:03:52 UTC (rev 687) @@ -0,0 +1,38 @@ +<?php +/* + * + * SVN INFORMATION::: + * ------------------ + * SVN Signature::::::: $Id$ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + * + * TODO: test methods to make sure they work! + */ + +//TODO: log everything! + +class invoiceItem extends dbAbstract { + + protected $gfObj; + protected $logsObj; + + //========================================================================= + public function __construct(cs_phpDB $db) { + $this->db = $db; + $this->gfObj = new cs_globalFunctions; + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; + $this->logsObj = new logsClass($this->db, 'Authentication Token'); + }//end __construct() + //========================================================================= + + + + //========================================================================= + public function create_item(array $data) { + }//end create_item() + //========================================================================= +} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-13 23:42:29
|
Revision: 690 http://cs-project.svn.sourceforge.net/cs-project/?rev=690&view=rev Author: crazedsanity Date: 2007-12-13 15:42:23 -0800 (Thu, 13 Dec 2007) Log Message: ----------- Fix logging name, add class for handling invoice transactions. Modified Paths: -------------- trunk/lib/invoice.class.php trunk/lib/invoiceItem.class.php Added Paths: ----------- trunk/lib/invoiceTransaction.class.php Modified: trunk/lib/invoice.class.php =================================================================== --- trunk/lib/invoice.class.php 2007-12-13 23:41:02 UTC (rev 689) +++ trunk/lib/invoice.class.php 2007-12-13 23:42:23 UTC (rev 690) @@ -23,7 +23,7 @@ $this->db = $db; $this->gfObj = new cs_globalFunctions; $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; - $this->logsObj = new logsClass($this->db, 'Authentication Token'); + $this->logsObj = new logsClass($this->db, 'Invoice'); }//end __construct() //========================================================================= Modified: trunk/lib/invoiceItem.class.php =================================================================== --- trunk/lib/invoiceItem.class.php 2007-12-13 23:41:02 UTC (rev 689) +++ trunk/lib/invoiceItem.class.php 2007-12-13 23:42:23 UTC (rev 690) @@ -24,7 +24,7 @@ $this->db = $db; $this->gfObj = new cs_globalFunctions; $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; - $this->logsObj = new logsClass($this->db, 'Authentication Token'); + $this->logsObj = new logsClass($this->db, 'Invoice Item'); }//end __construct() //========================================================================= Copied: trunk/lib/invoiceTransaction.class.php (from rev 687, trunk/lib/invoice.class.php) =================================================================== --- trunk/lib/invoiceTransaction.class.php (rev 0) +++ trunk/lib/invoiceTransaction.class.php 2007-12-13 23:42:23 UTC (rev 690) @@ -0,0 +1,30 @@ +<?php +/* + * + * SVN INFORMATION::: + * ------------------ + * SVN Signature::::::: $Id$ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + * + */ + +//TODO: log everything! + +class invoiceTransaction extends dbAbstract { + + protected $gfObj; + protected $logsObj; + + //========================================================================= + public function __construct(cs_phpDB $db) { + $this->db = $db; + $this->gfObj = new cs_globalFunctions; + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; + $this->logsObj = new logsClass($this->db, 'Invoice Transaction'); + }//end __construct() + //========================================================================= +} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-28 01:53:12
|
Revision: 731 http://cs-project.svn.sourceforge.net/cs-project/?rev=731&view=rev Author: crazedsanity Date: 2007-12-27 17:53:11 -0800 (Thu, 27 Dec 2007) Log Message: ----------- Lib changes for tag icons.... WEE! /lib/mainRecordClass.php: * get_records(): -- don't use tag_list() stored procedure anymore. -- create tag list using tagClass::get_tag_list_for_record(). /lib/tagClass.php: * MAIN::: -- new constant iconPath='/images/tags/' -- new constant iconExt='.gif' * get_tags_for_record(): -- ARG CHANGE: NEW ARG: #2 ($getIconName=FALSE) -- optionally retrieve icon_name from database. -- if $getIconName is set, pull a more complex array, including calling the new "create_icon_image_html()" method & placing the output into an index called "imgHtml". * get_tag_list_for_record() [NEW]: -- pull list of tags that can contain icons (possibly only the icons). * create_icon_image_html() [NEW]: -- create HTML for the image location of the icon. Modified Paths: -------------- trunk/lib/mainRecordClass.php trunk/lib/tagClass.php Modified: trunk/lib/mainRecordClass.php =================================================================== --- trunk/lib/mainRecordClass.php 2007-12-28 01:48:00 UTC (rev 730) +++ trunk/lib/mainRecordClass.php 2007-12-28 01:53:11 UTC (rev 731) @@ -186,8 +186,7 @@ //TODO: when retrieving the list of projects, "record_get_num_children()" is unaware of the group, and can't even guess what status it should filter on... leads to the "Project #<blah> disappeared" problem. $query = "SELECT r.*, record_get_num_children(record_id) as num_children, s.name as status_text, " . - "u.username as assigned, ce.email, c.fname, c.lname, c.company, " . - "tag_list(r.record_id) " . + "u.username as assigned, ce.email, c.fname, c.lname, c.company " . "FROM record_table AS r INNER JOIN status_table AS s ON (s.status_id=r.status_id) " . "INNER JOIN contact_table AS c ON (r.creator_contact_id=c.contact_id) " . "INNER JOIN contact_email_table AS ce ON (c.contact_email_id=ce.contact_email_id)" . @@ -212,12 +211,16 @@ $retval = $this->db->farray_fieldnames("public_id",NULL,0); //format the start_date + $tagObj = new tagClass($this->db); foreach($retval as $index=>$data) { $tmp = explode('.', $data['start_date']); if(preg_match('/00:00:00$/', $tmp[0])) { $tmp[0] = preg_replace('/ 00:00:00$/', '', $tmp[0]); } $retval[$index]['start_date'] = $tmp[0]; + + //retrieve a list of tags. + $retval[$index]['tag_list'] = $tagObj->get_tag_list_for_record($data['record_id'], TRUE, FALSE); } //set it into cache. Modified: trunk/lib/tagClass.php =================================================================== --- trunk/lib/tagClass.php 2007-12-28 01:48:00 UTC (rev 730) +++ trunk/lib/tagClass.php 2007-12-28 01:53:11 UTC (rev 731) @@ -26,6 +26,12 @@ /** Object for logging stuff */ private $logsObj; + /** Path to tag images... */ + const iconPath = '/images/tags/'; + + /** Extension for all tag images... */ + const iconExt = '.gif'; + //========================================================================= /** * Constructor. Requires connected phpDB{} object. @@ -143,12 +149,18 @@ * @return NULL FAIL: no records * @return (exception) FAIL: database error */ - public function get_tags_for_record($recordId) { + public function get_tags_for_record($recordId, $getIconName=FALSE) { // $sqlArr = array ( 'record_id' => cleanString($recordId, 'numeric') ); - $sql = "SELECT tag_name_id, name FROM tag_name_table INNER JOIN tag_table USING (tag_name_id) " . + + $selectThis = 'tag_name_id, name'; + if($getIconName) { + $selectThis .= ', icon_name'; + } + + $sql = "SELECT ". $selectThis ." FROM tag_name_table INNER JOIN tag_table USING (tag_name_id) " . "WHERE ". string_from_array($sqlArr, 'select') .' ORDER BY lower(name)'; $numrows = $this->db->exec($sql); @@ -168,7 +180,15 @@ } else { //retrieve the data for returning. - $retval = $this->db->farray_nvp('tag_name_id', 'name'); + if($getIconName) { + $retval = $this->db->farray_fieldnames('tag_name_id', NULL, 0); + foreach($retval as $index=>$value) { + $retval[$index]['imgHtml'] = $this->create_icon_image_html($value['icon_name'], $value['name']); + } + } + else { + $retval = $this->db->farray_nvp('tag_name_id', 'name'); + } } return($retval); @@ -492,6 +512,60 @@ return($retval); }//end update_tag_modifier() //========================================================================= + + + + //========================================================================= + public function get_tag_list_for_record($recordId, $addImageHTML=TRUE, $onlyShowIcons=FALSE) { + $data = $this->get_tags_for_record($recordId, TRUE); + + + + $retval = NULL; + if(is_array($data)) { + $gf = new cs_globalFunctions(); + + foreach($data as $index=>$value) { + if($addImageHTML) { + if($onlyShowIcons) { + if(strlen($value['icon_name'])) { + $current = $this->create_icon_image_html($value['icon_name'], $value['name']); + } + else { + $current = $value['name']; + } + } + else { + if(strlen($value['icon_name'])) { + $current = $value['name'] .' '. $this->create_icon_image_html($value['icon_name'], $value['name']); + } + else { + $current = $value['name']; + } + } + } + else { + $current = $value['icon_name']; + } + $retval = $gf->create_list($retval, $current, ','); + } + } + + return($retval); + }//end get_tag_list_for_record() + //========================================================================= + + + + //========================================================================= + public function create_icon_image_html($icon, $name=NULL) { + $retval = NULL; + if(strlen($icon)) { + $retval = '<img src="' . self::iconPath . $icon . self::iconExt . '" alt="'. $name .'" border="0">'; + } + return($retval); + }//end create_icon_image_html() + //========================================================================= } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-01-26 20:24:24
|
Revision: 735 http://cs-project.svn.sourceforge.net/cs-project/?rev=735&view=rev Author: crazedsanity Date: 2008-01-26 12:24:22 -0800 (Sat, 26 Jan 2008) Log Message: ----------- Change some PHP tags to NOT be the short ones (so users don't have to allow_short_open_tags, or whatever it's called). Modified Paths: -------------- trunk/lib/projectClass.php trunk/lib/sessionCacheClass.php trunk/lib/session_class.php trunk/lib/site_config.php Modified: trunk/lib/projectClass.php =================================================================== --- trunk/lib/projectClass.php 2008-01-07 23:20:45 UTC (rev 734) +++ trunk/lib/projectClass.php 2008-01-26 20:24:22 UTC (rev 735) @@ -1,12 +1,12 @@ -<? +<?php /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:projectClass.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/projectClass.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ class projectClass extends mainRecord { Modified: trunk/lib/sessionCacheClass.php =================================================================== --- trunk/lib/sessionCacheClass.php 2008-01-07 23:20:45 UTC (rev 734) +++ trunk/lib/sessionCacheClass.php 2008-01-26 20:24:22 UTC (rev 735) @@ -1,15 +1,15 @@ -<? +<?php /* * Written 2005-10-04 * * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:sessionCacheClass.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/sessionCacheClass.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ * * Basically, it's a way to store things in the session in a standard way, without having to * access $_SESSION directly. Data is, by default, stored on a per-page basis, and thus the Modified: trunk/lib/session_class.php =================================================================== --- trunk/lib/session_class.php 2008-01-07 23:20:45 UTC (rev 734) +++ trunk/lib/session_class.php 2008-01-26 20:24:22 UTC (rev 735) @@ -1,15 +1,15 @@ -<? +<?php ## ## 02-12-2002 /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:session_class.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/session_class.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ ## Modified: trunk/lib/site_config.php =================================================================== --- trunk/lib/site_config.php 2008-01-07 23:20:45 UTC (rev 734) +++ trunk/lib/site_config.php 2008-01-26 20:24:22 UTC (rev 735) @@ -1,13 +1,13 @@ -<? +<?php //contains local site information /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:site_config.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/site_config.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |