Commit 9205a94080158f15d9b04f4d403d261e57eb0aff

Authored by Conrad Vermeulen
1 parent a1000f06

KTS-1687

"Double quote to single quote conversion"
Fixed.
Reviewed by: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6215 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 41 additions and 41 deletions
browse.php
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 */ 28 */
29 29
30 // main library routines and defaults 30 // main library routines and defaults
31 -require_once("config/dmsDefaults.php");  
32 -require_once(KT_LIB_DIR . "/templating/templating.inc.php");  
33 -require_once(KT_LIB_DIR . "/templating/kt3template.inc.php");  
34 -require_once(KT_LIB_DIR . "/dispatcher.inc.php");  
35 -require_once(KT_LIB_DIR . "/util/ktutil.inc");  
36 -require_once(KT_LIB_DIR . "/browse/DocumentCollection.inc.php");  
37 -require_once(KT_LIB_DIR . "/browse/BrowseColumns.inc.php");  
38 -require_once(KT_LIB_DIR . "/browse/PartialQuery.inc.php");  
39 -require_once(KT_LIB_DIR . "/browse/browseutil.inc.php");  
40 -  
41 -require_once(KT_LIB_DIR . "/foldermanagement/Folder.inc");  
42 -require_once(KT_LIB_DIR . "/documentmanagement/DocumentType.inc");  
43 -require_once(KT_LIB_DIR . "/documentmanagement/Document.inc");  
44 -require_once(KT_LIB_DIR . "/documentmanagement/DocumentField.inc");  
45 -  
46 -require_once(KT_LIB_DIR . "/widgets/portlet.inc.php"); 31 +require_once('config/dmsDefaults.php');
  32 +require_once(KT_LIB_DIR . '/templating/templating.inc.php');
  33 +require_once(KT_LIB_DIR . '/templating/kt3template.inc.php');
  34 +require_once(KT_LIB_DIR . '/dispatcher.inc.php');
  35 +require_once(KT_LIB_DIR . '/util/ktutil.inc');
  36 +require_once(KT_LIB_DIR . '/browse/DocumentCollection.inc.php');
  37 +require_once(KT_LIB_DIR . '/browse/BrowseColumns.inc.php');
  38 +require_once(KT_LIB_DIR . '/browse/PartialQuery.inc.php');
  39 +require_once(KT_LIB_DIR . '/browse/browseutil.inc.php');
  40 +
  41 +require_once(KT_LIB_DIR . '/foldermanagement/Folder.inc');
  42 +require_once(KT_LIB_DIR . '/documentmanagement/DocumentType.inc');
  43 +require_once(KT_LIB_DIR . '/documentmanagement/Document.inc');
  44 +require_once(KT_LIB_DIR . '/documentmanagement/DocumentField.inc');
  45 +
  46 +require_once(KT_LIB_DIR . '/widgets/portlet.inc.php');
47 require_once(KT_LIB_DIR . '/actions/folderaction.inc.php'); 47 require_once(KT_LIB_DIR . '/actions/folderaction.inc.php');
48 require_once(KT_DIR . '/plugins/ktcore/KTFolderActions.php'); 48 require_once(KT_DIR . '/plugins/ktcore/KTFolderActions.php');
49 49
50 -require_once(KT_LIB_DIR . "/permissions/permissionutil.inc.php");  
51 -require_once(KT_LIB_DIR . "/permissions/permission.inc.php"); 50 +require_once(KT_LIB_DIR . '/permissions/permissionutil.inc.php');
  51 +require_once(KT_LIB_DIR . '/permissions/permission.inc.php');
52 52
53 require_once(KT_LIB_DIR . '/users/userhistory.inc.php'); 53 require_once(KT_LIB_DIR . '/users/userhistory.inc.php');
54 54
@@ -56,14 +56,14 @@ require_once(KT_LIB_DIR . '/browse/columnregistry.inc.php'); @@ -56,14 +56,14 @@ require_once(KT_LIB_DIR . '/browse/columnregistry.inc.php');
56 require_once(KT_LIB_DIR . '/actions/entitylist.php'); 56 require_once(KT_LIB_DIR . '/actions/entitylist.php');
57 require_once(KT_LIB_DIR . '/actions/bulkaction.php'); 57 require_once(KT_LIB_DIR . '/actions/bulkaction.php');
58 58
59 -$sectionName = "browse"; 59 +$sectionName = 'browse';
60 60
61 class BrowseDispatcher extends KTStandardDispatcher { 61 class BrowseDispatcher extends KTStandardDispatcher {
62 62
63 var $sName = 'ktcore.actions.folder.view'; 63 var $sName = 'ktcore.actions.folder.view';
64 64
65 var $oFolder = null; 65 var $oFolder = null;
66 - var $sSection = "browse"; 66 + var $sSection = 'browse';
67 var $browse_mode = null; 67 var $browse_mode = null;
68 var $query = null; 68 var $query = null;
69 var $resultURL; 69 var $resultURL;
@@ -78,7 +78,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -78,7 +78,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
78 } 78 }
79 79
80 function check() { 80 function check() {
81 - $this->browse_mode = KTUtil::arrayGet($_REQUEST, 'fBrowseMode', "folder"); 81 + $this->browse_mode = KTUtil::arrayGet($_REQUEST, 'fBrowseMode', 'folder');
82 $action = KTUtil::arrayGet($_REQUEST, $this->event_var, 'main'); 82 $action = KTUtil::arrayGet($_REQUEST, $this->event_var, 'main');
83 $this->editable = false; 83 $this->editable = false;
84 84
@@ -92,7 +92,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -92,7 +92,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
92 92
93 // folder browse mode 93 // folder browse mode
94 if ($this->browse_mode == 'folder') { 94 if ($this->browse_mode == 'folder') {
95 - $in_folder_id = KTUtil::arrayGet($_REQUEST, "fFolderId"); 95 + $in_folder_id = KTUtil::arrayGet($_REQUEST, 'fFolderId');
96 if (empty($in_folder_id)) { 96 if (empty($in_folder_id)) {
97 $oConfig = KTConfig::getSingleton(); 97 $oConfig = KTConfig::getSingleton();
98 if ($oConfig->get('tweaks/browseToUnitFolder')) { 98 if ($oConfig->get('tweaks/browseToUnitFolder')) {
@@ -146,7 +146,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -146,7 +146,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
146 'ignorepermissions' => KTBrowseUtil::inAdminMode($this->oUser, $oFolder), 146 'ignorepermissions' => KTBrowseUtil::inAdminMode($this->oUser, $oFolder),
147 ); 147 );
148 $this->oQuery = new BrowseQuery($oFolder->getId(), $this->oUser, $aOptions); 148 $this->oQuery = new BrowseQuery($oFolder->getId(), $this->oUser, $aOptions);
149 - $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fFolderId=%d", $oFolder->getId())); 149 + $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf('fFolderId=%d', $oFolder->getId()));
150 150
151 // and the portlets 151 // and the portlets
152 $portlet = new KTActionPortlet(sprintf(_kt('About this folder'))); 152 $portlet = new KTActionPortlet(sprintf(_kt('About this folder')));
@@ -183,7 +183,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -183,7 +183,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
183 183
184 $this->oQuery = new ValueBrowseQuery($oField, $oValue); 184 $this->oQuery = new ValueBrowseQuery($oField, $oValue);
185 $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], 185 $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'],
186 - sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value)); 186 + sprintf('fBrowseMode=lookup_value&fField=%d&fValue=%d', $field, $value));
187 187
188 // setup breadcrumbs 188 // setup breadcrumbs
189 $this->aBreadcrumbs = 189 $this->aBreadcrumbs =
@@ -193,7 +193,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -193,7 +193,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
193 array('name' => $oField->getName(), 193 array('name' => $oField->getName(),
194 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectLookup&fField=' . $oField->getId())), 194 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectLookup&fField=' . $oField->getId())),
195 array('name' => $oValue->getName(), 195 array('name' => $oValue->getName(),
196 - 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value)))); 196 + 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf('fBrowseMode=lookup_value&fField=%d&fValue=%d', $field, $value))));
197 197
198 198
199 199
@@ -215,7 +215,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -215,7 +215,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
215 $this->aBreadcrumbs[] = array('name' => _kt('Document Types'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectType')); 215 $this->aBreadcrumbs[] = array('name' => _kt('Document Types'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectType'));
216 $this->aBreadcrumbs[] = array('name' => $oDocType->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'fBrowseMode=document_type&fType=' . $oDocType->getId())); 216 $this->aBreadcrumbs[] = array('name' => $oDocType->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'fBrowseMode=document_type&fType=' . $oDocType->getId()));
217 217
218 - $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fType=%s&fBrowseMode=document_type", $doctype));; 218 + $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf('fType=%s&fBrowseMode=document_type', $doctype));;
219 219
220 220
221 } else { 221 } else {
@@ -248,10 +248,10 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -248,10 +248,10 @@ class BrowseDispatcher extends KTStandardDispatcher {
248 $aBulkActions = KTBulkActionUtil::getAllBulkActions(); 248 $aBulkActions = KTBulkActionUtil::getAllBulkActions();
249 249
250 $oTemplating =& KTTemplating::getSingleton(); 250 $oTemplating =& KTTemplating::getSingleton();
251 - $oTemplate = $oTemplating->loadTemplate("kt3/browse"); 251 + $oTemplate = $oTemplating->loadTemplate('kt3/browse');
252 $aTemplateData = array( 252 $aTemplateData = array(
253 - "context" => $this,  
254 - "collection" => $collection, 253 + 'context' => $this,
  254 + 'collection' => $collection,
255 'browse_mode' => $this->browse_mode, 255 'browse_mode' => $this->browse_mode,
256 'isEditable' => $this->editable, 256 'isEditable' => $this->editable,
257 'bulkactions' => $aBulkActions, 257 'bulkactions' => $aBulkActions,
@@ -277,10 +277,10 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -277,10 +277,10 @@ class BrowseDispatcher extends KTStandardDispatcher {
277 $_REQUEST['fBrowseMode'] = 'lookup_value'; 277 $_REQUEST['fBrowseMode'] = 'lookup_value';
278 278
279 $oTemplating =& KTTemplating::getSingleton(); 279 $oTemplating =& KTTemplating::getSingleton();
280 - $oTemplate = $oTemplating->loadTemplate("kt3/browse_lookup_selection"); 280 + $oTemplate = $oTemplating->loadTemplate('kt3/browse_lookup_selection');
281 $aTemplateData = array( 281 $aTemplateData = array(
282 - "context" => $this,  
283 - "fields" => $aFields, 282 + 'context' => $this,
  283 + 'fields' => $aFields,
284 ); 284 );
285 return $oTemplate->render($aTemplateData); 285 return $oTemplate->render($aTemplateData);
286 } 286 }
@@ -298,11 +298,11 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -298,11 +298,11 @@ class BrowseDispatcher extends KTStandardDispatcher {
298 $aValues = MetaData::getByDocumentField($oField); 298 $aValues = MetaData::getByDocumentField($oField);
299 299
300 $oTemplating =& KTTemplating::getSingleton(); 300 $oTemplating =& KTTemplating::getSingleton();
301 - $oTemplate = $oTemplating->loadTemplate("kt3/browse_lookup_value"); 301 + $oTemplate = $oTemplating->loadTemplate('kt3/browse_lookup_value');
302 $aTemplateData = array( 302 $aTemplateData = array(
303 - "context" => $this,  
304 - "oField" => $oField,  
305 - "values" => $aValues, 303 + 'context' => $this,
  304 + 'oField' => $oField,
  305 + 'values' => $aValues,
306 ); 306 );
307 return $oTemplate->render($aTemplateData); 307 return $oTemplate->render($aTemplateData);
308 } 308 }
@@ -319,10 +319,10 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -319,10 +319,10 @@ class BrowseDispatcher extends KTStandardDispatcher {
319 } 319 }
320 320
321 $oTemplating =& KTTemplating::getSingleton(); 321 $oTemplating =& KTTemplating::getSingleton();
322 - $oTemplate = $oTemplating->loadTemplate("kt3/browse_types"); 322 + $oTemplate = $oTemplating->loadTemplate('kt3/browse_types');
323 $aTemplateData = array( 323 $aTemplateData = array(
324 - "context" => $this,  
325 - "document_types" => $aTypes, 324 + 'context' => $this,
  325 + 'document_types' => $aTypes,
326 ); 326 );
327 return $oTemplate->render($aTemplateData); 327 return $oTemplate->render($aTemplateData);
328 } 328 }
@@ -345,7 +345,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -345,7 +345,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
345 // log this entry 345 // log this entry
346 $oLogEntry =& KTUserHistory::createFromArray(array( 346 $oLogEntry =& KTUserHistory::createFromArray(array(
347 'userid' => $this->oUser->getId(), 347 'userid' => $this->oUser->getId(),
348 - 'datetime' => date("Y-m-d H:i:s", time()), 348 + 'datetime' => date('Y-m-d H:i:s', time()),
349 'actionnamespace' => 'ktcore.user_history.enable_admin_mode', 349 'actionnamespace' => 'ktcore.user_history.enable_admin_mode',
350 'comments' => 'Admin Mode enabled', 350 'comments' => 'Admin Mode enabled',
351 'sessionid' => $_SESSION['sessionID'], 351 'sessionid' => $_SESSION['sessionID'],
@@ -389,7 +389,7 @@ class BrowseDispatcher extends KTStandardDispatcher { @@ -389,7 +389,7 @@ class BrowseDispatcher extends KTStandardDispatcher {
389 // log this entry 389 // log this entry
390 $oLogEntry =& KTUserHistory::createFromArray(array( 390 $oLogEntry =& KTUserHistory::createFromArray(array(
391 'userid' => $this->oUser->getId(), 391 'userid' => $this->oUser->getId(),
392 - 'datetime' => date("Y-m-d H:i:s", time()), 392 + 'datetime' => date('Y-m-d H:i:s', time()),
393 'actionnamespace' => 'ktcore.user_history.disable_admin_mode', 393 'actionnamespace' => 'ktcore.user_history.disable_admin_mode',
394 'comments' => 'Admin Mode disabled', 394 'comments' => 'Admin Mode disabled',
395 'sessionid' => $_SESSION['sessionID'], 395 'sessionid' => $_SESSION['sessionID'],