[Fusionforge-commits] r12268 - in trunk: . src/plugins/oslc src/plugins/oslc/include/oslc-zend/application/controllers src/plugins/oslc/include/oslc-zend/application/models src/plugins/oslc/include/oslc-zend/application/views/scripts src/plugins/oslc/include/oslc-zend/application/views/scripts/cm src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm src/plugins/oslc/include/oslc-zend/application/views/scripts/error src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm src/plugins/oslc/tests src/plugins/oslc/tests/func tests tests/func tests/func/Site tools/VM-scripts

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Feb 11 13:14:56 CET 2011


Author: lolando
Date: 2011-02-11 13:14:55 +0100 (Fri, 11 Feb 2011)
New Revision: 12268

Added:
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php
   trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/
   trunk/src/plugins/oslc/tests/
Removed:
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php
   trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/
Modified:
   trunk/
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeCmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeOSLCConnector.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/MantisCmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/MantisOSLCConnector.php
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/OSLCConnector.php
   trunk/src/plugins/oslc/include/oslc-zend/application/models/ChangeRequests.php
   trunk/src/plugins/oslc/include/oslc-zend/application/models/fusionforge.inc.php
   trunk/src/plugins/oslc/include/oslc-zend/application/models/mantis.inc.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_service-document_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/index.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/oslc-cm-service-document.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/oslc-service-catalog.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/oslc-service-catalog.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-bugnote-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-bugnote-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-bugnote.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-bugnote.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-resource-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-resource-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-resource.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/read-resource.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-selection-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/_add_hyperlinks.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/_resource_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/_service-catalog_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/_service-document_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/get.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/index.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/oslc-cm-service-document.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/oslc-cm-service-document.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/oslc-service-catalog.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/oslc-service-catalog.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/oslc-service-catalog.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/post.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/put.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/put.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-bugnote.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/read-resource.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/show-creation-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/codendicm/show-selection-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/error/error.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_add_hyperlinks.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_resource_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-catalog_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/get.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/index.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog-project.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-service-catalog.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/post.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/put.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/put.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-bugnote.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/read-resource.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-creation-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-selection-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/_add_hyperlinks.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/_resource_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/_service-catalog_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/_service-document_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/get.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/index.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/oslc-cm-service-document.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/oslc-cm-service-document.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/oslc-service-catalog.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/oslc-service-catalog.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/oslc-service-catalog.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/post.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/put.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/put.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-bugnote.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource-collection.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource-collection.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource-collection.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource.json.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/read-resource.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/show-creation-ui.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/mantiscm/show-selection-ui.phtml
   trunk/src/plugins/oslc/tests/func/sureFireReportTest.php
   trunk/src/plugins/oslc/tests/run-provider-tests.sh
   trunk/src/plugins/oslc/tests/setup-provider-test.sh
   trunk/tests/SeleniumTests.php
   trunk/tests/func/Site/loginTest.php
   trunk/tests/func/db_reload.sh
   trunk/tools/VM-scripts/run-testsuite.sh
   trunk/tools/VM-scripts/update.sh
Log:
Merged new version of OSLC plugin from 5.1


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:8721-8727
/branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504,7567,7577,7623-7624,7638,7659-7660,7662,7665,7668,7674,7699,7746-7748,7771,7774,7786,7838
/branches/Branch_5_1:11607-11609,11621,11625,11627,11631,11638,11644,11647-11651,11677,11680-11681,11683-11684,11719-11720,11724,11754,11780,11783,11792,11794,11802,11808-11816,11818,11822-11824,11827-11829,11834-11835,11847,11849,11851-11852,11855,11858,11862,11867,11869-11872,11876,11880,11893,11902-11905,11915,11923-11927,11929-11930,11932,11934-11941,11943,11948-11949,11952-11954,11956-11960,11962,11965-11966,11972,11975,11980,11983-11984,11986-11987,11990,11992-11997,12003-12004,12010-12013,12015,12018-12023,12024,12043-12044,12046-12050,12051-12061,12063,12065,12070,12073-12074,12075-12076,12081-12083,12093-12094,12102,12105,12118,12124,12127-12128,12139,12141,12143,12148-12149,12153,12157-12159,12168-12169,12175-12180,12190,12194-12198,12203
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7478,7480,7485,7490-7492,7505,7540,7556-7560,7568,7570-7571,7573,7576,7580,7609-7611,7613,7615,7618,7621-7622,7625-7627,7639,7658,7661,7663-7664,7666-7667,7673,7675,7678,7680,7685,7688-7689,7693,7700,7706-7708,7713,7725,7728-7742,7760,7763-7764,7767,7769-7770,7773,7776,7784-7785,7791,7797,7799,7802-7808,7810-7811,7816,7818,7825-7828,7839,7846-7847,7850,7894,7902,7920-7922,7927-7928,7932,7936-7937,7939,7942,7944-7945,7947,7951,7956,7958,7960,8064,8079-8080,8108,8113,8119,8121,8127-8128,8145,8197,8201-8202,8216,8224,8226,8228,8247-8250,8252,8271-8272,8310-8311,8328,8337,8339-8357,8361,8371,8373-8375,8378-8379,8383-8396,8415,8427-8431,8438-8441,8449,8452-8453,8458,8461,8477-8478,8480,8482,8492,8514,8530,8604-8605,8608,8637,8662,8674,8751,8754,8756,8760-8761,8812,8850,8945,8995,8998,9004-9006,9124,9137,9141,9317,9443,9469,9670,9701,9726,9934,10013
/branches/Branch_5_0:8892,8895,8897-8898,8900,8903-8904,8906-8907,8910,8915,8922,8924,8926,8929,8931-8933,8941,8946,8951,8955,8972-8977,8981,8997,8999,9002,9031-9032,9050,9080-9081,9084-9086,9093-9095,9102-9104,9108,9113-9115,9117-9118,9123,9125,9127-9131,9135-9136,9139,9146,9148-9150,9179-9191,9193-9195,9198,9200,9202,9204,9207,9209,9211,9213,9215,9220-9222,9231,9234-9235,9243,9251,9254,9259,9287,9315,9318,9347-9349,9358,9396,9427,9429,9431-9433,9441-9442,9444-9445,9462,9464,9468,9522-9523,9549,9551-9552,9576-9577,9579,9615,9633-9634,9672-9673,9675-9676,9684,9686-9687,9689,9699,9727,9729,9731,9930-9932,9935,9956,9980,10005-10006,10021,10024,10027,10064,10081-10082,10273,10285,10820-10824,10868,10872,10876-10878,10880,10918,11015,11017,11058-11060,11085-11086,11160-11165,11252-11253,11287,11294,11581,11619-11620,11679,11722-11723,11907,11974

   + /trunk:8721-8727
/branches/Branch_5_0:8892,8895,8897-8898,8900,8903-8904,8906-8907,8910,8915,8922,8924,8926,8929,8931-8933,8941,8946,8951,8955,8972-8977,8981,8997,8999,9002,9031-9032,9050,9080-9081,9084-9086,9093-9095,9102-9104,9108,9113-9115,9117-9118,9123,9125,9127-9131,9135-9136,9139,9146,9148-9150,9179-9191,9193-9195,9198,9200,9202,9204,9207,9209,9211,9213,9215,9220-9222,9231,9234-9235,9243,9251,9254,9259,9287,9315,9318,9347-9349,9358,9396,9427,9429,9431-9433,9441-9442,9444-9445,9462,9464,9468,9522-9523,9549,9551-9552,9576-9577,9579,9615,9633-9634,9672-9673,9675-9676,9684,9686-9687,9689,9699,9727,9729,9731,9930-9932,9935,9956,9980,10005-10006,10021,10024,10027,10064,10081-10082,10273,10285,10820-10824,10868,10872,10876-10878,10880,10918,11015,11017,11058-11060,11085-11086,11160-11165,11252-11253,11287,11294,11581,11619-11620,11679,11722-11723,11907,11974
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7478,7480,7485,7490-7492,7505,7540,7556-7560,7568,7570-7571,7573,7576,7580,7609-7611,7613,7615,7618,7621-7622,7625-7627,7639,7658,7661,7663-7664,7666-7667,7673,7675,7678,7680,7685,7688-7689,7693,7700,7706-7708,7713,7725,7728-7742,7760,7763-7764,7767,7769-7770,7773,7776,7784-7785,7791,7797,7799,7802-7808,7810-7811,7816,7818,7825-7828,7839,7846-7847,7850,7894,7902,7920-7922,7927-7928,7932,7936-7937,7939,7942,7944-7945,7947,7951,7956,7958,7960,8064,8079-8080,8108,8113,8119,8121,8127-8128,8145,8197,8201-8202,8216,8224,8226,8228,8247-8250,8252,8271-8272,8310-8311,8328,8337,8339-8357,8361,8371,8373-8375,8378-8379,8383-8396,8415,8427-8431,8438-8441,8449,8452-8453,8458,8461,8477-8478,8480,8482,8492,8514,8530,8604-8605,8608,8637,8662,8674,8751,8754,8756,8760-8761,8812,8850,8945,8995,8998,9004-9006,9124,9137,9141,9317,9443,9469,9670,9701,9726,9934,10013
/branches/Branch_5_1:11607-11609,11621,11625,11627,11631,11638,11644,11647-11651,11677,11680-11681,11683-11684,11719-11720,11724,11754,11780,11783,11792,11794,11802,11808-11816,11818,11822-11824,11827-11829,11834-11835,11847,11849,11851-11852,11855,11858,11862,11867,11869-11872,11876,11880,11893,11902-11905,11915,11923-11927,11929-11930,11932,11934-11941,11943,11948-11949,11952-11954,11956-11960,11962,11965-11966,11972,11975,11980,11983-11984,11986-11987,11990,11992-11997,12003-12004,12010-12013,12015,12018-12023,12024,12043-12044,12046-12050,12051-12061,12063,12065,12070,12073-12074,12075-12076,12081-12083,12093-12094,12102,12105,12118,12124,12127-12128,12139,12141,12143,12148-12149,12153,12157-12159,12168-12169,12175-12180,12190,12194-12198,12203,12208-12213,12217-12258,12262,12264-12266
/branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504,7567,7577,7623-7624,7638,7659-7660,7662,7665,7668,7674,7699,7746-7748,7771,7774,7786,7838

Modified: svk:merge
   - 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7001
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7012
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7291
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7458
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7623
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7624
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7786
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7838
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:10013
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7335
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7344
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7345
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7402
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7455
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7459
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7469
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7470
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7476
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7480
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7505
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7540
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7557
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7559
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7560
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7580
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7609
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7615
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7618
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7621
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7622
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7626
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7627
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7708
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7713
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7725
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7729
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7730
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7731
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7732
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7733
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7734
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7737
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7738
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7739
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7742
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7760
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7763
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7764
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7767
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7769
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7773
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7776
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7784
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7785
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7797
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7799
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7811
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7826
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7827
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7828
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7839
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7951
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7958
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7960
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8108
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8113
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8119
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8128
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8145
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8202
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8216
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8224
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8226
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8250
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8337
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8357
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8371
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8375
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8379
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8415
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8427
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8431
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8441
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8449
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8453
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8530
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8604
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8605
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8608
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8637
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8751
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8756
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8761
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:9141
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10006
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10021
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10064
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10082
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10824
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11017
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11060
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11165
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11253
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11294
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8895
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8898
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8900
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8941
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9115
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9118
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9131
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9136
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9139
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9150
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9188
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9195
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9198
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9202
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9207
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9209
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9213
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9243
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9254
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9358
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9427
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9433
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9549
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9552
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9579
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9634
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9675
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9676
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9729
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9731
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9932
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9980
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11621
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11627
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11631
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11638
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11651
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11684
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11724
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11754
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11794
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11802
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11818
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11835
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11855
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11858
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11872
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11876
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11905
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11930
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11932
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11941
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11960
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11962
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11966
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11975
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11980
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11984
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11987
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11997
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12013
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12015
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12022
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12049
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12060
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12073
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12105
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12118
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12143
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12169
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12180
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12190
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12203
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/trunk:8727

   + 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7001
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7012
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7291
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7458
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7623
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7624
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7786
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7838
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:10013
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7335
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7344
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7345
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7402
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7455
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7459
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7469
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7470
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7476
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7480
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7505
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7540
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7557
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7559
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7560
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7580
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7609
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7615
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7618
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7621
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7622
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7626
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7627
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7708
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7713
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7725
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7729
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7730
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7731
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7732
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7733
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7734
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7737
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7738
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7739
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7742
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7760
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7763
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7764
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7767
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7769
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7773
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7776
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7784
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7785
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7797
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7799
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7811
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7826
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7827
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7828
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7839
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7951
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7958
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7960
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8108
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8113
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8119
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8128
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8145
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8202
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8216
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8224
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8226
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8250
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8337
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8357
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8371
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8375
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8379
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8415
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8427
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8431
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8441
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8449
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8453
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8530
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8604
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8605
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8608
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8637
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8751
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8756
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:8761
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:9141
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10006
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10021
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10064
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10082
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:10824
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11017
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11060
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11165
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11253
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:11294
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8895
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8898
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8900
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:8941
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9115
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9118
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9131
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9136
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9139
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9150
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9188
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9195
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9198
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9202
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9207
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9209
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9213
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9243
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9254
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9358
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9427
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9433
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9549
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9552
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9579
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9634
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9675
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9676
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9729
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9731
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9932
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_0:9980
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11621
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11627
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11631
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11638
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11651
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11684
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11724
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11754
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11794
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11802
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11818
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11835
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11855
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11858
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11872
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11876
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11905
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11930
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11932
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11941
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11960
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11962
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11966
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11975
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11980
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11984
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11987
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:11997
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12013
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12015
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12022
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12049
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12060
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12073
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12105
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12118
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12143
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12169
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12180
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12190
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12203
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_5_1:12266
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/trunk:8727


Deleted: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,530 +0,0 @@
-<?php 
-/**
- * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
- *
- * Originally written by Sabri LABBENE, 201O
- *
- * Codendi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Codendi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
- */
-
-require_once ('CmController.php');
-require_once ('CodendiOSLCConnector.php');
-
-class CodendiCmController extends CmController {
-    /**
-     * @var oslc
-     * 
-     * This will be the OSLC-CM controller managing the business logic of the application
-     */
-    private $oslc;
-    
-    /**
-     * Defines accepted mime-types for queries, and corresponding 
-     * format of output
-     * 
-     * Order is important for the XML variants : 
-     * the first one is the default returned when only basic XML is required
-     * 
-     * @var array
-     */
-    private static $supportedAcceptMimeTypes = array();
-    
-    /**
-     * Init Codendi REST controller.
-     */
-    public function init() {
-    self::$supportedAcceptMimeTypes = parent::getSupportedAcceptMimeTypes();
-
-    parent::loadModelClasses('ChangeRequests');
-
-    // Now do things that relate to the REST framework
-
-    $req = $this->getRequest();
-
-    if(($req->getActionName()=='post')||($req->getActionName()=='put'))	{
-        $accept = $req->getHeader('Content-Type');
-    }
-    elseif($req->getActionName()=='get') {
-        $accept = $req->getHeader('Accept');
-    }
-
-    $action = $req->getActionName();
-
-    $mime = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $action);
-    if($mime) {
-        $accept = $mime;
-    }
-
-    // determine output format
-    if (isset(self::$supportedAcceptMimeTypes[$action])) {
-        if (isset(self::$supportedAcceptMimeTypes[$action][$accept])) {
-            $format = self::$supportedAcceptMimeTypes[$action][$accept];
-            $req->setParam('format', $format);
-        }
-    }
-
-    $contextSwitch = $this->_helper->getHelper('contextSwitch');
-
-    // we'll handle JSON ourselves
-    $contextSwitch->setAutoJsonSerialization(false);
-    $types = array();
-    foreach (self::$supportedAcceptMimeTypes as $action => $typesarr) {
-        //print_r(array_unique(array_values($typesarr)));
-        $types = array_unique(array_values($typesarr));
-        //print_r("Typesarr : ".$typesarr);
-        $contextSwitch->addActionContext($action, $types)->initContext();
-    }
-
-    // Create an OSLC Controller for Codendi.
-        $this->oslc = new CodendiOSLCConnector();
-    }
-    
-    public function getAction(){
-        $params = $this->getRequest()->getParams();
-
-        // Check if Authorization header was set in the request.
-        $auth = $this->getRequest()->getHeader('Authorization');
-        if (strlen($auth) != 0) {
-            // check authentication
-            if(!$this->retrieveAuthentication($login)){
-                throw new Exception('Invalid authentication provided !');
-            }
-        }
-
-        // handle OSLC services catalog access (http://open-services.net/bin/view/Main/OslcServiceProviderCatalogV1)
-        if ( isset($params['id']) && ($params['id'] == "oslc-services")) {
-            $this->_forward('oslcServiceCatalog');
-            return;
-        }
-
-        // handle OSLC-CM service document access
-        elseif (isset($params['oslc-cm-service'])) {
-            $this->_forward('oslcCmServiceDocument');
-            return;
-        }
-
-        // Now, do the OSLC-CM resources access work
-        // if no bug was mentioned, then return a resource collection
-        if (!array_key_exists('bug', $params)) {
-            // forward to an independant action so that it has its own views
-            // (see readresourcecollectionAction())
-            $this->_forward('readResourceCollection');
-        }
-        elseif(array_key_exists('bug', $params)) {
-            // now we're indeed getting one single resource
-            $this->_forward('readResource');
-        } else {
-            throw new NotFoundException("Resource ".$this->getRequest()->getRequestUri()." was not found on the server!");
-        }
-
-        // This is not explicitely required in OSLC-CM V1
-        // In the case of RDF+XML requested, mention it explicitely : LOD friendly
-        $req = $this->getRequest();
-        $accept = $req->getHeader('Accept');
-        switch (true) {
-            case (strstr($accept, 'application/rdf+xml')):
-                $resp = $this->getResponse()->setHeader('Content-Type', 'application/rdf+xml');
-                break;
-        }
-    }
-	
-    /**
-     * Handles PUT action as routed by Zend_Rest_Route
-     *  
-     * Update of an existing changerequest
-     * Will be invoked if PUT or if POST on a path relating to resources (due to Zend REST route behaviour)
-     * So in case of POST, will pass the handling to postAction()
-     * 
-     * @return unknown_type
-     */
-    public function putAction(){
-        $req = $this->getRequest();
-
-        // in case invoked like POST on .../cm/project/whatever we arrive to putAction
-        // so we check such case and then redirect to postAction() if needed
-        if ($req->isPost()) {
-            $this->postAction();
-        } else {
-            // otherwise it is indeed a PUT and we are trying to modify a change request
-
-            // do authentication.
-            $login = null;
-            $authenticated = $this->retrieveAuthentication($login);
-            if(isset($login)) {
-                // Basic auth requested
-                if (!$authenticated) {
-                    // not succesfully authd as $login
-                    // can't go on;
-                    throw new Exception('Invalid authentication provided !');
-                }
-            }
-
-            $contenttype = $req->getHeader('Content-Type');
-            $contenttype = $contenttype ? $contenttype : 'none';
-
-            switch($contenttype) {
-                case 'application/x-oslc-cm-change-request+xml':
-                case 'application/x-oslc-cm-change-request+json':
-                case 'application/xml':
-                    break;
-                default:
-                    throw new Exception('Unknown Content-Type for method put : '. $contenttype .' !');
-                    break;
-            }
-
-            $identifier = null;
-
-            $params = $req->getParams();
-
-            if (array_key_exists('id', $params)) {
-                $identifier = $req->getParam('id');
-            } else {
-                $identifier = $req->getParam('bug');
-                if (! isset($identifier)) {
-                    throw new Exception('No change request id provided !');
-                }
-            }
-
-            // checking if modification
-
-            $modifiedproperties = null;
-
-            $oslc_cm_properties = $req->getParam('oslc_cm_properties');
-            if (isset($oslc_cm_properties)) {
-                $modifiedproperties = explode(',', $oslc_cm_properties);
-                if (array_key_exists('identifier', $modifiedproperties)) {
-                    throw new Exception('Identifier cannot be modified !');
-                }
-            }
-
-            $body = file_get_contents('php://input');
-
-            // TODO: This should be done by $this->oslc
-            switch($contenttype) {
-                case 'application/x-oslc-cm-change-request+xml':
-                case 'application/xml':
-                    // extract values from XML
-                    $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromXml($body);
-                    break;
-                case 'application/x-oslc-cm-change-request+json':
-                    // extract values from JSON.
-                    $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromJson($body);
-                    break;
-                default:
-                	break;
-            }
-
-            if(!$this->oslc->checkChangeRequestExists($identifier))	{
-                throw new Exception("Change Request to be updated doesn't exist!");
-            } else {
-                // Proceed to change request update
-                $this->oslc->updateChangeRequest($identifier, $newchangerequest, $modifiedproperties);
-
-                //logout the user
-                session_logout();
-            }
-        }
-    }
-    
-    public function postAction(){
-        $req = $this->getRequest();
-
-        // check that we're indeed invoked by a POST request
-        if(! $req->isPost()) {
-            throw new Exception('postAction invoked without POST !');
-        }
-
-        $params = $req->getParams();
-
-        // do authentication.
-        $login = null;
-        $authenticated = $this->retrieveAuthentication($login);
-        if(isset($login)) {
-            // Basic auth requested
-            if (!$authenticated) {
-                // not succesfully authd as $login
-                // can't go on;
-                throw new Exception('Invalid authentication provided !');
-            }
-        }
-
-        $contenttype = $req->getHeader('Content-Type');
-        $contenttype = $contenttype ? $contenttype : 'none';
-
-        switch($contenttype) {
-            case 'application/x-oslc-cm-change-request+xml':
-            case 'application/x-oslc-cm-change-request+xml; charset=UTF-8':
-            case 'application/x-oslc-cm-change-request+json':
-            case 'application/json':
-            case 'application/xml':
-                break;
-            default:
-                throw new UnsupportedMediaTypeException('Unknown Content-Type for method post : '. $contenttype .' !');
-                break;
-        }
-
-        // used for PhpUnit tests.
-        if(APPLICATION_ENV=='testing') {
-            $body = $_POST['xml'];
-        } else {
-            $body = file_get_contents('php://input');
-        }
-        //print $body;
-
-        if(array_key_exists('project',$params)) {
-            if (array_key_exists('tracker', $params)) {
-                // create a change request
-                switch($contenttype) {
-                    case 'application/x-oslc-cm-change-request+xml':
-                    case 'application/xml':
-                    case 'application/x-oslc-cm-change-request+xml; charset=UTF-8':
-                        $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromXml($body);
-                        break;
-                    case 'application/x-oslc-cm-change-request+json':
-                        $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromJson($body);
-                        break;
-                }
-
-                $creationparams = array('project' => $params['project'],
-                                        'tracker' => $params['tracker'],
-                                        'new' => $newchangerequest);
-
-                // pass the creation work to the OSLC connector
-                $identifier = $this->oslc->createChangeRequest($creationparams);
-            } else {
-                throw new ConflictException('Need a valid tracker to create a change request');
-            }
-        } else {
-            throw new ConflictException('Need a valid project and tracker to create change request !');	
-        }
-
-        // prepare redirection
-        $httpScheme = $this->getRequest()->getScheme();
-        $httpHost = $this->getRequest()->getHttpHost();
-        $requestUri = $this->getRequest()->getRequestUri();
-        $baseURL = $this->getFrontController()->getBaseUrl();
-        $controllerName = $this->getFrontController()->getDefaultControllerName();
-
-        if(APPLICATION_ENV=='testing') {
-            $newlocation = '/'.$controllerName.'/project/'.$params['project'].'/tracker/'.$params['tracker'].'/bug/'.$identifier;
-        } else {
-            $newlocation = $httpScheme.'://'.$httpHost.$baseURL.'/'.$controllerName.'/project/'.$params['project'].'/tracker/'.$params['tracker'].'/bug/'.$identifier;
-        }
-
-        //logout the user
-        session_logout();
-				
-        //redirect to new change request
-        $this->getResponse()->setRedirect($newlocation,201);
-    }
-
-    public function indexAction(){
-        
-    }
-
-    public function deleteAction(){
-        
-    }
-    
-    /**
-     * Retrieve an individual resource and populates the view of an OSLC CM ChangeRequest
-     * 
-     * @param string $identifier
-     * @param string $uri
-     */
-    public function readresourceAction() {
-	
-        $params = $this->getRequest()->getParams();
-        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
-        if (! $content_type) {
-            $this->_forward('UnknownAcceptType','error');
-            return;
-        }
-
-        $identifier = $params['bug'];
-
-        // prepare resource URI
-        $httpScheme = $this->getRequest()->getScheme();
-        $httpHost = $this->getRequest()->getHttpHost();
-        $requestUri = $this->getRequest()->getRequestUri();
-        $changerequestURI = $httpScheme.'://'.$httpHost.$requestUri;
-
-        // Check if some specific fields have been requested for the ChangeRequest.
-        if (isset($params['oslc_properties'])){
-            $preparedChangeRequest = $this->oslc->fetchChangeRequest($identifier, $changerequestURI, $params['oslc_properties']);
-        } else {
-            $preparedChangeRequest = $this->oslc->fetchChangeRequest($identifier, $changerequestURI);
-        }
-
-        if(isset($preparedChangeRequest)) {
-
-            // populate the view with the model
-            foreach($preparedChangeRequest as $field => $value) {
-                $this->view->{$field} = $value;
-            }
-
-            $this->getResponse()->setHeader('Content-Type', $content_type);
-        } else {
-            $this->view->missing_resource = $identifier;
-            $this->_forward('ResNotFound','error');
-        }
-    }
-    
-    public function readresourcecollectionAction()	{
-
-        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
-        if (!$content_type) {
-            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
-            return;
-        }
-
-        $req = $this->getRequest();
-        $params = $req->getParams();
-
-        // load the model. Will fetch requested change requests from the db.
-        $params = $this->oslc->init($params);
-
-        // construct ATOM feed-like header
-        $httpScheme = $this->getRequest()->getScheme();
-        $httpHost = $this->getRequest()->getHttpHost();
-        $requestUri = $this->getRequest()->getRequestUri();
-        $requestUri = str_replace('bugs','bug', $requestUri);
-        $requestUri = preg_replace("/project.*/", 'bug/', $requestUri);
-        $requestUri = $requestUri.(($requestUri[strlen($requestUri)-1]=='/')?'':'/');
-        $prefix = $httpScheme.'://'.$httpHost.$requestUri;
-
-        // get all resources
-        $collection = $this->oslc->getResourceCollection($prefix);
-
-        // construct an intermediate array that will be used to populate the view
-        $preparedCollection = array ('id'         => $httpScheme.'://'.$httpHost.$requestUri,
-                                     'collection'     => $collection
-                            );
-        // Add request params so they ca reach views.
-        foreach($params as $key => $value){
-            $preparedCollection[$key] = $value;
-        }
-
-        // populate the view with the loaded values
-        foreach($preparedCollection as $key => $value) {
-            $this->view->$key = $value;
-        }
-
-        //print_r($this->view);
-        $this->getResponse()->setHeader('Content-Type', $content_type);
-    }
-    
-    /**
-     * Handle OSLC services catalog access.
-     */
-    public function oslcservicecatalogAction() {
-
-        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
-        if (!$content_type) {
-            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
-            return;
-        }
-
-        // each project will generate its own service description
-        $proj_arr = $this->oslc->getProjectsList();
-
-        $this->view->projects = $proj_arr;
-
-        $this->getResponse()->setHeader('Content-Type', $content_type);
-    }
-    
-    /**
-     * 
-     * Handles OSLC service document (service document) access.
-     * TODO: Implement service document details.
-     */
-    public function oslccmservicedocumentAction() {
-        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
-        if(!$content_type) {
-            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
-            return;
-        }
-
-        $req = $this->getRequest();
-        $params = $req->getParams();
-        $project = $params['oslc-cm-service'];
-        $this->view->project = $project;
-
-        $this->getResponse()->setHeader('Content-Type', $content_type);
-    }
-    
-    /**
-     * Performs authentication according to the configured AUTH_TYPE configured
-     *
-     * @param string $login
-     * @return True if auth is valid, in which case $login is modified.
-     * If there was actually no auth requested, then return False, but $login will be set to null.
-     */
-    private function retrieveAuthentication(&$login) {
-        switch (AUTH_TYPE) {
-            case 'basic':
-                return $this->retrieveRequestAuthHttpBasic();
-                break;
-            case 'oauth':
-                return $this->checkOauthAuthorization($login);
-                break;
-            default:
-                throw new BadRequestException('Unsupported AUTH_TYPE : '. AUTH_TYPE .' !');
-                break;
-        }
-    }
-    
-    /**
-     * Helper function that performs HTTP Basic authentication from request parameters/headers
-     *
-     * @return True if auth is valid, in which case $login is modified.
-     * If there was actually no auth requested, then return False, but $login will be set to null.
-     */
-    private function retrieveRequestAuthHttpBasic() {
-        // extract login and password from Basic auth
-        $login = null;
-        $password = null;
-
-        $return = False;
-
-        $request = $this->getRequest();
-        $auth = $request->getHeader('Authorization');
-
-        if (strlen($auth) != 0) {
-            $auth = explode(' ',$auth);
-            if($auth[0] == 'Basic') {
-                $basic = base64_decode($auth[1]);
-                $basic = explode(':',$basic);
-
-                $login = $basic[0];
-                $password = $basic[1];
-            } else {
-                throw new BadRequestException('Unsupported auth method : '. $auth[0] .' !');
-            }
-        }
-        // Do authentication in Codendi 
-        if(isset($password)) {
-            $user = UserManager::instance()->login($login, $password);
-            if($user->isLoggedIn()) {
-            	$return = true;
-            } else {
-            	$return =  false;
-            }
-        }
-        
-        return $return;
-    }
-}
-
-?>

Copied: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php (from rev 12266, branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php)
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	                        (rev 0)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiCmController.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -0,0 +1,530 @@
+<?php 
+/**
+ * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
+ *
+ * Originally written by Sabri LABBENE, 201O
+ *
+ * Codendi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Codendi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+require_once ('CmController.php');
+require_once ('CodendiOSLCConnector.php');
+
+class CodendiCmController extends CmController {
+    /**
+     * @var oslc
+     * 
+     * This will be the OSLC-CM controller managing the business logic of the application
+     */
+    private $oslc;
+    
+    /**
+     * Defines accepted mime-types for queries, and corresponding 
+     * format of output
+     * 
+     * Order is important for the XML variants : 
+     * the first one is the default returned when only basic XML is required
+     * 
+     * @var array
+     */
+    private static $supportedAcceptMimeTypes = array();
+    
+    /**
+     * Init Codendi REST controller.
+     */
+    public function init() {
+    self::$supportedAcceptMimeTypes = parent::getSupportedAcceptMimeTypes();
+
+    parent::loadModelClasses('ChangeRequests');
+
+    // Now do things that relate to the REST framework
+
+    $req = $this->getRequest();
+
+    if(($req->getActionName()=='post')||($req->getActionName()=='put'))	{
+        $accept = $req->getHeader('Content-Type');
+    }
+    elseif($req->getActionName()=='get') {
+        $accept = $req->getHeader('Accept');
+    }
+
+    $action = $req->getActionName();
+
+    $mime = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $action);
+    if($mime) {
+        $accept = $mime;
+    }
+
+    // determine output format
+    if (isset(self::$supportedAcceptMimeTypes[$action])) {
+        if (isset(self::$supportedAcceptMimeTypes[$action][$accept])) {
+            $format = self::$supportedAcceptMimeTypes[$action][$accept];
+            $req->setParam('format', $format);
+        }
+    }
+
+    $contextSwitch = $this->_helper->getHelper('contextSwitch');
+
+    // we'll handle JSON ourselves
+    $contextSwitch->setAutoJsonSerialization(false);
+    $types = array();
+    foreach (self::$supportedAcceptMimeTypes as $action => $typesarr) {
+        //print_r(array_unique(array_values($typesarr)));
+        $types = array_unique(array_values($typesarr));
+        //print_r("Typesarr : ".$typesarr);
+        $contextSwitch->addActionContext($action, $types)->initContext();
+    }
+
+    // Create an OSLC Controller for Codendi.
+        $this->oslc = new CodendiOSLCConnector();
+    }
+    
+    public function getAction(){
+        $params = $this->getRequest()->getParams();
+
+        // Check if Authorization header was set in the request.
+        $auth = $this->getRequest()->getHeader('Authorization');
+        if (strlen($auth) != 0) {
+            // check authentication
+            if(!$this->retrieveAuthentication($login)){
+                throw new Exception('Invalid authentication provided !');
+            }
+        }
+
+        // handle OSLC services catalog access (http://open-services.net/bin/view/Main/OslcServiceProviderCatalogV1)
+        if ( isset($params['id']) && ($params['id'] == "oslc-services")) {
+            $this->_forward('oslcServiceCatalog');
+            return;
+        }
+
+        // handle OSLC-CM service document access
+        elseif (isset($params['oslc-cm-service'])) {
+            $this->_forward('oslcCmServiceDocument');
+            return;
+        }
+
+        // Now, do the OSLC-CM resources access work
+        // if no bug was mentioned, then return a resource collection
+        if (!array_key_exists('bug', $params)) {
+            // forward to an independant action so that it has its own views
+            // (see readresourcecollectionAction())
+            $this->_forward('readResourceCollection');
+        }
+        elseif(array_key_exists('bug', $params)) {
+            // now we're indeed getting one single resource
+            $this->_forward('readResource');
+        } else {
+            throw new NotFoundException("Resource ".$this->getRequest()->getRequestUri()." was not found on the server!");
+        }
+
+        // This is not explicitely required in OSLC-CM V1
+        // In the case of RDF+XML requested, mention it explicitely : LOD friendly
+        $req = $this->getRequest();
+        $accept = $req->getHeader('Accept');
+        switch (true) {
+            case (strstr($accept, 'application/rdf+xml')):
+                $resp = $this->getResponse()->setHeader('Content-Type', 'application/rdf+xml');
+                break;
+        }
+    }
+	
+    /**
+     * Handles PUT action as routed by Zend_Rest_Route
+     *  
+     * Update of an existing changerequest
+     * Will be invoked if PUT or if POST on a path relating to resources (due to Zend REST route behaviour)
+     * So in case of POST, will pass the handling to postAction()
+     * 
+     * @return unknown_type
+     */
+    public function putAction(){
+        $req = $this->getRequest();
+
+        // in case invoked like POST on .../cm/project/whatever we arrive to putAction
+        // so we check such case and then redirect to postAction() if needed
+        if ($req->isPost()) {
+            $this->postAction();
+        } else {
+            // otherwise it is indeed a PUT and we are trying to modify a change request
+
+            // do authentication.
+            $login = null;
+            $authenticated = $this->retrieveAuthentication($login);
+            if(isset($login)) {
+                // Basic auth requested
+                if (!$authenticated) {
+                    // not succesfully authd as $login
+                    // can't go on;
+                    throw new Exception('Invalid authentication provided !');
+                }
+            }
+
+            $contenttype = $req->getHeader('Content-Type');
+            $contenttype = $contenttype ? $contenttype : 'none';
+
+            switch($contenttype) {
+                case 'application/x-oslc-cm-change-request+xml':
+                case 'application/x-oslc-cm-change-request+json':
+                case 'application/xml':
+                    break;
+                default:
+                    throw new Exception('Unknown Content-Type for method put : '. $contenttype .' !');
+                    break;
+            }
+
+            $identifier = null;
+
+            $params = $req->getParams();
+
+            if (array_key_exists('id', $params)) {
+                $identifier = $req->getParam('id');
+            } else {
+                $identifier = $req->getParam('bug');
+                if (! isset($identifier)) {
+                    throw new Exception('No change request id provided !');
+                }
+            }
+
+            // checking if modification
+
+            $modifiedproperties = null;
+
+            $oslc_cm_properties = $req->getParam('oslc_cm_properties');
+            if (isset($oslc_cm_properties)) {
+                $modifiedproperties = explode(',', $oslc_cm_properties);
+                if (array_key_exists('identifier', $modifiedproperties)) {
+                    throw new Exception('Identifier cannot be modified !');
+                }
+            }
+
+            $body = file_get_contents('php://input');
+
+            // TODO: This should be done by $this->oslc
+            switch($contenttype) {
+                case 'application/x-oslc-cm-change-request+xml':
+                case 'application/xml':
+                    // extract values from XML
+                    $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromXml($body);
+                    break;
+                case 'application/x-oslc-cm-change-request+json':
+                    // extract values from JSON.
+                    $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromJson($body);
+                    break;
+                default:
+                	break;
+            }
+
+            if(!$this->oslc->checkChangeRequestExists($identifier))	{
+                throw new Exception("Change Request to be updated doesn't exist!");
+            } else {
+                // Proceed to change request update
+                $this->oslc->updateChangeRequest($identifier, $newchangerequest, $modifiedproperties);
+
+                //logout the user
+                session_logout();
+            }
+        }
+    }
+    
+    public function postAction(){
+        $req = $this->getRequest();
+
+        // check that we're indeed invoked by a POST request
+        if(! $req->isPost()) {
+            throw new Exception('postAction invoked without POST !');
+        }
+
+        $params = $req->getParams();
+
+        // do authentication.
+        $login = null;
+        $authenticated = $this->retrieveAuthentication($login);
+        if(isset($login)) {
+            // Basic auth requested
+            if (!$authenticated) {
+                // not succesfully authd as $login
+                // can't go on;
+                throw new Exception('Invalid authentication provided !');
+            }
+        }
+
+        $contenttype = $req->getHeader('Content-Type');
+        $contenttype = $contenttype ? $contenttype : 'none';
+
+        switch($contenttype) {
+            case 'application/x-oslc-cm-change-request+xml':
+            case 'application/x-oslc-cm-change-request+xml; charset=UTF-8':
+            case 'application/x-oslc-cm-change-request+json':
+            case 'application/json':
+            case 'application/xml':
+                break;
+            default:
+                throw new UnsupportedMediaTypeException('Unknown Content-Type for method post : '. $contenttype .' !');
+                break;
+        }
+
+        // used for PhpUnit tests.
+        if(APPLICATION_ENV=='testing') {
+            $body = $_POST['xml'];
+        } else {
+            $body = file_get_contents('php://input');
+        }
+        //print $body;
+
+        if(array_key_exists('project',$params)) {
+            if (array_key_exists('tracker', $params)) {
+                // create a change request
+                switch($contenttype) {
+                    case 'application/x-oslc-cm-change-request+xml':
+                    case 'application/xml':
+                    case 'application/x-oslc-cm-change-request+xml; charset=UTF-8':
+                        $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromXml($body);
+                        break;
+                    case 'application/x-oslc-cm-change-request+json':
+                        $newchangerequest = CodendiChangeRequest::CreateCodendiArrayFromJson($body);
+                        break;
+                }
+
+                $creationparams = array('project' => $params['project'],
+                                        'tracker' => $params['tracker'],
+                                        'new' => $newchangerequest);
+
+                // pass the creation work to the OSLC connector
+                $identifier = $this->oslc->createChangeRequest($creationparams);
+            } else {
+                throw new ConflictException('Need a valid tracker to create a change request');
+            }
+        } else {
+            throw new ConflictException('Need a valid project and tracker to create change request !');	
+        }
+
+        // prepare redirection
+        $httpScheme = $this->getRequest()->getScheme();
+        $httpHost = $this->getRequest()->getHttpHost();
+        $requestUri = $this->getRequest()->getRequestUri();
+        $baseURL = $this->getFrontController()->getBaseUrl();
+        $controllerName = $this->getFrontController()->getDefaultControllerName();
+
+        if(APPLICATION_ENV=='testing') {
+            $newlocation = '/'.$controllerName.'/project/'.$params['project'].'/tracker/'.$params['tracker'].'/bug/'.$identifier;
+        } else {
+            $newlocation = $httpScheme.'://'.$httpHost.$baseURL.'/'.$controllerName.'/project/'.$params['project'].'/tracker/'.$params['tracker'].'/bug/'.$identifier;
+        }
+
+        //logout the user
+        session_logout();
+				
+        //redirect to new change request
+        $this->getResponse()->setRedirect($newlocation,201);
+    }
+
+    public function indexAction(){
+        
+    }
+
+    public function deleteAction(){
+        
+    }
+    
+    /**
+     * Retrieve an individual resource and populates the view of an OSLC CM ChangeRequest
+     * 
+     * @param string $identifier
+     * @param string $uri
+     */
+    public function readresourceAction() {
+	
+        $params = $this->getRequest()->getParams();
+        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
+        if (! $content_type) {
+            $this->_forward('UnknownAcceptType','error');
+            return;
+        }
+
+        $identifier = $params['bug'];
+
+        // prepare resource URI
+        $httpScheme = $this->getRequest()->getScheme();
+        $httpHost = $this->getRequest()->getHttpHost();
+        $requestUri = $this->getRequest()->getRequestUri();
+        $changerequestURI = $httpScheme.'://'.$httpHost.$requestUri;
+
+        // Check if some specific fields have been requested for the ChangeRequest.
+        if (isset($params['oslc_properties'])){
+            $preparedChangeRequest = $this->oslc->fetchChangeRequest($identifier, $changerequestURI, $params['oslc_properties']);
+        } else {
+            $preparedChangeRequest = $this->oslc->fetchChangeRequest($identifier, $changerequestURI);
+        }
+
+        if(isset($preparedChangeRequest)) {
+
+            // populate the view with the model
+            foreach($preparedChangeRequest as $field => $value) {
+                $this->view->{$field} = $value;
+            }
+
+            $this->getResponse()->setHeader('Content-Type', $content_type);
+        } else {
+            $this->view->missing_resource = $identifier;
+            $this->_forward('ResNotFound','error');
+        }
+    }
+    
+    public function readresourcecollectionAction()	{
+
+        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
+        if (!$content_type) {
+            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
+            return;
+        }
+
+        $req = $this->getRequest();
+        $params = $req->getParams();
+
+        // load the model. Will fetch requested change requests from the db.
+        $params = $this->oslc->init($params);
+
+        // construct ATOM feed-like header
+        $httpScheme = $this->getRequest()->getScheme();
+        $httpHost = $this->getRequest()->getHttpHost();
+        $requestUri = $this->getRequest()->getRequestUri();
+        $requestUri = str_replace('bugs','bug', $requestUri);
+        $requestUri = preg_replace("/project.*/", 'bug/', $requestUri);
+        $requestUri = $requestUri.(($requestUri[strlen($requestUri)-1]=='/')?'':'/');
+        $prefix = $httpScheme.'://'.$httpHost.$requestUri;
+
+        // get all resources
+        $collection = $this->oslc->getResourceCollection($prefix);
+
+        // construct an intermediate array that will be used to populate the view
+        $preparedCollection = array ('id'         => $httpScheme.'://'.$httpHost.$requestUri,
+                                     'collection'     => $collection
+                            );
+        // Add request params so they ca reach views.
+        foreach($params as $key => $value){
+            $preparedCollection[$key] = $value;
+        }
+
+        // populate the view with the loaded values
+        foreach($preparedCollection as $key => $value) {
+            $this->view->$key = $value;
+        }
+
+        //print_r($this->view);
+        $this->getResponse()->setHeader('Content-Type', $content_type);
+    }
+    
+    /**
+     * Handle OSLC services catalog access.
+     */
+    public function oslcservicecatalogAction() {
+
+        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
+        if (!$content_type) {
+            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
+            return;
+        }
+
+        // each project will generate its own service description
+        $proj_arr = $this->oslc->getProjectsList();
+
+        $this->view->projects = $proj_arr;
+
+        $this->getResponse()->setHeader('Content-Type', $content_type);
+    }
+    
+    /**
+     * 
+     * Handles OSLC service document (service document) access.
+     * TODO: Implement service document details.
+     */
+    public function oslccmservicedocumentAction() {
+        $content_type = parent::checkSupportedActionMimeType(self::$supportedAcceptMimeTypes, $this->getRequest()->getActionName());
+        if(!$content_type) {
+            throw new NotAcceptableException("Accept header ".$this->getRequest()->getHeader('Accept')." not supported!");
+            return;
+        }
+
+        $req = $this->getRequest();
+        $params = $req->getParams();
+        $project = $params['oslc-cm-service'];
+        $this->view->project = $project;
+
+        $this->getResponse()->setHeader('Content-Type', $content_type);
+    }
+    
+    /**
+     * Performs authentication according to the configured AUTH_TYPE configured
+     *
+     * @param string $login
+     * @return True if auth is valid, in which case $login is modified.
+     * If there was actually no auth requested, then return False, but $login will be set to null.
+     */
+    private function retrieveAuthentication(&$login) {
+        switch (AUTH_TYPE) {
+            case 'basic':
+                return $this->retrieveRequestAuthHttpBasic();
+                break;
+            case 'oauth':
+                return $this->checkOauthAuthorization($login);
+                break;
+            default:
+                throw new BadRequestException('Unsupported AUTH_TYPE : '. AUTH_TYPE .' !');
+                break;
+        }
+    }
+    
+    /**
+     * Helper function that performs HTTP Basic authentication from request parameters/headers
+     *
+     * @return True if auth is valid, in which case $login is modified.
+     * If there was actually no auth requested, then return False, but $login will be set to null.
+     */
+    private function retrieveRequestAuthHttpBasic() {
+        // extract login and password from Basic auth
+        $login = null;
+        $password = null;
+
+        $return = False;
+
+        $request = $this->getRequest();
+        $auth = $request->getHeader('Authorization');
+
+        if (strlen($auth) != 0) {
+            $auth = explode(' ',$auth);
+            if($auth[0] == 'Basic') {
+                $basic = base64_decode($auth[1]);
+                $basic = explode(':',$basic);
+
+                $login = $basic[0];
+                $password = $basic[1];
+            } else {
+                throw new BadRequestException('Unsupported auth method : '. $auth[0] .' !');
+            }
+        }
+        // Do authentication in Codendi 
+        if(isset($password)) {
+            $user = UserManager::instance()->login($login, $password);
+            if($user->isLoggedIn()) {
+            	$return = true;
+            } else {
+            	$return =  false;
+            }
+        }
+        
+        return $return;
+    }
+}
+
+?>

Deleted: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,409 +0,0 @@
-<?php 
-/**
- * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
- *
- * Originally written by Sabri LABBENE, 201O
- *
- * Codendi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Codendi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
- */
-
-require_once('OSLCConnector.php');
-require_once(dirname(__FILE__) . '/../models/Codendi.inc.php');
-
-require_once ('pre.php');
-require_once ('session.php');
-
-require_once ('common/tracker/Tracker.class.php');
-require_once ('common/tracker/TrackerFactory.class.php');
-require_once ('common/tracker/Tracker_Artifact.class.php');
-require_once ('common/tracker/Tracker_ArtifactFactory.class.php');
-require_once ('common/tracker/Tracker_FormElementFactory.class.php');
-
-
-class CodendiOSLCConnector extends OSLCConnector {
-
-	
-    /**
-     * Filter parameters provided in the REST GET request to check whether mandatory ones are set.
-     * 
-     * @param array $params
-     * @return array 
-     */
-    public function filterRequestParams($params) {
-        // Process the args provided by Zend REST
-        if (is_array($params)) {
-            if(!isset($params['project'])) {
-                throw new Exception('Missing project id !');
-            } elseif(!isset($params['tracker'])) {
-                throw new Exception('Missing tracker id resource for project '.$params['project'].' !');
-            } else {
-                return $params;
-            }
-        }
-    }
-    
-    /**
-     * Checks whether a change request exists inside Codendi trackers. 
-     * @param int $id change request id.
-     * @return bool
-     */
-    public function checkChangeRequestExists($changerequest_id) {
-        $af = Tracker_ArtifactFactory::instance();
-        $artifact = $af->getArtifactById($changerequest_id);
-        if (!$artifact) {
-            return false;
-        } else {
-            return true;
-        }
-    }
-    
-    /**
-     * Constructs the model from Codendi DB by fetching the requested changeRequests.
-     *
-     * @param array $params contains 'project' + 'tracker'
-     */
-    public function fetchChangeRequests($params) {
-        $artifacts = array();
-
-        // what the DB will be queried on
-        $group_id = null;
-        $tracker_id = null;
-
-        if (isset($params['project'])) {
-            $group_id = $params['project'];
-        }
-        if (isset($params['tracker'])) {
-            $tracker_id = $params['tracker'];
-        }
-        if (isset($params['bug'])) {
-            $changerequest_id = $params['bug'];
-            $af = Tracker_ArtifactFactory::instance();
-            $changeRequest = $af->getArtifactById($changerequest_id);
-            $this->changerequests = new ChangeRequestsFusionForgeDb($changeRequest);
-        }
-
-        $project = new Project($group_id);
-        if (!$project->usesService('tracker')) {
-            throw new Exception('Error : Tracker service is not used for this project.', 'fetchChangeRequests');
-        }
-
-        $tf = TrackerFactory::instance();
-        if (!$tf) {
-            throw new Exception('Error : Could Not Get TrackerFactory', 'fetchChangeRequests');
-        } 
-        
-        $tracker = $tf->getTrackerById($tracker_id);
-        
-        if ($tracker == null) {
-            throw new Exception('Error : Could Not Get Tracker', 'fetchChangeRequests');
-        } else {
-            $af = Tracker_ArtifactFactory::instance();
-            $artifacts = $af->getArtifactsByTrackerId($tracker_id);
-        }
-
-        // instanciate the model from the returned artifacts
-            if(isset($params['fields'])){
-                $this->changerequests = new ChangeRequestsCodendiDb($artifacts, $params['fields']);
-            } else {
-                $this->changerequests = new ChangeRequestsCodendiDb($artifacts);
-            }
-    }
-
-    public function fetchChangeRequest($changerequest_id, $uri, $requested_fields=array()) {
-        $af = Tracker_ArtifactFactory::instance();
-        $artifact = $af->getArtifactById($changerequest_id);
-
-        if(!$artifact){
-            throw new NotFoundException('Error : Change Request not found', 'fetchChangeRequest' );
-        }
-        $art = array($artifact);
-
-        $changerequest = new ChangeRequestsCodendiDb($art, $requested_fields);
-
-        return $this->prepareChangeRequest($changerequest[$changerequest_id], $uri);
-    }
-
-    /**
-     * Updates an existant Codendi ChangeRequest in the tracker DataBase.
-     * @param int $identifier id of the ChangeRequest within Codendi tracker
-     * @param ChangeRequest the change request given as input for the PUT request.
-     * @param array $props array of the properties that PUT request is going to change 
-     * @return boolean true if success, false otherwise.
-     */
-    public function updateChangeRequest($changerequest_id, $group_id, $tracker_id, $changerequest, $props) {
-        $user = UserManager::instance()->getCurrentUser();
-        $pm = ProjectManager::instance();
-        $project = $pm->getProject($group_id);
-        if (! $project || ! is_object($project)) {
-            throw new Exception('Error : Could Not Get Group','updateChangeRequest');
-        } elseif ($project->isError()) {
-            throw new Exception('Error : ' . $project->getErrorMessage(),'updateChangeRequest');
-        }
-        if ( ! checkRestrictedAccess($project)) {
-            throw new Exception('Error, Restricted user: permission denied.', 'updateChangeRequest');
-        }
-
-        $tf = TrackerFactory::instance();
-        $tracker = $tf->getTrackerById($tracker_id);
-
-        if ($tracker == null) {
-            throw new Exception('Error : Could not get Tracker.', 'updateChangeRequest');
-        } elseif ($tracker->getGroupId() != $group_id) {
-            throw new Exception('Error : Could not get Tracker.', 'updateChangeRequest');
-        }
-
-        $af = Tracker_ArtifactFactory::instance();
-        if ($artifact = $af->getArtifactById($changerequest_id)) {
-            if ($artifact->getTrackerId() != $tracker_id) {
-                throw new Exception('Error : Could not get Artifact.', 'updateChangeRequest');
-            }
-        }
-
-        // Get the artifact data using its ID. 
-		$art_obj =& artifact_get_object($identifier);
-		$art = $art_obj->data_array;
-
-		$cm_request = $changerequest->container;
-
-		$terms = array('dc:','helios_bt:');
-		foreach($props as &$prop) {
-			$prop = str_replace($terms,"",$prop);
-			//echo $prop;
-		}
-		
-		// Check all the mandatory fields for an artifact update request.
-		
-		// dc:title ===> summary 
-		if(in_array('title',$props))
-		{
-			if(isset($cm_request['title']))
-			{
-				$art['summary'] = $cm_request['title'];			// mandatory
-			}
-			else
-			{
-				throw new BadRequestException("dc:title mentioned in the request query not found in request body!");
-			}
-		}
-		
-		// dc:description ===> details 
-		if(in_array('description',$props))
-		{
-			if(isset($cm_request['description']))
-			{
-				$art['details'] = $cm_request['description'];			// mandatory
-			}
-			else
-			{
-				throw new BadRequestException("dc:decription mentioned in the request query not found in request body!");
-			}
-		}
-		
-		// helios_bt:priority ===> priority 
-		if(in_array('priority',$props))
-		{
-			if(isset($cm_request['priority']))
-			{
-				$art['priority'] = $cm_request['priority'];			// mandatory
-			}
-			else
-			{
-				throw new BadRequestException("helios_bt:priority mentioned in the request query not found in request body!");
-			}
-		}
-		
-		// helios_bt:status ===> status 
-		if(in_array('status',$props))
-		{
-			if(isset($cm_request['status']))
-			{
-				$art['status_id'] = self::$status_arr[$cm_request['status']];			// mandatory
-			}
-			else
-			{
-				throw new BadRequestException("helios_bt:status mentioned in the request query not found in request body!");
-			}
-		}
-		
-		//helios_bt:assigned_to ====> assigned_to
-		if(in_array('assigned_to', $props))
-		{
-			if(isset($cm_request['assigned_to']))
-			{
-				$art['assigned_to'] = $cm_request['assigned_to'];
-			}
-			else 
-			{
-				throw new BadRequestException("helios_bt:assigned_to mentionned in the request query not found in request body!");
-			}
-		}
-		
-		
-		$canned_response=100;
-		
-		// We assume that we don't change the artifact type (bug, task, etc)
-		// in PUT request. 
-		$new_artifact_type_id = $art_obj->ArtifactType->getID();
-		
-		//TODO: figure out if a follow up is in OSLC specs and if it is the case include it.
-		$follow_up_msg = '';
-		
-		if(!$art_obj->update($art['priority'],$art['status_id'],$art['assigned_to'],$art['summary'],$canned_response,$follow_up_msg,$new_artifact_type_id,array(),$art['details']))
-		{
-			throw new Exception($art_obj->getErrorMessage());
-		}
-	}
-
-    /**
-     * Returns the list of projects of the user.
-     * @todo fix this method.
-     */
-    public function getProjectsList() {
-        $uM = UserManager::instance();
-        $pM = ProjectManager::instance();
-        $user = $uM->getCurrentUser();
-        if($user->getId() != 0) {
-            $project_ids = $user->getProjects();
-        } else {
-            return $this->createProjectsArray($pM->getAllPublicProjects()); 
-        }
-        foreach($project_ids as $id) {
-            $projects[$id] = $pM->getProject($id);
-        }
-        $uM->logout(); 
-        return $this->createProjectsArray($projects);
-	}
-	
-    /**
-     *  Converts projects objects into a single projects array.
-     *  We only set the id and the public name of each project 
-     *  into the array.
-     *  @param array $projects array of projects indexed by their relative ids
-     */
-    private function createProjectsArray($projects) {
-        $return = array();
-        foreach($projects as $prj_idx => $project){
-            $return[$prj_idx] = array(
-                'id'                => $prj_idx, 
-                'name'              => $project->getPublicName()
-            );
-        }
-        return $return;
-    }
-
-/**
- * updateArtifact - update the artifact $artifact_id in tracker $tracker_id of the project $group_id with given values
- *
- * @param string $sessionKey  the session hash associated with the session opened by the person who calls the service
- * @param int    $group_id    the ID of the group we want to update the artifact
- * @param int    $tracker_id  the ID of the tracker we want to update the artifact
- * @param int    $artifact_id the ID of the artifact to update
- * @param array{SOAPArtifactFieldValue} $value the fields value to update
- * @param string $comment     the comment associated with the modification, or null if no follow-up comment.
- *
- * @return int The artifact id if update was fine,
- *              or a soap fault if :
- *              - group_id does not match with a valid project, 
- *              - tracker_id does not match with a valid tracker,
- *              - artifact_id does not match with a valid artifact,
- *              - the given values are breaking a field dependency rule
- *              - the artifact modification failed.
- */
-function updateArtifact($sessionKey, $group_id, $tracker_id, $artifact_id, $value, $comment) {
-    if (session_continue($sessionKey)) {
-        $user = UserManager::instance()->getCurrentUser();
-        $pm = ProjectManager::instance();
-        $project = $pm->getProject($group_id);
-        if (! $project || ! is_object($project)) {
-            return new SoapFault(get_group_fault,'Could Not Get Group','updateArtifact');
-        } elseif ($project->isError()) {
-            return new SoapFault(get_group_fault, $project->getErrorMessage(),'updateArtifact');
-        }
-        if ( ! checkRestrictedAccess($project)) {
-            return new SoapFault(get_group_fault, 'Restricted user: permission denied.', 'updateArtifact');
-        }
-        
-        $tf = TrackerFactory::instance();
-        $tracker = $tf->getTrackerById($tracker_id);
-        if ($tracker == null) {
-            return new SoapFault(get_tracker_fault, 'Could not get Tracker.', 'updateArtifact');
-        } elseif ($tracker->getGroupId() != $group_id) {
-            return new SoapFault(get_tracker_fault, 'Could not get Tracker.', 'updateArtifact');
-        }
-        
-        $af = Tracker_ArtifactFactory::instance();
-        if ($artifact = $af->getArtifactById($artifact_id)) {
-            if ($artifact->getTrackerId() != $tracker_id) {
-                return new SoapFault(get_tracker_fault, 'Could not get Artifact.', 'updateArtifact');
-            }
-            
-            //Check Field Dependencies
-            // TODO : implement it
-            /*require_once('common/tracker/ArtifactRulesManager.class.php');
-            $arm =& new ArtifactRulesManager();
-            if (!$arm->validate($ath->getID(), $data, $art_field_fact)) {
-                return new SoapFault(invalid_field_dependency_fault, 'Invalid Field Dependency', 'updateArtifact');
-            }*/
-            
-            $fef = Tracker_FormElementFactory::instance();
-            
-            $fields_data = array();
-            foreach ($value as $field_value) {
-                // field are identified by name, we need to retrieve the field id
-                if ($field_value->field_name) {
-                    
-                    $field = $fef->getUsedFieldByName($tracker_id, $field_value->field_name);
-                    if ($field) {
-                        
-                        $field_data = $field->getFieldData($field_value->field_value);
-                        if ($field_data != null) {
-                            // $field_value is an object: SOAP must cast it in ArtifactFieldValue
-                            if (isset($fields_data[$field->getId()])) {
-                                if ( ! is_array($fields_data[$field->getId()]) ) {
-                                    $fields_data[$field->getId()] = array($fields_data[$field->getId()]);
-                                }
-                                $fields_data[$field->getId()][] = $field_data;
-                            } else {
-                                $fields_data[$field->getId()] = $field_data;
-                            }
-                        } else {
-                            return new SoapFault(update_artifact_fault, 'Unknown value ' . $field_value->field_value . ' for field: '.$field_value->field_name ,'addArtifact');
-                        }
-                    } else {
-                        return new SoapFault(update_artifact_fault, 'Unknown field: '.$field_value->field_name ,'addArtifact');
-                    }
-                }
-            }
-            
-            if ($artifact->createNewChangeset($fields_data, $comment, $user, null)) {
-                return $artifact_id;
-            } else {
-                $response = new Response();
-                if ($response->feedbackHasErrors()) {
-                    return new SoapFault(update_artifact_fault, $response->getRawFeedback(),'updateArtifact');
-                } else {
-                    return new SoapFault(update_artifact_fault, 'Unknown error','updateArtifact');
-                }
-            }
-        } else {
-            return new SoapFault(get_tracker_fault, 'Could not get Artifact.', 'updateArtifact');
-        }
-        
-    } else {
-        return new SoapFault(invalid_session_fault,'Invalid Session ','updateArtifact');
-    }
-}
-
-}
-?>
\ No newline at end of file

Copied: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php (from rev 12266, branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php)
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php	                        (rev 0)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/CodendiOSLCConnector.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -0,0 +1,409 @@
+<?php 
+/**
+ * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
+ *
+ * Originally written by Sabri LABBENE, 201O
+ *
+ * Codendi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Codendi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+require_once('OSLCConnector.php');
+require_once(dirname(__FILE__) . '/../models/Codendi.inc.php');
+
+require_once ('pre.php');
+require_once ('session.php');
+
+require_once ('common/tracker/Tracker.class.php');
+require_once ('common/tracker/TrackerFactory.class.php');
+require_once ('common/tracker/Tracker_Artifact.class.php');
+require_once ('common/tracker/Tracker_ArtifactFactory.class.php');
+require_once ('common/tracker/Tracker_FormElementFactory.class.php');
+
+
+class CodendiOSLCConnector extends OSLCConnector {
+
+	
+    /**
+     * Filter parameters provided in the REST GET request to check whether mandatory ones are set.
+     * 
+     * @param array $params
+     * @return array 
+     */
+    public function filterRequestParams($params) {
+        // Process the args provided by Zend REST
+        if (is_array($params)) {
+            if(!isset($params['project'])) {
+                throw new Exception('Missing project id !');
+            } elseif(!isset($params['tracker'])) {
+                throw new Exception('Missing tracker id resource for project '.$params['project'].' !');
+            } else {
+                return $params;
+            }
+        }
+    }
+    
+    /**
+     * Checks whether a change request exists inside Codendi trackers. 
+     * @param int $id change request id.
+     * @return bool
+     */
+    public function checkChangeRequestExists($changerequest_id) {
+        $af = Tracker_ArtifactFactory::instance();
+        $artifact = $af->getArtifactById($changerequest_id);
+        if (!$artifact) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+    
+    /**
+     * Constructs the model from Codendi DB by fetching the requested changeRequests.
+     *
+     * @param array $params contains 'project' + 'tracker'
+     */
+    public function fetchChangeRequests($params) {
+        $artifacts = array();
+
+        // what the DB will be queried on
+        $group_id = null;
+        $tracker_id = null;
+
+        if (isset($params['project'])) {
+            $group_id = $params['project'];
+        }
+        if (isset($params['tracker'])) {
+            $tracker_id = $params['tracker'];
+        }
+        if (isset($params['bug'])) {
+            $changerequest_id = $params['bug'];
+            $af = Tracker_ArtifactFactory::instance();
+            $changeRequest = $af->getArtifactById($changerequest_id);
+            $this->changerequests = new ChangeRequestsFusionForgeDb($changeRequest);
+        }
+
+        $project = new Project($group_id);
+        if (!$project->usesService('tracker')) {
+            throw new Exception('Error : Tracker service is not used for this project.', 'fetchChangeRequests');
+        }
+
+        $tf = TrackerFactory::instance();
+        if (!$tf) {
+            throw new Exception('Error : Could Not Get TrackerFactory', 'fetchChangeRequests');
+        } 
+        
+        $tracker = $tf->getTrackerById($tracker_id);
+        
+        if ($tracker == null) {
+            throw new Exception('Error : Could Not Get Tracker', 'fetchChangeRequests');
+        } else {
+            $af = Tracker_ArtifactFactory::instance();
+            $artifacts = $af->getArtifactsByTrackerId($tracker_id);
+        }
+
+        // instanciate the model from the returned artifacts
+            if(isset($params['fields'])){
+                $this->changerequests = new ChangeRequestsCodendiDb($artifacts, $params['fields']);
+            } else {
+                $this->changerequests = new ChangeRequestsCodendiDb($artifacts);
+            }
+    }
+
+    public function fetchChangeRequest($changerequest_id, $uri, $requested_fields=array()) {
+        $af = Tracker_ArtifactFactory::instance();
+        $artifact = $af->getArtifactById($changerequest_id);
+
+        if(!$artifact){
+            throw new NotFoundException('Error : Change Request not found', 'fetchChangeRequest' );
+        }
+        $art = array($artifact);
+
+        $changerequest = new ChangeRequestsCodendiDb($art, $requested_fields);
+
+        return $this->prepareChangeRequest($changerequest[$changerequest_id], $uri);
+    }
+
+    /**
+     * Updates an existant Codendi ChangeRequest in the tracker DataBase.
+     * @param int $identifier id of the ChangeRequest within Codendi tracker
+     * @param ChangeRequest the change request given as input for the PUT request.
+     * @param array $props array of the properties that PUT request is going to change 
+     * @return boolean true if success, false otherwise.
+     */
+    public function updateChangeRequest($changerequest_id, $group_id, $tracker_id, $changerequest, $props) {
+        $user = UserManager::instance()->getCurrentUser();
+        $pm = ProjectManager::instance();
+        $project = $pm->getProject($group_id);
+        if (! $project || ! is_object($project)) {
+            throw new Exception('Error : Could Not Get Group','updateChangeRequest');
+        } elseif ($project->isError()) {
+            throw new Exception('Error : ' . $project->getErrorMessage(),'updateChangeRequest');
+        }
+        if ( ! checkRestrictedAccess($project)) {
+            throw new Exception('Error, Restricted user: permission denied.', 'updateChangeRequest');
+        }
+
+        $tf = TrackerFactory::instance();
+        $tracker = $tf->getTrackerById($tracker_id);
+
+        if ($tracker == null) {
+            throw new Exception('Error : Could not get Tracker.', 'updateChangeRequest');
+        } elseif ($tracker->getGroupId() != $group_id) {
+            throw new Exception('Error : Could not get Tracker.', 'updateChangeRequest');
+        }
+
+        $af = Tracker_ArtifactFactory::instance();
+        if ($artifact = $af->getArtifactById($changerequest_id)) {
+            if ($artifact->getTrackerId() != $tracker_id) {
+                throw new Exception('Error : Could not get Artifact.', 'updateChangeRequest');
+            }
+        }
+
+        // Get the artifact data using its ID. 
+		$art_obj =& artifact_get_object($identifier);
+		$art = $art_obj->data_array;
+
+		$cm_request = $changerequest->container;
+
+		$terms = array('dc:','helios_bt:');
+		foreach($props as &$prop) {
+			$prop = str_replace($terms,"",$prop);
+			//echo $prop;
+		}
+		
+		// Check all the mandatory fields for an artifact update request.
+		
+		// dc:title ===> summary 
+		if(in_array('title',$props))
+		{
+			if(isset($cm_request['title']))
+			{
+				$art['summary'] = $cm_request['title'];			// mandatory
+			}
+			else
+			{
+				throw new BadRequestException("dc:title mentioned in the request query not found in request body!");
+			}
+		}
+		
+		// dc:description ===> details 
+		if(in_array('description',$props))
+		{
+			if(isset($cm_request['description']))
+			{
+				$art['details'] = $cm_request['description'];			// mandatory
+			}
+			else
+			{
+				throw new BadRequestException("dc:decription mentioned in the request query not found in request body!");
+			}
+		}
+		
+		// helios_bt:priority ===> priority 
+		if(in_array('priority',$props))
+		{
+			if(isset($cm_request['priority']))
+			{
+				$art['priority'] = $cm_request['priority'];			// mandatory
+			}
+			else
+			{
+				throw new BadRequestException("helios_bt:priority mentioned in the request query not found in request body!");
+			}
+		}
+		
+		// helios_bt:status ===> status 
+		if(in_array('status',$props))
+		{
+			if(isset($cm_request['status']))
+			{
+				$art['status_id'] = self::$status_arr[$cm_request['status']];			// mandatory
+			}
+			else
+			{
+				throw new BadRequestException("helios_bt:status mentioned in the request query not found in request body!");
+			}
+		}
+		
+		//helios_bt:assigned_to ====> assigned_to
+		if(in_array('assigned_to', $props))
+		{
+			if(isset($cm_request['assigned_to']))
+			{
+				$art['assigned_to'] = $cm_request['assigned_to'];
+			}
+			else 
+			{
+				throw new BadRequestException("helios_bt:assigned_to mentionned in the request query not found in request body!");
+			}
+		}
+		
+		
+		$canned_response=100;
+		
+		// We assume that we don't change the artifact type (bug, task, etc)
+		// in PUT request. 
+		$new_artifact_type_id = $art_obj->ArtifactType->getID();
+		
+		//TODO: figure out if a follow up is in OSLC specs and if it is the case include it.
+		$follow_up_msg = '';
+		
+		if(!$art_obj->update($art['priority'],$art['status_id'],$art['assigned_to'],$art['summary'],$canned_response,$follow_up_msg,$new_artifact_type_id,array(),$art['details']))
+		{
+			throw new Exception($art_obj->getErrorMessage());
+		}
+	}
+
+    /**
+     * Returns the list of projects of the user.
+     * @todo fix this method.
+     */
+    public function getProjectsList() {
+        $uM = UserManager::instance();
+        $pM = ProjectManager::instance();
+        $user = $uM->getCurrentUser();
+        if($user->getId() != 0) {
+            $project_ids = $user->getProjects();
+        } else {
+            return $this->createProjectsArray($pM->getAllPublicProjects()); 
+        }
+        foreach($project_ids as $id) {
+            $projects[$id] = $pM->getProject($id);
+        }
+        $uM->logout(); 
+        return $this->createProjectsArray($projects);
+	}
+	
+    /**
+     *  Converts projects objects into a single projects array.
+     *  We only set the id and the public name of each project 
+     *  into the array.
+     *  @param array $projects array of projects indexed by their relative ids
+     */
+    private function createProjectsArray($projects) {
+        $return = array();
+        foreach($projects as $prj_idx => $project){
+            $return[$prj_idx] = array(
+                'id'                => $prj_idx, 
+                'name'              => $project->getPublicName()
+            );
+        }
+        return $return;
+    }
+
+/**
+ * updateArtifact - update the artifact $artifact_id in tracker $tracker_id of the project $group_id with given values
+ *
+ * @param string $sessionKey  the session hash associated with the session opened by the person who calls the service
+ * @param int    $group_id    the ID of the group we want to update the artifact
+ * @param int    $tracker_id  the ID of the tracker we want to update the artifact
+ * @param int    $artifact_id the ID of the artifact to update
+ * @param array{SOAPArtifactFieldValue} $value the fields value to update
+ * @param string $comment     the comment associated with the modification, or null if no follow-up comment.
+ *
+ * @return int The artifact id if update was fine,
+ *              or a soap fault if :
+ *              - group_id does not match with a valid project, 
+ *              - tracker_id does not match with a valid tracker,
+ *              - artifact_id does not match with a valid artifact,
+ *              - the given values are breaking a field dependency rule
+ *              - the artifact modification failed.
+ */
+function updateArtifact($sessionKey, $group_id, $tracker_id, $artifact_id, $value, $comment) {
+    if (session_continue($sessionKey)) {
+        $user = UserManager::instance()->getCurrentUser();
+        $pm = ProjectManager::instance();
+        $project = $pm->getProject($group_id);
+        if (! $project || ! is_object($project)) {
+            return new SoapFault(get_group_fault,'Could Not Get Group','updateArtifact');
+        } elseif ($project->isError()) {
+            return new SoapFault(get_group_fault, $project->getErrorMessage(),'updateArtifact');
+        }
+        if ( ! checkRestrictedAccess($project)) {
+            return new SoapFault(get_group_fault, 'Restricted user: permission denied.', 'updateArtifact');
+        }
+        
+        $tf = TrackerFactory::instance();
+        $tracker = $tf->getTrackerById($tracker_id);
+        if ($tracker == null) {
+            return new SoapFault(get_tracker_fault, 'Could not get Tracker.', 'updateArtifact');
+        } elseif ($tracker->getGroupId() != $group_id) {
+            return new SoapFault(get_tracker_fault, 'Could not get Tracker.', 'updateArtifact');
+        }
+        
+        $af = Tracker_ArtifactFactory::instance();
+        if ($artifact = $af->getArtifactById($artifact_id)) {
+            if ($artifact->getTrackerId() != $tracker_id) {
+                return new SoapFault(get_tracker_fault, 'Could not get Artifact.', 'updateArtifact');
+            }
+            
+            //Check Field Dependencies
+            // TODO : implement it
+            /*require_once('common/tracker/ArtifactRulesManager.class.php');
+            $arm =& new ArtifactRulesManager();
+            if (!$arm->validate($ath->getID(), $data, $art_field_fact)) {
+                return new SoapFault(invalid_field_dependency_fault, 'Invalid Field Dependency', 'updateArtifact');
+            }*/
+            
+            $fef = Tracker_FormElementFactory::instance();
+            
+            $fields_data = array();
+            foreach ($value as $field_value) {
+                // field are identified by name, we need to retrieve the field id
+                if ($field_value->field_name) {
+                    
+                    $field = $fef->getUsedFieldByName($tracker_id, $field_value->field_name);
+                    if ($field) {
+                        
+                        $field_data = $field->getFieldData($field_value->field_value);
+                        if ($field_data != null) {
+                            // $field_value is an object: SOAP must cast it in ArtifactFieldValue
+                            if (isset($fields_data[$field->getId()])) {
+                                if ( ! is_array($fields_data[$field->getId()]) ) {
+                                    $fields_data[$field->getId()] = array($fields_data[$field->getId()]);
+                                }
+                                $fields_data[$field->getId()][] = $field_data;
+                            } else {
+                                $fields_data[$field->getId()] = $field_data;
+                            }
+                        } else {
+                            return new SoapFault(update_artifact_fault, 'Unknown value ' . $field_value->field_value . ' for field: '.$field_value->field_name ,'addArtifact');
+                        }
+                    } else {
+                        return new SoapFault(update_artifact_fault, 'Unknown field: '.$field_value->field_name ,'addArtifact');
+                    }
+                }
+            }
+            
+            if ($artifact->createNewChangeset($fields_data, $comment, $user, null)) {
+                return $artifact_id;
+            } else {
+                $response = new Response();
+                if ($response->feedbackHasErrors()) {
+                    return new SoapFault(update_artifact_fault, $response->getRawFeedback(),'updateArtifact');
+                } else {
+                    return new SoapFault(update_artifact_fault, 'Unknown error','updateArtifact');
+                }
+            }
+        } else {
+            return new SoapFault(get_tracker_fault, 'Could not get Artifact.', 'updateArtifact');
+        }
+        
+    } else {
+        return new SoapFault(invalid_session_fault,'Invalid Session ','updateArtifact');
+    }
+}
+
+}
+?>
\ No newline at end of file

Deleted: trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,145 +0,0 @@
-<?php 
-/**
- * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
- *
- * Originally written by Sabri LABBENE, 201O
- *
- * Codendi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Codendi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
- */
-
-require_once('ChangeRequests.php');
-
-
-
-        // will contain an array of fields read in the oslc:ChangeRequest
-        $resource = null;
-
-        // we use simplexml PHP library which supports namespaces
-
-        /*******Sample CR*****************************************
-         * 
-         * <?xml version="1.0"?>
-         * <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-         *   <oslc_cm:ChangeRequest xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
-         *       <dc:title xmlns:dc="http://purl.org/dc/terms/">Provide import</dc:title>
-         *       <dc:identifier xmlns:dc="http://purl.org/dc/terms/">1234</dc:identifier>
-         *       <dc:type xmlns:dc="http://purl.org/dc/terms/">http://myserver/mycmapp/types/Enhancement</dc:type>
-         *       <dc:description xmlns:dc="http://purl.org/dc/terms/">Implement the system's import capabilities.</dc:description>
-         *       <dc:subject xmlns:dc="http://purl.org/dc/terms/">import</dc:subject>
-         *       <dc:creator xmlns:dc="http://purl.org/dc/terms/">mailto:aadams at someemail.com</dc:creator>
-         *       <dc:modified xmlns:dc="http://purl.org/dc/terms/">2008-09-16T08:42:11.265Z</dc:modified>
-         *   </oslc_cm:ChangeRequest>
-         * </rdf:RDF>
-         *           
-         */
-
-/*        $dc_attr = array("title", "identifier", "description","creator","modified","created");
-        $fusionforgebt_attr = array("status","priority", "assigned_to");
-
-        $xml = simplexml_load_string($xmlstr);
-
-		$namespace = $xml->getNamespaces(true);
-
-*/
-// Represents a base of changerequests loaded from Codendi DB
-class ChangeRequestsCodendiDb extends ChangeRequests {
-    function __construct($art_arr, $fields='') {
-        parent::__construct();
-        $changerequestsdata = $this->convert_artifacts_array($art_arr, $fields);
-        foreach ($changerequestsdata as $identifier => $data) {
-            $this->_data[$identifier] = ChangeRequest::Create('Codendi');
-            $this->_data[$identifier] = $data;
-        }
-    }
-	
-    /* duplicated from Codendi tracker SOAP API
-     * 
-     * TODO Add code that maps Codendi tracker fields to ontologies (dc, oslc, etc) 
-     * 
-     */
-    protected static function convert_artifacts_array($at_arr, $fields_string) {
-        $CodendiCR_attr = array('artifact_id','group_artifact_id','status_id','priority','submitted_by','assigned_to','open_date','close_date',
-            'summary','details','assigned_unixname','assigned_realname','assigned_email','submitted_unixname','submitted_realname','submitted_email',
-            'status_name','last_modified_date');
-
-        $return = array();
-
-        if (is_array($at_arr) && count($at_arr) > 0) {
-            for ($i=0; $i <count($at_arr); $i++) {
-                // Retrieving the artifact details
-                //**checks whether there is any artifact details exists for this object, if not continue with next loop
-                if(count($at_arr[$i]) < 1) { continue; }
-                $identifier = $at_arr[$i]->data_array['artifact_id'];
-
-                // If specific fields were requested using a query
-                // we only return the requested fields data in the change request.
-                if (strlen($fields_string) > 0) {
-                    $fields = explode(",", $fields_string);
-                }
-
-                if(isset($fields) && is_array($fields) && count($fields) > 0){
-                    foreach ($fields as $field) {
-                        switch ($field) {
-                            case 'dc:identifier': 
-                                $return[$identifier]['identifier'] = $identifier;
-                                break;
-                            case 'dc:title': 
-                                $return[$identifier]['title'] = $at_arr[$i]->data_array['summary'];
-                                break;
-                            case 'dc:description': 
-                                $return[$identifier]['description'] = $at_arr[$i]->data_array['details'];
-                                break;
-                            case 'dc:creator': 
-                                $return[$identifier]['creator'] = $at_arr[$i]->data_array['submitted_realname'];
-                                break;
-                            case 'helios_bt:status': 
-                                $return[$identifier]['helios_bt:status'] = $at_arr[$i]->data_array['status_name'];
-                                break;
-                            case 'helios_bt:priority': 
-                                $return[$identifier]['helios_bt:priority'] = $at_arr[$i]->data_array['priority'];
-                                break;
-                            case 'helios_bt:assigned_to': 
-                                $return[$identifier]['helios_bt:assigned_to'] = $at_arr[$i]->data_array['assigned_realname'];
-                                break;
-                            case 'dc:modified': 
-                                $return[$identifier]['modified'] = $at_arr[$i]->data_array['last_modified_date'];
-                                break;
-                            case 'dc:created': 
-                                $return[$identifier]['created'] = $at_arr[$i]->data_array['open_date'];
-                                break;
-                            default: 
-                                throw new ConflictException("The attribute specified ".$field." cannot be found!");
-                        }
-                    }
-                } else {
-                    //return the by default set of Change request fields.
-                    $return[$identifier]=array(
-                        'identifier'=>$identifier,
-                        'title'=>$at_arr[$i]->data_array['summary'],
-                        'description'=>$at_arr[$i]->data_array['details'],
-                        'helios_bt:status'=>$at_arr[$i]->data_array['status_name'],
-                        'helios_bt:priority'=>$at_arr[$i]->data_array['priority'],
-                        'creator' => $at_arr[$i]->data_array['submitted_realname'],
-                        'helios_bt:assigned_to' => $at_arr[$i]->data_array['assigned_realname'],
-                        'modified' => $at_arr[$i]->data_array['last_modified_date'],
-                        'created' => $at_arr[$i]->data_array['open_date']
-                    );
-                }
-            }
-        }
-        return $return;
-    }
-}
-
-?>

Copied: trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php (from rev 12266, branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php)
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php	                        (rev 0)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/models/Codendi.inc.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -0,0 +1,145 @@
+<?php 
+/**
+ * Copyright (c) Institut TELECOM, 2010. All Rights Reserved.
+ *
+ * Originally written by Sabri LABBENE, 201O
+ *
+ * Codendi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Codendi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Codendi. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+require_once('ChangeRequests.php');
+
+
+
+        // will contain an array of fields read in the oslc:ChangeRequest
+        $resource = null;
+
+        // we use simplexml PHP library which supports namespaces
+
+        /*******Sample CR*****************************************
+         * 
+         * <?xml version="1.0"?>
+         * <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+         *   <oslc_cm:ChangeRequest xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
+         *       <dc:title xmlns:dc="http://purl.org/dc/terms/">Provide import</dc:title>
+         *       <dc:identifier xmlns:dc="http://purl.org/dc/terms/">1234</dc:identifier>
+         *       <dc:type xmlns:dc="http://purl.org/dc/terms/">http://myserver/mycmapp/types/Enhancement</dc:type>
+         *       <dc:description xmlns:dc="http://purl.org/dc/terms/">Implement the system's import capabilities.</dc:description>
+         *       <dc:subject xmlns:dc="http://purl.org/dc/terms/">import</dc:subject>
+         *       <dc:creator xmlns:dc="http://purl.org/dc/terms/">mailto:aadams at someemail.com</dc:creator>
+         *       <dc:modified xmlns:dc="http://purl.org/dc/terms/">2008-09-16T08:42:11.265Z</dc:modified>
+         *   </oslc_cm:ChangeRequest>
+         * </rdf:RDF>
+         *           
+         */
+
+/*        $dc_attr = array("title", "identifier", "description","creator","modified","created");
+        $fusionforgebt_attr = array("status","priority", "assigned_to");
+
+        $xml = simplexml_load_string($xmlstr);
+
+		$namespace = $xml->getNamespaces(true);
+
+*/
+// Represents a base of changerequests loaded from Codendi DB
+class ChangeRequestsCodendiDb extends ChangeRequests {
+    function __construct($art_arr, $fields='') {
+        parent::__construct();
+        $changerequestsdata = $this->convert_artifacts_array($art_arr, $fields);
+        foreach ($changerequestsdata as $identifier => $data) {
+            $this->_data[$identifier] = ChangeRequest::Create('Codendi');
+            $this->_data[$identifier] = $data;
+        }
+    }
+	
+    /* duplicated from Codendi tracker SOAP API
+     * 
+     * TODO Add code that maps Codendi tracker fields to ontologies (dc, oslc, etc) 
+     * 
+     */
+    protected static function convert_artifacts_array($at_arr, $fields_string) {
+        $CodendiCR_attr = array('artifact_id','group_artifact_id','status_id','priority','submitted_by','assigned_to','open_date','close_date',
+            'summary','details','assigned_unixname','assigned_realname','assigned_email','submitted_unixname','submitted_realname','submitted_email',
+            'status_name','last_modified_date');
+
+        $return = array();
+
+        if (is_array($at_arr) && count($at_arr) > 0) {
+            for ($i=0; $i <count($at_arr); $i++) {
+                // Retrieving the artifact details
+                //**checks whether there is any artifact details exists for this object, if not continue with next loop
+                if(count($at_arr[$i]) < 1) { continue; }
+                $identifier = $at_arr[$i]->data_array['artifact_id'];
+
+                // If specific fields were requested using a query
+                // we only return the requested fields data in the change request.
+                if (strlen($fields_string) > 0) {
+                    $fields = explode(",", $fields_string);
+                }
+
+                if(isset($fields) && is_array($fields) && count($fields) > 0){
+                    foreach ($fields as $field) {
+                        switch ($field) {
+                            case 'dc:identifier': 
+                                $return[$identifier]['identifier'] = $identifier;
+                                break;
+                            case 'dc:title': 
+                                $return[$identifier]['title'] = $at_arr[$i]->data_array['summary'];
+                                break;
+                            case 'dc:description': 
+                                $return[$identifier]['description'] = $at_arr[$i]->data_array['details'];
+                                break;
+                            case 'dc:creator': 
+                                $return[$identifier]['creator'] = $at_arr[$i]->data_array['submitted_realname'];
+                                break;
+                            case 'helios_bt:status': 
+                                $return[$identifier]['helios_bt:status'] = $at_arr[$i]->data_array['status_name'];
+                                break;
+                            case 'helios_bt:priority': 
+                                $return[$identifier]['helios_bt:priority'] = $at_arr[$i]->data_array['priority'];
+                                break;
+                            case 'helios_bt:assigned_to': 
+                                $return[$identifier]['helios_bt:assigned_to'] = $at_arr[$i]->data_array['assigned_realname'];
+                                break;
+                            case 'dc:modified': 
+                                $return[$identifier]['modified'] = $at_arr[$i]->data_array['last_modified_date'];
+                                break;
+                            case 'dc:created': 
+                                $return[$identifier]['created'] = $at_arr[$i]->data_array['open_date'];
+                                break;
+                            default: 
+                                throw new ConflictException("The attribute specified ".$field." cannot be found!");
+                        }
+                    }
+                } else {
+                    //return the by default set of Change request fields.
+                    $return[$identifier]=array(
+                        'identifier'=>$identifier,
+                        'title'=>$at_arr[$i]->data_array['summary'],
+                        'description'=>$at_arr[$i]->data_array['details'],
+                        'helios_bt:status'=>$at_arr[$i]->data_array['status_name'],
+                        'helios_bt:priority'=>$at_arr[$i]->data_array['priority'],
+                        'creator' => $at_arr[$i]->data_array['submitted_realname'],
+                        'helios_bt:assigned_to' => $at_arr[$i]->data_array['assigned_realname'],
+                        'modified' => $at_arr[$i]->data_array['last_modified_date'],
+                        'created' => $at_arr[$i]->data_array['open_date']
+                    );
+                }
+            }
+        }
+        return $return;
+    }
+}
+
+?>

Deleted: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,28 +0,0 @@
-<?php 
-
-
-function get_url() {
-	 $url = 'http';
-	 if ($_SERVER["HTTPS"] == "on") {$url .= "s";}
-	 $url .= "://";
-	 if ($_SERVER["SERVER_PORT"] != "80") {
-	  	$url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
-	 } else {
-	  	$url .= $_SERVER["SERVER_NAME"];
-	 }
-	 return $url;
-}
-
-function add_href($match){
-	return '<a href="'.$match[0].'">'.$match[0].'</a>';
-}
-
-function add_links($text, $url)	{
-	$preg_url = "/".str_replace("/", "\/", $url)."[^&\"]*"."/";
-	$replacement = preg_replace_callback($preg_url, "add_href", $text);
-	return $replacement;
-}
-
-
-
-?>

Copied: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php (from rev 12266, branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php)
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php	                        (rev 0)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/_add_hyperlinks.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -0,0 +1,28 @@
+<?php 
+
+
+function get_url() {
+	 $url = 'http';
+	 if ($_SERVER["HTTPS"] == "on") {$url .= "s";}
+	 $url .= "://";
+	 if ($_SERVER["SERVER_PORT"] != "80") {
+	  	$url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
+	 } else {
+	  	$url .= $_SERVER["SERVER_NAME"];
+	 }
+	 return $url;
+}
+
+function add_href($match){
+	return '<a href="'.$match[0].'">'.$match[0].'</a>';
+}
+
+function add_links($text, $url)	{
+	$preg_url = "/".str_replace("/", "\/", $url)."[^&\"]*"."/";
+	$replacement = preg_replace_callback($preg_url, "add_href", $text);
+	return $replacement;
+}
+
+
+
+?>

Deleted: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,511 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<?php 
-
-	$project = $this->data['project'];
-		
-	//type
-	//reproducibility
-	//severity
-	//priority
-	//platform //os //os_build ????
-	//product version
-	//product build
-	//assigned to (handler)
-	//target version
-	//summary
-	//description
-	//steps to reproduce
-	//additional info
-	//custom field
-	//view status
-	
-	/*
-	 * @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/Grid.css";
-		@import url("http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/soria/soria.css");
-		
-	 */
-	
-?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>OSLC Creation UI</title>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-		<style type="text/css">
-		@import url("/javascript/dojox/grid/resources/Grid.css");
-		@import url("/javascript/dijit/themes/soria/soria.css");
-		
-		body { 	font: 13px Myriad,Arial,Helvetica,clean,sans-serif; 	
-				*font-size: small;	
-				*font: x-small;}
-				
-		h1 {	font-size: 1.5em; 	
-				font-weight: normal;	
-				line-height: 1em; 	
-				margin-top: 1em;	
-				margin-bottom:0;}
-				
-		h2 { 	font-size: 1.1667em;
-				font-weight: bold; 	
-				line-height: 1.286em; 	
-				margin-top: 1.929em; 	
-				margin-bottom:0.643em;}
-		
-		h3, h4, h5, h6 {	font-size: 1em; 	
-							font-weight: bold; 	
-							line-height: 1.5em; 	
-							margin-top: 1.5em; 	
-							margin-bottom: 0;}
-							
-		p { 	font-size: 1em;
-				margin-top: 1.5em;
-				margin-bottom: 1.5em;
-				line-height: 1.5em;}
-		
-		body {
-			margin: 2em;
-		}
-		
-		table td {
-			padding: 2px;
-		}
-		
-		</style>
-        <script type="text/javascript" src="/javascript/dojo/dojo.js"
-			djconfig="parseOnLoad:true">
-		</script>
-        <script type="text/javascript">
-        dojo.require("dojox.encoding.base64");
-
-        var project = "<?php echo $project;?>";
-        var URL = '<?php echo $this->baseUrl(); ?>'+"/cm/project/"+project;
-        var result;
-        var postdata;
-        var userpass;
-        var error = false;
-
-        var convertToByteArray = function(data){
-            var bin=[] ;
-            for (var i=0; i<data.length; i++){
-            	bin.push(data.charCodeAt(i));
-            }
-            return bin;
-        }
-
-        var createCR = function()	{
-            createBugData();
-            if(!error)	{
-                var xhrArgs = {
-	                    url: URL,
-	                    postData: dojo.toJson(postdata),
-	                    headers: {	'Content-Type': "application/x-oslc-cm-change-request+json",
-									'Authorization': "Basic " + dojox.encoding.base64.encode(convertToByteArray(userpass))
-								},
-	                    load: function(data, ioArgs) {
-	                  	  	alert("The url of the bug just created is: "+data);                  	 	                        
-	                     	result = data;
-	                     	refresh();
-	                    },
-	                    error: function(err, ioargs) {
-	                    	var response = dojo.fromJson(ioargs.xhr.responseText);
-	                    	var errmsg, errcode;
-	                    	for (var key in response) {
-	  							var obj = response[key];						   
-	  							if(key=="oslc_cm:Error")   {
-	  							   for (var i in obj) {
-	  								  if(i=="oslc_cm:statusCode")	{
-	  									  errcode = obj[i];
-	  								  }else if(i=="oslc_cm:message")	{
-	  									  errmsg = obj[i];
-	  								  } 
-	  							   }
-	  							   var errtext = "Error " + errcode + ": " + errmsg;
-	  							   alert(errtext);
-	  						   }
-	  						}
-	                	}
-	                }			
-				dojo.xhrPost(xhrArgs);
-            }
-        }
-
-        var createBugData = function()	{
-            error = false;
-        	var user = dojo.trim(dojo.byId("usertext").value);
-            var pass = dojo.trim(dojo.byId("passtext").value);
-
-            if(user=="")	{
-                alert("User field is empty!");
-                error = true;
-                return;
-            }else if((user!="")&&(pass==""))	{
-                alert("Password field is empty!");
-                error = true;
-                return;
-            }else if(!user.match(/^[a-zA-Z0-9\s-\.+_]+$/))	{
-                alert("Invalid user name!");
-                error = true;
-                return;
-            }
-            
-			postdata = {};
-			var temp = dojo.trim(dojo.byId("titletext").value);
-			if(temp=="")	{
-				alert("Bug Title cannot be empty!");
-				error = true;
-                return;
-			}else	{
-				postdata['dc:title'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("descriptiontext").value);
-			if(temp=="")	{
-				alert("Bug description cannot be empty!");
-				error = true;
-                return;
-			}else	{
-				postdata['dc:description'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("stepstext").value);
-			if(temp!="")	{
-				postdata['mantisbt:steps_to_reproduce'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("additionalinfotext").value);
-			if(temp!="")	{
-				postdata['mantisbt:additional_information'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("categorylist").value);
-			if(temp=="none selected")	{
-				alert("Bug Category cannot be empty!");
-				error = true;
-                return;
-			}else	{
-				postdata['dc:type'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("reproducibilitylist").value);
-			if(temp!="none selected")	{
-				postdata['mantisbt:reproducibility'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("prioritylist").value);
-			if(temp!="none selected")	{
-				postdata['mantisbt:priority'] = temp;
-			}
-
-			temp = dojo.trim(dojo.byId("severitylist").value);
-			if(temp!="none selected")	{
-				postdata['mantisbt:severity'] = temp;
-			}
-
-			postdata['dc:creator'] = user;
-
-			var version = "<?php if(array_key_exists('product_version', $this->data)) echo "true";?>";
-			if(version=="true")	{
-				temp = dojo.trim(dojo.byId("productversionlist").value);
-				if(temp!="none selected")	{
-					postdata['mantisbt:version'] = temp;
-				}
-				temp = dojo.trim(dojo.byId("targetversionlist").value);
-				if(temp!="none selected")	{
-					postdata['mantisbt:target_version'] = temp;
-				}
-			}
-
-			if(dojo.byId("vspublic").checked==true)	{
-				postdata['mantisbt:view_state'] = "public";
-			}else if(dojo.byId("vsprivate").checked==true)	{
-				postdata['mantisbt:view_state'] = "private";
-			}
-			
-			//alert(postdata.toSource());
-			userpass = user + ":" + pass;
-			
-        }
-        
-        var creatensendCR = function()	{
-			createBugData();
-			if(!error)	{
-				
-				var xhrArgs = {
-	                    url: URL,
-	                    postData: dojo.toJson(postdata),
-	                    headers: {	'Content-Type': "application/x-oslc-cm-change-request+json",
-									'Authorization': "Basic " + dojox.encoding.base64.encode(convertToByteArray(userpass))
-								},
-	                    load: function(data, ioArgs) {
-	                  	  	alert("The url of the bug just created is: "+data);                  	 	                        
-	                     	result = data;
-	                     	postdata['rdf:resource'] = result;
-	        				postdata['oslc_cm:label'] = postdata['dc:title'];
-	        				postdataArr = [];
-	        				postdataArr.push(postdata);
-	        				var datatosend = {'oslc_cm:results': postdataArr};
-	        				datatosend = datatosend.toSource();
-	        				refresh();
-	        				//alert(datatosend);
-	        				respondWithPostMessage(datatosend);
-	                    },
-	                    error: function(err, ioargs) {
-	                    	var response = dojo.fromJson(ioargs.xhr.responseText);
-	                    	var errmsg, errcode;
-	                    	for (var key in response) {
-	  							var obj = response[key];						   
-	  							if(key=="oslc_cm:Error")   {
-	  							   for (var i in obj) {
-	  								  if(i=="oslc_cm:statusCode")	{
-	  									  errcode = obj[i];
-	  								  }else if(i=="oslc_cm:message")	{
-	  									  errmsg = obj[i];
-	  								  } 
-	  							   }
-	  							   var errtext = "Error " + errcode + ": " + errmsg;
-	  							   alert(errtext);
-	  						   }
-	  						}
-	                  	}
-	                }
-				
-				dojo.xhrPost(xhrArgs);
-			}
-			
-        }
-
-		function respondWithPostMessage(/*string*/ response) {
-            window.parent.postMessage("oslc-response:" + response, "*");
-            //TODO if window is not parented window.postMessage to be used
-            //which shud be ignored
-         }
-
-		var init = function()	{			
-			createconnect = dojo.connect(dojo.byId("createbutton"), "onclick", createCR);
-			creatensendconnect = dojo.connect(dojo.byId("creatensendbutton"), "onclick", creatensendCR);			
-		}
-
-		var refresh = function()	{
-			dojo.query(".textclass").forEach(
-                    function(item, index, array)	{
-						item.value = "";
-					});
-		
-			dojo.query(".listclass").forEach(
-                    function(item, index, array)	{
-						item.selectedIndex = 0;
-					});
-			
-		}
-
-		dojo.addOnLoad(init);
-
-        
-        </script>
-    </head>
-    <body>
-        <h1><?php echo strtoupper($project); ?>: Creation UI for OSLC</h1><hr/>
-        <!-- <p>some details of the query and blah blah to be added here</p> -->
-        
-        <br>
-        <!-- <p><b>Project: <?php echo $project ?></b></p> -->
-        <table>
-        	     		
-        </table>
-        <table border=1>        
-        <tr><td>
-	        <table CELLSPACING=2 CELLPADDING=2 id="main">
-	        	<tr><td><fieldset>
-        		<legend><em>User</em></legend>
-        		<input id="usertext" type=text>
-        		</fieldset>
-        		</td><td><fieldset>
-        		<legend><em>Password</em></legend>
-        		<input id="passtext" type=password>
-        		</fieldset>
-        		</td>
-        		</tr>
-        		<tr><td width=50% valign="top">
-	        	<fieldset>
-        		<legend><em>Title *</em></legend>
-		        <table>
-					<tr>
-						<td><input class="textclass" id="titletext" size="40" type=text></td>
-					</tr>
-				</table>
-				</fieldset>
-				</td>
-				<td width=50%>
-	        	<fieldset>
-        		<legend><em>Description *</em></legend>
-		        <table>
-					<tr>
-						<td><textarea class="textclass" id="descriptiontext" cols="40" rows="3"></textarea></td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<tr><td width=50% valign="top">
-	        	<fieldset>
-        		<legend><em>Steps to reproduce</em></legend>
-		        <table>
-					<tr>
-						<td><textarea class="textclass" id="stepstext" cols="40" rows="3"></textarea></td>
-					</tr>
-				</table>
-				</fieldset>
-				</td>
-				<td width=50%>
-	        	<fieldset>
-        		<legend><em>Additional information</em></legend>
-		        <table>
-					<tr>
-						<td><textarea class="textclass" id="additionalinfotext" cols="40" rows="3"></textarea></td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<tr><td width=50%>
-	        	<fieldset>
-        		<legend><em>Category *</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="categorylist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['category_id'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-								
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td>
-				<td width=50%>
-	        	<fieldset>
-        		<legend><em>Reproducibility</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="reproducibilitylist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['reproducibility'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<tr><td width=50%>
-	        	<fieldset>
-        		<legend><em>Priority</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="prioritylist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['priority'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-								
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td>
-				<td width=50%>
-	        	<fieldset>
-        		<legend><em>Severity</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="severitylist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['severity'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<?php 
-				if(array_key_exists('product_version', $this->data))	{
-				?>
-				<tr><td width=50%>
-	        	<fieldset>
-        		<legend><em>Product Version</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="productversionlist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['product_version'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-								
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td>
-				<td width=50%>
-	        	<fieldset>
-        		<legend><em>Target Version</em></legend>
-		        <table>
-					<tr>
-						<td><select class="listclass" id="targetversionlist">
-							<option value="none selected" selected="selected">Select</option>
-							<?php 
-							foreach ($this->data['target_version'] as $value) {
-								echo '<option value="'.$value.'">'.$value.'</option>';
-							}
-							?>			  			
-							</select>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<?php 
-				}
-				?>
-				<tr><td >
-	        	<fieldset>
-        		<legend><em>View State</em></legend>
-		        <table>
-					<tr>
-						<td>
-						<?php 
-						foreach ($this->data['view_state'] as $value) {
-							echo '<input type="radio" id="vs'.$value.'" name="viewstate" value="'.$value.'"/>'.$value.'';
-						}
-						?>
-						</td>
-					</tr>
-				</table>
-				</fieldset>
-				</td></tr>
-				<tr><td align="center">
-					<button id="createbutton">CREATE CHANGE REQUEST</button>
-				</td><td align="center">
-					<button id="creatensendbutton">CREATE CHANGE REQUEST AND ADD TO CLIENT</button>
-				</td></tr>
-			</table>
-		</td>
-		</tr>
-		</table>
-    </body>
-</html>

Copied: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml (from rev 12266, branches/Branch_5_1/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml)
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml	                        (rev 0)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/cm/show-creation-ui.phtml	2011-02-11 12:14:55 UTC (rev 12268)
@@ -0,0 +1,511 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<?php 
+
+	$project = $this->data['project'];
+		
+	//type
+	//reproducibility
+	//severity
+	//priority
+	//platform //os //os_build ????
+	//product version
+	//product build
+	//assigned to (handler)
+	//target version
+	//summary
+	//description
+	//steps to reproduce
+	//additional info
+	//custom field
+	//view status
+	
+	/*
+	 * @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/Grid.css";
+		@import url("http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/soria/soria.css");
+		
+	 */
+	
+?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>OSLC Creation UI</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+		<style type="text/css">
+		@import url("/javascript/dojox/grid/resources/Grid.css");
+		@import url("/javascript/dijit/themes/soria/soria.css");
+		
+		body { 	font: 13px Myriad,Arial,Helvetica,clean,sans-serif; 	
+				*font-size: small;	
+				*font: x-small;}
+				
+		h1 {	font-size: 1.5em; 	
+				font-weight: normal;	
+				line-height: 1em; 	
+				margin-top: 1em;	
+				margin-bottom:0;}
+				
+		h2 { 	font-size: 1.1667em;
+				font-weight: bold; 	
+				line-height: 1.286em; 	
+				margin-top: 1.929em; 	
+				margin-bottom:0.643em;}
+		
+		h3, h4, h5, h6 {	font-size: 1em; 	
+							font-weight: bold; 	
+							line-height: 1.5em; 	
+							margin-top: 1.5em; 	
+							margin-bottom: 0;}
+							
+		p { 	font-size: 1em;
+				margin-top: 1.5em;
+				margin-bottom: 1.5em;
+				line-height: 1.5em;}
+		
+		body {
+			margin: 2em;
+		}
+		
+		table td {
+			padding: 2px;
+		}
+		
+		</style>
+        <script type="text/javascript" src="/javascript/dojo/dojo.js"
+			djconfig="parseOnLoad:true">
+		</script>
+        <script type="text/javascript">
+        dojo.require("dojox.encoding.base64");
+
+        var project = "<?php echo $project;?>";
+        var URL = '<?php echo $this->baseUrl(); ?>'+"/cm/project/"+project;
+        var result;
+        var postdata;
+        var userpass;
+        var error = false;
+
+        var convertToByteArray = function(data){
+            var bin=[] ;
+            for (var i=0; i<data.length; i++){
+            	bin.push(data.charCodeAt(i));
+            }
+            return bin;
+        }
+
+        var createCR = function()	{
+            createBugData();
+            if(!error)	{
+                var xhrArgs = {
+	                    url: URL,
+	                    postData: dojo.toJson(postdata),
+	                    headers: {	'Content-Type': "application/x-oslc-cm-change-request+json",
+									'Authorization': "Basic " + dojox.encoding.base64.encode(convertToByteArray(userpass))
+								},
+	                    load: function(data, ioArgs) {
+	                  	  	alert("The url of the bug just created is: "+data);                  	 	                        
+	                     	result = data;
+	                     	refresh();
+	                    },
+	                    error: function(err, ioargs) {
+	                    	var response = dojo.fromJson(ioargs.xhr.responseText);
+	                    	var errmsg, errcode;
+	                    	for (var key in response) {
+	  							var obj = response[key];						   
+	  							if(key=="oslc_cm:Error")   {
+	  							   for (var i in obj) {
+	  								  if(i=="oslc_cm:statusCode")	{
+	  									  errcode = obj[i];
+	  								  }else if(i=="oslc_cm:message")	{
+	  									  errmsg = obj[i];
+	  								  } 
+	  							   }
+	  							   var errtext = "Error " + errcode + ": " + errmsg;
+	  							   alert(errtext);
+	  						   }
+	  						}
+	                	}
+	                }			
+				dojo.xhrPost(xhrArgs);
+            }
+        }
+
+        var createBugData = function()	{
+            error = false;
+        	var user = dojo.trim(dojo.byId("usertext").value);
+            var pass = dojo.trim(dojo.byId("passtext").value);
+
+            if(user=="")	{
+                alert("User field is empty!");
+                error = true;
+                return;
+            }else if((user!="")&&(pass==""))	{
+                alert("Password field is empty!");
+                error = true;
+                return;
+            }else if(!user.match(/^[a-zA-Z0-9\s-\.+_]+$/))	{
+                alert("Invalid user name!");
+                error = true;
+                return;
+            }
+            
+			postdata = {};
+			var temp = dojo.trim(dojo.byId("titletext").value);
+			if(temp=="")	{
+				alert("Bug Title cannot be empty!");
+				error = true;
+                return;
+			}else	{
+				postdata['dc:title'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("descriptiontext").value);
+			if(temp=="")	{
+				alert("Bug description cannot be empty!");
+				error = true;
+                return;
+			}else	{
+				postdata['dc:description'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("stepstext").value);
+			if(temp!="")	{
+				postdata['mantisbt:steps_to_reproduce'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("additionalinfotext").value);
+			if(temp!="")	{
+				postdata['mantisbt:additional_information'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("categorylist").value);
+			if(temp=="none selected")	{
+				alert("Bug Category cannot be empty!");
+				error = true;
+                return;
+			}else	{
+				postdata['dc:type'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("reproducibilitylist").value);
+			if(temp!="none selected")	{
+				postdata['mantisbt:reproducibility'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("prioritylist").value);
+			if(temp!="none selected")	{
+				postdata['mantisbt:priority'] = temp;
+			}
+
+			temp = dojo.trim(dojo.byId("severitylist").value);
+			if(temp!="none selected")	{
+				postdata['mantisbt:severity'] = temp;
+			}
+
+			postdata['dc:creator'] = user;
+
+			var version = "<?php if(array_key_exists('product_version', $this->data)) echo "true";?>";
+			if(version=="true")	{
+				temp = dojo.trim(dojo.byId("productversionlist").value);
+				if(temp!="none selected")	{
+					postdata['mantisbt:version'] = temp;
+				}
+				temp = dojo.trim(dojo.byId("targetversionlist").value);
+				if(temp!="none selected")	{
+					postdata['mantisbt:target_version'] = temp;
+				}
+			}
+
+			if(dojo.byId("vspublic").checked==true)	{
+				postdata['mantisbt:view_state'] = "public";
+			}else if(dojo.byId("vsprivate").checked==true)	{
+				postdata['mantisbt:view_state'] = "private";
+			}
+			
+			//alert(postdata.toSource());
+			userpass = user + ":" + pass;
+			
+        }
+        
+        var creatensendCR = function()	{
+			createBugData();
+			if(!error)	{
+				
+				var xhrArgs = {
+	                    url: URL,
+	                    postData: dojo.toJson(postdata),
+	                    headers: {	'Content-Type': "application/x-oslc-cm-change-request+json",
+									'Authorization': "Basic " + dojox.encoding.base64.encode(convertToByteArray(userpass))
+								},
+	                    load: function(data, ioArgs) {
+	                  	  	alert("The url of the bug just created is: "+data);                  	 	                        
+	                     	result = data;
+	                     	postdata['rdf:resource'] = result;
+	        				postdata['oslc_cm:label'] = postdata['dc:title'];
+	        				postdataArr = [];
+	        				postdataArr.push(postdata);
+	        				var datatosend = {'oslc_cm:results': postdataArr};
+	        				datatosend = datatosend.toSource();
+	        				refresh();
+	        				//alert(datatosend);
+	        				respondWithPostMessage(datatosend);
+	                    },
+	                    error: function(err, ioargs) {
+	                    	var response = dojo.fromJson(ioargs.xhr.responseText);
+	                    	var errmsg, errcode;
+	                    	for (var key in response) {
+	  							var obj = response[key];						   
+	  							if(key=="oslc_cm:Error")   {
+	  							   for (var i in obj) {
+	  								  if(i=="oslc_cm:statusCode")	{
+	  									  errcode = obj[i];
+	  								  }else if(i=="oslc_cm:message")	{
+	  									  errmsg = obj[i];
+	  								  } 
+	  							   }
+	  							   var errtext = "Error " + errcode + ": " + errmsg;
+	  							   alert(errtext);
+	  						   }
+	  						}
+	                  	}
+	                }
+				
+				dojo.xhrPost(xhrArgs);
+			}
+			
+        }
+
+		function respondWithPostMessage(/*string*/ response) {
+            window.parent.postMessage("oslc-response:" + response, "*");
+            //TODO if window is not parented window.postMessage to be used
+            //which shud be ignored
+         }
+
+		var init = function()	{			
+			createconnect = dojo.connect(dojo.byId("createbutton"), "onclick", createCR);
+			creatensendconnect = dojo.connect(dojo.byId("creatensendbutton"), "onclick", creatensendCR);			
+		}
+
+		var refresh = function()	{
+			dojo.query(".textclass").forEach(
+                    function(item, index, array)	{
+						item.value = "";
+					});
+		
+			dojo.query(".listclass").forEach(
+                    function(item, index, array)	{
+						item.selectedIndex = 0;
+					});
+			
+		}
+
+		dojo.addOnLoad(init);
+
+        
+        </script>
+    </head>
+    <body>
+        <h1><?php echo strtoupper($project); ?>: Creation UI for OSLC</h1><hr/>
+        <!-- <p>some details of the query and blah blah to be added here</p> -->
+        
+        <br>
+        <!-- <p><b>Project: <?php echo $project ?></b></p> -->
+        <table>
+        	     		
+        </table>
+        <table border=1>        
+        <tr><td>
+	        <table CELLSPACING=2 CELLPADDING=2 id="main">
+	        	<tr><td><fieldset>
+        		<legend><em>User</em></legend>
+        		<input id="usertext" type=text>
+        		</fieldset>
+        		</td><td><fieldset>
+        		<legend><em>Password</em></legend>
+        		<input id="passtext" type=password>
+        		</fieldset>
+        		</td>
+        		</tr>
+        		<tr><td width=50% valign="top">
+	        	<fieldset>
+        		<legend><em>Title *</em></legend>
+		        <table>
+					<tr>
+						<td><input class="textclass" id="titletext" size="40" type=text></td>
+					</tr>
+				</table>
+				</fieldset>
+				</td>
+				<td width=50%>
+	        	<fieldset>
+        		<legend><em>Description *</em></legend>
+		        <table>
+					<tr>
+						<td><textarea class="textclass" id="descriptiontext" cols="40" rows="3"></textarea></td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<tr><td width=50% valign="top">
+	        	<fieldset>
+        		<legend><em>Steps to reproduce</em></legend>
+		        <table>
+					<tr>
+						<td><textarea class="textclass" id="stepstext" cols="40" rows="3"></textarea></td>
+					</tr>
+				</table>
+				</fieldset>
+				</td>
+				<td width=50%>
+	        	<fieldset>
+        		<legend><em>Additional information</em></legend>
+		        <table>
+					<tr>
+						<td><textarea class="textclass" id="additionalinfotext" cols="40" rows="3"></textarea></td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<tr><td width=50%>
+	        	<fieldset>
+        		<legend><em>Category *</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="categorylist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['category_id'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+								
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td>
+				<td width=50%>
+	        	<fieldset>
+        		<legend><em>Reproducibility</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="reproducibilitylist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['reproducibility'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<tr><td width=50%>
+	        	<fieldset>
+        		<legend><em>Priority</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="prioritylist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['priority'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+								
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td>
+				<td width=50%>
+	        	<fieldset>
+        		<legend><em>Severity</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="severitylist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['severity'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<?php 
+				if(array_key_exists('product_version', $this->data))	{
+				?>
+				<tr><td width=50%>
+	        	<fieldset>
+        		<legend><em>Product Version</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="productversionlist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['product_version'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+								
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td>
+				<td width=50%>
+	        	<fieldset>
+        		<legend><em>Target Version</em></legend>
+		        <table>
+					<tr>
+						<td><select class="listclass" id="targetversionlist">
+							<option value="none selected" selected="selected">Select</option>
+							<?php 
+							foreach ($this->data['target_version'] as $value) {
+								echo '<option value="'.$value.'">'.$value.'</option>';
+							}
+							?>			  			
+							</select>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<?php 
+				}
+				?>
+				<tr><td >
+	        	<fieldset>
+        		<legend><em>View State</em></legend>
+		        <table>
+					<tr>
+						<td>
+						<?php 
+						foreach ($this->data['view_state'] as $value) {
+							echo '<input type="radio" id="vs'.$value.'" name="viewstate" value="'.$value.'"/>'.$value.'';
+						}
+						?>
+						</td>
+					</tr>
+				</table>
+				</fieldset>
+				</td></tr>
+				<tr><td align="center">
+					<button id="createbutton">CREATE CHANGE REQUEST</button>
+				</td><td align="center">
+					<button id="creatensendbutton">CREATE CHANGE REQUEST AND ADD TO CLIENT</button>
+				</td></tr>
+			</table>
+		</td>
+		</tr>
+		</table>
+    </body>
+</html>

Modified: trunk/tests/SeleniumTests.php
===================================================================
--- trunk/tests/SeleniumTests.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/tests/SeleniumTests.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -27,6 +27,9 @@
 		$suite->addTestFiles(glob("func/PluginsBlocks/*Test.php"));
 		$suite->addTestFiles(glob("func/RBAC/*Test.php"));
 		
+		// Run any func tests available in the plugins
+		$suite->addTestFiles(glob("../src/plugins/*/tests/func/*Test.php"));
+
 		return $suite;
 	}
 }

Modified: trunk/tests/func/Site/loginTest.php
===================================================================
--- trunk/tests/func/Site/loginTest.php	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/tests/func/Site/loginTest.php	2011-02-11 12:14:55 UTC (rev 12268)
@@ -53,6 +53,17 @@
 		$this->open( ROOT );
 		$this->click("link=Log In");
 		$this->waitForPageToLoad("30000");
+
+		// Check that current URL's base is the same as ROOT
+		// If the forge redirects to other URL than the one
+		// used to access it, then logout doesn't work (bug or
+		// feature ?)
+		$location=$this->getLocation();
+		$url_regexp = str_replace('.', '\.', HOST);
+		$url_regexp = '/https?:\/\/'. $url_regexp .'\//';
+		$this->assertRegExp($url_regexp, $location, 
+				    "You may need to set 'HOST' setting in test suite's config file to something compatible with 'web_host' defined in ini file");
+
 		$this->type("form_loginname", "admin");
 		$this->type("form_pw", "myadmin");
 		$this->click("login");
@@ -60,7 +71,9 @@
 		$this->assertTrue($this->isTextPresent("Forge Admin"));
 		$this->assertTrue($this->isTextPresent("Log Out"));
 		$this->logout();
-				
+		// Verify that logout is succesfull
+		$this->assertTrue($this->isTextPresent("Log In"));
+	
 		// Test with an empty password.
 		$this->open( ROOT );
 		$this->click("link=Log In");

Modified: trunk/tests/func/db_reload.sh
===================================================================
--- trunk/tests/func/db_reload.sh	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/tests/func/db_reload.sh	2011-02-11 12:14:55 UTC (rev 12268)
@@ -1,7 +1,11 @@
 #! /bin/sh
 
+echo "Cleaning up the database"
 invoke-rc.d apache2 stop
+
 invoke-rc.d postgresql restart
-su - postgres -c "dropdb gforge"
+su - postgres -c "dropdb -e gforge"
+echo "Executing: pg_restore -C -d template1 < /root/dump"
 su - postgres -c "pg_restore -C -d template1" < /root/dump
+
 invoke-rc.d apache2 start

Modified: trunk/tools/VM-scripts/run-testsuite.sh
===================================================================
--- trunk/tools/VM-scripts/run-testsuite.sh	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/tools/VM-scripts/run-testsuite.sh	2011-02-11 12:14:55 UTC (rev 12268)
@@ -11,10 +11,3 @@
 	phpunit --verbose $i
     done
 fi
-
-# If available, run the JUnit OSLC provider test suite
-if [ -d /root/fusionforge/src/plugins/oslc/tests ]; then
-    cd /root/fusionforge/src/plugins/oslc/tests
-    ./setup-provider-test.sh
-    ./run-provider-tests.sh
-fi

Modified: trunk/tools/VM-scripts/update.sh
===================================================================
--- trunk/tools/VM-scripts/update.sh	2011-02-11 12:11:10 UTC (rev 12267)
+++ trunk/tools/VM-scripts/update.sh	2011-02-11 12:14:55 UTC (rev 12268)
@@ -27,4 +27,8 @@
     git pull
 fi
 
-
+# If available, install the JUnit OSLC provider test suite
+if [ -d src/plugins/oslc/tests ]; then
+    cd /root/fusionforge/src/plugins/oslc/tests
+    ./setup-provider-test.sh
+fi




More information about the Fusionforge-commits mailing list