Commit 4c9512f8ca58fba92caa2d8bfbf377b8d8b1e0e1

Authored by Neil Blakey-Milner
1 parent 06adcbba

Implement pre- and post-code to execute before and after storage of the

item.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3527 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/store.inc
... ... @@ -26,6 +26,7 @@
26 26  
27 27 function constructQuery($aKeys, $aSuppliedValues = null) {
28 28 $aQuery = array();
  29 + $first = true;
29 30 for ($i = 0; $i < count($aKeys); $i++) {
30 31 $sRowStart = $aKeys[$i];
31 32 $pos = strncasecmp("unique_start", $sRowStart, 12);
... ... @@ -58,6 +59,12 @@ function constructQuery($aKeys, $aSuppliedValues = null) {
58 59 $i++;
59 60 $iColumnCount = 0;
60 61  
  62 + if ($first === true) {
  63 + $sPreCode = $_SESSION["pelfq_" . $sRandomString . "_code_pre"];
  64 + eval($sPreCode);
  65 + $first = false;
  66 + }
  67 +
61 68 //get all the values for the table
62 69 while ((strncasecmp("unique_end", $sRowStart, 10) != 0) && ($i <= count($aKeys))) {
63 70 //$aColumns[$iColumnCount] = $_POST[$aKeys[$i]];
... ... @@ -107,6 +114,8 @@ function constructQuery($aKeys, $aSuppliedValues = null) {
107 114 }
108 115 }
109 116 }
  117 + $sPostCode = $_SESSION["pelfq_" . $sRandomString . "_code_post"];
  118 + eval($sPostCode);
110 119 return $aQuery;
111 120 }
112 121 ?>
... ...