Thread: [Cs-project-svn_notify] SF.net SVN: cs-project: [660] releases/1.1
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-21 18:08:28
|
Revision: 660 http://cs-project.svn.sourceforge.net/cs-project/?rev=660&view=rev Author: crazedsanity Date: 2007-11-21 10:08:22 -0800 (Wed, 21 Nov 2007) Log Message: ----------- *** RELEASE 1.1.0-BETA14 *** SUMMARY OF CHANGES::: * better logging when remarking on helpdesk issues. * catch exceptions when sending emails (attempts to send ALL emails). * better exception logging * added "svn:eol-style" to files for M$ Windows users/developers. * emails contain SVN "Id". * new users are sent emails. * fix problems with creating new users + email addresses. * set priority based on associated tags (initial creation) (issue #77) * array_as_option_list() checks display & value (instead of just value) * add randomness to URL when redirecting after POSTing to defeat browser cache. * tags returned in a more complex manner now. * issue creation allows multiple tags to be linked immediately * "bug" is always automatically selected for issue creation. * fixed invalid image links. * use cs-content v0.10.5 SVN COMMAND::: merge -r620:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk Modified Paths: -------------- releases/1.1/VERSION releases/1.1/docs/sql/setup/03__indexes_etc.sql releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA3_part1.sql releases/1.1/includes/content/helpdesk.inc releases/1.1/includes/extern/helpdesk.inc releases/1.1/includes/login.inc releases/1.1/lib/adminUserClass.php releases/1.1/lib/contactClass.php releases/1.1/lib/cs-content/VERSION releases/1.1/lib/cs-content/contentSystemClass.php releases/1.1/lib/cs-content/cs_fileSystemClass.php releases/1.1/lib/cs-content/cs_genericPageClass.php releases/1.1/lib/cs-content/cs_globalFunctions.php releases/1.1/lib/cs-content/cs_phpDB.php releases/1.1/lib/cs-content/cs_sessionClass.php releases/1.1/lib/cs-content/cs_versionAbstract.class.php releases/1.1/lib/cs-content/sample_files/public_html/index.php releases/1.1/lib/cs-content/sample_files/templates/footer.shared.tmpl releases/1.1/lib/cs-content/sample_files/templates/header.shared.tmpl releases/1.1/lib/cs-content/sample_files/templates/infobar.shared.tmpl releases/1.1/lib/cs-content/sample_files/templates/main.shared.tmpl releases/1.1/lib/cs-content/sample_files/templates/menu.shared.tmpl releases/1.1/lib/cs-content/sample_files/templates/system/construction.content.tmpl releases/1.1/lib/cs-content/sample_files/templates/system/message_box.tmpl releases/1.1/lib/globalFunctions.php releases/1.1/lib/helpdeskClass.php releases/1.1/lib/recordContactLink.class.php releases/1.1/lib/site_config.php releases/1.1/lib/tagClass.php releases/1.1/public_html/images/index.html releases/1.1/templates/content/helpdesk/create.content.tmpl releases/1.1/templates/content/helpdesk/view.content.tmpl releases/1.1/templates/email/helpdesk-new.tmpl releases/1.1/templates/email/helpdesk-remark.tmpl releases/1.1/templates/email/lost_password.tmpl releases/1.1/templates/extern/helpdesk/create.content.tmpl releases/1.1/templates/system/message_box.tmpl releases/1.1/upgrade/upgrade.xml Added Paths: ----------- releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql releases/1.1/templates/email/new_user.tmpl releases/1.1/upgrade/upgradeTo1.1.0-BETA14.php Property Changed: ---------------- releases/1.1/LICENSE releases/1.1/VERSION releases/1.1/docs/sql/setup/01__storedprocs.sql releases/1.1/docs/sql/setup/02__tables.sql releases/1.1/docs/sql/setup/03__indexes_etc.sql releases/1.1/includes/content/contacts.inc releases/1.1/includes/content/helpdesk.inc releases/1.1/includes/content/notes.inc releases/1.1/includes/content/project.inc releases/1.1/includes/content/settings.inc releases/1.1/includes/content/summary.inc releases/1.1/includes/content/tags.inc releases/1.1/includes/content/todo.inc releases/1.1/includes/content.inc releases/1.1/includes/extern.inc releases/1.1/includes/help/lost_password.inc releases/1.1/includes/help.inc releases/1.1/includes/login.inc releases/1.1/includes/setup/1.inc releases/1.1/includes/setup/2.inc releases/1.1/includes/setup/3.inc releases/1.1/includes/setup/4.inc releases/1.1/includes/setup/5.inc releases/1.1/includes/setup.inc releases/1.1/lib/_unitTests_/cs-arrayToPath_tests.php releases/1.1/lib/_unitTests_/cs-content_tests.php releases/1.1/lib/_unitTests_/cs-phpxml_tests.php releases/1.1/lib/_unitTests_/data/test.xml releases/1.1/lib/adminUserClass.php releases/1.1/lib/attributeClass.php releases/1.1/lib/globalFunctions.php releases/1.1/lib/logsClass.php releases/1.1/lib/mainRecordClass.php releases/1.1/lib/noteClass.php releases/1.1/lib/prefClass.php releases/1.1/lib/projectClass.php releases/1.1/lib/recordContactLink.class.php releases/1.1/lib/sessionCacheClass.php releases/1.1/lib/session_class.php releases/1.1/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE releases/1.1/lib/simpletest/LICENSE releases/1.1/lib/simpletest/README releases/1.1/lib/simpletest/VERSION releases/1.1/lib/simpletest/authentication.php releases/1.1/lib/simpletest/autorun.php releases/1.1/lib/simpletest/browser.php releases/1.1/lib/simpletest/collector.php releases/1.1/lib/simpletest/compatibility.php releases/1.1/lib/simpletest/cookies.php releases/1.1/lib/simpletest/default_reporter.php releases/1.1/lib/simpletest/detached.php releases/1.1/lib/simpletest/docs/en/authentication_documentation.html releases/1.1/lib/simpletest/docs/en/browser_documentation.html releases/1.1/lib/simpletest/docs/en/docs.css releases/1.1/lib/simpletest/docs/en/expectation_documentation.html releases/1.1/lib/simpletest/docs/en/form_testing_documentation.html releases/1.1/lib/simpletest/docs/en/group_test_documentation.html releases/1.1/lib/simpletest/docs/en/index.html releases/1.1/lib/simpletest/docs/en/mock_objects_documentation.html releases/1.1/lib/simpletest/docs/en/overview.html releases/1.1/lib/simpletest/docs/en/partial_mocks_documentation.html releases/1.1/lib/simpletest/docs/en/reporter_documentation.html releases/1.1/lib/simpletest/docs/en/unit_test_documentation.html releases/1.1/lib/simpletest/docs/en/web_tester_documentation.html releases/1.1/lib/simpletest/docs/fr/authentication_documentation.html releases/1.1/lib/simpletest/docs/fr/browser_documentation.html releases/1.1/lib/simpletest/docs/fr/docs.css releases/1.1/lib/simpletest/docs/fr/expectation_documentation.html releases/1.1/lib/simpletest/docs/fr/form_testing_documentation.html releases/1.1/lib/simpletest/docs/fr/group_test_documentation.html releases/1.1/lib/simpletest/docs/fr/index.html releases/1.1/lib/simpletest/docs/fr/mock_objects_documentation.html releases/1.1/lib/simpletest/docs/fr/overview.html releases/1.1/lib/simpletest/docs/fr/partial_mocks_documentation.html releases/1.1/lib/simpletest/docs/fr/reporter_documentation.html releases/1.1/lib/simpletest/docs/fr/server_stubs_documentation.html releases/1.1/lib/simpletest/docs/fr/unit_test_documentation.html releases/1.1/lib/simpletest/docs/fr/web_tester_documentation.html releases/1.1/lib/simpletest/dumper.php releases/1.1/lib/simpletest/eclipse.php releases/1.1/lib/simpletest/encoding.php releases/1.1/lib/simpletest/errors.php releases/1.1/lib/simpletest/exceptions.php releases/1.1/lib/simpletest/expectation.php releases/1.1/lib/simpletest/extensions/pear_test_case.php releases/1.1/lib/simpletest/extensions/phpunit_test_case.php releases/1.1/lib/simpletest/extensions/testdox/test.php releases/1.1/lib/simpletest/extensions/testdox.php releases/1.1/lib/simpletest/form.php releases/1.1/lib/simpletest/frames.php releases/1.1/lib/simpletest/http.php releases/1.1/lib/simpletest/invoker.php releases/1.1/lib/simpletest/mock_objects.php releases/1.1/lib/simpletest/page.php releases/1.1/lib/simpletest/parser.php releases/1.1/lib/simpletest/reflection_php4.php releases/1.1/lib/simpletest/reflection_php5.php releases/1.1/lib/simpletest/remote.php releases/1.1/lib/simpletest/reporter.php releases/1.1/lib/simpletest/scorer.php releases/1.1/lib/simpletest/selector.php releases/1.1/lib/simpletest/shell_tester.php releases/1.1/lib/simpletest/simpletest.php releases/1.1/lib/simpletest/socket.php releases/1.1/lib/simpletest/tag.php releases/1.1/lib/simpletest/test_case.php releases/1.1/lib/simpletest/unit_tester.php releases/1.1/lib/simpletest/url.php releases/1.1/lib/simpletest/user_agent.php releases/1.1/lib/simpletest/web_tester.php releases/1.1/lib/simpletest/xml.php releases/1.1/lib/site_config.php releases/1.1/lib/tagClass.php releases/1.1/lib/todoClass.php releases/1.1/lib/upgradeClass.php releases/1.1/lib/userClass.php releases/1.1/public_html/.htaccess releases/1.1/public_html/content releases/1.1/public_html/css/common.css releases/1.1/public_html/extern releases/1.1/public_html/help releases/1.1/public_html/images/index.html releases/1.1/public_html/index.php releases/1.1/public_html/js/builder.js releases/1.1/public_html/js/controls.js releases/1.1/public_html/js/cs-project.js releases/1.1/public_html/js/dragdrop.js releases/1.1/public_html/js/effects.js releases/1.1/public_html/js/prototype.js releases/1.1/public_html/js/scriptaculous.js releases/1.1/public_html/js/slider.js releases/1.1/public_html/js/unittest.js releases/1.1/public_html/login.php releases/1.1/public_html/setup releases/1.1/templates/content/contacts/index.content.tmpl releases/1.1/templates/content/contacts/view.content.tmpl releases/1.1/templates/content/helpdesk/create.content.tmpl releases/1.1/templates/content/helpdesk/index.content.tmpl releases/1.1/templates/content/helpdesk/view.content.tmpl releases/1.1/templates/content/index.content.tmpl releases/1.1/templates/content/notes/index.shared.tmpl releases/1.1/templates/content/project/create.content.tmpl releases/1.1/templates/content/project/index.content.tmpl releases/1.1/templates/content/project/view/index.content.tmpl releases/1.1/templates/content/project/view/related_issue.content.tmpl releases/1.1/templates/content/project/view/related_note.content.tmpl releases/1.1/templates/content/project/view/related_todo.content.tmpl releases/1.1/templates/content/settings/index.content.tmpl releases/1.1/templates/content/summary/index.content.tmpl releases/1.1/templates/content/tags/shared.content.tmpl releases/1.1/templates/content/todo/create.content.tmpl releases/1.1/templates/content/todo/view.content.tmpl releases/1.1/templates/email/helpdesk-new.tmpl releases/1.1/templates/email/helpdesk-remark.tmpl releases/1.1/templates/email/lost_password.tmpl releases/1.1/templates/extern/helpdesk/create.content.tmpl releases/1.1/templates/extern/helpdesk/index.content.tmpl releases/1.1/templates/extern/helpdesk/view.content.tmpl releases/1.1/templates/footer.shared.tmpl releases/1.1/templates/header.shared.tmpl releases/1.1/templates/index.content.tmpl releases/1.1/templates/infobar.shared.tmpl releases/1.1/templates/login.tmpl releases/1.1/templates/main.shared.tmpl releases/1.1/templates/setup/1.content.tmpl releases/1.1/templates/setup/2.content.tmpl releases/1.1/templates/setup/3.content.tmpl releases/1.1/templates/setup/4.content.tmpl releases/1.1/templates/setup/5.content.tmpl releases/1.1/templates/setup/html_title.shared.tmpl releases/1.1/templates/setup/index.content.tmpl releases/1.1/templates/setup/stepData.shared.tmpl releases/1.1/templates/system/404.shared.tmpl releases/1.1/templates/system/message_box.tmpl releases/1.1/templates/tabs.shared.tmpl releases/1.1/upgrade/upgrade.xml releases/1.1/upgrade/upgradeTo1.1.0-BETA10.php releases/1.1/upgrade/upgradeTo1.1.0-BETA12.php releases/1.1/upgrade/upgradeTo1.1.0-BETA13.php releases/1.1/upgrade/upgradeTo1.1.0-BETA2.php releases/1.1/upgrade/upgradeTo1.1.0-BETA3.php releases/1.1/upgrade/upgradeTo1.1.0-BETA4.php releases/1.1/upgrade/upgradeTo1.1.0-BETA7.php Property changes on: releases/1.1/LICENSE ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/VERSION 2007-11-21 18:08:22 UTC (rev 660) @@ -1,4 +1,4 @@ -$Id$ +$Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0-BETA13 -$HeadURL$ +VERSION: 1.1.0-BETA14 +$HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Property changes on: releases/1.1/VERSION ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/docs/sql/setup/01__storedprocs.sql ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/docs/sql/setup/02__tables.sql ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/docs/sql/setup/03__indexes_etc.sql =================================================================== --- releases/1.1/docs/sql/setup/03__indexes_etc.sql 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/docs/sql/setup/03__indexes_etc.sql 2007-11-21 18:08:22 UTC (rev 660) @@ -1,8 +1,8 @@ -- -- SVN INFORMATION::: -- SVN Signature: $Id:::: 03__indexes_etc.sql 253 2007-09-29 19:48:37Z crazedsanity $ --- Last Committted Date:: $Date$ --- Last Committed Path::: $HeadURL$ +-- Last Committted Date:: $Date:2007-11-20 11:02:38 -0600 (Tue, 20 Nov 2007) $ +-- Last Committed Path::: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/docs/sql/setup/03__indexes_etc.sql $ -- -- Property changes on: releases/1.1/docs/sql/setup/03__indexes_etc.sql ___________________________________________________________________ Name: svn:eol-style + native Copied: releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql (from rev 659, trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql) =================================================================== --- releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql (rev 0) +++ releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql 2007-11-21 18:08:22 UTC (rev 660) @@ -0,0 +1,13 @@ +-- +-- SVN INFORMATION::: +-- +-- SVN Signature::::::: $Id$ +-- Last Committted::::: $Date$ +-- Last Committed Path: $HeadURL$ +-- + + +ALTER TABLE tag_name_table ADD COLUMN modifier int; +UPDATE tag_name_table SET modifier = -1; +ALTER TABLE tag_name_table ALTER COLUMN modifier SET DEFAULT -1; +ALTER TABLE tag_name_table ALTER COLUMN modifier SET NOT NULL; Property changes on: releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA14.sql ___________________________________________________________________ Name: svn:keywords + Id HeadURL Date Revision Author Name: svn:eol-style + native Modified: releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA3_part1.sql =================================================================== --- releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA3_part1.sql 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/docs/sql/upgrades/upgradeTo1.1.0-BETA3_part1.sql 2007-11-21 18:08:22 UTC (rev 660) @@ -1,8 +1,8 @@ -- -- SVN INFORMATION::: --- SVN Signature::::::: $Id$ --- Last Committted::::: $Date$ --- Last Committed Path: $HeadURL$ +-- SVN Signature::::::: $Id:upgradeTo1.1.0-BETA3_part1.sql 443 2007-10-24 16:56:31Z crazedsanity $ +-- Last Committted::::: $Date:2007-10-24 11:56:31 -0500 (Wed, 24 Oct 2007) $ +-- Last Committed Path: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/docs/sql/upgrades/upgradeTo1.1.0-BETA3_part1.sql $ -- ALTER TABLE contact_table Property changes on: releases/1.1/includes/content/contacts.inc ___________________________________________________________________ Name: svn:eol-style - + native Modified: releases/1.1/includes/content/helpdesk.inc =================================================================== --- releases/1.1/includes/content/helpdesk.inc 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/includes/content/helpdesk.inc 2007-11-21 18:08:22 UTC (rev 660) @@ -2,10 +2,10 @@ /* * SVN INFORMATION::: * ------------------ - * Last Author: $Author$ - * Current Revision: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated: $Date$ + * Last Author: $Author:crazedsanity $ + * Current Revision: $Revision:637 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/includes/content/helpdesk.inc $ + * Last Updated: $Date:2007-11-20 11:04:33 -0600 (Tue, 20 Nov 2007) $ */ if($_POST) { $action = strtolower($_POST['action']); @@ -123,7 +123,7 @@ else { exit("invalid action: [$action]"); } - } elseif($_POST['submit'] == "go" && count($_POST['data']) > 1) { + } elseif(isset($_POST['submit']) && count($_POST['data']) > 1) { //CREATING NEW RECORD!!! $dataArr = $_POST['data']; $result = $proj->helpdeskObj->create_record($dataArr); @@ -180,7 +180,7 @@ if(!$byPassUrlExtras && count($urlExtrasArr) > 0) { $urlExtrasStr = string_from_array($urlExtrasArr, "url"); if($urlExtrasStr !== 0) { - $url .= "?". $urlExtrasStr; + $url .= "?". $urlExtrasStr .'&random='. time(); } } conditional_header($url); @@ -205,7 +205,7 @@ $page->set_all_block_rows("content"); //show the "category" selection. - $categoryList = $proj->helpdeskObj->get_category_list(); + $categoryList = $proj->helpdeskObj->get_category_list('bug'); $page->add_template_var("select_tags", $categoryList); // Property changes on: releases/1.1/includes/content/helpdesk.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/notes.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/project.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/settings.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/summary.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/tags.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content/todo.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/content.inc ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/includes/extern/helpdesk.inc =================================================================== --- releases/1.1/includes/extern/helpdesk.inc 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/includes/extern/helpdesk.inc 2007-11-21 18:08:22 UTC (rev 660) @@ -1,296 +1,296 @@ -<?php -/* - * - * SVN INFORMATION::: - * ------------------ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ - - */ - -$page->set_all_block_rows("header"); - -$myContactId = $page->session->get_cookie('CS_CONTACT_ID'); - -if($_POST) { - $postAction = strtolower($_POST['action']); - if($postAction == "remark") { - $helpdeskId = $_POST['ID']; - - if(is_numeric($helpdeskId)) { - //now check to make sure they can actually remark on it... - $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); - - if(is_array($helpdeskData)) { - //okay, so they can still remark. - - //get information about the user based on the email address... - if(strlen($_POST['email'])) { - $contactObj = new contactClass($proj->db); - $myContactId = $contactObj->get_contact_id_from_email($_POST['email'], TRUE); - $page->session->create_cookie('CS_CONTACT_ID', $myContactId); - - //Add "contact_id" to the session, so the note gets created properly. - $_SESSION['contact_id'] = $myContactId; - } - - $result = $proj->helpdeskObj->remark($helpdeskId, $_POST['remark']); - - //now tell 'em what happened. - if($result >= 1) { - set_message_wrapper(array( - "title" => "Remark Accepted", - "message" => "Your remark has been added to the database. Thank you for your feedback.", - "type" => "status" - )); - } - else { - set_message_wrapper(array( - "title" => "Remark Failed", - "message" => "Seems like the issue may have been updated in the interim: check your email for a new link to be used for remarking.", - "type" => "error" - )); - } - } - else { - //not an array. Something screwed up in the session? - set_message_wrapper(array( - "title" => "Unable to retrieve issue data", - "message" => "Something went horribly wrong. Tell somebody, would ya?", - "type" => "error" - )); - } - conditional_header("/extern/helpdesk/view?ID=$helpdeskId"); - exit; - } - else { - //hmmm... invalid ID. - set_message_wrapper(array( - "title" => "Data Error", - "message" => "Unable to retrieve the helpdesk issue's ID.<BR>\n" . - "Remarking failed.", - "type" => "error" - )); - conditional_header("/extern/helpdesk/"); - exit; - } - } - elseif($_POST && strtolower($_POST['submit']) == "go" && !isset($_POST['action'])) { - //they're CREATING an issue. - $result = $proj->helpdeskObj->create_record($_POST['data']); - - //first, determine what happened from the result... - if($result > 0) { - //everything worked. - set_message_wrapper(array( - "title" => "Issue Successfully Created", - "message" => "Your issue has been added to the helpdesk. You should receive an email shortly with confirmation.", - "type" => "notice" - )); - } - else { - //something failed. - set_message_wrapper(array( - "title" => "Unable to Create Issue", - "message" => "Something broke. Sorry.", - "type" => "notice" - )); - } - - //send 'em packing. - conditional_header("/extern/helpdesk/view?ID=$result"); - exit; - } - elseif($_POST['action'] == "filter") { - if($_POST['reset_filter']) { - $page->ui->unset_cache("filter"); - } - else { - //store the filter. - $page->ui->set_cache("filter", $_POST['filter']); - } - - //now redirect to the main page: it'll have to pull that filter data & use it. - conditional_header($_GLOBALS['PHP_SELF'] ."?step=kb&from=filter"); - exit; - } -} -else { - $action = $page->ftsSections[2]; - $helpdeskId = $_GET['ID']; - $page->add_template_var("id", $helpdeskId); - if(isset($_GET['sort'])) { - store_and_return_sorting($page, $_GET['sort'], $_GET['sortType']); - conditional_header($GLOBALS['PHP_SELF'] ."?from=re-sort&sortFieldWas=". $_GET['sort']); - exit; - } - elseif($action == 'view' && $_GET['dropCookie']) { - $page->session->drop_cookie('CS_CONTACT_ID'); - $goHere = $_SERVER['PHP_SELF'] .'?ID='. $_GET['ID'] .'&random='. time(); - $page->conditional_header($goHere, TRUE); - } - elseif(($action == "view" || $action == "respond") && is_numeric($helpdeskId)) { - $htmlTitle = "View Issue #$helpdeskId"; - $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); - - $bbCodeParser = new bbCodeParser($proj, $proj->helpdeskObj); - - //show it's "access" properly.. - $page->add_template_var("select_acc_". $helpdeskData['acc'], "selected"); - - //convert the returned data into htmlentities so brackets show properly. - $helpdeskData['name'] = cleanString($helpdeskData['name'], "htmlspecial"); - $myNotes = $helpdeskData['notes']; - unset($helpdeskData['notes']); - - //make the wrapping SANE. - $helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); - $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'],FALSE); - - //add everything to the page as a template var... - foreach($helpdeskData as $field=>$value) { - $page->add_template_var($field, $value); - } - - //remove all block rows unless they're supposed to be kept... - $doNotRipRows = array(); - if(is_numeric($page->session->get_cookie('CS_CONTACT_ID'))) { - $doNotRipRows[] = 'remark_showEmail'; - $contactObj = new contactClass($page->db); - $contactObj->set_contact_id($page->session->get_cookie('CS_CONTACT_ID')); - $data = $contactObj->get_contact(); - $page->add_template_var('displayEmail', $data['email']); - } - else { - $doNotRipRows[] = 'remark_editEmail'; - } - - if(in_array($helpdeskData['status_id'], $GLOBALS['STATUS_NOTENDED'])) { - $doNotRipRows[] = 'remark_row'; - } - $page->set_all_block_rows("content", $doNotRipRows); - - //now parse the note rows. - if(is_array($myNotes) && count($myNotes)) { - $baseRow = $page->templateRows['issueNotes']; - foreach($myNotes as $repArr) { - $repArr['body'] = cleanString($repArr['body'], "htmlentity_plus_brackets"); - $repArr['body'] = $bbCodeParser->parseString($repArr['body'], FALSE); - $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); - - $repArr['solutionIndicator'] = ""; - if($repArr['is_solution'] == 't') { - $repArr['solutionIndicator'] = "<img src='/images/checkmark_green.jpg' height='14px'>"; - } - $issueNotesRow .= mini_parser($baseRow, $repArr, '%%', '%%'); - } - $page->add_template_var('issueNotes', $issueNotesRow); - } - - } - elseif($action == "create") { - //set the html title. - $page->add_template_var("html_title", "Create a Helpdesk Issue"); - $page->add_template_var("email", $_SESSION['email']); - $page->set_all_block_rows("content", array("create_form")); - +<?php +/* + * + * SVN INFORMATION::: + * ------------------ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + + */ + +$page->set_all_block_rows("header"); + +$myContactId = $page->session->get_cookie('CS_CONTACT_ID'); + +if($_POST) { + $postAction = strtolower($_POST['action']); + if($postAction == "remark") { + $helpdeskId = $_POST['ID']; + + if(is_numeric($helpdeskId)) { + //now check to make sure they can actually remark on it... + $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); + + if(is_array($helpdeskData)) { + //okay, so they can still remark. + + //get information about the user based on the email address... + if(strlen($_POST['email'])) { + $contactObj = new contactClass($proj->db); + $myContactId = $contactObj->get_contact_id_from_email($_POST['email'], TRUE); + $page->session->create_cookie('CS_CONTACT_ID', $myContactId); + + //Add "contact_id" to the session, so the note gets created properly. + $_SESSION['contact_id'] = $myContactId; + } + + $result = $proj->helpdeskObj->remark($helpdeskId, $_POST['remark']); + + //now tell 'em what happened. + if($result >= 1) { + set_message_wrapper(array( + "title" => "Remark Accepted", + "message" => "Your remark has been added to the database. Thank you for your feedback.", + "type" => "status" + )); + } + else { + set_message_wrapper(array( + "title" => "Remark Failed", + "message" => "Seems like the issue may have been updated in the interim: check your email for a new link to be used for remarking.", + "type" => "error" + )); + } + } + else { + //not an array. Something screwed up in the session? + set_message_wrapper(array( + "title" => "Unable to retrieve issue data", + "message" => "Something went horribly wrong. Tell somebody, would ya?", + "type" => "error" + )); + } + conditional_header("/extern/helpdesk/view?ID=$helpdeskId"); + exit; + } + else { + //hmmm... invalid ID. + set_message_wrapper(array( + "title" => "Data Error", + "message" => "Unable to retrieve the helpdesk issue's ID.<BR>\n" . + "Remarking failed.", + "type" => "error" + )); + conditional_header("/extern/helpdesk/"); + exit; + } + } + elseif($_POST && strtolower($_POST['submit']) == "go" && !isset($_POST['action'])) { + //they're CREATING an issue. + $result = $proj->helpdeskObj->create_record($_POST['data']); + + //first, determine what happened from the result... + if($result > 0) { + //everything worked. + set_message_wrapper(array( + "title" => "Issue Successfully Created", + "message" => "Your issue has been added to the helpdesk. You should receive an email shortly with confirmation.", + "type" => "notice" + )); + } + else { + //something failed. + set_message_wrapper(array( + "title" => "Unable to Create Issue", + "message" => "Something broke. Sorry.", + "type" => "notice" + )); + } + + //send 'em packing. + conditional_header("/extern/helpdesk/view?ID=$result"); + exit; + } + elseif($_POST['action'] == "filter") { + if($_POST['reset_filter']) { + $page->ui->unset_cache("filter"); + } + else { + //store the filter. + $page->ui->set_cache("filter", $_POST['filter']); + } + + //now redirect to the main page: it'll have to pull that filter data & use it. + conditional_header($_GLOBALS['PHP_SELF'] ."?step=kb&from=filter"); + exit; + } +} +else { + $action = $page->ftsSections[2]; + $helpdeskId = $_GET['ID']; + $page->add_template_var("id", $helpdeskId); + if(isset($_GET['sort'])) { + store_and_return_sorting($page, $_GET['sort'], $_GET['sortType']); + conditional_header($GLOBALS['PHP_SELF'] ."?from=re-sort&sortFieldWas=". $_GET['sort']); + exit; + } + elseif($action == 'view' && $_GET['dropCookie']) { + $page->session->drop_cookie('CS_CONTACT_ID'); + $goHere = $_SERVER['PHP_SELF'] .'?ID='. $_GET['ID'] .'&random='. time(); + $page->conditional_header($goHere, TRUE); + } + elseif(($action == "view" || $action == "respond") && is_numeric($helpdeskId)) { + $htmlTitle = "View Issue #$helpdeskId"; + $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); + + $bbCodeParser = new bbCodeParser($proj, $proj->helpdeskObj); + + //show it's "access" properly.. + $page->add_template_var("select_acc_". $helpdeskData['acc'], "selected"); + + //convert the returned data into htmlentities so brackets show properly. + $helpdeskData['name'] = cleanString($helpdeskData['name'], "htmlspecial"); + $myNotes = $helpdeskData['notes']; + unset($helpdeskData['notes']); + + //make the wrapping SANE. + $helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); + $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'],FALSE); + + //add everything to the page as a template var... + foreach($helpdeskData as $field=>$value) { + $page->add_template_var($field, $value); + } + + //remove all block rows unless they're supposed to be kept... + $doNotRipRows = array(); + if(is_numeric($page->session->get_cookie('CS_CONTACT_ID'))) { + $doNotRipRows[] = 'remark_showEmail'; + $contactObj = new contactClass($page->db); + $contactObj->set_contact_id($page->session->get_cookie('CS_CONTACT_ID')); + $data = $contactObj->get_contact(); + $page->add_template_var('displayEmail', $data['email']); + } + else { + $doNotRipRows[] = 'remark_editEmail'; + } + + if(in_array($helpdeskData['status_id'], $GLOBALS['STATUS_NOTENDED'])) { + $doNotRipRows[] = 'remark_row'; + } + $page->set_all_block_rows("content", $doNotRipRows); + + //now parse the note rows. + if(is_array($myNotes) && count($myNotes)) { + $baseRow = $page->templateRows['issueNotes']; + foreach($myNotes as $repArr) { + $repArr['body'] = cleanString($repArr['body'], "htmlentity_plus_brackets"); + $repArr['body'] = $bbCodeParser->parseString($repArr['body'], FALSE); + $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); + + $repArr['solutionIndicator'] = ""; + if($repArr['is_solution'] == 't') { + $repArr['solutionIndicator'] = "<img src='/images/checkmark_green.jpg' height='14px'>"; + } + $issueNotesRow .= mini_parser($baseRow, $repArr, '%%', '%%'); + } + $page->add_template_var('issueNotes', $issueNotesRow); + } + + } + elseif($action == "create") { + //set the html title. + $page->add_template_var("html_title", "Create a Helpdesk Issue"); + $page->add_template_var("email", $_SESSION['email']); + $page->set_all_block_rows("content", array("create_form")); + //show the "category" properly. - $categoryList = $proj->helpdeskObj->get_category_list($helpdeskData['helpdesk_cat_id']); + $categoryList = $proj->helpdeskObj->get_category_list($helpdeskData['helpdesk_cat_id']); $page->add_template_var("select_category_list", $categoryList); - $page->add_template_var("select_tags", $categoryList); + $page->add_template_var("select_tags", $categoryList); $page->add_template_var("id", $helpdeskId); - } - else { - - //================================================================================================================ - $titleSub = "Show All"; - //change the content of the page properly. - #$page->change_content(html_file_to_string("modules/helpdesk/helpdesk_main.tmpl")); - $page->set_all_block_rows("content", array("helpdesk_search")); - - $filterData = $page->ui->get_cache("filter"); - $currentSortArr = store_and_return_sorting($page,NULL,NULL); - if(is_array($filterData)) { - $page->add_template_var("filter_keyword", $filterData['keyword']); - $page->add_template_var("filter_field_". $filterData['field'] ."_selected", "selected"); - } - else { - //no filter array... set one. - $filterData = array(); - $page->ui->set_cache("filter", $filterData); - } - $page->add_template_var("filter_status_id_". $filterData['status_id'] ."_selected", "selected"); - unset($filterData['status']); - - //the data will already show only items with the given status, so don't add that to the filter again. - $primaryFilterArr = array("status_id" => $filterData['status_id']); - if($filterData['status_id'] == 'all') { - //literally show ALL records. - $primaryFilterArr = NULL; - } - elseif(!is_numeric($filterData['status_id'])) { - //only show the "not ended" ones. - $primaryFilterArr = array('status_id' => array(0,1,2,6)); - } - $filter = $filterData; - unset($filter['status']); - - //pull the recordset. - $helpdeskArr = $proj->helpdeskObj->get_records($primaryFilterArr, $currentSortArr, $filter); - $page->add_template_var("numRows", count($helpdeskArr)); - - //if there's an array, show it... - if(is_array($helpdeskArr) && count($helpdeskArr) > 0) { - //got good data. - $baseRow = $page->templateRows['helpdesk_row']; - foreach($helpdeskArr as $helpdeskId=>$subData) { - unset($deleteLink); - if($subData['von'] == $_SESSION['uid']) { - $deleteLink = mini_parser($baseDeleteLink, $subData, "%%", "%%"); - } - - - swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); - swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); - - $subData['bgColor'] = $bgColor; - $subData['bgColor2']= $bgColor2; - - //define the text fields, so they can be cleaned & truncated. - $previewLength = 160; - $textFieldArr = array("name", "subject", "solution", "remark"); - foreach($textFieldArr as $cleanThisField) { - //truncate them... - $subData[$cleanThisField] = truncate_string($subData[$cleanThisField], $previewLength, "... [more]", TRUE); - - //now clean 'em (clean after to avoid truncating html special characters. - $subData[$cleanThisField] = cleanString($subData[$cleanThisField], "htmlentity"); - - //more special parsing to ensure GenericPage{} doesn't make the $ (and random characters after it) disappear. - $subData[$cleanThisField] = str_replace('$', '\$', $subData[$cleanThisField]); - } - - //force the "text" preview to wrap. - $subData['subject'] = wordwrap($subData['subject'], (($previewLength * 2)/3), "\n", 1); - - //truncate the email address... - $subData['email'] = truncate_string($subData['email'], 20, "...", TRUE); - - $subData['helpdesk_id'] = $helpdeskId; - unset($subData['id']); - - //show the "created" and "updated" strings properly... - $subData['created'] = parse_date_string($subData['div1'],TRUE); - $subData['updated'] = parse_date_string($subData['div2'],TRUE); - $finalRow .= mini_parser($baseRow, $subData, "%%", "%%"); - } - $page->add_template_var("helpdesk_row", $finalRow); - } - } -} - -#$page->print_page(); - -?> \ No newline at end of file + } + else { + + //================================================================================================================ + $titleSub = "Show All"; + //change the content of the page properly. + #$page->change_content(html_file_to_string("modules/helpdesk/helpdesk_main.tmpl")); + $page->set_all_block_rows("content", array("helpdesk_search")); + + $filterData = $page->ui->get_cache("filter"); + $currentSortArr = store_and_return_sorting($page,NULL,NULL); + if(is_array($filterData)) { + $page->add_template_var("filter_keyword", $filterData['keyword']); + $page->add_template_var("filter_field_". $filterData['field'] ."_selected", "selected"); + } + else { + //no filter array... set one. + $filterData = array(); + $page->ui->set_cache("filter", $filterData); + } + $page->add_template_var("filter_status_id_". $filterData['status_id'] ."_selected", "selected"); + unset($filterData['status']); + + //the data will already show only items with the given status, so don't add that to the filter again. + $primaryFilterArr = array("status_id" => $filterData['status_id']); + if($filterData['status_id'] == 'all') { + //literally show ALL records. + $primaryFilterArr = NULL; + } + elseif(!is_numeric($filterData['status_id'])) { + //only show the "not ended" ones. + $primaryFilterArr = array('status_id' => array(0,1,2,6)); + } + $filter = $filterData; + unset($filter['status']); + + //pull the recordset. + $helpdeskArr = $proj->helpdeskObj->get_records($primaryFilterArr, $currentSortArr, $filter); + $page->add_template_var("numRows", count($helpdeskArr)); + + //if there's an array, show it... + if(is_array($helpdeskArr) && count($helpdeskArr) > 0) { + //got good data. + $baseRow = $page->templateRows['helpdesk_row']; + foreach($helpdeskArr as $helpdeskId=>$subData) { + unset($deleteLink); + if($subData['von'] == $_SESSION['uid']) { + $deleteLink = mini_parser($baseDeleteLink, $subData, "%%", "%%"); + } + + + swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); + swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); + + $subData['bgColor'] = $bgColor; + $subData['bgColor2']= $bgColor2; + + //define the text fields, so they can be cleaned & truncated. + $previewLength = 160; + $textFieldArr = array("name", "subject", "solution", "remark"); + foreach($textFieldArr as $cleanThisField) { + //truncate them... + $subData[$cleanThisField] = truncate_string($subData[$cleanThisField], $previewLength, "... [more]", TRUE); + + //now clean 'em (clean after to avoid truncating html special characters. + $subData[$cleanThisField] = cleanString($subData[$cleanThisField], "htmlentity"); + + //more special parsing to ensure GenericPage{} doesn't make the $ (and random characters after it) disappear. + $subData[$cleanThisField] = str_replace('$', '\$', $subData[$cleanThisField]); + } + + //force the "text" preview to wrap. + $subData['subject'] = wordwrap($subData['subject'], (($previewLength * 2)/3), "\n", 1); + + //truncate the email address... + $subData['email'] = truncate_string($subData['email'], 20, "...", TRUE); + + $subData['helpdesk_id'] = $helpdeskId; + unset($subData['id']); + + //show the "created" and "updated" strings properly... + $subData['created'] = parse_date_string($subData['div1'],TRUE); + $subData['updated'] = parse_date_string($subData['div2'],TRUE); + $finalRow .= mini_parser($baseRow, $subData, "%%", "%%"); + } + $page->add_template_var("helpdesk_row", $finalRow); + } + } +} + +#$page->print_page(); + +?> Property changes on: releases/1.1/includes/extern.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/help/lost_password.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/help.inc ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/includes/login.inc =================================================================== --- releases/1.1/includes/login.inc 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/includes/login.inc 2007-11-21 18:08:22 UTC (rev 660) @@ -1,63 +1,63 @@ -<?php -/* - * SVN INFORMATION::: - * ------------------ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ - */ - - -$page->clear_content("header"); - -$db = new cs_phpDB; -$db->connect(get_config_db_params()); -$page->db = &$db; - -if(isset($_GET['loginDestination']) && strlen($_GET['loginDestination'])) { - $_SESSION['loginDestination'] = $_GET['loginDestination']; -} - -if(!$_GET['logout'] && !$_POST && $page->session->sid_check == 1) { - //they came here & need to be redirected. - conditional_header("/content?from=login&reason=alreadyLoggedIn"); - exit; -} -elseif($_GET['logout']) { - //call the logout function. - $res = $page->session->logout(); - conditional_header("/login.php?redirFrom=logout"); - exit; -} -elseif($_POST['username'] && $_POST['password']) { - - - $loginRes = $page->session->login($_POST['username'],$_POST['password']); - - if($loginRes == 1) { - //TODO: use their "startmodule" (or whatever it's called) is if nothing specific is requested. - $goHere = "/content?from=login"; - if(strlen($_SESSION['loginDestination']) && urldecode($_SESSION['loginDestination']) !== '/') { - //go where they asked. - $goHere = urldecode($_SESSION['loginDestination']); - unset($_SESSION['loginDestination']); - } - else { - $prefObj = new pref($page->db, $_SESSION['uid']); - $startModule = $prefObj->get_pref_value_by_name('startModule'); - $goHere = "/content/". $startModule; - } - - conditional_header($goHere); - exit; - } -} - -if($_GET['destination']) { - $_SESSION['loginDestination'] = urlencode($_GET['destination']); -} -//show the default page. -$page->change_content(html_file_to_string("login.tmpl")); - +<?php +/* + * SVN INFORMATION::: + * ------------------ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + */ + + +$page->clear_content("header"); + +$db = new cs_phpDB; +$db->connect(get_config_db_params()); +$page->db = &$db; + +if(isset($_GET['loginDestination']) && strlen($_GET['loginDestination'])) { + $_SESSION['loginDestination'] = $_GET['loginDestination']; +} + +if(!$_GET['logout'] && !$_POST && $page->session->sid_check == 1) { + //they came here & need to be redirected. + conditional_header("/content?from=login&reason=alreadyLoggedIn"); + exit; +} +elseif($_GET['logout']) { + //call the logout function. + $res = $page->session->logout(); + conditional_header("/login.php?redirFrom=logout"); + exit; +} +elseif($_POST['username'] && $_POST['password']) { + + + $loginRes = $page->session->login($_POST['username'],$_POST['password']); + + if($loginRes == 1) { + //TODO: use their "startmodule" (or whatever it's called) is if nothing specific is requested. + $goHere = "/content?from=login"; + if(strlen($_SESSION['loginDestination']) && urldecode($_SESSION['loginDestination']) !== '/') { + //go where they asked. + $goHere = urldecode($_SESSION['loginDestination']); + unset($_SESSION['loginDestination']); + } + else { + $prefObj = new pref($page->db, $_SESSION['uid']); + $startModule = $prefObj->get_pref_value_by_name('startModule'); + $goHere = "/content/". $startModule; + } + + conditional_header($goHere); + exit; + } +} + +if($_GET['destination']) { + $_SESSION['loginDestination'] = urlencode($_GET['destination']); +} +//show the default page. +$page->change_content(html_file_to_string("login.tmpl")); + ?> \ No newline at end of file Property changes on: releases/1.1/includes/login.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup/1.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup/2.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup/3.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup/4.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup/5.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/includes/setup.inc ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/lib/_unitTests_/cs-arrayToPath_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/lib/_unitTests_/cs-content_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/lib/_unitTests_/cs-phpxml_tests.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/lib/_unitTests_/data/test.xml ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/lib/adminUserClass.php =================================================================== --- releases/1.1/lib/adminUserClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/adminUserClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -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 ."]"; Property changes on: releases/1.1/lib/adminUserClass.php ___________________________________________________________________ Name: svn:eol-style + native Property changes on: releases/1.1/lib/attributeClass.php ___________________________________________________________________ Name: svn:eol-style + native Modified: releases/1.1/lib/contactClass.php =================================================================== --- releases/1.1/lib/contactClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/contactClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -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 .")"); + } } } } Modified: releases/1.1/lib/cs-content/VERSION =================================================================== --- releases/1.1/lib/cs-content/VERSION 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/VERSION 2007-11-21 18:08:22 UTC (rev 660) @@ -1,5 +1,5 @@ ## Stores the current version of the cs-content system, and it's source. Please do NOT modify this file. -VERSION: 0.10.4 +VERSION: 0.10.5 PROJECT: cs-content -$HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/VERSION $ \ No newline at end of file +$HeadURL:https://cs-content.svn.sourceforge.net/svnroot/cs-content/trunk/VERSION $ \ No newline at end of file Modified: releases/1.1/lib/cs-content/contentSystemClass.php =================================================================== --- releases/1.1/lib/cs-content/contentSystemClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/contentSystemClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -2,9 +2,9 @@ /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/contentSystemClass.php $ - * $Id: contentSystemClass.php 214 2007-11-07 17:35:59Z crazedsanity $ - * $LastChangedDate: 2007-11-07 11:35:59 -0600 (Wed, 07 Nov 2007) $ - * $LastChangedRevision: 214 $ + * $Id: contentSystemClass.php 221 2007-11-21 17:39:01Z crazedsanity $ + * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ + * $LastChangedRevision: 221 $ * $LastChangedBy: crazedsanity $ * * HOW THE SYSTEM WORKS::: @@ -687,9 +687,8 @@ } else { //TODO: make it *actually* die gracefully... the way it works now looks more like puke than grace. - $this->gfObj->debug_print(__METHOD__ .": something broke. \nDETAILS::: $details" . + throw new exception(__METHOD__ .": something broke. \nDETAILS::: $details" . "\nREASON::: ". $this->reason); - exit; } }//end die_gracefully() //------------------------------------------------------------------------ Modified: releases/1.1/lib/cs-content/cs_fileSystemClass.php =================================================================== --- releases/1.1/lib/cs-content/cs_fileSystemClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_fileSystemClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -3,10 +3,10 @@ /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_fileSystemClass.php $ - * $Id: cs_fileSystemClass.php 214 2007-11-07 17:35:59Z crazedsanity $ - * $LastChangedDate: 2007-11-07 11:35:59 -0600 (Wed, 07 Nov 2007) $ + * $Id: cs_fileSystemClass.php 221 2007-11-21 17:39:01Z crazedsanity $ + * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ * $LastChangedBy: crazedsanity $ - * $LastChangedRevision: 214 $ + * $LastChangedRevision: 221 $ */ require_once(dirname(__FILE__) ."/cs_globalFunctions.php"); @@ -253,6 +253,7 @@ * can enlighten me, I'd be glad to give them credit. */ private function translate_perms($in_Perms) { + $sP = ""; $sP .= (($in_Perms & 0x0100) ? 'r' : '-') . (($in_Perms & 0x0080) ? 'w' : '-') . (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : Modified: releases/1.1/lib/cs-content/cs_genericPageClass.php =================================================================== --- releases/1.1/lib/cs-content/cs_genericPageClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_genericPageClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -2,10 +2,10 @@ /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_genericPageClass.php $ - * $Id: cs_genericPageClass.php 172 2007-10-01 16:24:17Z crazedsanity $ - * $LastChangedDate: 2007-10-01 11:24:17 -0500 (Mon, 01 Oct 2007) $ + * $Id: cs_genericPageClass.php 221 2007-11-21 17:39:01Z crazedsanity $ + * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ * $LastChangedBy: crazedsanity $ - * $LastChangedRevision: 172 $ + * $LastChangedRevision: 221 $ */ require_once(dirname(__FILE__) ."/template.inc"); require_once(dirname(__FILE__) ."/cs_versionAbstract.class.php"); @@ -65,7 +65,7 @@ $this->add_template_var($key, $value); } } - if(is_array($GLOBALS['templateFiles'])) { + if(isset($GLOBALS['templateFiles']) && is_array($GLOBALS['templateFiles'])) { foreach($GLOBALS['templateFiles'] as $key => $value) { $this->templateFiles[$key] = $value; } @@ -257,7 +257,7 @@ if($stripUndefVars) { $numLoops = 0; - while(preg_match_all('/\{.*?\}/', $this->templateObj->varvals[out], $tags) && $numLoops < 50) { + while(preg_match_all('/\{.*?\}/', $this->templateObj->varvals['out'], $tags) && $numLoops < 50) { $tags = $tags[0]; //TODO: figure out why this works when running it twice. @@ -287,7 +287,7 @@ public function process_set_message() { //if there's not a message set, skip. $errorBox = $this->file_to_string("system/message_box.tmpl"); - if(is_array($_SESSION['message'])) { + if(isset($_SESSION['message']) && is_array($_SESSION['message'])) { //let's make sure the "type" value is *lowercase*. $_SESSION['message']['type'] = strtolower($_SESSION['message']['type']); Modified: releases/1.1/lib/cs-content/cs_globalFunctions.php =================================================================== --- releases/1.1/lib/cs-content/cs_globalFunctions.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_globalFunctions.php 2007-11-21 18:08:22 UTC (rev 660) @@ -82,6 +82,7 @@ */ public function string_from_array($array,$style=NULL,$separator=NULL, $cleanString=NULL, $removeEmptyVals=FALSE) { + $retval = NULL; //precheck... if it's not an array, kill it. if(!is_array($array)) { return(NULL); @@ -271,7 +272,7 @@ } else { //not an array. - $retval = 0; + $retval = NULL; } return($retval); @@ -660,7 +661,7 @@ foreach($data as $value=>$display) { //see if it's the value that's been selected. $selectedString = ""; - if($value == $checkedValue) { + if($value == $checkedValue || $display == $checkedValue) { //yep, it's selected. $selectedString = " ". $myType; } Modified: releases/1.1/lib/cs-content/cs_phpDB.php =================================================================== --- releases/1.1/lib/cs-content/cs_phpDB.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_phpDB.php 2007-11-21 18:08:22 UTC (rev 660) @@ -4,8 +4,8 @@ * A class for generic PostgreSQL database access. * * SVN INFORMATION::: - * SVN Signature:::::::: $Id: cs_phpDB.php 207 2007-10-31 17:44:42Z crazedsanity $ - * Last Committted Date: $Date: 2007-10-31 12:44:42 -0500 (Wed, 31 Oct 2007) $ + * SVN Signature:::::::: $Id: cs_phpDB.php 221 2007-11-21 17:39:01Z crazedsanity $ + * Last Committted Date: $Date: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ * Last Committed Path:: $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_phpDB.php $ * */ @@ -24,6 +24,11 @@ // /////////////////////// +//TODO: option to not use layered transactions +//TODO: rollbackTrans() in layered transaction causes abort when final layer is committed/aborted +//TODO: stop sending queries to backend when transction is bad/aborted. +//TODO: commit/abort specific layer requests (i.e. if there's 8 layers & the first is named "x", calling commitTrans("x") will cause the whole transaction to commit & all layers to be destroyed. + require_once(dirname(__FILE__) ."/cs_versionAbstract.class.php"); class cs_phpDB extends cs_versionAbstract { Modified: releases/1.1/lib/cs-content/cs_sessionClass.php =================================================================== --- releases/1.1/lib/cs-content/cs_sessionClass.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_sessionClass.php 2007-11-21 18:08:22 UTC (rev 660) @@ -2,10 +2,10 @@ /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_sessionClass.php $ - * $Id: cs_sessionClass.php 214 2007-11-07 17:35:59Z crazedsanity $ - * $LastChangedDate: 2007-11-07 11:35:59 -0600 (Wed, 07 Nov 2007) $ + * $Id: cs_sessionClass.php 221 2007-11-21 17:39:01Z crazedsanity $ + * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ * $LastChangedBy: crazedsanity $ - * $LastChangedRevision: 214 $ + * $LastChangedRevision: 221 $ */ require_once(dirname(__FILE__) ."/cs_versionAbstract.class.php"); Modified: releases/1.1/lib/cs-content/cs_versionAbstract.class.php =================================================================== --- releases/1.1/lib/cs-content/cs_versionAbstract.class.php 2007-11-21 17:42:49 UTC (rev 659) +++ releases/1.1/lib/cs-content/cs_versionAbstract.class.php 2007-11-21 18:08:22 UTC (rev 660) @@ -5,9 +5,9 @@ * SVN INFORMATION::: * ------------------- * Last Author::::::::: $Author: crazedsanity $ - * Current Revision:::: $Revision: 155 $ + * Current Revision:::: $Revision: 221 $ * Repository Location: $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_versionAbstract.class.php $ - * Last Updated:::::::: $Date: 2007-09-12 14:28:20 -0500 (Wed, 12 Sep 2007) $ + * Last Updated:::::::: $Date: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ */ abstract class cs_versionAbstract { Modified: releases/1.1/lib/cs-content/sample_files/public_html/index.php =================================================================== --- releases/1.1/lib/cs-content/sample_files/public_html/index.php 2007-11-21 17:42:49 UTC (rev 659) +++ rel... [truncated message content] |
From: <cra...@us...> - 2007-11-21 19:03:13
|
Revision: 663 http://cs-project.svn.sourceforge.net/cs-project/?rev=663&view=rev Author: crazedsanity Date: 2007-11-21 11:03:03 -0800 (Wed, 21 Nov 2007) Log Message: ----------- *** RELEASE 1.1.0-BETA15 *** SUMMARY OF CHANGES::: * fix tag display on existing issue (#118) Modified Paths: -------------- releases/1.1/VERSION releases/1.1/lib/helpdeskClass.php releases/1.1/lib/tagClass.php Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2007-11-21 19:00:56 UTC (rev 662) +++ releases/1.1/VERSION 2007-11-21 19:03:03 UTC (rev 663) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0-BETA14 +VERSION: 1.1.0-BETA15 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/lib/helpdeskClass.php =================================================================== --- releases/1.1/lib/helpdeskClass.php 2007-11-21 19:00:56 UTC (rev 662) +++ releases/1.1/lib/helpdeskClass.php 2007-11-21 19:03:03 UTC (rev 663) @@ -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: releases/1.1/lib/tagClass.php =================================================================== --- releases/1.1/lib/tagClass.php 2007-11-21 19:00:56 UTC (rev 662) +++ releases/1.1/lib/tagClass.php 2007-11-21 19:03:03 UTC (rev 663) @@ -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-19 02:01:30
|
Revision: 711 http://cs-project.svn.sourceforge.net/cs-project/?rev=711&view=rev Author: crazedsanity Date: 2007-12-18 18:01:13 -0800 (Tue, 18 Dec 2007) Log Message: ----------- *** RELEASE 1.1.0-BETA16 *** SUMMARY OF CHANGES: * Formatting of helpdesk issue body & notes without "pre" tags. * More formatting of issue body & notes. * No longer wordwrap() note body in main noteClass. * Cleaning note body. * Format issue notes without the "pre" tag. * admin interface for tags * Updated tag listing. * Helpdesk converts newlines to BR's in body again (internal & external). * Ordering options for tags, ability to change modifier for tag name. * Updated block row name to match code, form to change modifier, etc (tags). * Add the "tags" section back (infobar). * Code to better display tags, option to update modifier, list alphabetically. * Folder for icons from "Sweetie-BasePack-v3" * help links * status messages show icon in title for prettiness. :) * After re-linking an issue, message now shows link back to previous project. * Force noteClass to format note data for uniform display. * Fix header (of SQL files) to have proper SVN keywords & such. * Ability to change helpdesk issue name (issue #70). * Fix order of tags when viewing issue (#123). * Fix initial priority based on tag modifier (#77). * Display ancestry link list instead of just project name on summary (#101). * Use block rows to display input or text for open/closed issue (#119). * Display currently logged-in user (#71). * Update to new version of cs-content. * More help pages & help links! SVN COMMAND: merge -r663:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk Modified Paths: -------------- releases/1.1/VERSION releases/1.1/docs/sql/setup/00__connectSettings.sql releases/1.1/docs/sql/setup/01__storedprocs.sql releases/1.1/docs/sql/setup/02__tables.sql releases/1.1/docs/sql/setup/03__indexes_etc.sql releases/1.1/docs/sql/setup/plpgsql.sql releases/1.1/docs/sql/setup/test_plpgsql.sql releases/1.1/includes/content/helpdesk.inc releases/1.1/includes/content/project.inc releases/1.1/includes/content/summary.inc releases/1.1/includes/content/tags.inc releases/1.1/includes/content.inc releases/1.1/includes/extern/helpdesk.inc releases/1.1/lib/cs-content/VERSION releases/1.1/lib/cs-content/cs_phpDB.php releases/1.1/lib/cs-content/documentation/basics.pdf releases/1.1/lib/globalFunctions.php releases/1.1/lib/helpdeskClass.php releases/1.1/lib/noteClass.php releases/1.1/lib/tagClass.php releases/1.1/templates/content/helpdesk/view.content.tmpl releases/1.1/templates/content/project/view/related_note.content.tmpl releases/1.1/templates/content/summary/index.content.tmpl releases/1.1/templates/extern/helpdesk/view.content.tmpl releases/1.1/templates/help/index.content.tmpl releases/1.1/templates/infobar.shared.tmpl releases/1.1/templates/system/message_box.tmpl Added Paths: ----------- releases/1.1/lib/invoice.class.php releases/1.1/lib/invoiceItem.class.php releases/1.1/public_html/images/bullet-round.png releases/1.1/public_html/images/icon-help.png releases/1.1/public_html/images/icons/ releases/1.1/public_html/images/icons/12-em-check.png releases/1.1/public_html/images/icons/12-em-cross.png releases/1.1/public_html/images/icons/12-em-down.png releases/1.1/public_html/images/icons/12-em-pencil.png releases/1.1/public_html/images/icons/12-em-plus.png releases/1.1/public_html/images/icons/12-em-up.png releases/1.1/public_html/images/icons/16-arrow-down.png releases/1.1/public_html/images/icons/16-arrow-left.png releases/1.1/public_html/images/icons/16-arrow-right.png releases/1.1/public_html/images/icons/16-arrow-up.png releases/1.1/public_html/images/icons/16-circle-blue-add.png releases/1.1/public_html/images/icons/16-circle-blue-check.png releases/1.1/public_html/images/icons/16-circle-blue-delete.png releases/1.1/public_html/images/icons/16-circle-blue-remove.png releases/1.1/public_html/images/icons/16-circle-blue.png releases/1.1/public_html/images/icons/16-circle-green-add.png releases/1.1/public_html/images/icons/16-circle-green-check.png releases/1.1/public_html/images/icons/16-circle-green-delete.png releases/1.1/public_html/images/icons/16-circle-green-remove.png releases/1.1/public_html/images/icons/16-circle-green.png releases/1.1/public_html/images/icons/16-circle-red-add.png releases/1.1/public_html/images/icons/16-circle-red-check.png releases/1.1/public_html/images/icons/16-circle-red-delete.png releases/1.1/public_html/images/icons/16-circle-red-remove.png releases/1.1/public_html/images/icons/16-circle-red.png releases/1.1/public_html/images/icons/16-clock.png releases/1.1/public_html/images/icons/16-cube-blue.png releases/1.1/public_html/images/icons/16-cube-green.png releases/1.1/public_html/images/icons/16-cube-red.png releases/1.1/public_html/images/icons/16-em-check.png releases/1.1/public_html/images/icons/16-em-cross.png releases/1.1/public_html/images/icons/16-em-down.png releases/1.1/public_html/images/icons/16-em-open.png releases/1.1/public_html/images/icons/16-em-pencil.png releases/1.1/public_html/images/icons/16-em-plus.png releases/1.1/public_html/images/icons/16-file-archive.png releases/1.1/public_html/images/icons/16-file-page.png releases/1.1/public_html/images/icons/16-heart-gold-l.png releases/1.1/public_html/images/icons/16-heart-gold-m.png releases/1.1/public_html/images/icons/16-heart-gold-s.png releases/1.1/public_html/images/icons/16-heart-gold-xs.png releases/1.1/public_html/images/icons/16-heart-gold-xxs.png releases/1.1/public_html/images/icons/16-heart-red-l.png releases/1.1/public_html/images/icons/16-heart-red-m.png releases/1.1/public_html/images/icons/16-heart-red-s.png releases/1.1/public_html/images/icons/16-heart-red-xs.png releases/1.1/public_html/images/icons/16-heart-red-xxs.png releases/1.1/public_html/images/icons/16-heart-silver-l.png releases/1.1/public_html/images/icons/16-heart-silver-m.png releases/1.1/public_html/images/icons/16-heart-silver-s.png releases/1.1/public_html/images/icons/16-heart-silver-xs.png releases/1.1/public_html/images/icons/16-heart-silver-xxs.png releases/1.1/public_html/images/icons/16-image-add.png releases/1.1/public_html/images/icons/16-image-check.png releases/1.1/public_html/images/icons/16-image-remove.png releases/1.1/public_html/images/icons/16-image.png releases/1.1/public_html/images/icons/16-member-add.png releases/1.1/public_html/images/icons/16-member-heart.png releases/1.1/public_html/images/icons/16-member-profile.png releases/1.1/public_html/images/icons/16-member-remove.png releases/1.1/public_html/images/icons/16-member.png releases/1.1/public_html/images/icons/16-message-info.png releases/1.1/public_html/images/icons/16-message-warn.png releases/1.1/public_html/images/icons/16-security-key.png releases/1.1/public_html/images/icons/16-security-lock-open.png releases/1.1/public_html/images/icons/16-security-lock.png releases/1.1/public_html/images/icons/16-square-blue-add.png releases/1.1/public_html/images/icons/16-square-blue-check.png releases/1.1/public_html/images/icons/16-square-blue-delete.png releases/1.1/public_html/images/icons/16-square-blue-remove.png releases/1.1/public_html/images/icons/16-square-blue.png releases/1.1/public_html/images/icons/16-square-green-add.png releases/1.1/public_html/images/icons/16-square-green-check.png releases/1.1/public_html/images/icons/16-square-green-delete.png releases/1.1/public_html/images/icons/16-square-green-remove.png releases/1.1/public_html/images/icons/16-square-green.png releases/1.1/public_html/images/icons/16-square-red-add.png releases/1.1/public_html/images/icons/16-square-red-check.png releases/1.1/public_html/images/icons/16-square-red-delete.png releases/1.1/public_html/images/icons/16-square-red-remove.png releases/1.1/public_html/images/icons/16-square-red.png releases/1.1/public_html/images/icons/16-star-cold.png releases/1.1/public_html/images/icons/16-star-hot.png releases/1.1/public_html/images/icons/16-tag-add.png releases/1.1/public_html/images/icons/16-tag-check.png releases/1.1/public_html/images/icons/16-tag-cold.png releases/1.1/public_html/images/icons/16-tag-cross.png releases/1.1/public_html/images/icons/16-tag-hot.png releases/1.1/public_html/images/icons/16-tag-pencil.png releases/1.1/public_html/images/icons/16-tool-a.png releases/1.1/public_html/images/icons/16-tool-b.png releases/1.1/public_html/images/icons/16-tool-c.png releases/1.1/public_html/images/icons/16-tool-d.png releases/1.1/public_html/images/icons/16-zoom.png releases/1.1/public_html/images/icons/24-arrow-back.png releases/1.1/public_html/images/icons/24-arrow-first.png releases/1.1/public_html/images/icons/24-arrow-forward.png releases/1.1/public_html/images/icons/24-arrow-last.png releases/1.1/public_html/images/icons/24-arrow-next.png releases/1.1/public_html/images/icons/24-arrow-previous.png releases/1.1/public_html/images/icons/24-book-blue-add.png releases/1.1/public_html/images/icons/24-book-blue-check.png releases/1.1/public_html/images/icons/24-book-blue-mark.png releases/1.1/public_html/images/icons/24-book-blue-open.png releases/1.1/public_html/images/icons/24-book-blue-remove.png releases/1.1/public_html/images/icons/24-book-blue.png releases/1.1/public_html/images/icons/24-book-green-add.png releases/1.1/public_html/images/icons/24-book-green-check.png releases/1.1/public_html/images/icons/24-book-green-mark.png releases/1.1/public_html/images/icons/24-book-green-open.png releases/1.1/public_html/images/icons/24-book-green-remove.png releases/1.1/public_html/images/icons/24-book-green.png releases/1.1/public_html/images/icons/24-book-red-add.png releases/1.1/public_html/images/icons/24-book-red-check.png releases/1.1/public_html/images/icons/24-book-red-mark.png releases/1.1/public_html/images/icons/24-book-red-open.png releases/1.1/public_html/images/icons/24-book-red-remove.png releases/1.1/public_html/images/icons/24-book-red.png releases/1.1/public_html/images/icons/24-columns.png releases/1.1/public_html/images/icons/24-control-pause.png releases/1.1/public_html/images/icons/24-control-stop.png releases/1.1/public_html/images/icons/24-em-check.png releases/1.1/public_html/images/icons/24-em-cross.png releases/1.1/public_html/images/icons/24-em-down.png releases/1.1/public_html/images/icons/24-em-plus.png releases/1.1/public_html/images/icons/24-em-up.png releases/1.1/public_html/images/icons/24-frame-add.png releases/1.1/public_html/images/icons/24-frame-close.png releases/1.1/public_html/images/icons/24-frame-open.png releases/1.1/public_html/images/icons/24-frame.png releases/1.1/public_html/images/icons/24-heart-gold.png releases/1.1/public_html/images/icons/24-heart-red.png releases/1.1/public_html/images/icons/24-heart-silver.png releases/1.1/public_html/images/icons/24-image-add.png releases/1.1/public_html/images/icons/24-image-check.png releases/1.1/public_html/images/icons/24-image-open.png releases/1.1/public_html/images/icons/24-image-remove.png releases/1.1/public_html/images/icons/24-image.png releases/1.1/public_html/images/icons/24-imageset-add.png releases/1.1/public_html/images/icons/24-imageset-check.png releases/1.1/public_html/images/icons/24-imageset-open.png releases/1.1/public_html/images/icons/24-imageset-remove.png releases/1.1/public_html/images/icons/24-imageset.png releases/1.1/public_html/images/icons/24-member-add.png releases/1.1/public_html/images/icons/24-member-heart.png releases/1.1/public_html/images/icons/24-member-remove.png releases/1.1/public_html/images/icons/24-member.png releases/1.1/public_html/images/icons/24-message-info.png releases/1.1/public_html/images/icons/24-message-warn.png releases/1.1/public_html/images/icons/24-security-key.png releases/1.1/public_html/images/icons/24-security-lock-open.png releases/1.1/public_html/images/icons/24-security-lock.png releases/1.1/public_html/images/icons/24-settings-blue.png releases/1.1/public_html/images/icons/24-settings-orange.png releases/1.1/public_html/images/icons/24-settings-silver.png releases/1.1/public_html/images/icons/24-settings.png releases/1.1/public_html/images/icons/24-sidebar.png releases/1.1/public_html/images/icons/24-tab-add.png releases/1.1/public_html/images/icons/24-tab-close.png releases/1.1/public_html/images/icons/24-tab-open.png releases/1.1/public_html/images/icons/24-tab.png releases/1.1/public_html/images/icons/24-tag-add.png releases/1.1/public_html/images/icons/24-tag-check.png releases/1.1/public_html/images/icons/24-tag-cold.png releases/1.1/public_html/images/icons/24-tag-hot.png releases/1.1/public_html/images/icons/24-tag-manager.png releases/1.1/public_html/images/icons/24-tag-pencil.png releases/1.1/public_html/images/icons/24-tag-remove.png releases/1.1/public_html/images/icons/24-tool-a.png releases/1.1/public_html/images/icons/24-tool-b.png releases/1.1/public_html/images/icons/24-tool-c.png releases/1.1/public_html/images/icons/24-tools.png releases/1.1/public_html/images/icons/24-zoom-actual.png releases/1.1/public_html/images/icons/24-zoom-fill.png releases/1.1/public_html/images/icons/24-zoom-in.png releases/1.1/public_html/images/icons/24-zoom-out.png releases/1.1/public_html/images/icons/24-zoom.png releases/1.1/public_html/images/icons/8-em-check.png releases/1.1/public_html/images/icons/8-em-cross.png releases/1.1/public_html/images/icons/8-em-heart.png releases/1.1/public_html/images/icons/8-em-pencil.png releases/1.1/public_html/images/icons/8-em-plus.png releases/1.1/public_html/images/message_icons/ releases/1.1/public_html/images/message_icons/error.png releases/1.1/public_html/images/message_icons/fatal.png releases/1.1/public_html/images/message_icons/info.png releases/1.1/public_html/images/message_icons/notice.png releases/1.1/public_html/images/message_icons/status.png releases/1.1/templates/content/tags/index.content.tmpl releases/1.1/templates/help/helpdesk/ releases/1.1/templates/help/helpdesk/assigned.content.tmpl releases/1.1/templates/help/helpdesk/external_link.content.tmpl releases/1.1/templates/help/helpdesk/helpdesk_links.shared.tmpl releases/1.1/templates/help/helpdesk/index.content.tmpl releases/1.1/templates/help/helpdesk/notified_users.content.tmpl releases/1.1/templates/help/helpdesk/priority.content.tmpl releases/1.1/templates/help/helpdesk/project_linkage.content.tmpl releases/1.1/templates/help/helpdesk/submit_buttons.content.tmpl releases/1.1/templates/help/tags/ releases/1.1/templates/help/tags/index.content.tmpl releases/1.1/templates/help/tags/modifier.content.tmpl Removed Paths: ------------- releases/1.1/public_html/images/icons/12-em-check.png releases/1.1/public_html/images/icons/12-em-cross.png releases/1.1/public_html/images/icons/12-em-down.png releases/1.1/public_html/images/icons/12-em-pencil.png releases/1.1/public_html/images/icons/12-em-plus.png releases/1.1/public_html/images/icons/12-em-up.png releases/1.1/public_html/images/icons/16-arrow-down.png releases/1.1/public_html/images/icons/16-arrow-left.png releases/1.1/public_html/images/icons/16-arrow-right.png releases/1.1/public_html/images/icons/16-arrow-up.png releases/1.1/public_html/images/icons/16-circle-blue-add.png releases/1.1/public_html/images/icons/16-circle-blue-check.png releases/1.1/public_html/images/icons/16-circle-blue-delete.png releases/1.1/public_html/images/icons/16-circle-blue-remove.png releases/1.1/public_html/images/icons/16-circle-blue.png releases/1.1/public_html/images/icons/16-circle-green-add.png releases/1.1/public_html/images/icons/16-circle-green-check.png releases/1.1/public_html/images/icons/16-circle-green-delete.png releases/1.1/public_html/images/icons/16-circle-green-remove.png releases/1.1/public_html/images/icons/16-circle-green.png releases/1.1/public_html/images/icons/16-circle-red-add.png releases/1.1/public_html/images/icons/16-circle-red-check.png releases/1.1/public_html/images/icons/16-circle-red-delete.png releases/1.1/public_html/images/icons/16-circle-red-remove.png releases/1.1/public_html/images/icons/16-circle-red.png releases/1.1/public_html/images/icons/16-clock.png releases/1.1/public_html/images/icons/16-cube-blue.png releases/1.1/public_html/images/icons/16-cube-green.png releases/1.1/public_html/images/icons/16-cube-red.png releases/1.1/public_html/images/icons/16-em-check.png releases/1.1/public_html/images/icons/16-em-cross.png releases/1.1/public_html/images/icons/16-em-down.png releases/1.1/public_html/images/icons/16-em-open.png releases/1.1/public_html/images/icons/16-em-pencil.png releases/1.1/public_html/images/icons/16-em-plus.png releases/1.1/public_html/images/icons/16-file-archive.png releases/1.1/public_html/images/icons/16-file-page.png releases/1.1/public_html/images/icons/16-heart-gold-l.png releases/1.1/public_html/images/icons/16-heart-gold-m.png releases/1.1/public_html/images/icons/16-heart-gold-s.png releases/1.1/public_html/images/icons/16-heart-gold-xs.png releases/1.1/public_html/images/icons/16-heart-gold-xxs.png releases/1.1/public_html/images/icons/16-heart-red-l.png releases/1.1/public_html/images/icons/16-heart-red-m.png releases/1.1/public_html/images/icons/16-heart-red-s.png releases/1.1/public_html/images/icons/16-heart-red-xs.png releases/1.1/public_html/images/icons/16-heart-red-xxs.png releases/1.1/public_html/images/icons/16-heart-silver-l.png releases/1.1/public_html/images/icons/16-heart-silver-m.png releases/1.1/public_html/images/icons/16-heart-silver-s.png releases/1.1/public_html/images/icons/16-heart-silver-xs.png releases/1.1/public_html/images/icons/16-heart-silver-xxs.png releases/1.1/public_html/images/icons/16-image-add.png releases/1.1/public_html/images/icons/16-image-check.png releases/1.1/public_html/images/icons/16-image-remove.png releases/1.1/public_html/images/icons/16-image.png releases/1.1/public_html/images/icons/16-member-add.png releases/1.1/public_html/images/icons/16-member-heart.png releases/1.1/public_html/images/icons/16-member-profile.png releases/1.1/public_html/images/icons/16-member-remove.png releases/1.1/public_html/images/icons/16-member.png releases/1.1/public_html/images/icons/16-message-info.png releases/1.1/public_html/images/icons/16-message-warn.png releases/1.1/public_html/images/icons/16-security-key.png releases/1.1/public_html/images/icons/16-security-lock-open.png releases/1.1/public_html/images/icons/16-security-lock.png releases/1.1/public_html/images/icons/16-square-blue-add.png releases/1.1/public_html/images/icons/16-square-blue-check.png releases/1.1/public_html/images/icons/16-square-blue-delete.png releases/1.1/public_html/images/icons/16-square-blue-remove.png releases/1.1/public_html/images/icons/16-square-blue.png releases/1.1/public_html/images/icons/16-square-green-add.png releases/1.1/public_html/images/icons/16-square-green-check.png releases/1.1/public_html/images/icons/16-square-green-delete.png releases/1.1/public_html/images/icons/16-square-green-remove.png releases/1.1/public_html/images/icons/16-square-green.png releases/1.1/public_html/images/icons/16-square-red-add.png releases/1.1/public_html/images/icons/16-square-red-check.png releases/1.1/public_html/images/icons/16-square-red-delete.png releases/1.1/public_html/images/icons/16-square-red-remove.png releases/1.1/public_html/images/icons/16-square-red.png releases/1.1/public_html/images/icons/16-star-cold.png releases/1.1/public_html/images/icons/16-star-hot.png releases/1.1/public_html/images/icons/16-tag-add.png releases/1.1/public_html/images/icons/16-tag-check.png releases/1.1/public_html/images/icons/16-tag-cold.png releases/1.1/public_html/images/icons/16-tag-cross.png releases/1.1/public_html/images/icons/16-tag-hot.png releases/1.1/public_html/images/icons/16-tag-pencil.png releases/1.1/public_html/images/icons/16-tool-a.png releases/1.1/public_html/images/icons/16-tool-b.png releases/1.1/public_html/images/icons/16-tool-c.png releases/1.1/public_html/images/icons/16-tool-d.png releases/1.1/public_html/images/icons/16-zoom.png releases/1.1/public_html/images/icons/24-arrow-back.png releases/1.1/public_html/images/icons/24-arrow-first.png releases/1.1/public_html/images/icons/24-arrow-forward.png releases/1.1/public_html/images/icons/24-arrow-last.png releases/1.1/public_html/images/icons/24-arrow-next.png releases/1.1/public_html/images/icons/24-arrow-previous.png releases/1.1/public_html/images/icons/24-book-blue-add.png releases/1.1/public_html/images/icons/24-book-blue-check.png releases/1.1/public_html/images/icons/24-book-blue-mark.png releases/1.1/public_html/images/icons/24-book-blue-open.png releases/1.1/public_html/images/icons/24-book-blue-remove.png releases/1.1/public_html/images/icons/24-book-blue.png releases/1.1/public_html/images/icons/24-book-green-add.png releases/1.1/public_html/images/icons/24-book-green-check.png releases/1.1/public_html/images/icons/24-book-green-mark.png releases/1.1/public_html/images/icons/24-book-green-open.png releases/1.1/public_html/images/icons/24-book-green-remove.png releases/1.1/public_html/images/icons/24-book-green.png releases/1.1/public_html/images/icons/24-book-red-add.png releases/1.1/public_html/images/icons/24-book-red-check.png releases/1.1/public_html/images/icons/24-book-red-mark.png releases/1.1/public_html/images/icons/24-book-red-open.png releases/1.1/public_html/images/icons/24-book-red-remove.png releases/1.1/public_html/images/icons/24-book-red.png releases/1.1/public_html/images/icons/24-columns.png releases/1.1/public_html/images/icons/24-control-pause.png releases/1.1/public_html/images/icons/24-control-stop.png releases/1.1/public_html/images/icons/24-em-check.png releases/1.1/public_html/images/icons/24-em-cross.png releases/1.1/public_html/images/icons/24-em-down.png releases/1.1/public_html/images/icons/24-em-plus.png releases/1.1/public_html/images/icons/24-em-up.png releases/1.1/public_html/images/icons/24-frame-add.png releases/1.1/public_html/images/icons/24-frame-close.png releases/1.1/public_html/images/icons/24-frame-open.png releases/1.1/public_html/images/icons/24-frame.png releases/1.1/public_html/images/icons/24-heart-gold.png releases/1.1/public_html/images/icons/24-heart-red.png releases/1.1/public_html/images/icons/24-heart-silver.png releases/1.1/public_html/images/icons/24-image-add.png releases/1.1/public_html/images/icons/24-image-check.png releases/1.1/public_html/images/icons/24-image-open.png releases/1.1/public_html/images/icons/24-image-remove.png releases/1.1/public_html/images/icons/24-image.png releases/1.1/public_html/images/icons/24-imageset-add.png releases/1.1/public_html/images/icons/24-imageset-check.png releases/1.1/public_html/images/icons/24-imageset-open.png releases/1.1/public_html/images/icons/24-imageset-remove.png releases/1.1/public_html/images/icons/24-imageset.png releases/1.1/public_html/images/icons/24-member-add.png releases/1.1/public_html/images/icons/24-member-heart.png releases/1.1/public_html/images/icons/24-member-remove.png releases/1.1/public_html/images/icons/24-member.png releases/1.1/public_html/images/icons/24-message-info.png releases/1.1/public_html/images/icons/24-message-warn.png releases/1.1/public_html/images/icons/24-security-key.png releases/1.1/public_html/images/icons/24-security-lock-open.png releases/1.1/public_html/images/icons/24-security-lock.png releases/1.1/public_html/images/icons/24-settings-blue.png releases/1.1/public_html/images/icons/24-settings-orange.png releases/1.1/public_html/images/icons/24-settings-silver.png releases/1.1/public_html/images/icons/24-settings.png releases/1.1/public_html/images/icons/24-sidebar.png releases/1.1/public_html/images/icons/24-tab-add.png releases/1.1/public_html/images/icons/24-tab-close.png releases/1.1/public_html/images/icons/24-tab-open.png releases/1.1/public_html/images/icons/24-tab.png releases/1.1/public_html/images/icons/24-tag-add.png releases/1.1/public_html/images/icons/24-tag-check.png releases/1.1/public_html/images/icons/24-tag-cold.png releases/1.1/public_html/images/icons/24-tag-hot.png releases/1.1/public_html/images/icons/24-tag-manager.png releases/1.1/public_html/images/icons/24-tag-pencil.png releases/1.1/public_html/images/icons/24-tag-remove.png releases/1.1/public_html/images/icons/24-tool-a.png releases/1.1/public_html/images/icons/24-tool-b.png releases/1.1/public_html/images/icons/24-tool-c.png releases/1.1/public_html/images/icons/24-tools.png releases/1.1/public_html/images/icons/24-zoom-actual.png releases/1.1/public_html/images/icons/24-zoom-fill.png releases/1.1/public_html/images/icons/24-zoom-in.png releases/1.1/public_html/images/icons/24-zoom-out.png releases/1.1/public_html/images/icons/24-zoom.png releases/1.1/public_html/images/icons/8-em-check.png releases/1.1/public_html/images/icons/8-em-cross.png releases/1.1/public_html/images/icons/8-em-heart.png releases/1.1/public_html/images/icons/8-em-pencil.png releases/1.1/public_html/images/icons/8-em-plus.png releases/1.1/public_html/images/message_icons/error.png releases/1.1/public_html/images/message_icons/fatal.png releases/1.1/public_html/images/message_icons/info.png releases/1.1/public_html/images/message_icons/notice.png releases/1.1/public_html/images/message_icons/status.png releases/1.1/templates/content/tags/shared.content.tmpl releases/1.1/templates/help/helpdesk/assigned.content.tmpl releases/1.1/templates/help/helpdesk/external_link.content.tmpl releases/1.1/templates/help/helpdesk/helpdesk_links.shared.tmpl releases/1.1/templates/help/helpdesk/index.content.tmpl releases/1.1/templates/help/helpdesk/notified_users.content.tmpl releases/1.1/templates/help/helpdesk/priority.content.tmpl releases/1.1/templates/help/helpdesk/project_linkage.content.tmpl releases/1.1/templates/help/helpdesk/submit_buttons.content.tmpl releases/1.1/templates/help/tags/index.content.tmpl releases/1.1/templates/help/tags/modifier.content.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/VERSION 2007-12-19 02:01:13 UTC (rev 711) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0-BETA15 +VERSION: 1.1.0-BETA16 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/docs/sql/setup/00__connectSettings.sql =================================================================== --- releases/1.1/docs/sql/setup/00__connectSettings.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/00__connectSettings.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,6 +1,6 @@ -- -- SVN INFORMATION::: --- SVN Signature: $Id:::: 00__connectSettings.sql 185 2007-09-15 23:42:34Z crazedsanity $ +-- SVN Signature::::::::: $Id$ -- Last Committted Date:: $Date$ -- Last Committed Path::: $HeadURL$ -- Modified: releases/1.1/docs/sql/setup/01__storedprocs.sql =================================================================== --- releases/1.1/docs/sql/setup/01__storedprocs.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/01__storedprocs.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,6 +1,6 @@ -- -- SVN INFORMATION::: --- SVN Signature: $Id:::: 01__storedprocs.sql 186 2007-09-15 23:43:10Z crazedsanity $ +-- SVN Signature::::::::: $Id$ -- Last Committted Date:: $Date$ -- Last Committed Path::: $HeadURL$ -- Modified: releases/1.1/docs/sql/setup/02__tables.sql =================================================================== --- releases/1.1/docs/sql/setup/02__tables.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/02__tables.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,6 +1,6 @@ -- -- SVN INFORMATION::: --- SVN Signature: $Id:::: 02__tables.sql 253 2007-09-29 19:48:37Z crazedsanity $ +-- SVN Signature::::::::: $Id$ -- Last Committted Date:: $Date$ -- Last Committed Path::: $HeadURL$ -- Modified: releases/1.1/docs/sql/setup/03__indexes_etc.sql =================================================================== --- releases/1.1/docs/sql/setup/03__indexes_etc.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/03__indexes_etc.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,8 +1,8 @@ -- -- SVN INFORMATION::: --- SVN Signature: $Id:::: 03__indexes_etc.sql 253 2007-09-29 19:48:37Z crazedsanity $ --- Last Committted Date:: $Date:2007-11-20 11:02:38 -0600 (Tue, 20 Nov 2007) $ --- Last Committed Path::: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/docs/sql/setup/03__indexes_etc.sql $ +-- SVN Signature: $Id:::: 01__storedprocs.sql 186 2007-09-15 23:43:10Z crazedsanity $ +-- Last Committted Date:: $Date$ +-- Last Committed Path::: $HeadURL$ -- -- Modified: releases/1.1/docs/sql/setup/plpgsql.sql =================================================================== --- releases/1.1/docs/sql/setup/plpgsql.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/plpgsql.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,7 +1,7 @@ -- -- SVN INFORMATION::: --- SVN Signature: $Id:::: plpgsql.sql 183 2007-09-14 23:17:47Z crazedsanity $ --- Last Committted Date:: $Date$ +-- SVN Signature: $Id:::: 03__indexes_etc.sql 253 2007-09-29 19:48:37Z crazedsanity $ +-- Last Committted Date:: $Date:2007-11-20 11:02:38 -0600 (Tue, 20 Nov 2007) $ -- Last Committed Path::: $HeadURL$ -- Modified: releases/1.1/docs/sql/setup/test_plpgsql.sql =================================================================== --- releases/1.1/docs/sql/setup/test_plpgsql.sql 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/docs/sql/setup/test_plpgsql.sql 2007-12-19 02:01:13 UTC (rev 711) @@ -1,7 +1,7 @@ -- -- SVN INFORMATION::: --- SVN Signature::::::::: $Id$ --- Last Committted Date:: $Date$ +-- SVN Signature: $Id:::: 03__indexes_etc.sql 253 2007-09-29 19:48:37Z crazedsanity $ +-- Last Committted Date:: $Date:2007-11-20 11:02:38 -0600 (Tue, 20 Nov 2007) $ -- Last Committed Path::: $HeadURL$ -- Modified: releases/1.1/includes/content/helpdesk.inc =================================================================== --- releases/1.1/includes/content/helpdesk.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/content/helpdesk.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -23,13 +23,29 @@ $_POST['updates']['parentRecordId'] = $_POST['updates']['project_id']; unset($_POST['updates']['project_id']); - //that means we've gotta update everything sent... right? + + //if they've changed the name, we gotta log it. + //TODO: probably log this within helpdeskClass::update(). + if(isset($_POST['updates']['name'])) { + //retrieve the old info. + $oldData = $proj->helpdeskObj->get_record($_POST['id']); + + if($oldData['name'] !== $_POST['updates']['name']) { + $addRemark = 'Updated [b]name[/b] from ([b][i]'. $oldData['name'] .'[/i][/b])'; + } + } + $doNotAcceptFields = array("solution", "remark"); foreach($doNotAcceptFields as $unsetThis) { unset($_POST['updates'][$unsetThis]); } $result = $proj->helpdeskObj->update_record($helpdeskId, $_POST['updates']); + if(strlen($addRemark)) { + $proj->helpdeskObj->remark($_POST['id'], $addRemark); + } + + //tell them what happened. if($result == 1) { set_message_wrapper(array( @@ -205,7 +221,7 @@ $page->set_all_block_rows("content"); //show the "category" selection. - $categoryList = $proj->helpdeskObj->get_category_list('bug'); + $categoryList = $proj->helpdeskObj->get_category_list('bug', TRUE); $page->add_template_var("select_tags", $categoryList); // @@ -247,21 +263,29 @@ $page->add_template_var("select_category_list", $categoryList); //convert the returned data into htmlentities so brackets show properly. - $helpdeskData['subject'] = $bbCodeParser->parseString(cleanString($helpdeskData['subject'], "htmlentity_plus_brackets")); + $helpdeskData['subject'] = $bbCodeParser->parseString(cleanString($helpdeskData['subject'], "htmlentity_plus_brackets"), TRUE); + $helpdeskData['subject'] = preg_replace('/\s\s/', ' ', $helpdeskData['subject']); + $helpdeskData['subject'] = preg_replace('/\S\s\s/', ' ', $helpdeskData['subject']); + + $helpdeskData['name'] = cleanString($helpdeskData['name'], "htmlentity_plus_brackets"); $helpdeskData['solution'] = cleanString($helpdeskData['solution'], "htmlentity_plus_brackets"); //make the wrapping SANE. - $helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); + #$helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); //show the buttons appropriate to their membership level & ownership. //if they're the owner, show the "solution" section. $assignedStr = $helpdeskData['leader_contact_id']; if($helpdeskData['status_id'] == 4) { //allow the current user to re-open this issue. + $doNotRipRows[] = "assigned_text"; + $doNotRipRows[] = "priority_text"; $doNotRipRows[] = "reopen_button"; } else { + $doNotRipRows[] = "assigned_optionList"; + $doNotRipRows[] = "priority_optionList"; if(($assignedStr == $_SESSION['contact_id']) || ($assignedStr == "" || is_null($assignedStr))) { //well, we can show 'em the update/modify button. $doNotRipRows[] = "update_button"; @@ -365,8 +389,10 @@ if(is_array($myNotes) && count($myNotes)) { $baseRow = $page->templateRows['issueNotes']; foreach($myNotes as $repArr) { - $repArr['body'] = $bbCodeParser->parseString(cleanString($repArr['body'], "htmlentity_plus_brackets")); + $repArr['body'] = $bbCodeParser->parseString($repArr['body']); + $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); + $repArr['solutionIndicator'] = ""; if($repArr['is_solution'] == 't') { Modified: releases/1.1/includes/content/project.inc =================================================================== --- releases/1.1/includes/content/project.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/content/project.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -183,9 +183,16 @@ $helpdeskObj->remark($linkIssue, $remarkDetails); if($linkRes) { + $oldIsHelpdesk = $proj->helpdeskObj->isHelpdeskIssue; + $proj->helpdeskObj->isHelpdeskIssue=FALSE; + $oldProjData = $proj->helpdeskObj->get_parent_record($issueData['ancestry']); + $proj->helpdeskObj->isHelpdeskIssue=$oldIsHelpdesk; + $oldProjLinkList = $proj->get_ancestry_link_list($oldProjData['public_id'], TRUE, TRUE, TRUE); + $page->set_message_wrapper(array( 'title' => "Issue Linked Successfully", - 'message' => "Issue #". $linkIssue ." was successfully linked to this project.", + 'message' => "Issue #". $linkIssue ." was successfully linked to this project.<BR><BR>" . + "<b>Back to old project:</b> [". $oldProjLinkList ."]", 'type' => "status" )); } Modified: releases/1.1/includes/content/summary.inc =================================================================== --- releases/1.1/includes/content/summary.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/content/summary.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -130,7 +130,6 @@ function process_row(&$page, $projectArr, $expandArr, $baseRow, $level=0) { //loop through the array... $linkLevel = $level+1; - //pre-pad subprojects, so they appear indented. if($level > 0) { @@ -140,7 +139,16 @@ } } if(is_array($projectArr)) { + + $projObj = new projectClass($page->db); + foreach($projectArr as $id=>$subArr) { + + $subArr['linkList'] = $projObj->get_ancestry_link_list($id); + if(!strlen($subArr['linkList'])) { + $subArr['linkList'] = $subArr['name']; + } + //parse stuff into the template row... $rowColor1 = swapValue($rowColor1, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); $rowColor2 = swapValue($rowColor2,"#D5D5D5", "#C2C2C2"); Modified: releases/1.1/includes/content/tags.inc =================================================================== --- releases/1.1/includes/content/tags.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/content/tags.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -106,7 +106,10 @@ debug_print($_POST); $goHere = $_SERVER['PHP_SELF']; - if($_POST['new_tag']) { + if($_POST['action'] == 'update') { + $result = $proj->tagObj->update_tag_modifier($_POST['tag_name_id'], $_POST['modifier']); + } + elseif($_POST['new_tag']) { //check for pre-existing tags of that name. $myTagList = $proj->tagObj->get_tag_list(); $existingTagNameId = array_search($_POST['new_tag'], $myTagList); @@ -158,10 +161,10 @@ } //get the list of tags, regardless of whether we'll show 'em all or not. -$myTagList = $proj->tagObj->get_tag_list(); +$myTagList = $proj->tagObj->get_tag_list(TRUE, FALSE); $showData = TRUE; -$showTagNameId = $sessionCache->get_cache('tagNameId'); +#$showTagNameId = $sessionCache->get_cache('tagNameId'); if($_GET['move']) { @@ -205,7 +208,7 @@ $messageArr = array( 'title' => 'No Tag Specified', 'message' => "For your convenience, records for the first available tag, " . - "\"". $myTagList[$showTagNameId] ."\" ($showTagNameId) are currently displayed. " . + "\"". $myTagList[$showTagNameId]['name'] ."\" ($showTagNameId) are currently displayed. " . "You may select a different tag from the list.", 'type' => 'notice' ); @@ -241,15 +244,20 @@ //retrieve the (possibly updated) setting $showTagNameId = $sessionCache->get_cache('tagNameId'); -if($showData) { +if($showData) { //get data for this tag. $data = $proj->tagObj->get_records_for_tag($showTagNameId); //set some vars. - $page->add_template_var("tagName", $myTagList[$showTagNameId]); + $page->add_template_var("tagName", $myTagList[$showTagNameId]['name']); + $page->add_template_var('tagModifier', $myTagList[$showTagNameId]['modifier']); $page->add_template_var("tagRecordCount", count($data)); $page->add_template_var("showTagNameId", $showTagNameId); + $page->add_template_var('modifier_option_list', create_priority_option_list($myTagList[$showTagNameId]['modifier'], 5, -5)); + + create_page_title($page, array('title' => "Tag #". $showTagNameId . ": ". $myTagList[$showTagNameId]['name'])); + //rip all block rows. $page->set_all_block_rows('content'); @@ -273,7 +281,8 @@ //display the list of available tags. $tagListBaseRow = $page->templateRows['availableTagsList']; $myRow = ""; - foreach($myTagList as $tagNameId=>$tagName) { + foreach($myTagList as $tagNameId=>$data) { + $tagName = $data['name']; $tagListBaseRow = $page->templateRows['availableTagsList']; if($tagNameId == $showTagNameId) { //switch to a row without the link, so it's more apparent what's selected. Modified: releases/1.1/includes/content.inc =================================================================== --- releases/1.1/includes/content.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/content.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -39,6 +39,17 @@ $user = new userClass($page->db, $_SESSION['uid']); +if(is_numeric($_SESSION['login_contact_id'])) { + $contactObj = new contactClass($page->db); + $contactObj->set_contact_id($_SESSION['login_contact_id']); + $contactData = $contactObj->get_contact(); + + $page->add_template_var('LOGGED_USERNAME', $_SESSION['login_username']); + $page->add_template_var('LOGGED_CONTACT_ID', $_SESSION['login_contact_id']); + $page->add_template_var('LOGGED_CONTACT_NAME', $contactData['fname'] .' '. $contactData['lname']); + $page->add_template_var('LOGGED_COMPANY', $contactData['company']); +} + if(!$page->ui->get_cache("userData/settings")) { $page->ui->set_cache("userData/settings", $user->get_settings()); } @@ -116,6 +127,7 @@ 'summary' => "Summary", 'project' => "Projects", 'helpdesk' => "Helpdesk", + 'tags' => "Tags", 'contacts' => "Contacts", 'settings' => "Settings", ); Modified: releases/1.1/includes/extern/helpdesk.inc =================================================================== --- releases/1.1/includes/extern/helpdesk.inc 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/includes/extern/helpdesk.inc 2007-12-19 02:01:13 UTC (rev 711) @@ -146,8 +146,10 @@ unset($helpdeskData['notes']); //make the wrapping SANE. - $helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); - $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'],FALSE); + #$helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); + $helpdeskData['subject'] = cleanString($helpdeskData['subject'], "htmlentity_plus_brackets"); + $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'], TRUE); + $helpdeskData['subject'] = preg_replace('/\S\s\s/', ' ', $helpdeskData['subject']); //add everything to the page as a template var... foreach($helpdeskData as $field=>$value) { @@ -176,8 +178,10 @@ if(is_array($myNotes) && count($myNotes)) { $baseRow = $page->templateRows['issueNotes']; foreach($myNotes as $repArr) { - $repArr['body'] = cleanString($repArr['body'], "htmlentity_plus_brackets"); $repArr['body'] = $bbCodeParser->parseString($repArr['body'], FALSE); + $repArr['body'] = preg_replace('/\s\s/', ' ', $repArr['body']); + $repArr['body'] = preg_replace('/\S\s\s/', ' ', $repArr['body']); + $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); $repArr['solutionIndicator'] = ""; Modified: releases/1.1/lib/cs-content/VERSION =================================================================== --- releases/1.1/lib/cs-content/VERSION 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/cs-content/VERSION 2007-12-19 02:01:13 UTC (rev 711) @@ -1,5 +1,5 @@ ## Stores the current version of the cs-content system, and it's source. Please do NOT modify this file. -VERSION: 0.10.5 +VERSION: 0.10.6 PROJECT: cs-content $HeadURL:https://cs-content.svn.sourceforge.net/svnroot/cs-content/trunk/VERSION $ \ No newline at end of file Modified: releases/1.1/lib/cs-content/cs_phpDB.php =================================================================== --- releases/1.1/lib/cs-content/cs_phpDB.php 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/cs-content/cs_phpDB.php 2007-12-19 02:01:13 UTC (rev 711) @@ -4,8 +4,8 @@ * A class for generic PostgreSQL database access. * * SVN INFORMATION::: - * SVN Signature:::::::: $Id: cs_phpDB.php 221 2007-11-21 17:39:01Z crazedsanity $ - * Last Committted Date: $Date: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ + * SVN Signature:::::::: $Id: cs_phpDB.php 225 2007-12-19 00:20:13Z crazedsanity $ + * Last Committted Date: $Date: 2007-12-18 18:20:13 -0600 (Tue, 18 Dec 2007) $ * Last Committed Path:: $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_phpDB.php $ * */ @@ -105,6 +105,10 @@ public function __construct() { $this->gfObj = new cs_globalFunctions; + if(defined('DEBUGPRINTOPT')) { + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; + } + $this->isInitialized = TRUE; }//end __construct() //========================================================================= Modified: releases/1.1/lib/cs-content/documentation/basics.pdf =================================================================== (Binary files differ) Modified: releases/1.1/lib/globalFunctions.php =================================================================== --- releases/1.1/lib/globalFunctions.php 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/globalFunctions.php 2007-12-19 02:01:13 UTC (rev 711) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.5'), + 'contentSystem' => array('cs-content', '0.10.6'), 'XMLParser' => array('cs-phpxml', '0.5.5'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); Modified: releases/1.1/lib/helpdeskClass.php =================================================================== --- releases/1.1/lib/helpdeskClass.php 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/helpdeskClass.php 2007-12-19 02:01:13 UTC (rev 711) @@ -297,7 +297,7 @@ if(is_array($dataArr['initialTag']) && count($dataArr['initialTag'])) { //get the list of tags, so we know what the total modifier is. - $allTags = $tagObj->get_tag_list(); + $allTags = $tagObj->get_tag_list(TRUE); foreach($dataArr['initialTag'] as $id) { $dataArr['priority'] += $allTags[$id]['modifier']; @@ -410,10 +410,10 @@ /** * This returns a list of available TAGS (the "helpdesk_cat" table is deprecated) */ - function get_category_list($selectThis=NULL) { + function get_category_list($selectThis=NULL, $orderByMod=FALSE) { //create a list of tags. $object = new tagClass($this->db); - $mainTagList = $object->get_tag_list(TRUE); + $mainTagList = $object->get_tag_list(TRUE, $orderByMod); //create the "replacement array" and such. $tagList = array(); Copied: releases/1.1/lib/invoice.class.php (from rev 710, trunk/lib/invoice.class.php) =================================================================== --- releases/1.1/lib/invoice.class.php (rev 0) +++ releases/1.1/lib/invoice.class.php 2007-12-19 02:01:13 UTC (rev 711) @@ -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() + //========================================================================= +} +?> Property changes on: releases/1.1/lib/invoice.class.php ___________________________________________________________________ Name: svn:keywords + Id HeadURL Date Revision Author Name: svn:eol-style + native Copied: releases/1.1/lib/invoiceItem.class.php (from rev 710, trunk/lib/invoiceItem.class.php) =================================================================== --- releases/1.1/lib/invoiceItem.class.php (rev 0) +++ releases/1.1/lib/invoiceItem.class.php 2007-12-19 02:01:13 UTC (rev 711) @@ -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() + //========================================================================= +} +?> Property changes on: releases/1.1/lib/invoiceItem.class.php ___________________________________________________________________ Name: svn:keywords + Id HeadURL Date Revision Author Name: svn:eol-style + native Modified: releases/1.1/lib/noteClass.php =================================================================== --- releases/1.1/lib/noteClass.php 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/noteClass.php 2007-12-19 02:01:13 UTC (rev 711) @@ -2,11 +2,11 @@ /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:noteClass.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/noteClass.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ @@ -52,7 +52,7 @@ * @return 0 FAIL: unable to retrieve notes. * @return <array> PASS: array contains records, indexed by id. */ - function get_notes($critArr=NULL, $primaryOrder=NULL) { + function get_notes($critArr=NULL, $primaryOrder=NULL, $formatIt=TRUE) { if(is_array($primaryOrder)) { $arrayKeysArr = array_keys($primaryOrder); @@ -102,11 +102,20 @@ $retval = $this->db->farray_fieldnames("note_id",NULL,0); foreach($retval as $id=>$arr) { - //add some wrapping & cleaning (so the data appears properly) - $retval[$id]['body'] = wordwrap($arr['body'], 95); - $retval[$id]['subject'] = cleanString($retval[$id]['subject'], "htmlentity_plus_brackets"); - $retval[$id]['body'] = cleanString($retval[$id]['body'], "htmlentity_plus_brackets"); + if($formatIt === TRUE) { + //add some wrapping & cleaning (so the data appears properly) + $retval[$id]['subject'] = cleanString($retval[$id]['subject'], "htmlentity_plus_brackets"); + + $body = $retval[$id]['body']; + $body = cleanString($body, "htmlentity_plus_brackets"); + $body = preg_replace("/\n/", "<BR>", $body); + $body = preg_replace('/\s\s/', ' ', $body); + $body = preg_replace('/\S\s\s/', ' ', $body); + + $retval[$id]['body'] = $body; + } + //make the created & updated fields nicer. $cleanDatesArr = array('created', 'updated'); foreach($cleanDatesArr as $dateField) { Modified: releases/1.1/lib/tagClass.php =================================================================== --- releases/1.1/lib/tagClass.php 2007-12-19 01:41:33 UTC (rev 710) +++ releases/1.1/lib/tagClass.php 2007-12-19 02:01:13 UTC (rev 711) @@ -53,8 +53,12 @@ * @return (array) PASS: contains tag_name_id=>name array. * @return (exception) database error or no rows. */ - public function get_tag_list($getAllData=FALSE) { - $sql = "SELECT * FROM tag_name_table ORDER BY modifier, lower(name)"; + public function get_tag_list($getAllData=FALSE, $orderByMod=FALSE) { + $orderBy = "ORDER BY lower(name)"; + if($orderByMod) { + $orderBy = "ORDER BY modifier, lower(name)"; + } + $sql = "SELECT * FROM tag_name_table ". $orderBy; $numrows = $this->db->exec($sql); $dberror = $this->db->errorMsg(); @@ -144,7 +148,8 @@ $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) WHERE ". string_from_array($sqlArr, 'select'); + $sql = "SELECT tag_name_id, name 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); $dberror = $this->db->errorMsg(); @@ -285,7 +290,7 @@ //========================================================================= - private function update_tag_record($critArr, array $changes) { + private function update_tag_record(array $critArr, array $changes) { $updateStr = string_from_array($changes, 'update'); $criteria = string_from_array($critArr, 'select', NULL, 'numeric'); $sql = "UPDATE tag_table SET ". $updateStr ."" . @@ -440,6 +445,53 @@ return($retval); }//end create_new_tag_name() //========================================================================= + + + + //========================================================================= + private function update_tag_name_record(array $critArr, array $changes) { + $updateStr = string_from_array($changes, 'update'); + $criteria = string_from_array($critArr, 'select', NULL, 'numeric'); + $sql = "UPDATE tag_name_table SET ". $updateStr ."" . + "WHERE ". $criteria; + + //start a transaction & run the update. + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + if(strlen($this->lastError) || $numrows !== 1) { + //something bad happened. + $retval = 0; + if(strlen($this->lastError)) { + //make it apparent that something went wrong. + $this->logsObj->log_dberror(__METHOD__ .": unable to update ($numrows) or dberror::: ". $this->lastError); + $retval = NULL; + } + } + else { + //good to go. + $retval = $numrows; + $this->logsObj->log_by_class("Updated tag record::: ". $updateStr ."\nCRITERIA::: ". $criteria, 'system'); + } + + return($retval); + }//end update_tag_name_record() + //========================================================================= + + + + //========================================================================= + public function update_tag_modifier($tagNameId, $modifier) { + if(is_numeric($tagNameId) && is_numeric($modifier)) { + $retval = $this->update_tag_name_record(array('tag_name_id' => $tagNameId), array('modifier' => $modifier)); + } + else { + throw new exception(__METHOD__ .": invalid input given..."); + } + + return($retval); + }//end update_tag_modifier() + //========================================================================= } ?> \ No newline at end of file Copied: releases/1.1/public_html/images/bullet-round.png (from rev 710, trunk/public_html/images/bullet-round.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/bullet-round.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Copied: releases/1.1/public_html/images/icon-help.png (from rev 710, trunk/public_html/images/icon-help.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icon-help.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Copied: releases/1.1/public_html/images/icons (from rev 710, trunk/public_html/images/icons) Deleted: releases/1.1/public_html/images/icons/12-em-check.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-check.png (from rev 710, trunk/public_html/images/icons/12-em-check.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-check.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/12-em-cross.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-cross.png (from rev 710, trunk/public_html/images/icons/12-em-cross.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-cross.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/12-em-down.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-down.png (from rev 710, trunk/public_html/images/icons/12-em-down.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/12-em-pencil.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-pencil.png (from rev 710, trunk/public_html/images/icons/12-em-pencil.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-pencil.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/12-em-plus.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-plus.png (from rev 710, trunk/public_html/images/icons/12-em-plus.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-plus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/12-em-up.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/12-em-up.png (from rev 710, trunk/public_html/images/icons/12-em-up.png) =================================================================== (Binary files differ) Property changes on: releases/1.1/public_html/images/icons/12-em-up.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: releases/1.1/public_html/images/icons/16-arrow-down.png =================================================================== (Binary files differ) Copied: releases/1.1/public_html/images/icons/16-arrow-down.png (from rev 710, trunk/public_html/images/icons/16-arrow-down.png) =====================... [truncated message content] |
From: <cra...@us...> - 2007-12-19 18:53:00
|
Revision: 713 http://cs-project.svn.sourceforge.net/cs-project/?rev=713&view=rev Author: crazedsanity Date: 2007-12-19 10:52:52 -0800 (Wed, 19 Dec 2007) Log Message: ----------- *** RELEASE 1.1.0-RC1 *** SUMMARY OF CHANGES: * Formatting of helpdesk issue body & notes without "pre" tags. * admin interface for tags, updated tag listing * Ordering options for tags, ability to change modifier for tag name. * Folder for icons from "Sweetie-BasePack-v3" * Help system (mostly just for the Helpdesk). * Status messages show icon in title for prettiness. :) * After re-linking an issue, message now shows link back to previous project. * Fix header (of SQL files) to have proper SVN keywords & such. * Ability to change helpdesk issue name (issue #70). * Fix order of tags when viewing issue (#123). * Fix initial priority based on tag modifier (#77). * Display ancestry link list instead of just project name on summary (#101). * Use block rows to display input or text for open/closed issue (#119). * Display currently logged-in user (#71). * Implement newest version of cs-content (0.10.6) * External helpdesk remembers contact_id/email * Better internal error handling & reporting * Tag modifiers affect initial issue priority * "Bug" auto-selected for new issues. * Remove "Stall" option for issues (status not properly handled anyway) * Enhanced email alerts, handle errors when sending * BBCode implemented! * Options for sending email locally vs. via SMTP (must be manually set) * AuthToken system for handling temporary authentication (lost passwords) * Helpdesk displays "Notified Users" list * Use real cookies (ones that last after browser is closed) * Javascript goodness for changing issue/project details * Updated documentation for developers & such * Use magic "__autoload()" function for class inclusions * Updates & bugfixes to upgrade system * Contacts can have multiple email address (one is always primary) * Automatic exception logging * More logging, better format of log details NOTE: this also contains two documents that didn't get added in the last commit when cs-content was updated (non-essential files). Modified Paths: -------------- releases/1.1/VERSION Added Paths: ----------- releases/1.1/lib/cs-content/documentation/source/why_templating.odt releases/1.1/lib/cs-content/documentation/why_templating.pdf Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2007-12-19 18:49:52 UTC (rev 712) +++ releases/1.1/VERSION 2007-12-19 18:52:52 UTC (rev 713) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0-BETA16 +VERSION: 1.1.0-RC1 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Added: releases/1.1/lib/cs-content/documentation/source/why_templating.odt =================================================================== (Binary files differ) Property changes on: releases/1.1/lib/cs-content/documentation/source/why_templating.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: releases/1.1/lib/cs-content/documentation/why_templating.pdf =================================================================== (Binary files differ) Property changes on: releases/1.1/lib/cs-content/documentation/why_templating.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-27 00:07:51
|
Revision: 716 http://cs-project.svn.sourceforge.net/cs-project/?rev=716&view=rev Author: crazedsanity Date: 2007-12-26 16:07:36 -0800 (Wed, 26 Dec 2007) Log Message: ----------- *** RELEASE 1.1.0 *** SUMMARY OF CHANGES: * Cannot modify tags on closed issues. * Formatting of helpdesk issue body & notes without "pre" tags. * admin interface for tags, updated tag listing * Ordering options for tags, ability to change modifier for tag name. * Folder for icons from "Sweetie-BasePack-v3" * Help system (mostly just for the Helpdesk). * Status messages show icon in title for prettiness. :) * After re-linking an issue, message now shows link back to previous project. * Fix header (of SQL files) to have proper SVN keywords & such. * Ability to change helpdesk issue name (issue #70). * Fix order of tags when viewing issue (#123). * Fix initial priority based on tag modifier (#77). * Display ancestry link list instead of just project name on summary (#101). * Use block rows to display input or text for open/closed issue (#119). * Display currently logged-in user (#71). * Implement newest version of cs-content (0.10.6) * External helpdesk remembers contact_id/email * Better internal error handling & reporting * Tag modifiers affect initial issue priority * "Bug" auto-selected for new issues. * Remove "Stall" option for issues (status not properly handled anyway) * Enhanced email alerts, handle errors when sending * BBCode implemented! * Options for sending email locally vs. via SMTP (must be manually set) * AuthToken system for handling temporary authentication (lost passwords) * Helpdesk displays "Notified Users" list * Use real cookies (ones that last after browser is closed) * Javascript goodness for changing issue/project details * Updated documentation for developers & such * Use magic "__autoload()" function for class inclusions * Updates & bugfixes to upgrade system * Contacts can have multiple email address (one is always primary) * Automatic exception logging * More logging, better format of log details SVN COMMAND: merge -r713:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk Modified Paths: -------------- releases/1.1/VERSION releases/1.1/includes/content/helpdesk.inc releases/1.1/templates/content/helpdesk/view.content.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2007-12-27 00:05:57 UTC (rev 715) +++ releases/1.1/VERSION 2007-12-27 00:07:36 UTC (rev 716) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0-RC1 +VERSION: 1.1.0 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/includes/content/helpdesk.inc =================================================================== --- releases/1.1/includes/content/helpdesk.inc 2007-12-27 00:05:57 UTC (rev 715) +++ releases/1.1/includes/content/helpdesk.inc 2007-12-27 00:07:36 UTC (rev 716) @@ -278,14 +278,16 @@ //if they're the owner, show the "solution" section. $assignedStr = $helpdeskData['leader_contact_id']; if($helpdeskData['status_id'] == 4) { - //allow the current user to re-open this issue. + //CLOSED: allow the current user to re-open this issue. $doNotRipRows[] = "assigned_text"; $doNotRipRows[] = "priority_text"; $doNotRipRows[] = "reopen_button"; } else { + //NOT closed... $doNotRipRows[] = "assigned_optionList"; $doNotRipRows[] = "priority_optionList"; + $doNotRipRows[] = "editable_tags"; if(($assignedStr == $_SESSION['contact_id']) || ($assignedStr == "" || is_null($assignedStr))) { //well, we can show 'em the update/modify button. $doNotRipRows[] = "update_button"; @@ -353,7 +355,14 @@ $myTagList = $proj->tagObj->get_tags_for_record($helpdeskData['record_id']); if(is_array($myTagList)) { - $baseRow = $page->templateRows['removeable_tag']; + if($helpdeskData['status_id'] == 4) { + $tagListVar = 'text_tags'; + $baseRow = $page->templateRows['text_tags']; + } + else { + $tagListVar = 'removeable_tag'; + $baseRow = $page->templateRows['removeable_tag']; + } $myTagRow = ""; $tCount = 0; foreach($myTagList as $tagNameId=>$tagName) { @@ -371,12 +380,8 @@ ); $myTagRow .= mini_parser($baseRow, $repArr, '%%', '%%'); } + $page->add_template_var($tagListVar, $myTagRow); } - else { - //tell 'em there's no tags! - $myTagRow = ""; - } - $page->add_template_var('removeable_tag', $myTagRow); //Display tags that can be added. $availableTagsList = $proj->tagObj->get_available_tags_for_record($helpdeskData['record_id'], 3); Modified: releases/1.1/templates/content/helpdesk/view.content.tmpl =================================================================== --- releases/1.1/templates/content/helpdesk/view.content.tmpl 2007-12-27 00:05:57 UTC (rev 715) +++ releases/1.1/templates/content/helpdesk/view.content.tmpl 2007-12-27 00:07:36 UTC (rev 716) @@ -149,19 +149,24 @@ </th> <td colspan="2"> + <!-- BEGIN editable_tags --> <!-- BEGIN removeable_tag --><a href="/content/tags/remove/%%tag_name_id%%/{record_id}">%%name%%</a>%%separator%% <!-- END removeable_tag --> - - <BR> - + + <BR> + <select> <!-- BEGIN addTag_option --> <option value='%%value%%'%%selectedString%% onClick="location.href='/content/tags/add/%%value%%/{record_id}'">%%display%%</option> <!-- END addTag_option --> {add_tag_list} </select> <i><font color="red">(NOTE: this will *immediately* add a tag -- don't do it if you've changed something!)</font></i><BR> - <input type="text" name="newTag" value=""><input type="button" value="Add New Tag" - onClick="this.value='Creating Tag...';document.main.newTag.readonly=true;document.hiddenAddTagForm.new_tag.value=document.main.newTag.value;document.hiddenAddTagForm.submit()"></td> + <input type="text" name="newTag" value=""><input type="button" value="Add New Tag" + onClick="this.value='Creating Tag...';document.main.newTag.readonly=true;document.hiddenAddTagForm.new_tag.value=document.main.newTag.value;document.hiddenAddTagForm.submit()"> + <!-- END editable_tags --> + <!-- BEGIN text_tags --><b>%%name%%</b>%%separator%% + <!-- END text_tags --> + </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-02-07 03:59:50
|
Revision: 796 http://cs-project.svn.sourceforge.net/cs-project/?rev=796&view=rev Author: crazedsanity Date: 2008-02-06 19:59:47 -0800 (Wed, 06 Feb 2008) Log Message: ----------- *** RELEASE 1.1.1 *** SUMMARY OF CHANGES::: * update to cs-content v0.10.8 * update to cs-phpxml v0.5.5 * minor template & include changes for updated version of cs-content. * remove invalid links to non-existent "contacts" page... NOTE: changes from trunk of v1.0 were merged, also, commit in trunk for v1.1 invalidly indicated release 1.0.1 (instead of 1.1.1). SVN COMMAND::: merge -r794:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/1.1 Modified Paths: -------------- releases/1.1/VERSION releases/1.1/includes/login.inc releases/1.1/lib/cs-arrayToPath/VERSION releases/1.1/lib/cs-arrayToPath/arrayToPathClass.php releases/1.1/lib/cs-content/VERSION releases/1.1/lib/cs-content/contentSystemClass.php releases/1.1/lib/cs-content/cs_fileSystemClass.php releases/1.1/lib/cs-content/cs_genericPageClass.php releases/1.1/lib/cs-content/cs_phpDB.php releases/1.1/lib/cs-phpxml/xmlAbstract.class.php releases/1.1/lib/cs-phpxml/xmlBuilderClass.php releases/1.1/lib/cs-phpxml/xmlParserClass.php releases/1.1/lib/globalFunctions.php releases/1.1/lib/projectClass.php releases/1.1/lib/sessionCacheClass.php releases/1.1/lib/session_class.php releases/1.1/lib/site_config.php releases/1.1/templates/content/helpdesk/view.content.tmpl releases/1.1/templates/infobar.shared.tmpl Added Paths: ----------- releases/1.1/lib/cs-content/db_types/ releases/1.1/lib/cs-content/db_types/cs_phpDB__pgsql.class.php releases/1.1/templates/content/notes/create.content.tmpl releases/1.1/templates/content/notes/view.content.tmpl releases/1.1/templates/login.content.tmpl Removed Paths: ------------- releases/1.1/lib/cs-content/db_types/cs_phpDB__pgsql.class.php releases/1.1/templates/content/notes/index.shared.tmpl releases/1.1/templates/login.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/VERSION 2008-02-07 03:59:47 UTC (rev 796) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.0 +VERSION: 1.1.1 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/includes/login.inc =================================================================== --- releases/1.1/includes/login.inc 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/includes/login.inc 2008-02-07 03:59:47 UTC (rev 796) @@ -57,7 +57,7 @@ if($_GET['destination']) { $_SESSION['loginDestination'] = urlencode($_GET['destination']); } -//show the default page. -$page->change_content(html_file_to_string("login.tmpl")); +$page->add_template_var('cs-project_version', VERSION_STRING); + ?> \ No newline at end of file Modified: releases/1.1/lib/cs-arrayToPath/VERSION =================================================================== --- releases/1.1/lib/cs-arrayToPath/VERSION 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-arrayToPath/VERSION 2008-02-07 03:59:47 UTC (rev 796) @@ -2,4 +2,4 @@ VERSION: 0.2.2 PROJECT: cs-arrayToPath -$HeadURL: https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/releases/0.2.2/VERSION $ \ No newline at end of file +$HeadURL: https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/releases/0.2/VERSION $ \ No newline at end of file Modified: releases/1.1/lib/cs-arrayToPath/arrayToPathClass.php =================================================================== --- releases/1.1/lib/cs-arrayToPath/arrayToPathClass.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-arrayToPath/arrayToPathClass.php 2008-02-07 03:59:47 UTC (rev 796) @@ -6,7 +6,7 @@ * ------------------- * Last Author::::::::: $Author: crazedsanity $ * Current Revision:::: $Revision: 17 $ - * Repository Location: $HeadURL: https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/releases/0.2.2/arrayToPathClass.php $ + * Repository Location: $HeadURL: https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/releases/0.2/arrayToPathClass.php $ * Last Updated:::::::: $Date: 2007-09-12 14:24:46 -0500 (Wed, 12 Sep 2007) $ * * Modified: releases/1.1/lib/cs-content/VERSION =================================================================== --- releases/1.1/lib/cs-content/VERSION 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/VERSION 2008-02-07 03:59:47 UTC (rev 796) @@ -1,5 +1,5 @@ ## Stores the current version of the cs-content system, and it's source. Please do NOT modify this file. -VERSION: 0.10.6 +VERSION: 0.10.8 PROJECT: cs-content $HeadURL:https://cs-content.svn.sourceforge.net/svnroot/cs-content/trunk/VERSION $ \ No newline at end of file Modified: releases/1.1/lib/cs-content/contentSystemClass.php =================================================================== --- releases/1.1/lib/cs-content/contentSystemClass.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/contentSystemClass.php 2008-02-07 03:59:47 UTC (rev 796) @@ -1,10 +1,10 @@ -<? +<?php /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/contentSystemClass.php $ - * $Id: contentSystemClass.php 221 2007-11-21 17:39:01Z crazedsanity $ - * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ - * $LastChangedRevision: 221 $ + * $Id: contentSystemClass.php 252 2008-01-31 21:57:49Z crazedsanity $ + * $LastChangedDate: 2008-01-31 15:57:49 -0600 (Thu, 31 Jan 2008) $ + * $LastChangedRevision: 252 $ * $LastChangedBy: crazedsanity $ * * HOW THE SYSTEM WORKS::: @@ -90,12 +90,15 @@ ); protected $templateList = array(); protected $includesList = array(); - protected $templateObj = NULL; + public $templateObj = NULL; protected $gfObj = NULL; protected $tabs = NULL; protected $finalSection; + private $isValid=FALSE; + private $reason=NULL; + //------------------------------------------------------------------------ /** * The CONSTRUCTOR. Duh. @@ -257,8 +260,7 @@ * Rips apart the "section" string, setting $this->section and $this->sectionArr. */ private function parse_section() { - // - if($this->section === 0) { + if($this->section === 0 || is_null($this->section) || !strlen($this->section)) { $this->section = "content/index"; } $myArr = split('/', $this->section); @@ -286,8 +288,10 @@ //make sure we've still got something valid to work with. if(!strlen($section)) { + //TODO: remove the extra return statement (should only be one at the bottom of the method). return(0); - } else { + } + else { //check the string to make sure it doesn't begin or end with a "/" if($section[0] == '/') { $section = substr($section, 1, strlen($section)); @@ -359,8 +363,9 @@ //now cd() all the way back. $this->fileSystemObj->cd('/'); - } else { - //couldn't find the templates directory... ick. + } + else { + //couldn't find the templates directory, and no includes... it's dead. $this->die_gracefully(__METHOD__ .": unable to find the templates directory, or non-valid page [". $this->validate_page() ."]"); } }//end prepare() @@ -399,14 +404,17 @@ } $lsDir = $this->fileSystemObj->ls($indexFilename); + $lsDirVals = array_values($lsDir); $lsFile = $this->fileSystemObj->ls("$finalSection.content.tmpl"); - if(is_array(array_values($lsDir))) { - //it's the dir. + + if(is_array(array_values($lsFile)) && is_array($lsFile[$finalSection .".content.tmpl"])) { + //it's the file ("{finalSection}.content.tmpl", like "mySection.content.tmpl") + $myIndex = $finalSection .".content.tmpl"; + } + elseif(is_array(array_values($lsDir)) && (is_array($lsDir[$indexFilename]))) { $myIndex = $indexFilename; - } elseif(is_array(array_values($lsFile))) { - //it's the file (no dir, or dir w/o index) - $myIndex = $finalSection.content.tmpl; - } else { + } + else { //nothin' doin'. $myIndex = NULL; } @@ -420,21 +428,35 @@ if(isset($myIndex)) { $valid = TRUE; $this->fileSystemObj->cd('/templates'); - } else { - $this->reason = __METHOD__ .": couldn't find page template for (". $this->section .", final=[$finalSection])..."; } - } else { - //just the base template. Make sure it's good. + else { + $this->reason = __METHOD__ .": couldn't find page template for ". $this->section; + } + } + else { + //if the baseDir is "help", this would try to use "/help/index.content.tmpl" $myFile = $this->baseDir .'/index.content.tmpl'; - $lsData = $this->fileSystemObj->ls($myFile); - if(isset($lsData[$myFile]) && $lsData[$myFile]['type'] == 'file') { + $sectionLsData = $this->fileSystemObj->ls($myFile); + + //if the baseDir is "help", this would try to use "/help.content.tmpl" + $sectionFile = $this->baseDir .'.content.tmpl'; + $lsData = $this->fileSystemObj->ls(); + + if(isset($lsData[$sectionFile]) && is_array($lsData[$sectionFile])) { + $valid = TRUE; + $this->finalSection = $this->baseDir; + } + elseif(isset($sectionLsData[$myFile]) && $sectionLsData[$myFile]['type'] == 'file') { //we're good. $valid = TRUE; $this->finalSection = $this->baseDir; - } else { + } + else { $this->reason = __METHOD__ .": couldn't find base template."; } } + $this->isValid = $valid; + return($valid); }//end validate_page() //------------------------------------------------------------------------ @@ -486,6 +508,10 @@ $this->templateList[$mySection] = $myTmpl; } } + if(isset($tmplList[$this->baseDir]['content'])) { + //load template for the main page (if $this->baseDir == "help", this would load "/help.content.tmpl" as content) + $this->templateList['content'] = $tmplList[$this->baseDir]['content']; + } } }//end load_page_templates() //------------------------------------------------------------------------ @@ -553,6 +579,7 @@ if(($myType == 'file') && !in_array($index, $this->ignoredList[$myType])) { $filename = $this->gfObj->create_list($this->fileSystemObj->cwd, $index, '/'); $filename = preg_replace('/^\/templates/', '', $filename); + $filename = preg_replace('/^\/\//', '/', $filename); //call another method to rip the filename apart properly, then arrange things as needed. $pieces = $this->parse_filename($index); $myPriIndex = $pieces[$primaryIndex]; @@ -687,7 +714,7 @@ } else { //TODO: make it *actually* die gracefully... the way it works now looks more like puke than grace. - throw new exception(__METHOD__ .": something broke. \nDETAILS::: $details" . + throw new exception(__METHOD__ .": Couldn't find 404 template, plus additional error... \nDETAILS::: $details" . "\nREASON::: ". $this->reason); } }//end die_gracefully() @@ -762,7 +789,16 @@ unset($myInternalScriptName); } - $page->print_page(); + if(is_bool($this->templateObj->allow_invalid_urls() === TRUE) && $this->isValid === FALSE) { + $this->isValid = $this->templateObj->allow_invalid_urls(); + } + + if($this->isValid === TRUE) { + $page->print_page(); + } + else { + $this->die_gracefully($this->reason); + } }//end finish() //------------------------------------------------------------------------ @@ -772,8 +808,7 @@ /** * Method for accessing the protected $this->sectionArr array. */ - public function get_sectionArr() - { + public function get_sectionArr() { //give 'em what they want. return($this->sectionArr); }//end get_sectionArr() @@ -785,8 +820,7 @@ /** * Method for accessing the protected member $this->finalSection. */ - public function get_finalSection() - { + public function get_finalSection() { //give 'em what they want. return($this->finalSection); }//end get_finalSection() @@ -798,8 +832,7 @@ /** * Method for accessing "baseDir", only referenced as the base section. */ - public function get_baseSection() - { + public function get_baseSection() { return($this->baseDir); }//end get_baseSection() //------------------------------------------------------------------------ Modified: releases/1.1/lib/cs-content/cs_fileSystemClass.php =================================================================== --- releases/1.1/lib/cs-content/cs_fileSystemClass.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/cs_fileSystemClass.php 2008-02-07 03:59:47 UTC (rev 796) @@ -1,12 +1,12 @@ -<? +<?php /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_fileSystemClass.php $ - * $Id: cs_fileSystemClass.php 221 2007-11-21 17:39:01Z crazedsanity $ - * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ + * $Id: cs_fileSystemClass.php 252 2008-01-31 21:57:49Z crazedsanity $ + * $LastChangedDate: 2008-01-31 15:57:49 -0600 (Thu, 31 Jan 2008) $ * $LastChangedBy: crazedsanity $ - * $LastChangedRevision: 221 $ + * $LastChangedRevision: 252 $ */ require_once(dirname(__FILE__) ."/cs_globalFunctions.php"); Modified: releases/1.1/lib/cs-content/cs_genericPageClass.php =================================================================== --- releases/1.1/lib/cs-content/cs_genericPageClass.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/cs_genericPageClass.php 2008-02-07 03:59:47 UTC (rev 796) @@ -2,10 +2,10 @@ /* * FILE INFORMATION: * $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_genericPageClass.php $ - * $Id: cs_genericPageClass.php 221 2007-11-21 17:39:01Z crazedsanity $ - * $LastChangedDate: 2007-11-21 11:39:01 -0600 (Wed, 21 Nov 2007) $ + * $Id: cs_genericPageClass.php 252 2008-01-31 21:57:49Z crazedsanity $ + * $LastChangedDate: 2008-01-31 15:57:49 -0600 (Thu, 31 Jan 2008) $ * $LastChangedBy: crazedsanity $ - * $LastChangedRevision: 221 $ + * $LastChangedRevision: 252 $ */ require_once(dirname(__FILE__) ."/template.inc"); require_once(dirname(__FILE__) ."/cs_versionAbstract.class.php"); @@ -22,6 +22,8 @@ private $showEditableLink = FALSE; + private $allowInvalidUrls=NULL; + //--------------------------------------------------------------------------------------------- /** * The constructor. @@ -257,7 +259,7 @@ if($stripUndefVars) { $numLoops = 0; - while(preg_match_all('/\{.*?\}/', $this->templateObj->varvals['out'], $tags) && $numLoops < 50) { + while(preg_match_all('/\{.\S+?\}/', $this->templateObj->varvals['out'], $tags) && $numLoops < 50) { $tags = $tags[0]; //TODO: figure out why this works when running it twice. @@ -286,8 +288,9 @@ */ public function process_set_message() { //if there's not a message set, skip. - $errorBox = $this->file_to_string("system/message_box.tmpl"); + $errorBox = ""; if(isset($_SESSION['message']) && is_array($_SESSION['message'])) { + $errorBox = $this->file_to_string("system/message_box.tmpl"); //let's make sure the "type" value is *lowercase*. $_SESSION['message']['type'] = strtolower($_SESSION['message']['type']); @@ -307,6 +310,7 @@ // they'll never get past this point). unset($_SESSION['message']); } + return($errorBox); }//end of process_set_message() //--------------------------------------------------------------------------------------------- @@ -595,6 +599,17 @@ return($retval); }//end set_all_block_rows() //--------------------------------------------------------------------------------------------- + + + + //--------------------------------------------------------------------------------------------- + public function allow_invalid_urls($newSetting=NULL) { + if(!is_null($newSetting) && is_bool($newSetting)) { + $this->allowInvalidUrls = $newSetting; + } + return($this->allowInvalidUrls); + }//end allow_invalid_urls() + //--------------------------------------------------------------------------------------------- }//end cs_genericPage{} ?> Modified: releases/1.1/lib/cs-content/cs_phpDB.php =================================================================== --- releases/1.1/lib/cs-content/cs_phpDB.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/cs_phpDB.php 2008-02-07 03:59:47 UTC (rev 796) @@ -4,8 +4,8 @@ * A class for generic PostgreSQL database access. * * SVN INFORMATION::: - * SVN Signature:::::::: $Id: cs_phpDB.php 225 2007-12-19 00:20:13Z crazedsanity $ - * Last Committted Date: $Date: 2007-12-18 18:20:13 -0600 (Tue, 18 Dec 2007) $ + * SVN Signature:::::::: $Id: cs_phpDB.php 252 2008-01-31 21:57:49Z crazedsanity $ + * Last Committted Date: $Date: 2008-01-31 15:57:49 -0600 (Thu, 31 Jan 2008) $ * Last Committed Path:: $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/cs_phpDB.php $ * */ @@ -32,1132 +32,51 @@ require_once(dirname(__FILE__) ."/cs_versionAbstract.class.php"); class cs_phpDB extends cs_versionAbstract { - - /** Internal result set pointer. */ - protected $result = NULL; - /** Internal error code. */ - protected $errorCode = 0; + private $dbLayerObj; + private $dbType; - /** Status of the current transaction. */ - protected $transStatus = NULL; - - /** Whether there is a transaction in progress or not. */ - protected $inTrans = FALSE; - - /** Holds the last query performed. */ - protected $lastQuery = NULL; - - /** List of queries that have been run */ - protected $queryList=array(); - - /** How many seconds to wait for a query before cancelling it. */ - protected $timeOutSeconds = NULL; - - /** Internal check to determine if a connection has been established. */ - protected $isConnected=FALSE; - - /** Internal check to determine if the parameters have been set. */ - protected $paramsAreSet=FALSE; - - /** Resource handle. */ - protected $connectionID = -1; - - /** Hostname or IP to connect to */ - protected $host; - - /** Port to connect to (default for Postgres is 5432) */ - protected $port; - - /** Name of the database */ - protected $dbname; - - /** Username to connect to the database */ - protected $user; - - /** password to connect to the database */ - protected $password; - - /** Row counter for looping through records */ - protected $row = -1; - - /** cs_globalFunctions object, for string stuff. */ - protected $gfObj; - - /** Internal check to ensure the object has been properly created. */ - protected $isInitialized=FALSE; - - /** List of prepared statements, indexed off the name, with the sub-array being fieldname=>dataType. */ - protected $preparedStatements = array(); - - /** Set to TRUE to save all queries into an array. */ - protected $useQueryList=FALSE; - - /** array that essentially remembers how many times beginTrans() was called. */ - protected $transactionTree = NULL; - - //////////////////////////////////////////// - // Core primary connection/database function - //////////////////////////////////////////// - - //========================================================================= - public function __construct() { - $this->gfObj = new cs_globalFunctions; + public function __construct($type='pgsql') { - if(defined('DEBUGPRINTOPT')) { - $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; - } - - $this->isInitialized = TRUE; - }//end __construct() - //========================================================================= - - - - //========================================================================= - /** - * Make sure the object is sane. - */ - final protected function sanity_check() { - if($this->isInitialized !== TRUE) { - throw new exception(__METHOD__ .": not properly initialized"); - } - }//end sanity_check() - //========================================================================= - - - - //========================================================================= - /** - * Set appropriate parameters for database connection - */ - public function set_db_info(array $params){ - $this->sanity_check(); - $required = array('host', 'port', 'dbname', 'user', 'password'); - - $requiredCount = 0; - foreach($params as $index=>$value) { - if(property_exists($this, $index) && in_array($index, $required)) { - $this->$index = $value; - $requiredCount++; - } - else { - throw new exception(__METHOD__. ": property (". $index .") does " . - "not exist or isn't allowed"); - } - } - - if($requiredCount == count($required)) { - $this->paramsAreSet = TRUE; - } - else { - throw new exception(__METHOD__ .": required count (". $requiredCount - .") does not match required number of fields (". count($required) .")"); - } - }//end set_db_info() - //========================================================================= - - - - //========================================================================= - /** - * Wrapper for close() - */ - function disconnect() { - //Disconnect from $database - return($this->close()); - }//end disconnect() - //========================================================================= - - - - //========================================================================= - /** - * Standard method to close connection. - */ - function close() { - $this->isConnected = FALSE; - $retval = null; - if($this->connectionID != -1) { - $retval = pg_close($this->connectionID); - } - else { - throw new exception(__METHOD__ .": Failed to close connection: connection is invalid"); - } - - return($retval); - }//end close() - //========================================================================= - - - - //========================================================================= - /** - * Connect to the database - */ - function connect(array $dbParams=NULL, $forceNewConnection=FALSE){ - $this->sanity_check(); - $retval = NULL; - if(is_array($dbParams)) { - $this->set_db_info($dbParams); - } - - if($this->paramsAreSet === TRUE && $this->isConnected === FALSE) { + if(strlen($type)) { - $myConnArr = array( - 'host' => $this->host, - 'port' => $this->port, - 'dbname' => $this->dbname, - 'user' => $this->user, - 'password' => $this->password - ); + require_once(dirname(__FILE__) .'/db_types/'. __CLASS__ .'__'. $type .'.class.php'); + $className = __CLASS__ .'__'. $type; + $this->dbLayerObj = new $className; + $this->dbType = $type; - //make it into a string separated by spaces, don't clean anything, remove null elements - $connStr = $this->gfObj->string_from_array($myConnArr, 'url', " "); + $this->gfObj = new cs_globalFunctions; - //start output buffer for displaying error. - ob_start(); - if($forceNewConnection) { - $connID = pg_connect($connStr, PGSQL_CONNECT_FORCE_NEW); + if(defined('DEBUGPRINTOPT')) { + $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; } - else { - $connID =pg_connect($connStr); - } - $connectError = ob_get_contents(); - ob_end_clean(); - if(is_resource($connID)) { - $this->errorCode=0; - $this->connectionID = $connID; - $this->isConnected = TRUE; - $retval = $this->connectionID; - } - else { - throw new exception(__METHOD__ .": FATAL ERROR: ". $connectError); - } + $this->isInitialized = TRUE; } else { - throw new exception(__METHOD__ .": paramsAreSet=(". $this->paramsAreSet ."), isConnected=(". $this->isConnected .")"); + throw new exception(__METHOD__ .": failed to give a type (". $type .")"); } - - return($retval); - }//end connect() + }//end __construct() //========================================================================= //========================================================================= - function get_hostname() { - $this->sanity_check(); - return($this->host); - }//end get_hostname() - //========================================================================= - - - - //========================================================================= - /** - * Run sql queries - * - * TODO: re-implement query logging (setting debug, logfilename, etc). - */ - function exec($query) { - $this->lastQuery = $query; - if($this->useQueryList) { - $this->queryList[] = $query; - } - $returnVal = false; - - if(($this->get_transaction_status() != -1) && ($this->connectionID != -1)) { - $this->result = @pg_query($this->connectionID, $query); - - if($this->result !== false) { - if (eregi("^[[:space:]]*select", $query)) { - //If we didn't have an error and we are a select statement, move the pointer to first result - $numRows = $this->numRows(); - if($numRows > 0) { - $this->move_first(); - } - $returnVal = $numRows; - - } - else { - //We got something other than an update. Use numAffected - $returnVal = $this->numAffected(); - } - } - } - return($returnVal); - }//end exec() - //========================================================================= - - - - //========================================================================= /** - * Returns any error caused by the last executed query. - * - * @return NULL OK: no error - * @return (string) FAIL: contains error returned from the query. + * Magic method to call methods within the database abstraction layer ($this->dbLayerObj). */ - function errorMsg($setMessage=NULL,$logError=NULL) { - $this->sanity_check(); - if ($this->connectionID < 0) { - switch ($this->errorCode) { - //############################################### - case -1: - $retVal = "FATAL ERROR - CONNECTION ERROR: RESOURCE NOT FOUND"; - break; - //############################################### - - //############################################### - case -2: - $retVal = "FATAL ERROR - CLASS ERROR: FUNCTION CALLED WITHOUT PARAMETERS"; - break; - //############################################### - - //############################################### - case -3: - $retVal = "Query exceeded maximum timeout (". $this->timeoutSeconds .")"; - break; - //############################################### - - //############################################### - default: - $retVal = null; - //############################################### - } - } else { - $retVal = pg_last_error($this->connectionID); + public function __call($methodName, $args) { + if(method_exists($this->dbLayerObj, $methodName)) { + $retval = call_user_func_array(array($this->dbLayerObj, $methodName), $args); } - - return($retVal); - }//end errorMsg() - //========================================================================= - - - - - //////////////////// - // Cursor movement - //////////////////// - - - - - //========================================================================= - /** - * move pointer to first row of result set - */ - function move_first() { - $this->sanity_check(); - if($this->result == NULL) { - $retval = FALSE; - } else { - $this->set_row(0); - $retval = TRUE; + throw new exception(__METHOD__ .': unsupported method ('. $methodName .') for database of type ('. $this->dbType .')'); } - return($retval); - }//end move_first() + }//end __call() //========================================================================= - - - //========================================================================= - /** - * move pointer to last row of result set - */ - function move_last() { - $this->sanity_check(); - if($this->result == NULL) { - $retval = FALSE; - } - else { - $this->set_row($this->numRows()-1); - $retval = TRUE; - } - - return($retval); - }//end move_list() - //========================================================================= - - - - //========================================================================= - /** - * point to the next row, return false if no next row - */ - function move_next() { - $this->sanity_check(); - // If more rows, then advance row pointer - if($this->row < $this->numRows()-1) { - $this->set_row($this->row +1); - $retval = TRUE; - } - else { - $retval = FALSE; - } - - return($retval); - }//end move_next() - //========================================================================= - - - - //========================================================================= - /** - * point to the previous row, return false if no previous row - */ - function move_previous() { - // If not first row, then advance row pointer - if ($this->row > 0) { - $this->set_row($this->row -1); - return true; - } - else return false; - }//end move_previous() - //========================================================================= - - - - //========================================================================= - // point to the next row, return false if no next row - function next_row() { - // If more rows, then advance row pointer - if ($this->row < $this->numRows()-1) { - $this->set_row($this->row +1); - return true; - } - else return false; - }//end next_row() - //========================================================================= - - - - //========================================================================= - // can be used to set a pointer to a perticular row - function set_row($row){ - if(is_numeric($row)) { - $this->row = $row; - } - else { - throw new exception(__METHOD__ .": invalid data for row (". $row .")"); - } - return($this->row); - }//end set_row(); - //========================================================================= - - - - - /////////////////////// - // Result set related - /////////////////////// - - - - //========================================================================= - /** - * Return the current row as an object. - */ - function fobject() { - $this->sanity_check(); - if($this->result == NULL || $this->row == -1) { - $retval = NULL; - } - else { - $retval = pg_fetch_object($this->result, $this->row); - } - - return($retval); - } - //========================================================================= - - - - //========================================================================= - /** - * Fetch the current row as an array containing fieldnames AND numeric indexes. - */ - function farray(){ - if($this->result == NULL || $this->row == -1) { - $retval = NULL; - } - else { - $retval = pg_fetch_array($this->result,$this->row); - } - - return($retval); - }//end farray() - //========================================================================= - - - - //========================================================================= - /** - * Another way to retrieve a single row (useful for loops). - */ - function frow(){ - $this->sanity_check(); - if($this->numRows() <= 0) { - $retval = NULL; - } - else { - if($this->result == null || $this->row == -1) { - $retval = NULL; - } - else { - $retval = pg_fetch_row($this->result, $this->row); - } - } - - return($retval); - }//end frow() - //========================================================================= - - - - //========================================================================= - /** - * Similar to farray(), except all indexes are non-numeric, and the entire - * result set is retrieved: if only one row is available, no numeric index - * is set, unless $numbered is TRUE. - * - * TODO: clean this up! - */ - function farray_fieldnames($index=NULL, $numbered=NULL,$unsetIndex=1) { - $this->sanity_check(); - $retval = NULL; - - //before we get too far, let's make sure there's something there. - if($this->numRows() <= 0) { - $retval = 0; - } - else { - //keep any errors/warnings from printing to the screen by using OUTPUT BUFFERS. - ob_start(); - - $x = 0; - do { - $temp = $this->farray(); - foreach($temp as $key=>$value) { - //remove the numbered indexes. - if(is_string($key)) { - $tArr[$key] = $value; - } - } - $newArr[$x] = $tArr; - $x++; - } - while($this->next_row()); - - if($index) { - foreach($newArr as $row=>$contents) { //For each of the returned sets of information - foreach($contents as $fieldname=>$value) { //And now for each of the items in that set - if($fieldname == $index) { - //The index for the new array will be this fieldname's value - $arrayKey = $value; - } - - $tempContent[$fieldname] = $value; - //don't include the "index" field in the subarray; that always seems to end badly. - if ($unsetIndex) { - unset($tempContent[$index]); - } - } - - if (!isset($tempArr[$arrayKey])) { - //Make sure we didn't already set this in the array. If so, then we don't have a unique variable to use for the array index. - $tempArr[$arrayKey] = $tempContent; - } - else { - //TODO: bigtime cleaning... should only return at the bottom of the method. - $retval = 0; - break; - } - $arrayKey = NULL; //Blank this out after using it, just in case we don't find one in the next iteration - } - - if (count($tempArr) != count($newArr)) { - $details = "farray_fieldnames(): Array counts don't match.<BR>\n" - ."FUNCTION ARGUMENTS: index=[$index], numbered=[$numbered], unsetIndex=[$unsetIndex]<BR>\n" - ."LAST QUERY: ". $this->lastQuery; - throw new exception(__METHOD__ .": $details"); - } - $newArr = $tempArr; - } - //this is where, if there's only one row (and the planets align just the way - // I like them to), there's no row w/ a sub-array... This is only done - // if $index is NOT set... - if(($this->numRows() == 1) AND (!$index) AND (!$numbered)) { - $newArr = $newArr[0]; - } - $retval = $newArr; - ob_end_clean(); - } - return($retval); - }//end farray_fieldnames() - //========================================================================= - - - - //========================================================================= - /** - * Uses farray_fieldnames() to retrieve the entire result set, but the final - * array is contains name=>value pairs. - */ - function farray_nvp($name, $value) { - if((!$name) OR (!$value)) { - $retval = 0; - } - else { - $tArr = $this->farray_fieldnames(NULL,1); - if(!is_array($tArr)) { - $retval = 0; - } - else { - //loop through it & grab the proper info. - $retval = array(); - foreach($tArr as $row=>$array) { - $tKey = $array[$name]; - $tVal = $array[$value]; - $retval[$tKey] = $tVal; - } - } - } - - //return the new array. - return($retval); - }//end farray_nvp() - //========================================================================= - - - - //========================================================================= - /** - * Similar to farray_fieldnames(), but only returns the NUMERIC indexes - */ - function farray_numbered() { - do { - $temp = $this->frow(); - $retArr[] = $temp[0]; - } - while($this->next_row()); - - return($retArr); - }//end farray_numbered() - //========================================================================= - - - - //========================================================================= - /** - * Returns the number of tuples affected by an insert/delete/update query. - * NOTE: select queries must use numRows() - */ - function numAffected() { - if($this->result == null) { - $retval = 0; - } else { - $this->affectedRows = pg_affected_rows($this->result); - $retval = $this->affectedRows; - } - - return($retval); - }//end numAffected() - //========================================================================= - - - - //========================================================================= - /** - * Returns the number of rows in a result (from a SELECT query). - */ - function numRows() { - if ($this->result == null) { - $retval = 0; - } - else { - $this->numrows = pg_num_rows($this->result); - $retval = $this->numrows; - } - - return($retval); - }//end numRows() - //========================================================================= - - - - //========================================================================= - /** - * wrapper for numAffected() - */ - function affectedRows(){ - return($this->numAffected()); - }//end affectedRows() - //========================================================================= - - - - //========================================================================= - /** - * Returns the current row number. - */ - function currRow(){ - return($this->row); - }//end currRow() - //========================================================================= - - - - //========================================================================= - /** - * Get the number of fields in a result. - */ - // get the number of fields in a result - function num_fields() { - if($this->result == null) { - $retval = 0; - } - else { - $retval = pg_num_fields($this->result); - } - return($retval); - }//end num_fields() - //========================================================================= - - - - //========================================================================= - function column_count() { - return($this->numFields()); - }//end column_count() - //========================================================================= - - - - //========================================================================= - /** - * get last OID (object identifier) of last INSERT statement - */ - function lastOID($doItForMe=0, $field=NULL) { - if($this->result == NULL) { - $retval = NULL; - } - else { - $tOid = pg_last_oid($this->result); - $retval = $tOid; - - if(($doItForMe) AND (eregi("^insert", $this->last_query))) { - //attempt to parse the insert statement, then select - // all fields (unless $field is set) from it. - $t = split(" into ", strtolower($this->last_query)); - $t = split(" ", $t[1]); - $t = split("\(", $t[0]); - $table = $t[0]; - - //now we have the table. - if(!$field) { - $field = "*"; - } - $query = "SELECT $field FROM $table WHERE OID=$tOid"; - $this->exec($query); - $dberror = $this->errorMsg(1,1,1,"lastOID(): "); - - if(!$dberror) { - $res = $this->farray(); - if(is_string($field)) { - $retval = $res[0]; - } - } - } - } - return($retval); - }//end lastOID() - //========================================================================= - - - - //========================================================================= - /** - * get result field name of the given field number. - */ - // get result field name - function fieldname($fieldnum) { - if($this->result == NULL) { - $retval =NULL; - } - else { - $retval = pg_field_name($this->result, $fieldnum); - } - - return($retval); - }//end fieldname() - //========================================================================= - - - - - //////////////////////// - // Transaction related - //////////////////////// - - - - - //========================================================================= - /** - * Start a transaction. - */ - function beginTrans($transName=NULL) { - $transStatus = $this->get_transaction_status(TRUE); - if(!$this->inTrans) { - //not in a transaction. Set up the transaction tree properly. - $this->transactionTree = array(); - } - else { - if($this->inTrans && is_null($this->transactionTree)) { - $transLevel = $this->get_transaction_level(); - //transaction started without using beginTrans()... - $this->transactionTree = array(); - $this->gfObj->debug_print(__METHOD__ .": transaction already started, transStatus=(". $transStatus ."), transLevel=(". $transLevel .")"); - $this->transactionTree[] = "Already started..."; - } - } - - if(is_null($transName)) { - $transName = time(TRUE); - } - $this->transactionTree[] = $transName; - $transLevel = $this->get_transaction_level(); - $this->gfObj->debug_print(__METHOD__ .": starting transaction at transLevel=(". $transLevel .")"); - return($this->exec("BEGIN")); - }//end beginTrans() - //========================================================================= - - - - //========================================================================= - /** - * Commit a transaction. - */ - function commitTrans() { - $retval = $this->get_transaction_status(); - $lastTransLayer = array_pop($this->transactionTree); - $transLevel = $this->get_transaction_level(); - if($transLevel == 0) { - if($retval > 1) { - $retval = 1; - } - $this->exec("COMMIT"); - - //check to see if there was an error (deferred constraints are checked at commit time) - if(strlen($this->errorMsg())) { - $retval = 0; - } - } - $this->get_transaction_status(); - return($retval); - }//end commitTrans() - //========================================================================= - - - - //========================================================================= - // returns true/false - function rollbackTrans() { - $retval = $this->exec("ABORT"); - $this->get_transaction_status(); - return($retval); - }//end rollbackTrans() - //========================================================================= - - - - //////////////////////// - // SQL String Related - //////////////////////// - - - - //========================================================================= - /** - * Gets rid of evil characters that might lead ot SQL injection attacks. - */ - function querySafe($string) { - return($this->gfObj->cleanString($string,"query")); - }//end querySafe() - //========================================================================= - - - - //========================================================================= - /** - * Make it SQL safe. - */ - function sqlSafe($string) { - return($this->gfObj->cleanString($string,"sql")); - }//end sqlSafe() - //========================================================================= - - - - //========================================================================= - /** - * Gives textual explanation of the current status of our database - * connection. - * - * @param $goodOrBad (bool,optional) return good/bad status. - * - * @return (-1) (FAIL) connection is broken - * @return (0) (FAIL) error was encountered (transient error) - * @return (1) (PASS) useable - * @return (2) (PASS) useable, but not just yet (working - * on something) - */ - function get_transaction_status($goodOrBad=TRUE) { - $myStatus = pg_transaction_status($this->connectionID); - $text = 'unknown'; - switch($myStatus) { - case PGSQL_TRANSACTION_IDLE: { - //No query in progress: it's idle. - $goodOrBadValue = 1; - $text = 'idle'; - $this->inTrans = FALSE; - } - break; - - - case PGSQL_TRANSACTION_ACTIVE: { - //there's a command in progress. - $goodOrBadValue = 2; - $text = 'processing'; - } - break; - - - case PGSQL_TRANSACTION_INTRANS: { - //connection idle within a valid transaction block. - $goodOrBadValue = 1; - $text = 'valid transaction'; - $this->inTrans = TRUE; - } - break; - - - case PGSQL_TRANSACTION_INERROR: { - //connection idle within a broken transaction. - $goodOrBadValue = 0; - $text = 'failed transaction'; - $this->inTrans = TRUE; - } - break; - - - case PGSQL_TRANSACTION_UNKNOWN: - default: { - //the connection is bad. - $goodOrBadValue = -1; - $text = 'bad connection'; - } - break; - } - - //do they want text or the good/bad number? - $retval = $text; - $this->transactionStatus = $goodOrBadValue; - if($goodOrBad) { - //they want the number. - $retval = $goodOrBadValue; - } - - return($retval); - }//end get_transaction_status() - //========================================================================= - - - - //========================================================================= - public function is_connected() { - $retval = FALSE; - if(is_resource($this->connectionID) && $this->isConnected === TRUE) { - $retval = TRUE; - } - - return($retval); - }//end is_connected() - //========================================================================= - - - - //========================================================================= - /** - * Create a prepared statement. - */ - public function create_prepared_statement($planName,array $fieldToType, $statement) { - $retval = FALSE; - //store the mappings. - $this->preparedStatements[$planName] = $fieldToType; - - //TODO: check that the string in "$statement" has the same number of "${n}" as are in "$fieldToType". - - $dataTypeString = ""; - foreach($fieldToType as $field => $type) { - $dataTypeString = $this->gfObj->create_list($dataTypeString, $type, ", "); - } - - $sql = "PREPARE ". $planName ."(". $dataTypeString .") AS ". $statement; - - $myNumrows = $this->exec($sql); - $myDberror = $this->errorMsg(); - - if(!strlen($myDberror)) { - $retval = TRUE; - } - else { - throw new exception(__METHOD__ .": failed to create prepared statement '". $planName ."'... dberror::: ". $myDberror ."\n\nSQL::: ". $sql); - } - - return($retval); - }//end create_prepared_statement() - //========================================================================= - - - - //========================================================================= - /** - * Run a statement prepared by this object. - * - * NOTE: determination of rows affected (numAffected) vs. rows returned (numRows) - * must be done by the user via the referenced methods. - */ - public function run_prepared_statement($name, array $data) { - $retval = FALSE; - if(is_array($this->preparedStatements[$name]) && count($data) == count($this->preparedStatements[$name])) { - $this->result = pg_execute($this->connectionID, $name, $data); - $dberror = $this->errorMsg(); - - if(!strlen($dberror)) { - $retval = TRUE; - } - } - else { - throw new exception(__METHOD__ .": invalid statement name (". $name ."), or incorrect number of elements"); - } - - return($retval); - }//end run_prepared_statement() - //========================================================================= - - - - //========================================================================= - /** - * Starts a copy command. - * - * TODO: implement safeguards so they can only put a line until the copy is ended. - */ - public function start_copy($tableName, array $fields) { - $retval = FALSE; - $copyStmt = "COPY ". $tableName ." (". $this->gfObj->string_from_array($fields, NULL, ", ") . ") FROM stdin;"; - $this->exec($copyStmt); - if(!strlen($this->errorMsg())) { - //TODO: set something here so that NOTHING ELSE can be done except put_line() and end_copy(). - $this->copyInProgress = TRUE; - $retval = TRUE; - } - else { - $this->end_copy(); - $retval = FALSE; - } - - return($retval); - }//end start_copy() - //========================================================================= - - - - //========================================================================= - /** - * Used to send a line to the COPY in progress (only if it was initiated by - * the internal start_copy() method). - * - * NOTE: the "end-of-copy" line, '\.', should NEVER be sent here. - */ - public function put_line($line) { - $retval = FALSE; - if($this->copyInProgress === TRUE) { - $myLine = trim($line); - $myLine .= "\n"; - - $retval = pg_put_line($this->connectionID, $myLine); - } - else { - throw new exception(__METHOD__ .": cannot send line if no copy is in progress"); - } - - return($retval); - }//end put_line() - //========================================================================= - - - - //========================================================================= - public function end_copy() { - if($this->copyInProgress === TRUE) { - //send the end-of-copy line... - $this->put_line("\\.\n"); - } - - $retval = pg_end_copy($this->connectionID); - - return($retval); - }//end end_copy() - //========================================================================= - - - - //========================================================================= - /** - * Determines how many times a transaction has been started. Starting - * multiple transactions does NOT protect the outer transaction from - * problems that occur in the inner transaction. In fact, it does the - * opposite: it protects the code from committing too early (which might - * destroy something that depending on the transaction). - */ - public function get_transaction_level() { - if(is_array($this->transactionTree)) { - $retval = count($this->transactionTree); - } - else { - $retval = 0; - } - - return($retval); - }//end get_transaction_level() - //========================================================================= - - - - //========================================================================= - /** - * Simple way to determine if the current connection is inside a - * transaction or not. - */ - public function is_in_transaction() { - $retval = 0; - if($this->inTrans || $this->get_transaction_level() != 0) { - $retval = TRUE; - } - return($retval); - }//end is_in_transaction() - //========================================================================= - - - } // end class phpDB ?> Copied: releases/1.1/lib/cs-content/db_types (from rev 795, trunk/1.1/lib/cs-content/db_types) Deleted: releases/1.1/lib/cs-content/db_types/cs_phpDB__pgsql.class.php =================================================================== --- trunk/1.1/lib/cs-content/db_types/cs_phpDB__pgsql.class.php 2008-02-07 03:55:00 UTC (rev 795) +++ releases/1.1/lib/cs-content/db_types/cs_phpDB__pgsql.class.php 2008-02-07 03:59:47 UTC (rev 796) @@ -1,1160 +0,0 @@ -<?php - -/* - * A class for generic PostgreSQL database access. - * - * SVN INFORMATION::: - * SVN Signature:::::::: $Id: cs_phpDB__pgsql.class.php 252 2008-01-31 21:57:49Z crazedsanity $ - * Last Committted Date: $Date: 2008-01-31 15:57:49 -0600 (Thu, 31 Jan 2008) $ - * Last Committed Path:: $HeadURL: https://cs-content.svn.sourceforge.net/svnroot/cs-content/releases/0.10/db_types/cs_phpDB__pgsql.class.php $ - * - */ - -/////////////////////// -// ORIGINATION INFO: -// Author: Trevin Chow (with contributions from Lee Pang, wle...@ho...) -// Email: t1...@ma... -// Date: February 21, 2000 -// Last Updated: August 14, 2001 -// -// Description: -// Abstracts both the php function calls and the server information to POSTGRES -// databases. Utilizes class variables to maintain connection information such -// as number of rows, result id of last operation, etc. -// -/////////////////////// - -//TODO: option to not use layered transactions -//TODO: rollbackTrans() in layered transaction causes abort when final layer is committed/aborted -//TODO: stop sending queries to backend when transction is bad/aborted. -//TODO: commit/abort specific layer requests (i.e. if there's 8 layers & the first is named "x", calling commitTrans("x") will cause the whole transaction to commit & all layers to be destroyed. - -class cs_phpDB__pgsql { - - /** Internal result set pointer. */ - protected $result = NULL; - - /** Internal error code. */ - protected $errorCode = 0; - - /** Status of the current transaction. */ - protected $transStatus = NULL; - - /** Whether there is a transaction in progress or not. */ - protected $inTrans = FALSE; - - /** Holds the last query performed. */ - protected $lastQuery = NULL; - - /** List of queries that have been run */ - protected $queryList=array(); - - /** How many seconds to wait for a query before cancelling it. */ - protected $timeOutSeconds = NULL; - - /** Internal check to determine if a connection has been established. */ - protected $isConnected=FALSE; - - /** Internal check to determine if the parameters have been set. */ - protected $paramsAreSet=FALSE; - - /** Resource handle. */ - protected $connectionID = -1; - - /** Hostname or IP to connect to */ - protected $host; - - /** Port to connect to (default for Postgres is 5432) */ - protected $port; - - /** Name of the database */ - protected $dbname; - - /** Username to connect to the database */ - protected $user; - - /** password to connect to the database */ - protected $password; - - /** Row counter for looping through records */ - protected $row = -1; - - /** cs_globalFunctions object, for string stuff. */ - protected $gfObj; - - /** Internal check to ensure the object has been properly created. */ - protected $isInitialized=FALSE; - - /** List of prepared statements, indexed off the name, with the sub-array being fieldname=>dataType. */ - protected $preparedStatements = array(); - - /** Set to TRUE to save all queries into an array. */ - protected $useQueryList=FALSE; - - /** array that essentially remembers how many times beginTrans() was called. */ - protected $transactionTree = NULL; - - //////////////////////////////////////////// - // Core primary connection/database function - //////////////////////////////////////////// - - - //========================================================================= - public function __construct() { - $this->gfObj = new cs_globalFunctions; - - if(defined('DEBUGPRINTOPT')) { - $this->gfObj->debugPrintOpt = DEBUGPRINTOPT; - } - - $this->isInitialized = TRUE; - }//end __construct() - //========================================================================= - - - - //========================================================================= - /** - * Make sure the object is sane. - */ - final protected function sanity_check() { - if($this->isInitialized !== TRUE) { - throw new exception(__METHOD__ .": not properly initialized"); - } - }//end sanity_check() - //========================================================================= - - - - //========================================================================= - /** - * Set appropriate parameters for database connection - */ - public function set_db_info(array $params){ - $this->sanity_check(); - $required = array('host', 'port', 'dbname', 'user', 'password'); - - $requiredCount = 0; - foreach($params as $index=>$value) { - if(property_exists($this, $index) && in_array($index, $required)) { - $this->$index = $value; - $requiredCount++; - } - else { - throw new exception(__METHOD__. ": property (". $index .") does " . - "not exist or isn't allowed"); - } - } - - if($requiredCount == count($required)) { - $this->paramsAreSet = TRUE; - } - else { - throw new exception(__METHOD__ .": required count (". $requiredCount - .") does not match required number of fields (". count($required) .")"); - } - }//end set_db_info() - //========================================================================= - - - - //========================================================================= - /** - * Wrapper for close() - */ - function disconnect() { - //Disconnect from $database - return($this->close()); - }//end disconnect() - //========================================================================= - - - - //========================================================================= - /** - * Standard method to close connection. - */ - function close() { - $this->isConnected = FALSE; - $retval = null; - if($this->connectionID != -1) { - $retval = pg_close($this->connectionID); - } - else { - throw new exception(__METHOD__ .": Failed to close connection: connection is invalid"); - } - - return($retval); - }//end close() - //========================================================================= - - - - //========================================================================= - /** - * Connect to the database - */ - function connect(array $dbParams=NULL, $forceNewConnection=FALSE){ - $this->sanity_check(); - $retval = NULL; - if(is_array($dbParams)) { - $this->set_db_info($dbParams); - } - - if($this->paramsAreSet === TRUE && $this->isConnected === FALSE) { - - $myConnArr = array( - 'host' => $this->host, - 'port' => $this->port, - 'dbname' => $this->dbname, - 'user' => $this->user, - 'password' => $this->password - ); - - //make it into a string separated by spaces, don't clean anything, remove null elements - $connStr = $this->gfObj->string_from_array($myConnArr, 'url', " "); - - //start output buffer for displaying error. - ob_start(); - if($forceNewConnection) { - $connID = pg_connect($connStr, PGSQL_CONNECT_FORCE_NEW); - } - else { - $connID =pg_connect($connStr); - } - $connectError = ob_get_contents(); - ob_end_clean(); - - if(is_resource($connID)) { - $this->errorCode=0; - $this->connectionID = $connID; - $this->isConnected = TRUE; - $retval = $this->connectionID; - } - else { - throw new exception(__METHOD__ .": FATAL ERROR: ". $connectError); - } - } - else { - throw new exception(__METHOD__ .": paramsAreSet=(". $this->paramsAreSet ."), isConnected=(". $this->isConnected .")"); - } - - return($retval); - }//end connect() - //========================================================================= - - - - //========================================================================= - function get_hostname() { - $this->sanity_check(); - return($this->host); - }//end get_hostname() - //========================================================================= - - - - //========================================================================= - /** - * Run sql queries - * - * TODO: re-implement query logging (setting debug, logfilename, etc). - */ - function exec($query) { - $this->lastQuery = $query; - if($this->useQueryList) { - $this->queryList[] = $query; - } - $returnVal = false; - - if(($this->get_transaction_status() != -1) && ($this->connectionID != -1)) { - $this->result = @pg_query($this->connectionID, $query); - - if($this->result !== false) { - if (eregi("^[[:space:]]*select", $query)) { - //If we didn't have an error and we are a select statement, move the pointer to first result - $numRows = $this->numRows(); - if($numRows > 0) { - $this->move_first(); - } - $returnVal = $numRows; - - } - else { - //We got something other than an update. Use numAffected - $returnVal = $this->numAffected(); - } - } - } - return($returnVal); - }//end exec() - //========================================================================= - - - - //========================================================================= - /** - * Returns any error caused by the last executed query. - * - * @return NULL OK: no error - * @return (string) FAIL: contains error returned from the query. - */ - function errorMsg($setMessage=NULL,$logError=NULL) { - $this->sanity_check(); - if ($this->connectionID < 0) { - switch ($this->errorCode) { - //############################################### - case -1: - $retVal = "FATAL ERROR - CONNECTION ERROR: RESOURCE NOT FOUND"; - break; - //############################################### - - //############################################### - case -2: - $retVal = "FATAL ERROR - CLASS ERROR: FUNCTION CALLED WITHOUT PARAMETERS"; - break; - //############################################### - - //############################################### - case -3: - $retVal = "Query exceeded maximum timeout (". $this->timeoutSeconds .")"; - break; - //############################################### - - //############################################### - default: - $retVal = null; - //############################################### - } - } else { - $retVal = pg_last_error($this->connectionID); - } - - return($retVal); - }//end errorMsg() - //========================================================================= - - - - - //////////////////// - // Cursor movement - //////////////////// - - - - - //========================================================================= - /** - * move pointer to first row... [truncated message content] |
From: <cra...@us...> - 2008-02-07 06:24:31
|
Revision: 798 http://cs-project.svn.sourceforge.net/cs-project/?rev=798&view=rev Author: crazedsanity Date: 2008-02-06 22:24:26 -0800 (Wed, 06 Feb 2008) Log Message: ----------- *** RELEASE 1.1.2 *** SUMMARY OF CHANGES::: * fix invalid/missing schema for tags during initial setup (issue #147) SVN COMMANDS::: merge -r796:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/1.1 Modified Paths: -------------- releases/1.1/VERSION releases/1.1/docs/schema/cs_project.schema.sql releases/1.1/docs/sql/setup/02__tables.sql releases/1.1/includes/setup/3.inc Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2008-02-07 05:28:32 UTC (rev 797) +++ releases/1.1/VERSION 2008-02-07 06:24:26 UTC (rev 798) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.1 +VERSION: 1.1.2 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/docs/schema/cs_project.schema.sql =================================================================== --- releases/1.1/docs/schema/cs_project.schema.sql 2008-02-07 05:28:32 UTC (rev 797) +++ releases/1.1/docs/schema/cs_project.schema.sql 2008-02-07 06:24:26 UTC (rev 798) @@ -1300,7 +1300,8 @@ CREATE TABLE tag_name_table ( tag_name_id integer NOT NULL, - name text NOT NULL + name text NOT NULL, + modifier integer NOT NULL default -1 ); Modified: releases/1.1/docs/sql/setup/02__tables.sql =================================================================== --- releases/1.1/docs/sql/setup/02__tables.sql 2008-02-07 05:28:32 UTC (rev 797) +++ releases/1.1/docs/sql/setup/02__tables.sql 2008-02-07 06:24:26 UTC (rev 798) @@ -690,7 +690,8 @@ CREATE TABLE tag_name_table ( tag_name_id integer NOT NULL, - name text NOT NULL + name text NOT NULL, + modifier integer NOT NULL default -1 ); Modified: releases/1.1/includes/setup/3.inc =================================================================== --- releases/1.1/includes/setup/3.inc 2008-02-07 05:28:32 UTC (rev 797) +++ releases/1.1/includes/setup/3.inc 2008-02-07 06:24:26 UTC (rev 798) @@ -790,19 +790,21 @@ //========================================================================= private function create_tag_names() { $tags = array( - 1 => 'bug', - 2 => 'feature request', - 3 => 'information', - 4 => 'network related', - 5 => 'critical', - 6 => 'exception' + 1 => array(-1, 'bug'), + 2 => array(-1, 'feature request'), + 3 => array(0, 'information'), + 4 => array(0, 'network related'), + 5 => array(-5, 'critical'), + 6 => array(-2, 'exception') ); $retval = 0; - foreach($tags as $id=>$name) { + foreach($tags as $id=>$data) { + $name = $data[1]; $insertArr = array( 'tag_name_id' => $id, - 'name' => $name + 'name' => $data[1], + 'modifier' => $data[0] ); $sql = "INSERT INTO tag_name_table ". $this->gfObj->string_from_array($insertArr, 'insert', NULL, 'sql'); $numrows = $this->db->exec($sql); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-02-08 17:49:22
|
Revision: 805 http://cs-project.svn.sourceforge.net/cs-project/?rev=805&view=rev Author: crazedsanity Date: 2008-02-08 09:49:16 -0800 (Fri, 08 Feb 2008) Log Message: ----------- *** RELEASE 1.1.3 *** SUMMARY OF CHANGES::: * Re-add missing links to contacts section (#148) SVN COMMAND::: merge -r802:HEAD https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/1.1 Modified Paths: -------------- releases/1.1/VERSION releases/1.1/templates/content/helpdesk/view.content.tmpl releases/1.1/templates/infobar.shared.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2008-02-08 17:47:24 UTC (rev 804) +++ releases/1.1/VERSION 2008-02-08 17:49:16 UTC (rev 805) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.2 +VERSION: 1.1.3 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/templates/content/helpdesk/view.content.tmpl =================================================================== --- releases/1.1/templates/content/helpdesk/view.content.tmpl 2008-02-08 17:47:24 UTC (rev 804) +++ releases/1.1/templates/content/helpdesk/view.content.tmpl 2008-02-08 17:49:16 UTC (rev 805) @@ -108,7 +108,7 @@ <!-- BEGIN associatedUser_data --> <tr> <td nowrap style="border-bottom:solid #999 1px;border-right:solid #999 1px;border-left:solid #000 1px;"> - %%displayName%%</td> + <a href="/content/contacts/view/%%contact_id%%">%%displayName%%</a></td> <td style="border-bottom:solid #999 1px;border-left:solid #999 1px;border-right:solid #000 1px;"> %%email%%</td> Modified: releases/1.1/templates/infobar.shared.tmpl =================================================================== --- releases/1.1/templates/infobar.shared.tmpl 2008-02-08 17:47:24 UTC (rev 804) +++ releases/1.1/templates/infobar.shared.tmpl 2008-02-08 17:49:16 UTC (rev 805) @@ -11,7 +11,7 @@ <td width="100%"> <h2 style="display:inline;"><u>Current User</u></h2><BR> <h3 style="display:inline;">{LOGGED_COMPANY}</h3><br> - <h4 style="display:inline;">{LOGGED_CONTACT_NAME} ({LOGGED_USERNAME})</h4> + <h4 style="display:inline;">{LOGGED_CONTACT_NAME} (<a href="/content/contacts/view/{LOGGED_CONTACT_ID}">{LOGGED_USERNAME}</a>)</h4> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-03-31 02:22:07
|
Revision: 869 http://cs-project.svn.sourceforge.net/cs-project/?rev=869&view=rev Author: crazedsanity Date: 2008-03-30 19:21:56 -0700 (Sun, 30 Mar 2008) Log Message: ----------- *** RELEASE 1.1.5 *** Add ancestry link list to issue title (issue #146), plus remove wrapping from send_single_email() so wrapping isn't terrible. SVN COMMAND::: merge -r866:868 https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/1.1 Modified Paths: -------------- releases/1.1/VERSION releases/1.1/lib/bbCodeParser.class.php releases/1.1/lib/globalFunctions.php releases/1.1/templates/email/helpdesk-remark.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/VERSION 2008-03-31 02:21:56 UTC (rev 869) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.4 +VERSION: 1.1.5 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/lib/bbCodeParser.class.php =================================================================== --- releases/1.1/lib/bbCodeParser.class.php 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/lib/bbCodeParser.class.php 2008-03-31 02:21:56 UTC (rev 869) @@ -69,8 +69,18 @@ $retval = '[helpdesk_id='. $helpdeskId .']'; if(is_numeric($helpdeskId)) { try { - $data = $this->helpdeskObj->get_record($helpdeskId); - $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $data['name'] .'</a>]'; + $data = $this->helpdeskObj->get_record($helpdeskId); + $displayName = $data['name']; + + //add project linkage if there is any... + if($data['ancestry_level'] > 1) { + //pull the ancestry string. + $parentRecord = $this->projectObj->get_parent_record($data['ancestry']); + $x = $this->projectObj->get_ancestry_link_list($parentRecord['public_id'], TRUE, TRUE, TRUE); + $displayName = $x .' / <b>'. $displayName ."</b>"; + } + + $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $displayName .'</a>]'; } catch(exception $e) { debug_print($e->getMessage); Modified: releases/1.1/lib/globalFunctions.php =================================================================== --- releases/1.1/lib/globalFunctions.php 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/lib/globalFunctions.php 2008-03-31 02:21:56 UTC (rev 869) @@ -1756,7 +1756,6 @@ $mail->ContentType = "text/html"; $mail->Subject = $subject; $mail->Body = $bbCodeParser->parseString($body); - $mail->WordWrap = 75; $logsObj = new logsClass($db, 'Email'); Modified: releases/1.1/templates/email/helpdesk-remark.tmpl =================================================================== --- releases/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 02:21:56 UTC (rev 869) @@ -12,7 +12,7 @@ </tr> <tr> <th>Name of Issue:</th> - <td><pre>{name}</pre></td> + <td><pre>[helpdesk_id={public_id}]</pre></td> </tr> <tr> <th>Submitted by:</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |