diff --git a/docs/VERSION-NAME.txt b/docs/VERSION-NAME.txt index 506e126..2d9ae5a 100644 --- a/docs/VERSION-NAME.txt +++ b/docs/VERSION-NAME.txt @@ -1 +1 @@ -3.5.3 beta1 +3.5.2a diff --git a/docs/VERSION-OSS.txt b/docs/VERSION-OSS.txt index 506e126..2d9ae5a 100644 --- a/docs/VERSION-OSS.txt +++ b/docs/VERSION-OSS.txt @@ -1 +1 @@ -3.5.3 beta1 +3.5.2a diff --git a/docs/VERSION.txt b/docs/VERSION.txt index 506e126..87ce492 100644 --- a/docs/VERSION.txt +++ b/docs/VERSION.txt @@ -1 +1 @@ -3.5.3 beta1 +3.5.2 diff --git a/ktwebdav/lib/KTWebDAVServer.inc.php b/ktwebdav/lib/KTWebDAVServer.inc.php index 2a21f56..05f1cfc 100644 --- a/ktwebdav/lib/KTWebDAVServer.inc.php +++ b/ktwebdav/lib/KTWebDAVServer.inc.php @@ -585,6 +585,8 @@ class KTWebDAVServer extends HTTP_WebDAV_Server if($this->dav_client == 'MC'){ $path = str_replace('%2F', '/', urlencode($path)); } + $path = str_replace('&', '%26', $path); + $info = array(); $info["path"] = $path; $info["props"] = array(); @@ -666,6 +668,8 @@ class KTWebDAVServer extends HTTP_WebDAV_Server if($this->dav_client == 'MC'){ $path = str_replace('%2F', '/', urlencode(utf8_encode($path))); } + $path = str_replace('&', '%26', $path); + // create result array $info = array(); $info["path"] = $path; diff --git a/lib/documentmanagement/DocumentField.inc b/lib/documentmanagement/DocumentField.inc index f6de02e..21bdb28 100644 --- a/lib/documentmanagement/DocumentField.inc +++ b/lib/documentmanagement/DocumentField.inc @@ -41,6 +41,21 @@ require_once(KT_LIB_DIR . '/metadata/metadatautil.inc.php'); require_once(KT_LIB_DIR . '/documentmanagement/DocumentType.inc'); require_once(KT_LIB_DIR . "/util/sanitize.inc"); +/** + * Compare the fields within a fieldset for alphabetising. + * + * @param object $a + * @param object $b + * @return integer + */ +function compareFields($a, $b) +{ + if ($a->getName() == $b->getName()) return 0; + if ($a->getName() < $b->getName()) return -1; + return 1; +} + + class DocumentField extends KTEntity { /** primary key value */ @@ -130,11 +145,20 @@ class DocumentField extends KTEntity { } else { $iFieldsetId = $oFieldset; } - return KTEntityUtil::getByDict('DocumentField', array( + $aFields = KTEntityUtil::getByDict('DocumentField', array( 'parent_fieldset' => $iFieldsetId, ), array( 'multi' => true, )); + + // Alphabetise the metadata fields within a fieldset if set in config + $oKTConfig =& KTConfig::getSingleton(); + $use_sort = $oKTConfig->get('ui/metadata_sort', false); + + if($use_sort){ + usort($aFields, 'compareFields'); + } + return $aFields; } function &getByFieldsetAndName($oFieldset, $sName) { diff --git a/lib/plugins/plugin.inc.php b/lib/plugins/plugin.inc.php index c504e66..2cbe71f 100644 --- a/lib/plugins/plugin.inc.php +++ b/lib/plugins/plugin.inc.php @@ -213,11 +213,12 @@ class KTPlugin { } function registerHelpLanguage($sPlugin, $sLanguage, $sBasedir) { + $sBasedir = (!empty($sBasedir)) ? $this->_fixFilename($sBasedir) : ''; $this->_aHelpLanguage[$sLanguage] = array($sPlugin, $sLanguage, $sBasedir); // Register helper in DB $params = $sPlugin.'|'.$sLanguage.'|'.$sBasedir; - $this->registerPluginHelper($sLanguage, $sClassName, $sFilename, $params, 'general', 'help_language'); + $this->registerPluginHelper($sLanguage, $sClassName, '', $params, 'general', 'help_language'); } function registerColumn($sName, $sNamespace, $sClassName, $sFile) { @@ -363,7 +364,11 @@ class KTPlugin { $sFilename = sprintf("%s/%s", $sDirPath, $sFilename); } } + + $sKtDir = str_replace('\\', '/', KT_DIR); + $sFilename = realpath($sFilename); $sFilename = str_replace('\\', '/', $sFilename); + $sFilename = str_replace($sKtDir.'/', '', $sFilename); return $sFilename; } @@ -652,7 +657,7 @@ class KTPlugin { function run_setup() { return true; } - + function setAvailability($sNamespace, $bAvailable = true){ $aValues = array('unavailable' => $bAvailable); $aWhere = array('namespace' => $sNamespace); @@ -767,6 +772,7 @@ class KTPlugin { } return $path; } + } ?> \ No newline at end of file diff --git a/lib/plugins/pluginregistry.inc.php b/lib/plugins/pluginregistry.inc.php index 8c79cf9..2cfe49f 100644 --- a/lib/plugins/pluginregistry.inc.php +++ b/lib/plugins/pluginregistry.inc.php @@ -54,6 +54,7 @@ class KTPluginRegistry { * @param unknown_type $sFilename */ function registerPlugin($sClassName, $sNamespace, $sFilename = null) { + $sFilename = (!empty($sFilename)) ? KTPlugin::_fixFilename($sFilename) : ''; $this->_aPluginDetails[$sNamespace] = array($sClassName, $sNamespace, $sFilename); $object = $sClassName.'|'.$sNamespace.'|'.$sFilename; @@ -66,15 +67,9 @@ class KTPluginRegistry { } $aDetails = KTUtil::arrayGet($this->_aPluginDetails, $sNamespace); if (empty($aDetails)) { - // plugin hasn't been registered - check the DB -// $query = "SELECT * FROM plugin_helper WHERE namespace = '{$sNamespace}'"; -// $plugin = DBUtil::getOneResult($query); -// if(empty($plugin)){ return null; -// } -// $aDetails = explode('|', $plugin['object']); } - $sFilename = $aDetails[2]; + $sFilename = KT_DIR.'/'.$aDetails[2]; if (!empty($sFilename)) { require_once($sFilename); } diff --git a/lib/plugins/pluginutil.inc.php b/lib/plugins/pluginutil.inc.php index 0660892..8c9a26c 100644 --- a/lib/plugins/pluginutil.inc.php +++ b/lib/plugins/pluginutil.inc.php @@ -178,7 +178,7 @@ class KTPluginUtil { $query = "SELECT h.classname, h.pathname, h.plugin FROM plugin_helper h INNER JOIN plugins p ON (p.namespace = h.plugin) - WHERE p.disabled = 0 AND h.viewtype='{$sType}' AND h.classtype='plugin' ORDER BY p.orderby"; + WHERE p.disabled = 0 AND h.classtype='plugin' ORDER BY p.orderby"; $aPluginHelpers = DBUtil::getResultArray($query); } @@ -188,15 +188,16 @@ class KTPluginUtil { $path = $aItem['pathname']; if (!empty($path)) { + $path = KT_DIR.'/'.$path; require_once($path); - } - $oPlugin = new $classname($path); - if($oPlugin->load()){ - $aPlugins[] = $oPlugin; - }else{ - $aDisabled[] = "'{$aItem['plugin']}'"; - } + $oPlugin = new $classname($path); + if($oPlugin->load()){ + $aPlugins[] = $oPlugin; + }else{ + $aDisabled[] = "'{$aItem['plugin']}'"; + } + } } $sDisabled = implode(',', $aDisabled); diff --git a/lib/util/ktutil.inc b/lib/util/ktutil.inc index 9e435b7..2dc71e1 100644 --- a/lib/util/ktutil.inc +++ b/lib/util/ktutil.inc @@ -795,6 +795,10 @@ class KTUtil { $sPath = str_replace('\\', '/', $sPath); $sReal = str_replace('\\', '/', realpath($sPath)); + if(substr($sPath, -1, 1) == '/'){ + $sReal .= '/'; + } + return (strtolower($sReal) == strtolower($sPath)); if (substr($sPath, 0, 1) == '/') { diff --git a/thirdpartyjs/extjs/examples/examples.css b/thirdpartyjs/extjs/examples/examples.css index e612636..804a177 100644 --- a/thirdpartyjs/extjs/examples/examples.css +++ b/thirdpartyjs/extjs/examples/examples.css @@ -1,54 +1,41 @@ -/* - * Ext JS Library 1.1 Beta 1 - * Copyright(c) 2006-2007, Ext JS, LLC. - * licensing@extjs.com - * - * http://www.extjs.com/license - */ - -body { - font-family:verdana,tahoma,helvetica; - padding:20px; - padding-top:32px; - font-size:13px; - background-color:#fff !important; -} -p { - margin-bottom:15px; -} -h1 { - font-size:large; - margin-bottom:20px; -} -.example-info{ - width:150px; - border:1px solid #c3daf9; - border-top:1px solid #DCEAFB; - border-left:1px solid #DCEAFB; - background:#ecf5fe url(info-bg.gif) repeat-x; - font-size:10px; - padding:8px; -} -pre.code{ - background: #F8F8F8; - border: 1px solid #e8e8e8; - padding:10px; - margin:10px; - margin-left:0px; - border-left:5px solid #e8e8e8; - font-size: 12px !important; - line-height:14px !important; -} -.msg .x-box-mc { - font-size:14px; -} -#msg-div { - position:absolute; - left:35%; - top:10px; - width:250px; - z-index:20000; -} -.x-grid3-row-body p { - margin:5px 5px 10px 5px !important; -} +/* + * Ext JS Library 1.1 Beta 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://www.extjs.com/license + */ + + +.example-info{ + width:150px; + border:1px solid #c3daf9; + border-top:1px solid #DCEAFB; + border-left:1px solid #DCEAFB; + background:#ecf5fe url(info-bg.gif) repeat-x; + font-size:10px; + padding:8px; +} +pre.code{ + background: #F8F8F8; + border: 1px solid #e8e8e8; + padding:10px; + margin:10px; + margin-left:0px; + border-left:5px solid #e8e8e8; + font-size: 12px !important; + line-height:14px !important; +} +.msg .x-box-mc { + font-size:14px; +} +#msg-div { + position:absolute; + left:35%; + top:10px; + width:250px; + z-index:20000; +} +.x-grid3-row-body p { + margin:5px 5px 10px 5px !important; +}