[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11892] Merge 11880:11891 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11892] Merge 11880:11891 from trunk |
Date: |
Mon, 07 Apr 2014 17:12:17 +0000 |
Revision: 11892
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11892
Author: sigurdne
Date: 2014-04-07 17:12:16 +0000 (Mon, 07 Apr 2014)
Log Message:
-----------
Merge 11880:11891 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/bim/setup/setup.inc.php
branches/Version-1_0-branch/bim/setup/tables_current.inc.php
branches/Version-1_0-branch/bim/setup/tables_update.inc.php
branches/Version-1_0-branch/booking/inc/class.socommon.inc.php
branches/Version-1_0-branch/booking/inc/class.uicompleted_reservation.inc.php
branches/Version-1_0-branch/catch/setup/setup.inc.php
branches/Version-1_0-branch/catch/setup/tables_current.inc.php
branches/Version-1_0-branch/catch/setup/tables_update.inc.php
branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
branches/Version-1_0-branch/controller/js/controller/ajax.js
branches/Version-1_0-branch/controller/setup/phpgw_no.lang
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
branches/Version-1_0-branch/phpgwapi/inc/class.vfs_fileoperation_braArkiv.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.vfs_sql.inc.php
branches/Version-1_0-branch/property/inc/class.boentity.inc.php
branches/Version-1_0-branch/property/inc/class.boevent.inc.php
branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
branches/Version-1_0-branch/property/inc/class.interlink.inc.php
branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
branches/Version-1_0-branch/property/inc/class.soentity.inc.php
branches/Version-1_0-branch/property/inc/class.soevent.inc.php
branches/Version-1_0-branch/property/inc/class.soproject.inc.php
branches/Version-1_0-branch/property/inc/class.sotts.inc.php
branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
branches/Version-1_0-branch/property/inc/class.uientity.inc.php
branches/Version-1_0-branch/property/inc/class.uievent.inc.php
branches/Version-1_0-branch/property/inc/class.uitts.inc.php
branches/Version-1_0-branch/property/setup/phpgw_no.lang
branches/Version-1_0-branch/property/setup/setup.inc.php
branches/Version-1_0-branch/property/setup/tables_current.inc.php
branches/Version-1_0-branch/property/setup/tables_update.inc.php
branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
branches/Version-1_0-branch/property/templates/base/entity.xsl
branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874,11876-11879,11881-11891
Modified: branches/Version-1_0-branch/bim/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/bim/setup/setup.inc.php 2014-04-07 13:28:11 UTC
(rev 11891)
+++ branches/Version-1_0-branch/bim/setup/setup.inc.php 2014-04-07 17:12:16 UTC
(rev 11892)
@@ -12,7 +12,7 @@
*/
$setup_info['bim']['name'] = 'bim';
- $setup_info['bim']['version'] = '0.9.17.506';
+ $setup_info['bim']['version'] = '0.9.17.507';
$setup_info['bim']['app_order'] = 8;
$setup_info['bim']['enable'] = 1;
$setup_info['bim']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/bim/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/bim/setup/tables_current.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/bim/setup/tables_current.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -60,6 +60,7 @@
'address' => array('type' =>
'varchar','precision' => '150','nullable' => True),
'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True),
'user_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
+ 'department_id' => array('type' =>
'int','precision' => '4','nullable' => True),
),
'pk' => array('type','id'),
'fk' => array(
Modified: branches/Version-1_0-branch/bim/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/bim/setup/tables_update.inc.php 2014-04-07
13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/bim/setup/tables_update.inc.php 2014-04-07
17:12:16 UTC (rev 11892)
@@ -166,3 +166,20 @@
return $GLOBALS['setup_info']['bim']['currentver'];
}
}
+
+ /**
+ * Update bim version from 0.9.17.506 to 0.9.17.507
+ */
+ $test[] = '0.9.17.506';
+ function bim_upgrade0_9_17_506()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_bim_item','department_id',
array('type' => 'int', 'precision' => 4,'nullable' => true));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['bim']['currentver'] =
'0.9.17.507';
+ return $GLOBALS['setup_info']['bim']['currentver'];
+ }
+ }
Modified: branches/Version-1_0-branch/booking/inc/class.socommon.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.socommon.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/booking/inc/class.socommon.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -417,7 +417,22 @@
strtolower($results) === 'all' AND $results =
$total_records; //TODO: Kept because of BC. Should be easy to remove this
dependency?
- $order = $sort ? "ORDER BY $sort $dir ": '';
+ /*
+ * Due to problem on order with offset - we need to set
an additional parameter in some cases
+ *
http://stackoverflow.com/questions/13580826/postgresql-repeating-rows-from-limit-offset
+ */
+
+ if($sort)
+ {
+ if(is_array($sort))
+ {
+ $order = "ORDER BY {$sort[0]} {$dir},
{$sort[1]}";
+ }
+ else
+ {
+ $order = "ORDER BY {$sort} {$dir}";
+ }
+ }
$base_sql = "SELECT $cols FROM $this->table_name $joins
WHERE $condition $order ";
if ($results)
@@ -499,7 +514,7 @@
'total_records' => $total_records,
'results' => $results,
'start' => $start,
- 'sort' => $sort,
+ 'sort' => is_array($sort) ?
$sort[0] : $sort,
'dir' => $dir
);
}
Modified:
branches/Version-1_0-branch/booking/inc/class.uicompleted_reservation.inc.php
===================================================================
---
branches/Version-1_0-branch/booking/inc/class.uicompleted_reservation.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++
branches/Version-1_0-branch/booking/inc/class.uicompleted_reservation.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -243,6 +243,48 @@
$sort = phpgw::get_var('sort');
$dir = phpgw::get_var('dir');
+ /*
+ * Due to problem on order with offset - we need to set
an additional parameter in some cases
+ *
http://stackoverflow.com/questions/13580826/postgresql-repeating-rows-from-limit-offset
+ */
+
+ switch($sort)
+ {
+ case 'cost':
+ $_sort = array('cost','id');
+ break;
+ case 'reservation_type':
+ $_sort = array('reservation_type','id');
+ break;
+ case 'building_name':
+ $_sort = array('building_name','id');
+ break;
+ case 'organization_name':
+ $_sort =
array('organization_name','id');
+ break;
+ case 'contact_name':
+ $_sort = array('contact_name','id');
+ break;
+ case 'customer_type':
+ $_sort = array('customer_type','id');
+ break;
+ case 'from_':
+ $_sort = array('from_','id');
+ break;
+ case 'to_':
+ $_sort = array('to_','id');
+ break;
+ case 'exported':
+ $_sort = array('exported','id');
+ break;
+ case 'export_file_id':
+ $_sort = array('export_file_id','id');
+ break;
+ default:
+ $_sort = $sort;
+ break;
+ }
+
$filters = array();
foreach($this->bo->so->get_field_defs() as $field =>
$params) {
if(phpgw::get_var("filter_$field")) {
@@ -283,7 +325,7 @@
'start' => $start,
'results' => $results,
'query' => $query,
- 'sort' => $sort,
+ 'sort' => $_sort,
'dir' => $dir,
'filters' => $filters
);
Modified: branches/Version-1_0-branch/catch/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/setup.inc.php 2014-04-07
13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/catch/setup/setup.inc.php 2014-04-07
17:12:16 UTC (rev 11892)
@@ -27,7 +27,7 @@
*/
$setup_info['catch']['name'] = 'catch';
- $setup_info['catch']['version'] = '0.9.17.515';
+ $setup_info['catch']['version'] = '0.9.17.517';
$setup_info['catch']['app_order'] = 20;
$setup_info['catch']['enable'] = 1;
$setup_info['catch']['globals_checked'] = True;
Modified: branches/Version-1_0-branch/catch/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -63,6 +63,7 @@
'jasperupload' => array('type' =>
'int','precision' => 2,'nullable' => True),
'parent_id' => array('type' =>
'int','precision' => '4','nullable' => True),
'level' => array('type' => 'int','precision' =>
'4','nullable' => True),
+ 'department' => array('type' =>
'int','precision' => '2','nullable' => True),
),
'pk' => array('entity_id','id'),
'fk' => array(),
Modified: branches/Version-1_0-branch/catch/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -483,3 +483,66 @@
}
}
+ /**
+ * Update catch version from 0.9.17.515 to 0.9.17.516
+ * Add department-flag to entities
+ */
+
+ $test[] = '0.9.17.515';
+ function catch_upgrade0_9_17_515()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_catch_category','department',array('type'
=> 'int','precision' => 2,'nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['catch']['currentver'] =
'0.9.17.516';
+ return $GLOBALS['setup_info']['catch']['currentver'];
+ }
+ }
+
+
+ /**
+ * Update catch version from 0.9.17.516 to 0.9.17.517
+ * Add department_id to catch tables
+ */
+ $test[] = '0.9.17.516';
+ function catch_upgrade0_9_17_516()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_catch_category");
+
+ $categories = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $categories[] = array
+ (
+ 'entity_id' =>
$GLOBALS['phpgw_setup']->oProc->f('entity_id'),
+ 'cat_id' =>
$GLOBALS['phpgw_setup']->oProc->f('id')
+ );
+ }
+
+ $tables = $GLOBALS['phpgw_setup']->oProc->m_odb->table_names();
+
+ foreach ($categories as $category)
+ {
+ $table =
"fm_catch_{$category['entity_id']}_{$category['cat_id']}";
+ if(in_array($table, $tables))
+ {
+ $metadata =
$GLOBALS['phpgw_setup']->oProc->m_odb->metadata($table);
+ if(!isset($metadata['department_id']))
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'department_id',array('type'
=> 'int','precision' => 4,'nullable' => True));
+ }
+ }
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['catch']['currentver'] =
'0.9.17.517';
+ return $GLOBALS['setup_info']['catch']['currentver'];
+ }
+ }
+
Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -62,7 +62,8 @@
'view_calendar_for_month' => true,
'view_calendar_for_year' => true,
'view_calendar_year_for_locations' => true,
- 'view_calendar_month_for_locations' => true
+ 'view_calendar_month_for_locations' => true,
+ 'update_bookmark'
=> true
);
public function __construct()
@@ -451,8 +452,21 @@
$control_id = phpgw::get_var('control_id', 'int');
$control = $this->so_control->get_single($control_id);
$year = phpgw::get_var('year', 'int');
- $location_code = phpgw::get_var('location_code');
+ $user_id = $GLOBALS['phpgw_info']['user']['account_id'];
+
+ $bookmark_locations = array();
+ $bookmarks = phpgwapi_cache::user_get('controller',
"location_bookmark", $user_id);
+ if(is_array($bookmarks))
+ {
+ $bookmark_locations = array_keys($bookmarks);
+ }
+
+ if($location_code = phpgw::get_var('location_code'))
+ {
+ $bookmark_locations[] = $location_code;
+ }
+
$locations_list = array();
if (is_numeric($control_id) & $control_id > 0)
@@ -493,7 +507,7 @@
{
$curr_location_code =
$location['location_code'];
- if(!$location_code ||
$curr_location_code != $location_code)
+ if(!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
{
continue;
}
@@ -510,7 +524,14 @@
$year_calendar_agg = new
year_calendar_agg($control, $year, $curr_location_code,
"VIEW_LOCATIONS_FOR_CONTROL");
$calendar_array =
$year_calendar_agg->build_calendar($agg_open_cases_pr_month_array);
- $locations_with_calendar_array[] =
array("location" => $location, "calendar_array" => $calendar_array);
+
+ $locations_with_calendar_array[] = array
+ (
+ 'location'
=> $location,
+ 'calendar_array' =>
$calendar_array,
+ 'selected'
=> $bookmarks && isset($bookmarks[$curr_location_code])
+ );
+
}
// COMPONENTS: Process aggregated values for
controls with repeat type day or week
@@ -562,7 +583,7 @@
{
$curr_location_code =
$location['location_code'];
- if(!$location_code ||
$curr_location_code != $location_code)
+ if(!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
{
continue;
}
@@ -573,7 +594,12 @@
$year_calendar = new
year_calendar($control, $year, null, $curr_location_code, "location");
$calendar_array =
$year_calendar->build_calendar($check_lists_array);
- $locations_with_calendar_array[] =
array("location" => $location, "calendar_array" => $calendar_array);
+ $locations_with_calendar_array[] = array
+ (
+ 'location'
=> $location,
+ 'calendar_array' =>
$calendar_array,
+ 'selected'
=> $bookmarks && isset($bookmarks[$curr_location_code])
+ );
}
foreach ($components_for_control_array as
$component)
@@ -646,8 +672,21 @@
$control = $this->so_control->get_single($control_id);
$year = intval(phpgw::get_var('year'));
$month = intval(phpgw::get_var('month'));
- $location_code = phpgw::get_var('location_code');
+ $user_id = $GLOBALS['phpgw_info']['user']['account_id'];
+
+ $bookmark_locations = array();
+ $bookmarks = phpgwapi_cache::user_get('controller',
"location_bookmark", $user_id);
+ if(is_array($bookmarks))
+ {
+ $bookmark_locations = array_keys($bookmarks);
+ }
+
+ if($location_code = phpgw::get_var('location_code'))
+ {
+ $bookmark_locations[] = $location_code;
+ }
+
if (is_numeric($control_id) & $control_id > 0)
{
$locations_for_control_array =
$this->so_control->get_locations_for_control($control_id);
@@ -685,7 +724,7 @@
{
$curr_location_code =
$location['location_code'];
- if(!$location_code || $curr_location_code !=
$location_code)
+ if(!$bookmark_locations ||
!in_array($curr_location_code, $bookmark_locations))
{
continue;
}
@@ -696,7 +735,12 @@
$month_calendar = new month_calendar($control, $year, $month,
null, $curr_location_code, "location");
$calendar_array =
$month_calendar->build_calendar($check_lists_array);
- $locations_with_calendar_array[] =
array("location" => $location, "calendar_array" => $calendar_array);
+ $locations_with_calendar_array[] = array
+ (
+ 'location' =>
$location,
+ 'calendar_array' =>
$calendar_array,
+ 'selected' =>
$bookmarks && isset($bookmarks[$curr_location_code])
+ );
}
foreach ($components_for_control_array as $component)
@@ -958,6 +1002,35 @@
{
}
+ public function update_bookmark()
+ {
+ $location_code = phpgw::get_var('location_code',
'string');
+ $user_id = $GLOBALS['phpgw_info']['user']['account_id'];
+ $bookmarks = phpgwapi_cache::user_get('controller',
"location_bookmark", $user_id);
+ if($bookmarks && is_array($bookmarks) &&
isset($bookmarks[$location_code]))
+ {
+ unset($bookmarks[$location_code]);
+ $status = lang('deleted');
+ }
+ else
+ {
+ if(! is_array($bookmarks))
+ {
+ $bookmarks = array();
+ }
+
+ $bookmarks[$location_code] = true;
+ $status = lang('added');
+ }
+
+ phpgwapi_cache::user_set('controller',
"location_bookmark", $bookmarks, $user_id);
+
+ return array
+ (
+ 'status' => $status
+ );
+ }
+
}
Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js
2014-04-07 17:12:16 UTC (rev 11892)
@@ -707,3 +707,23 @@
// Updating order number in front of row
$(span_order_nr).text(updated_order_nr);
}
+
+//Updates order number for hidden field and number in front of row
+function update_bookmark(location_code){
+ var oArgs =
{menuaction:'controller.uicalendar.update_bookmark',
location_code:location_code};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ $.ajax({
+ type: 'POST',
+ url: requestUrl,
+ dataType: 'json',
+ success: function(data) {
+ if(data)
+ {
+ alert(data.status);
+ }
+ }
+ });
+
+
+}
Modified: branches/Version-1_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/controller/setup/phpgw_no.lang 2014-04-07
13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/controller/setup/phpgw_no.lang 2014-04-07
17:12:16 UTC (rev 11892)
@@ -1,4 +1,7 @@
add_check_list_to_location controller no Registrer kontroll for
bygg
+added controller no Lagt til
+deleted controller no Slettet
+bookmark controller no Bokmerke
location_connections controller no Byggknytning
control controller no Kontroll
controller common no Kontroll
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
2014-04-07 13:28:11 UTC (rev 11891)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
2014-04-07 17:12:16 UTC (rev 11892)
@@ -92,7 +92,10 @@
<xsl:choose>
<xsl:when
test="locations_with_calendar_array/child::node()">
-
+ <xsl:variable name="lang_bookmark">
+ <xsl:value-of
select="php:function('lang', 'bookmark')" />
+ </xsl:variable>
+
<xsl:for-each
select="locations_with_calendar_array">
<tr>
<xsl:choose>
@@ -105,6 +108,13 @@
</xsl:choose>
<td>
+ <input type="checkbox"
name = "bookmark_location" value ="location/location_code"
title="{$lang_bookmark}">
+ <xsl:attribute
name="onchange">javascript:update_bookmark('<xsl:value-of
select="location/location_code"/>');</xsl:attribute>
+ <xsl:if
test="selected = 1">
+ <xsl:attribute
name="checked">checked</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xls:text> </xls:text>
<xsl:value-of
select="location/location_code"/>
</td>
<td class="location-name">
Modified:
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
===================================================================
---
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
2014-04-07 13:28:11 UTC (rev 11891)
+++
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
2014-04-07 17:12:16 UTC (rev 11892)
@@ -93,7 +93,10 @@
<xsl:choose>
<xsl:when
test="locations_with_calendar_array/child::node()">
- <xsl:for-each
select="locations_with_calendar_array">
+ <xsl:variable name="lang_bookmark">
+ <xsl:value-of
select="php:function('lang', 'bookmark')" />
+ </xsl:variable>
+ <xsl:for-each
select="locations_with_calendar_array">
<tr>
<xsl:choose>
<xsl:when test="(position() mod
2) != 1">
@@ -103,8 +106,14 @@
<xsl:attribute
name="class">even</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
-
<td class="title">
+ <input type="checkbox"
name = "bookmark_location" value ="location/location_code"
title="{$lang_bookmark}">
+ <xsl:attribute
name="onchange">javascript:update_bookmark('<xsl:value-of
select="location/location_code"/>');</xsl:attribute>
+ <xsl:if
test="selected = 1">
+ <xsl:attribute
name="checked">checked</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xls:text> </xls:text>
<xsl:value-of
select="location/location_code"/>
</td>
<td class="location-name">
Modified:
branches/Version-1_0-branch/phpgwapi/inc/class.vfs_fileoperation_braArkiv.inc.php
===================================================================
---
branches/Version-1_0-branch/phpgwapi/inc/class.vfs_fileoperation_braArkiv.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++
branches/Version-1_0-branch/phpgwapi/inc/class.vfs_fileoperation_braArkiv.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -132,20 +132,15 @@
/**
* Get filesize
- * @param object $p path_parts
+ * @param object $path_parts path_parts
* @return integer filesize
*/
- public function filesize($p)
+ public function filesize($path_parts)
{
- $sql = "SELECT size FROM phpgw_vfs WHERE
directory='{$p->fake_leading_dirs_clean}' AND name='{$p->fake_name_clean}'"
- . " AND ((mime_type != 'journal' AND mime_type
!= 'journal-deleted') OR mime_type IS NULL)"
- . " ORDER BY file_id ASC";//Get the latest
version.
- $this->db->query($sql, __LINE__, __FILE__);
- $this->db->next_record();
+ $path = $path_parts->real_full_path;
+ return filesize($path);
+ }
- return $this->db->f('size');
- }
-
/**
* Retreive file contents
* @param object $p path_parts
@@ -216,7 +211,14 @@
{
$fileid = $this->get_file_id($to); //this
represent the document
}
-
+/*
+ $putFileAsByteArray = new putFileAsByteArray();
+ $putFileAsByteArray->secKey = $this->secKey;
+ $putFileAsByteArray->documentId = $fileid;
+ $putFileAsByteArray->filename = $to->fake_name_clean;
+ $putFileAsByteArray->file = base64_encode($content);
+ $putFileAsByteArrayResponse =
$this->Services->putFileAsByteArray($putFileAsByteArray);
+*/
$fileTransferSendChunkedInit = new
fileTransferSendChunkedInit();
$fileTransferSendChunkedInit->secKey = $this->secKey;
$fileTransferSendChunkedInit->docid = $fileid;
@@ -224,7 +226,7 @@
$fileTransferSendChunkedInitResponse =
$this->Services->fileTransferSendChunkedInit($fileTransferSendChunkedInit);
$transaction_id =
$fileTransferSendChunkedInitResponse->fileTransferSendChunkedInitResult;
-
+// _debug_array($transaction_id);die();
$new_string =
chunk_split(base64_encode($content),1048576);// Definerer en
bufferstørrelse/pakkestørrelse på ca 1mb.
$content_arr = explode('\r\n', $new_string);
@@ -267,6 +269,19 @@
*/
public function touch($p)
{
+ static $check_document = array(); // only touch it once.
+
+ if($check_document[$p>real_full_path])
+ {
+ return true;
+ }
+
+ $check_document[$p>real_full_path] = true;
+/*
+ $bt = debug_backtrace();
+ echo "<b>db::{$bt[0]['function']} Called from file:
{$bt[0]['file']} line: {$bt[0]['line']}</b><br/>";
+ unset($bt);
+*/
$document = new Document();
$document->BBRegTime = date('Y-m-d');
$document->BaseClassName = "Eiendomsarkiver";
@@ -351,7 +366,7 @@
$createDocument->assignDocKey = 0;
$createDocument->doc = $document;
- // _debug_array($createDocument);die();
+//_debug_array($createDocument);//die();
$createDocumentResponse =
$this->Services->createDocument($createDocument);
$document_id =
$createDocumentResponse->createDocumentResult->ID;
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.vfs_sql.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.vfs_sql.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1151,7 +1151,7 @@
return false;
}
- $size =
$this->fileoperation->filesize($t);
+ $size =
$this->fileoperation->filesize($f);
}
else
{
@@ -1420,7 +1420,7 @@
$error = $error.
"t->real_full_path: $t->real_full_path \n";
throw new Exception($error);
}
- $size =
$this->fileoperation->filesize($t);
+ $size =
$this->fileoperation->filesize($f);
}
else
{
Modified: branches/Version-1_0-branch/property/inc/class.boentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -493,7 +493,22 @@
}
$values = $this->custom->prepare($values,
$this->type_app[$this->type],".{$this->type}.{$data['entity_id']}.{$data['cat_id']}",
$data['view']);
- // $soadmin_entity =
CreateObject('property.soadmin_entity');
+ if($values['department_id'])
+ {
+ $bogeneric =
CreateObject('property.sogeneric');
+ $bogeneric->get_location_info('department');
+ $department =
$bogeneric->read_single(array('id' => $values['department_id']));
+ $values['department_name'] =
$department['name'];
+ $values['department_name_path'] =
$department['name'];
+ if($department['parent_id'])
+ {
+ $path =
$bogeneric->get_path(array('type' => 'department', 'id' =>
$department['parent_id']));
+ if($path)
+ {
+ $values['department_name_path']
.= '::' . implode(' > ', $path);
+ }
+ }
+ }
if($values['location_code'])
{
Modified: branches/Version-1_0-branch/property/inc/class.boevent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boevent.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.boevent.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -69,15 +69,13 @@
var $cat_id;
var $location_info = array();
var $cached_events;
- protected $event_functions = array
- (
- 'send_sms' => 'send SMS'
- );
+ protected $event_functions = array();
var $public_functions = array
(
'event_schedule_data' => true,
- 'event_schedule_week_data' => true
+ 'event_schedule_week_data' => true,
+// 'action'
=> true
);
@@ -88,6 +86,25 @@
$this->sbox = CreateObject('phpgwapi.sbox');
$this->asyncservice =
CreateObject('phpgwapi.asyncservice');
+ if(isset($GLOBALS['phpgw_info']['user']['apps']['sms']))
+ {
+ $this->event_functions[1] = array
+ (
+ 'id' => 1,
+ 'name' => 'Send SMS',
+ 'action' => 'property.boevent.send_sms'
+ );
+ }
+
+
if(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
+ {
+ $this->event_functions[2] = array
+ (
+ 'id' => 2,
+ 'name' => 'Send Email',
+ 'action' =>
'property.boevent.send_email'
+ );
+ }
if ($session)
{
$this->read_sessiondata();
@@ -241,7 +258,7 @@
{
$data['start_date'] =
phpgwapi_datetime::date_to_timestamp($data['start_date']);
$data['end_date'] =
phpgwapi_datetime::date_to_timestamp($data['end_date']);
-
+// _debug_array($data);die();
if (isset($data['id']) && $data['id'] > 0 &&
$this->so->read_single($data['id']))
{
$receipt = $this->so->edit($data);
@@ -250,11 +267,11 @@
{
$receipt = $this->so->add($data);
}
-
+/*
$action_object =
CreateObject('property.sogeneric');
$action_object->get_location_info('event_action',false);
$action = $action_object->read_single(array('id'=>
$data['action']),$values = array());
-
+*/
$rpt_day = array
(
1 => 0, //'Sunday',
@@ -364,11 +381,13 @@
$timer_data = array
(
- 'start' => $data['start_date'],
- 'enabled' => true,
- 'owner' => $account_id,
- 'enabled' => !! $data['enabled'],
- 'action' => $action['action']
+ 'start' =>
$data['start_date'],
+ 'enabled' => true,
+ 'owner' => $account_id,
+ 'enabled' => !!
$data['enabled'],
+// 'action' =>
$action['action'],
+ 'action' =>
$this->event_functions[$data['action']]['action'],
+ 'action_data' =>
array('responsible_id' => $data['responsible_id'])
);
if($data['end_date'])
@@ -385,7 +404,7 @@
$location = phpgw::get_var('location');
- $id =
"property{$location}::{$data['item_id']}::{$data['attrib_id']}";
+ $id =
"property{$location}::{$data['item_id']}::{$receipt['id']}";
$timer_data['id'] = $id;
$this->asyncservice->cancel_timer($id);
@@ -509,28 +528,85 @@
$values =
$action_object->read(array('allrows'=> true));
*/
$list = array(0 => lang('none'));
-/*
- foreach($values as $entry)
+
+ foreach($this->event_functions as $entry)
{
$list[$entry['id']] = $entry['name'];
}
- */
- $list = array_merge($list,$this->event_functions);
return $this->sbox->getArrayItem('values[action]',
$selected, $list, true);
}
- protected function send_sms()
+ public function send_sms($data)
{
+ $parts = explode('::',$data['id']);
+ $id = $parts[1];
+ $location_arr = explode($parts[0]);
+ $interlink = CreateObject('property.interlink');
+ $relation_link =
$interlink->get_relation_link($location_arr[1], $id, 'view', true);
+
+ $responsible_id =
isset($data['action_data']['responsible_id']) ?
$data['action_data']['responsible_id'] : 0;
+ if(!$responsible_id)
+ {
+ return false;
+ }
+ $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$responsible_id);
+
+ $number = $comms[$entry['contact_id']]['mobile (cell)
phone'];
+ $subject = lang('reminder');
+ $message = '<a href ="{$relation_link}">' .
lang('record').' #' .$id .'</a>'."\n";
+
$data = array
(
- 'p_num_text' => 'xxxxxxxx',//number
- 'message' => 'dette er en
melding'
+ 'p_num_text' => $number,
+ 'message' =>
"{$subject}:\n{$message}"
);
execMethod('sms.bosms.send_sms', $data);
}
+ public function send_email($data)
+ {
+ $parts = explode('::',$data['id']);
+ $id = $parts[1];
+ $location_arr = explode($parts[0]);
+ $interlink = CreateObject('property.interlink');
+ $relation_link =
$interlink->get_relation_link($location_arr[1], $id, 'view', true);
+
+ $responsible_id =
isset($data['action_data']['responsible_id']) ?
$data['action_data']['responsible_id'] : 0;
+ if(!$responsible_id)
+ {
+ return false;
+ }
+ $comms =
execMethod('addressbook.boaddressbook.get_comm_contact_data',$responsible_id);
+
+ $_address = $comms[$entry['contact_id']]['work email'];
+ $subject = lang('reminder');
+ $message = '<a href ="{$relation_link}">' .
lang('record').' #' .$id .'</a>'."\n";
+ if (!is_object($GLOBALS['phpgw']->send))
+ {
+ $GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
+ }
+ try
+ {
+ $GLOBALS['phpgw']->send->msg('email',
$_address, $subject, stripslashes($message), '', $cc, $bcc, $coordinator_email,
$coordinator_name, 'html');
+ }
+ catch (phpmailerException $e)
+ {
+ $receipt['error'][] = array('msg' =>
$e->getMessage());
+ $GLOBALS['phpgw']->log->error(array(
+ 'text' =>
'property_boevent::send_email() failed with %1',
+ 'p1' => $e->getMessage(),
+ 'p2' => '',
+ 'line' => __LINE__,
+ 'file' => __FILE__
+ ));
+
+ return false;
+
+ }
+
+ }
/**
* Find recurring events
*
Modified: branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.bogeneric.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -43,6 +43,10 @@
var $location_info = array();
var $appname;
var $allrows;
+ var $public_functions = array
+ (
+ 'get_autocomplete' => true
+ );
function __construct($session=false)
{
@@ -162,7 +166,6 @@
}
}
}
-
}
$this->total_records = $this->so->total_records;
@@ -319,4 +322,18 @@
return $history_type;
}
+ function get_autocomplete()
+ {
+ $this->get_location_info();
+ $values = $this->read();
+
+ foreach($values as &$entry)
+ {
+ if($entry['parent_id'])
+ {
+ $entry['name'] .=
"::{$entry['parent_id']}";
+ }
+ }
+ return array('ResultSet'=> array('Result'=>$values));
+ }
}
Modified: branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -74,6 +74,9 @@
$location_id =
$GLOBALS['phpgw']->locations->get_id($appname, $location);
+// _debug_array($location_id);
+// _debug_array($values);die();
+
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$input_type_array = array
@@ -395,7 +398,7 @@
$attributes['enabled']
= $event['enabled'] ? lang('yes') : lang('no');
$attributes['lang_enabled']
= lang('enabled');
- $id =
"property{$location}::{$values['id']}::{$attributes['id']}";
+ $id =
"property{$location}::{$attributes['item_id']}::{$attributes['value']}";
$job =
execMethod('phpgwapi.asyncservice.read', $id);
$attributes['next']
=
$GLOBALS['phpgw']->common->show_date($job[$id]['next'],$dateformat);
Modified: branches/Version-1_0-branch/property/inc/class.interlink.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.interlink.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.interlink.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -249,7 +249,7 @@
* @return string the linkt to the the related item
*/
- public function get_relation_link($linkend_location, $id,
$function = 'edit')
+ public function get_relation_link($linkend_location, $id,
$function = 'edit', $external = false)
{
$link = array();
@@ -339,7 +339,14 @@
);
}
- return $GLOBALS['phpgw']->link('/index.php',$link);
+ if($external)
+ {
+ return
$GLOBALS['phpgw']->link('/index.php',$link, false, true);
+ }
+ else
+ {
+ return
$GLOBALS['phpgw']->link('/index.php',$link);
+ }
}
/**
Modified: branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.soadmin_entity.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -452,7 +452,8 @@
'jasperupload'
=> $this->db->f('jasperupload'),
'parent_id'
=> $this->db->f('parent_id'),
'level'
=> $this->db->f('level'),
- 'location_id'
=> $this->db->f('location_id')
+ 'location_id'
=> $this->db->f('location_id'),
+ 'department'
=> $this->db->f('department')
);
}
@@ -579,7 +580,7 @@
$fd['entry_date'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => true);
$fd['user_id'] = array('type' => 'int', 'precision' =>
4, 'nullable' => true);
-
+ $fd['department_id'] = array('type' => 'int',
'precision' => 4, 'nullable' => true);
return $fd;
}
@@ -629,12 +630,13 @@
$values['enable_bulk'],
$values['jasperupload'],
$values['parent_id'],
+ $values['department'],
$level
);
$values_insert =
$this->db->validate_insert($values_insert);
- $this->db->query("INSERT INTO {$table}
(location_id,entity_id,id,name,
descr,prefix,lookup_tenant,tracking,location_level,location_link_level,fileupload,loc_link,start_project,start_ticket,is_eav,enable_bulk,jasperupload,parent_id,level
) "
+ $this->db->query("INSERT INTO {$table}
(location_id,entity_id,id,name,
descr,prefix,lookup_tenant,tracking,location_level,location_link_level,fileupload,loc_link,start_project,start_ticket,is_eav,enable_bulk,jasperupload,parent_id,department,level
) "
. "VALUES ($values_insert)",__LINE__,__FILE__);
@@ -850,7 +852,8 @@
'enable_bulk'
=> $entity['enable_bulk'],
'jasperupload'
=> $entity['jasperupload'],
'parent_id'
=> $entity['parent_id'],
- 'level'
=> $level
+ 'level'
=> $level,
+ 'department'
=> $entity['department']
);
$value_set =
$this->db->validate_update($value_set);
Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -308,7 +308,7 @@
$querymethod = " $where (" . implode(' AND
',$_querymethod) . ')';
unset($_querymethod);
}
- $sql = "SELECT id, location_code, p_location_id, p_id,
xml_representation FROM fm_bim_item WHERE location_id = {$location_id}
$querymethod";
+ $sql = "SELECT id, location_code, p_location_id, p_id,
department_id, xml_representation FROM fm_bim_item WHERE location_id =
{$location_id} $querymethod";
$sql_cnt = "SELECT count(id) as cnt FROM fm_bim_item
WHERE location_id = {$location_id} $querymethod";
@@ -375,6 +375,7 @@
'datatype' => false,
'attrib_id' => false,
);
+
$dataset[$j]['p_location_id'] = array
(
'value' =>
$this->db->f('p_location_id'),
@@ -389,6 +390,12 @@
'attrib_id' => false,
);
+ $dataset[$j]['department_id'] = array
+ (
+ 'value' =>
$this->db->f('department_id'),
+ 'datatype' => false,
+ 'attrib_id' => false,
+ );
$j++;
}
@@ -1601,6 +1608,7 @@
$values['status'] =
$this->db->f('status');
$values['user_id'] =
$this->db->f('user_id');
$values['entry_date'] =
$this->db->f('entry_date');
+ $values['department_id'] =
$this->db->f('department_id');
if ( isset($values['attributes']) &&
is_array($values['attributes']) )
{
@@ -1651,6 +1659,7 @@
$values['location_code'] =
$this->db->f('location_code');
$values['user_id'] =
$this->db->f('user_id');
$values['entry_date'] =
$this->db->f('entry_date');
+ $values['department_id'] =
$this->db->f('department_id');
$xmldata =
$this->db->f('xml_representation',true);
$xml = new DOMDocument('1.0', 'utf-8');
@@ -2053,6 +2062,7 @@
'location_code' =>
$data['location_code'],
'loc1' =>
$data['loc1'],
'address' =>
$data['address'],
+ 'department_id' =>
$data['department_id']
);
$value_set =
$this->db->validate_update($value_set);
Modified: branches/Version-1_0-branch/property/inc/class.soevent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soevent.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.soevent.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -168,7 +168,7 @@
$filtermethod = "WHERE fm_event.id = {$id}";
$sql = "SELECT fm_event.id, fm_event.descr,
schedule_time, exception_time, location_id, location_item_id,"
- ." attrib_id, responsible_id, enabled,
responsible_id, fm_event.user_id, fm_event_receipt.entry_date as receipt_date"
+ ." attrib_id, responsible_id, enabled,
responsible_id, fm_event.user_id, fm_event_receipt.entry_date as receipt_date,
fm_event_receipt.user_id as receipt_user_id"
." FROM fm_event"
." {$this->_join} fm_event_schedule ON
(fm_event.id = fm_event_schedule.event_id)"
." {$this->_left_join} fm_event_exception ON
(fm_event_schedule.event_id = fm_event_exception.event_id AND
fm_event_schedule.schedule_time = fm_event_exception.exception_time)"
@@ -193,6 +193,7 @@
'enabled'
=> $this->_db->f('enabled'),
'exception'
=> $this->_db->f('exception_time') ? 'X' :'',
'receipt_date' =>
$this->_db->f('receipt_date'),
+ 'receipt_user_id' =>
$this->_db->f('receipt_user_id'),
'responsible_id' =>
$this->_db->f('responsible_id'),
'user_id'
=> $this->_db->f('user_id')
);
@@ -405,12 +406,12 @@
$id = $this->_db->next_id($table);
$cols[] = 'id';
- $vals[] = $id;
+ $vals[] = $id;
$cols = implode(",", $cols);
- $vals = $this->_db->validate_insert($vals);
+ $vals = $this->_db->validate_insert($vals);
- $this->_db->query("INSERT INTO {$table}
({$cols}) VALUES ({$vals})",__LINE__,__FILE__);
+ $this->_db->query("INSERT INTO {$table} ({$cols})
VALUES ({$vals})",__LINE__,__FILE__);
if($this->_db->transaction_commit())
{
Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1805,6 +1805,36 @@
$this->db->query("INSERT INTO fm_project_buffer_budget
({$cols}) VALUES ({$values})", __LINE__, __FILE__);
/**
+ * In case the transfer is betwee two buffer-projects
+ */
+ $this->db->query("SELECT project_type_id FROM
fm_project WHERE id = {$project_id}", __LINE__, __FILE__);
+ $this->db->next_record();
+ $project_type_id = $this->db->f('project_type_id');
+ if($project_type_id == 3)//buffer
+ {
+ $value_set = array
+ (
+ 'buffer_project_id' => $to_project,
+ 'year' =>
$year,
+ 'amount_in' =>
$amount_out,
+ 'amount_out' => $amount_in,
+ 'from_project' => $project_id,
+ 'to_project' => '',
+ 'user_id' =>
$this->account,
+ 'entry_date' => time(),
+ 'active' => 1,
+ 'remark' =>
$this->db->db_addslashes($transfer_remark)
+ );
+
+ $cols = implode(',', array_keys($value_set));
+ $values =
$this->db->validate_insert(array_values($value_set));
+ $this->db->query("INSERT INTO
fm_project_buffer_budget ({$cols}) VALUES ({$values})", __LINE__, __FILE__);
+
+ return;
+ }
+
+
+ /**
* Transfer fund to another project
* */
if($amount_out)
Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1382,13 +1382,6 @@
}
}
- if(isset($ticket['extra']) &&
is_array($ticket['extra']))
- {
- foreach ($ticket['extra'] as
$column => $value)
- {
- $value_set[$column]
= $value;
- }
- }
$value_set =
$this->db->validate_update($value_set);
@@ -1424,7 +1417,6 @@
$value_set['modified_date'] = time();
-
// check order-rights
$order_add =
$GLOBALS['phpgw']->acl->check('.ticket.order', PHPGW_ACL_ADD, 'property');
@@ -1443,6 +1435,20 @@
$value_set =
$this->db->validate_update($value_set);
$this->db->query("UPDATE fm_tts_tickets SET $value_set
WHERE id={$id}",__LINE__,__FILE__);
+ $value_set = array();
+
+ if(isset($ticket['extra']) &&
is_array($ticket['extra']))
+ {
+ foreach ($ticket['extra'] as $column => $value)
+ {
+ $value_set[$column] = $value;
+ }
+ }
+
+ $value_set =
$this->db->validate_update($value_set);
+
+ $this->db->query("UPDATE fm_tts_tickets SET $value_set
WHERE id={$id}",__LINE__,__FILE__);
+
$this->db->transaction_commit();
if (isset($this->fields_updated) &&
$this->fields_updated)
Modified: branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.uiadmin_entity.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1170,7 +1170,9 @@
'lang_no_location_link_level'
=> lang('None'),
'tracking'
=> true,
'value_tracking'
=> $values['tracking'],
- 'fileupload'
=> true,
+ 'department'
=> true,
+ 'value_department'
=> $values['department'],
+ 'fileupload'
=> true,
'value_fileupload'
=> $values['fileupload'],
'value_jasperupload'
=> $values['jasperupload'],
'loc_link'
=> true,
Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1526,6 +1526,10 @@
if ((isset($values['save']) && $values['save']) ||
(isset($values['apply']) && $values['apply']))
{
+ if($category['department'])
+ {
+ $values['extra']['department_id'] =
phpgw::get_var('department_id', 'int');
+ }
if($GLOBALS['phpgw']->session->is_repost())
{
$receipt['error'][]=array('msg'=>lang('Hmm... looks like a repost!'));
@@ -2378,13 +2382,33 @@
$property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js,'/'));
}
+ if($category['department'] && $mode == 'edit')
+ {
+ $_autocomplete = <<<JS
+ YAHOO.util.Event.addListener(window,
"load", function()
+ {
+ var oArgs =
{menuaction:'property.bogeneric.get_autocomplete', type:'department'};
+ var strURL =
phpGWLink('index.php', oArgs, true);
+
+
YAHOO.portico.autocompleteHelper(strURL,
+ 'department_name', 'department_id',
'department_container');
+
+ });
+JS;
+ $GLOBALS['phpgw']->js->add_code('',
$_autocomplete);
+ }
+
$data = array
(
'property_js'
=> json_encode($GLOBALS['phpgw_info']['server']['webserver_url'] .
$property_js),
'datatable'
=> $datavalues,
'myColumnDefs'
=> $myColumnDefs,
'enable_bulk'
=> $category['enable_bulk'],
+ 'department'
=> $category['department'],
+ 'value_department_id'
=> $values['department_id'],
+ 'value_department_name'
=> $values['department_name'],
+ 'value_department_name_path' =>
$values['department_name_path'],
'value_location_id'
=> $GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
$this->acl_location),
'link_pdf'
=> $GLOBALS['phpgw']->link('/index.php',$pdf_data),
'start_project'
=> $category['start_project'],
Modified: branches/Version-1_0-branch/property/inc/class.uievent.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uievent.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.uievent.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -143,7 +143,7 @@
$datatable['config']['base_java_url'] =
"menuaction:'property.uievent.index',"
."location_id:'{$this->location_id}',"
."user_id:'{$this->user_id}',"
- ."status_id:'{$this->status_id}'";
+ ."status_id:'{$this->status_id}'";
$values_combo_box = array();
@@ -289,7 +289,7 @@
)
)
)
- );
+ );
$dry_run = true;
}
@@ -523,7 +523,7 @@
if($dry_run)
{
- $datatable['pagination']['records_returned'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+ $datatable['pagination']['records_returned'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
}
else
{
@@ -667,16 +667,24 @@
{
if(!isset($values['descr']) ||
!$values['descr'])
{
-
$receipt['error'][]=array('msg'=>lang('Please enter a description'));
+
$receipt['error'][]=array('msg'=>lang('Please enter a description'));
}
if(!isset($values['responsible_id']) ||
!$values['responsible_id'])
{
-
$receipt['error'][]=array('msg'=>lang('Please select a responsible'));
+
$receipt['error'][]=array('msg'=>lang('Please select a responsible'));
}
if(!isset($values['action']) ||
!$values['action'])
{
- //
$receipt['error'][]=array('msg'=>lang('Please select an action'));
+
$receipt['error'][]=array('msg'=>lang('Please select an action'));
}
+ if(!isset($values['start_date']) ||
!$values['start_date'])
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select a start date'));
+ }
+ if(!isset($values['repeat_type']) ||
!$values['repeat_type'])
+ {
+
$receipt['error'][]=array('msg'=>lang('Please select a repeat type'));
+ }
/* if(isset($values['repeat_day']))
{
@@ -698,6 +706,7 @@
$js =
"opener.document.form.{$field_name}.value = '{$receipt['id']}';\n";
$js .=
"opener.document.form.{$field_name}_descr.value = '{$values['descr']}';\n";
+ $js .=
"opener.document.form.submit();\n";
if (isset($values['save']) &&
$values['save'])
{
@@ -825,7 +834,7 @@
'value_id'
=> isset($values['id']) ? $values['id'] : '',
'lang_next_run'
=> lang('next run'),
- 'value_next_run'
=> isset($values['next']) ? $values['next'] : '',
+ 'value_next_run'
=> isset($values['next']) ? $values['next'] : '',
'value_descr'
=> $values['descr'],
'lang_descr_text'
=> lang('Enter a description of the record'),
'lang_save_text'
=> lang('Save the record'),
@@ -931,6 +940,7 @@
'number'
=> $i,
'time'
=> $GLOBALS['phpgw']->common->show_date($entry['schedule_time'],$dateformat),
'performed'
=> $GLOBALS['phpgw']->common->show_date($entry['receipt_date'],$dateformat),
+ 'user'
=> $entry['receipt_user_id'] ?
$GLOBALS['phpgw']->accounts->get($entry['receipt_user_id'])->__toString() : '',
'alarm_id'
=> $GLOBALS['phpgw']->common->show_date($entry['schedule_time'],'Ymd'),
'enabled'
=> isset($entry['exception']) && $entry['exception']==true ? '' : 1,
'location_id' =>
$entry['location_id'],
@@ -972,7 +982,7 @@
{
if(count($values))
{
- _debug_array($values);
+// _debug_array($values);
return json_encode($values);
}
else
@@ -998,11 +1008,12 @@
$myColumnDefs[0] = array
(
'name' => "0",
- 'values' => json_encode(array(
+ 'values' => json_encode(array(
array('key' => 'number',
'label'=>'#', 'sortable'=>true,'resizeable'=>true,'width'=>20),
array('key' => 'time',
'label'=>lang('plan'), 'sortable'=>true,'resizeable'=>true,'width'=>80),
- array('key' => 'performed',
'label'=>lang('performed'), 'sortable'=>true,'resizeable'=>true,'width'=>80),
- array('key' => 'remark',
'label'=>lang('remark'), 'sortable'=>true,'resizeable'=>true,'width'=>140),
+ array('key' => 'performed',
'label'=>lang('performed'), 'sortable'=>true,'resizeable'=>true,'width'=>80),
+ array('key' => 'user',
'label'=>lang('user'), 'sortable'=>true,'resizeable'=>true,'width'=>80),
+ array('key' => 'remark',
'label'=>lang('remark'), 'sortable'=>true,'resizeable'=>true,'width'=>140),
array('key' =>
'enabled','label'=>
lang('enabled'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterCenter','width'=>30),
array('key' =>
'alarm_id','label'=>
'alarm_id','sortable'=>true,'resizeable'=>true,'hidden'=>false),
array('key' =>
'select','label'=> lang('select'),
'sortable'=>false,'resizeable'=>false,'formatter'=>'myFormatterCheck','width'=>30)))
@@ -1011,7 +1022,7 @@
$myButtons[0] = array
(
'name' => "0",
- 'values' => json_encode(array(
+ 'values' => json_encode(array(
array('id'
=>'values[set_receipt]','type'=>'buttons', 'value'=>'Receipt', 'label'=>
lang('Receipt'), 'funct'=> 'onActionsClick' , 'classname'=> 'actionButton',
'value_hidden'=>""),
array('id'
=>'values[delete_receipt]','type'=>'buttons', 'value'=>'Delete Receipt',
'label'=> lang('Delete receipt'), 'funct'=> 'onActionsClick' , 'classname'=>
'actionButton', 'value_hidden'=>""),
array('id'
=>'values[enable_alarm]','type'=>'buttons', 'value'=>'Enable', 'label'=>
lang('enable'), 'funct'=> 'onActionsClick' , 'classname'=> 'actionButton',
'value_hidden'=>""),
Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1790,8 +1790,9 @@
if ((isset($values['save']) && $values['save']) ||
(isset($values['apply']) && $values['apply']))
{
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record','property');
- $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity','property');
+ $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_values' .
$this->acl_location,'property');
+
if(isset($insert_record_entity) &&
is_array($insert_record_entity))
{
for
($j=0;$j<count($insert_record_entity);$j++)
@@ -2363,7 +2364,7 @@
}
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record','property');
- $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_entity','property');
+ $insert_record_entity =
$GLOBALS['phpgw']->session->appsession('insert_record_values' .
$this->acl_location,'property');
if(isset($insert_record_entity) &&
is_array($insert_record_entity))
{
@@ -2432,7 +2433,7 @@
{
$values['assignedto'] = $this->account;
}
-
+/*
if(isset($values_attribute) &&
is_array($values_attribute))
{
foreach ($values_attribute as
$attribute )
@@ -2443,7 +2444,7 @@
}
}
}
-
+*/
$receipt =
$this->bo->update_ticket($values,$id, $receipt, $values_attribute);
if ( (isset($values['send_mail']) &&
$values['send_mail'])
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2014-04-07
13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2014-04-07
17:12:16 UTC (rev 11892)
@@ -388,6 +388,8 @@
periodization property no Periodisering
periodization start property no Startperiode
periodization outline property no Periodiseringsfordeling
+delete receipt property no Slett kvittering
+plan property no Tidsplan
planned year property no Planlagt år
planning property no Planlagt
planning date property no Dato planlagt disponering
Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php 2014-04-07
13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php 2014-04-07
17:12:16 UTC (rev 11892)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.678';
+ $setup_info['property']['version'] = '0.9.17.680';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -1906,7 +1906,8 @@
'enable_bulk' => array('type' =>
'int','precision' => '2','nullable' => True),
'jasperupload' => array('type' =>
'int','precision' => '2','nullable' => True),
'parent_id' => array('type' =>
'int','precision' => '4','nullable' => True),
- 'level' => array('type' => 'int','precision' =>
'4','nullable' => True)
+ 'level' => array('type' => 'int','precision' =>
'4','nullable' => True),
+ 'department' => array('type' =>
'int','precision' => '2','nullable' => True),
),
'pk' => array('entity_id','id'),
'fk' => array(),
Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -7917,4 +7917,69 @@
$GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.678';
return $GLOBALS['setup_info']['property']['currentver'];
}
- }
\ No newline at end of file
+ }
+ /**
+ * Update property version from 0.9.17.678 to 0.9.17.679
+ * Add department-flag to entities
+ */
+
+
+ $test[] = '0.9.17.678';
+ function property_upgrade0_9_17_678()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_entity_category','department',array('type'
=> 'int','precision' => 2,'nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.679';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+ /**
+ * Update property version from 0.9.17.670 to 0.9.17.671
+ * Add department_id to entity tables
+ */
+ $test[] = '0.9.17.679';
+ function property_upgrade0_9_17_679()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_entity_category");
+
+ $categories = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $categories[] = array
+ (
+ 'entity_id' =>
$GLOBALS['phpgw_setup']->oProc->f('entity_id'),
+ 'cat_id' =>
$GLOBALS['phpgw_setup']->oProc->f('id')
+ );
+ }
+
+ $tables = $GLOBALS['phpgw_setup']->oProc->m_odb->table_names();
+
+ foreach ($categories as $category)
+ {
+ $table =
"fm_entity_{$category['entity_id']}_{$category['cat_id']}";
+ if(in_array($table, $tables))
+ {
+ $metadata =
$GLOBALS['phpgw_setup']->oProc->m_odb->metadata($table);
+ if(!isset($metadata['department_id']))
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'department_id',array('type'
=> 'int','precision' => 4,'nullable' => True));
+ }
+ }
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.680';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
Modified: branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/templates/base/admin_entity.xsl
2014-04-07 17:12:16 UTC (rev 11892)
@@ -623,6 +623,31 @@
</xsl:when>
</xsl:choose>
<xsl:choose>
+ <xsl:when test="department !=
''">
+ <tr>
+ <td>
+
<xsl:variable name="lang_department">
+
<xsl:value-of select="php:function('lang', 'department')"/>
+
</xsl:variable>
+
<xsl:value-of select="$lang_department"/>
+ </td>
+ <td>
+ <input
type="checkbox" name="values[department]" value="1">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'department')"/>
+
</xsl:attribute>
+
<xsl:if test="value_department = '1'">
+
<xsl:attribute name="checked">
+
<xsl:text>checked</xsl:text>
+
</xsl:attribute>
+
</xsl:if>
+ </input>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
<xsl:when test="lookup_tenant
!= ''">
<tr>
<td>
Modified: branches/Version-1_0-branch/property/templates/base/entity.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/entity.xsl
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/property/templates/base/entity.xsl
2014-04-07 17:12:16 UTC (rev 11892)
@@ -585,6 +585,32 @@
<table>
<xsl:choose>
<xsl:when test="mode='edit'">
+
<xsl:choose>
+
<xsl:when test="department='1'">
+
<tr>
+
<td>
+
<xsl:value-of
select="php:function('lang', 'department')"/>
+
</td>
+
<td>
+
<div class="autocomplete">
+
<input id="department_id"
name="department_id" type="hidden" value="{value_department_id}">
+
</input>
+
<input id="department_name"
name="department_name" type="text" value="{value_department_name}"
title="{value_department_name_path}" size='60'>
+
<xsl:choose>
+
<xsl:when
test="disabled!=''">
+
<xsl:attribute name="disabled">
+
<xsl:text>disabled</xsl:text>
+
</xsl:attribute>
+
</xsl:when>
+
</xsl:choose>
+
</input>
+
<div id="department_container"/>
+
</div>
+
</td>
+
</tr>
+
</xsl:when>
+
</xsl:choose>
+
<xsl:call-template name="location_form"/>
</xsl:when>
<xsl:otherwise>
Modified: branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
2014-04-07 13:28:11 UTC (rev 11891)
+++ branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
2014-04-07 17:12:16 UTC (rev 11892)
@@ -307,7 +307,7 @@
{
$sql = strtolower($sql);
}
- $db->query($sql,__LINE__,__FILE__);
+ $db->limit_query($sql,0,__LINE__,__FILE__);
$org_enhet_field = $db->Type == 'postgres' ?
'org_enhet_id' : 'ORG_ENHET_ID';
$name_field = $db->Type ==
'postgres' ? 'org_navn' : 'ORG_NAVN';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11892] Merge 11880:11891 from trunk,
Sigurd Nes <=