Commit fea28d1544afe92287febb44d19644a26af82003

Authored by Jarrett Jordaan
2 parents c56dd56c 8f7071c2

Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge

lib/metadata/fieldsetregistry.inc.php
... ... @@ -139,26 +139,26 @@ class KTFieldsetRegistry {
139 139 // FIXME delegate.
140 140 $oFieldset =& $fieldsetOrType;
141 141  
142   - $widgets = array();
143   - $fields = $oFieldset->getFields();
  142 + $widgets = array();
  143 + $fields = $oFieldset->getFields();
144 144  
145   - if ($oFieldset->getIsConditional()) {
146   - $iMasterId = $oFieldset->getMasterFieldId();
  145 + if ($oFieldset->getIsConditional()) {
  146 + $iMasterId = $oFieldset->getMasterFieldId();
147 147  
148   - $oMasterField = DocumentField::get($iMasterId);
  148 + $oMasterField = DocumentField::get($iMasterId);
149 149  
150   - $newfields = array();
151   - $newfields[] = $oMasterField;
152   - foreach($fields as $oField) {
153   - if($oField->getId() != $iMasterId) {
154   - $newfields[] = $oField;
155   - }
156   - }
  150 + $newfields = array();
  151 + $newfields[] = $oMasterField;
  152 + foreach($fields as $oField) {
  153 + if($oField->getId() != $iMasterId) {
  154 + $newfields[] = $oField;
  155 + }
  156 + }
157 157  
158 158 foreach ($newfields as $oField) {
159 159 $fname = 'metadata_' . $oField->getId();
160 160 $value = null;
161   -
  161 +
162 162 if (!is_null($oDocument)) {
163 163 $oFL = DocumentFieldLink::getByDocumentAndField($oDocument, $oField);
164 164 if (!is_null($oFL) && (!PEAR::isError($oFL))) {
... ... @@ -166,7 +166,7 @@ class KTFieldsetRegistry {
166 166 }
167 167 }
168 168  
169   - $widgets[] = $this->oWF->get('ktcore.widgets.conditionalselection',
  169 + $widgets[] = $this->oWF->get('ktcore.widgets.conditionalselection',
170 170 array(
171 171 'label' => $oField->getName(),
172 172 'required' => $oField->getIsMandatory(),
... ...
lib/widgets/forms.inc.php
... ... @@ -328,7 +328,7 @@ class KTForm {
328 328 $aOldData = array();
329 329 $aErrors = array();
330 330 $old_data = KTUtil::arrayGet((array) $_SESSION['_kt_old_data'],
331   - $this->_kt_form_name, array());
  331 + $this->_kt_form_name, array());
332 332 if (KTUtil::arrayGet($old_data, 'identifier') == $this->sIdentifier) {
333 333 $bUseOld = true;
334 334 $aStoredData = (array) unserialize(KTUtil::arrayGet($old_data, 'data'));
... ...
presentation/lookAndFeel/knowledgeTree/documentmanagement/getTypeMetadataFields.php
... ... @@ -44,6 +44,7 @@ require_once(KT_LIB_DIR . '/metadata/fieldset.inc.php');
44 44  
45 45 require_once(KT_LIB_DIR . '/widgets/fieldsetDisplay.inc.php');
46 46 require_once(KT_LIB_DIR . "/widgets/fieldWidgets.php");
  47 +require_once(KT_LIB_DIR . "/widgets/forms.inc.php");
47 48  
48 49 require_once(KT_LIB_DIR . "/metadata/fieldsetregistry.inc.php");
49 50 require_once(KT_LIB_DIR . "/widgets/widgetfactory.inc.php");
... ...