Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 56ab36b

Browse files
committed
Rebase and update
2 parents 86171d4 + 66a36d2 commit 56ab36b

File tree

163 files changed

+3877
-2883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3877
-2883
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
This is the main source code repository of Pydio (formerly AjaXplorer), containing all the PHP server and HTML5 Web GUI.
1010

11-
* Latest Stable release : 6.2.0
12-
* Latest Dev release : 5.3.4 (was RC4 for Pydio 6.0.0)
11+
* Latest Stable release : 6.4.1
12+
* Latest Dev release : 6.3.1 (was RC for Pydio 6.4)
1313
* License: [AGPLv3](https://www.gnu.org/licenses/agpl.html)
1414
* Lead developer : Charles du Jeu (cdujeu): [Github](https://github.com/cdujeu) | [Twitter](https://twitter.com/Pydio)
1515

core/src/conf/RELEASE_NOTE

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
Pydio ##VERSION_NUMBER## Release Note
22

3+
Pydio Core 6.4.1 - Bug Fixes for 6.4
4+
5+
Pydio Core 6.4.1 fixes most blocking issues revealed by the massive upgrade to 6.4.0. Installation is done via the "Stable" update channel in-app, or via Linux packages manager depending on your installation mode.
6+
7+
[Overview]
8+
Many issues fixed in shares, linked to the deep refactoring of this feature. Amongst others, the "shorten" plugins were broken.
9+
* UI : Missing close button on some new dialogs, mobile display of the web UI was a little buggy
10+
* CMS Bridges where broken due to an issue in the glueCode.php file
11+
* Federated Sharing: some installs could have issues with URI's.
12+
13+
14+
[Detailed Changelog]
15+
Fix GlueCode.php (details)
16+
Use longer description in api generator. (details)
17+
Missing media.css file in gruntfile. (details)
18+
Missing log for ShareNode action (details)
19+
Fix method signature for PHP7 (details)
20+
Expand api docs generator (details)
21+
Rework Share options for folders / files vs. public links / internal sharing - Fix #1143 Better invalid share detection and remove it from meta. Fix many error messages. (details)
22+
Update i18n (details)
23+
Core.mailer : add DROP TRIGGER IF EXISTS (details)
24+
Do not display section title if list is empty - Fix #1154 (details)
25+
Fix #1148 (details)
26+
Fix some media CSS (details)
27+
Fix various glitches on Spanish language. Close #1136 (details)
28+
Fix #1128 : add the ability to reject a previously accepted share. (details)
29+
Make sure to transfer an empty DATA_TEMPLATE value to child repository - Fix #1152 Fix broken unsharing. (details)
30+
Remove legacy share js resources - Discourage people to use old themes for now. (details)
31+
Add a canWrite attribute on editors declaration, use it in ShareDialog to detect if a file has "writeable" editors and show an additional Edit permission for public links on files. (details)
32+
Fix various issues with shares lists, especially in My Account & Admin panels. (details)
33+
Use original_path for header if present in metadata. (details)
34+
Fix failed remote share: make sure to remove unnecessary data on failure. (details)
35+
Display close icon for mp3 player. Fix #1156 (details)
36+
Fix htaccess tpl : replace ocs.php by opencollab.php (details)
37+
Rewire missing action for deleting user-created workspace. (details)
38+
Fixing S3 and webdav access (details)
39+
Fix to #1157: adding support for apcu (details)
40+
Fix to support mysqli (details)
41+
Display close icon for versioning plugins (details)
42+
Updated german translations and unified various words (details)
43+
Fixed typo (details)
44+
Fix broken shortener plugins : use a url.shorten hook instead of capturing share action output. Store data in share instead of metadata. (details)
45+
46+
----
347
Pydio 6.4.0 is a stable release introducing many important new features!
448

549
Installation is done via the "Stable" update channel in-app.

core/src/core/classes/class.AJXP_Node.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,22 @@ public function loadNodeInfo($forceRefresh = false, $contextNode = false, $detai
402402
if($this->nodeInfoLoaded && $this->nodeInfoLevel != $details){
403403
$forceRefresh = true;
404404
}
405-
if($this->nodeInfoLoaded && !$forceRefresh) return;
405+
if($this->nodeInfoLoaded && !$forceRefresh){
406+
return;
407+
}
406408
if (!empty($this->_wrapperClassName)) {
407409
$registered = AJXP_PluginsService::getInstance()->getRegisteredWrappers();
408410
if (!isSet($registered[$this->getScheme()])) {
409411
$driver = $this->getDriver();
410412
if(is_object($driver)) $driver->detectStreamWrapper(true);
411413
}
412414
}
415+
AJXP_Controller::applyHook("node.info.start", array(&$this, $contextNode, $details));
416+
if($this->nodeInfoLoaded && !$forceRefresh){
417+
return;
418+
}
413419
AJXP_Controller::applyHook("node.info", array(&$this, $contextNode, $details));
420+
AJXP_Controller::applyHook("node.info.end", array(&$this, $contextNode, $details));
414421
$this->nodeInfoLoaded = true;
415422
$this->nodeInfoLevel = $details;
416423
}
@@ -519,6 +526,23 @@ public function mergeMetadata($metadata, $mergeValues = false)
519526
}
520527
}
521528

529+
/**
530+
* Return all metadata loaded during node.info, mainly used for caching.
531+
* @return array
532+
*/
533+
public function getNodeInfoMeta(){
534+
return $this->_metadata;
535+
}
536+
537+
/**
538+
* Set nodeInfoLoaded to true from external.
539+
* @param string $level
540+
*/
541+
public function setInfoLoaded($level){
542+
$this->nodeInfoLoaded = true;
543+
$this->nodeInfoLevel = $level;
544+
}
545+
522546
/**
523547
* Magic getter for metadata
524548
* @param $varName

core/src/core/classes/class.AJXP_PluginsService.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class AJXP_PluginsService
4040
* @var AbstractConfDriver
4141
*/
4242
private $confStorage;
43+
/**
44+
* @var AbstractCacheDriver
45+
*/
4346
private $cacheStorage;
4447
private $mixinsDoc;
4548
private $mixinsXPath;
@@ -65,7 +68,7 @@ private function _loadRegistryFromCache(){
6568

6669
// Retrieving Registry from Server Cache
6770
if ($this->cacheStorage) {
68-
$res = $this->cacheStorage->fetch('plugins_registry');
71+
$res = $this->cacheStorage->fetch(AJXP_CACHE_SERVICE_NS_SHARED, 'plugins_registry');
6972

7073
$this->registry=$res;
7174
}
@@ -118,7 +121,7 @@ public function loadPluginsRegistryFromCache($cacheStorage = null) {
118121
*/
119122
public function savePluginsRegistryToCache() {
120123
if (!empty ($this->cacheStorage)) {
121-
$this->cacheStorage->save("plugins_registry", $this->registry);
124+
$this->cacheStorage->save(AJXP_CACHE_SERVICE_NS_SHARED, "plugins_registry", $this->registry);
122125
}
123126
}
124127

core/src/core/classes/class.AJXP_SchemeTranslatorWrapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class AJXP_SchemeTranslatorWrapper extends AJXP_MetaStreamWrapper implements Ajx
4444
/*
4545
* Initialise the path for a file
4646
*/
47-
public static function applyInitPathHook($path) {
48-
// Not defined
47+
public static function applyInitPathHook($path, $context = 'core') {
48+
//Do nothing
4949
}
5050

5151
/**

core/src/core/classes/class.AJXP_Utils.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,10 @@ public static function extractHooksToDoc()
956956
} else {
957957
$existingHooks = array();
958958
}
959-
$allPhpFiles = self::glob_recursive(AJXP_INSTALL_PATH."/*.php");
959+
$allPhpFiles1 = self::glob_recursive(AJXP_INSTALL_PATH."/core/classes/*.php");
960+
$allPhpFiles2= self::glob_recursive(AJXP_INSTALL_PATH."/plugins/*.php");
961+
$allPhpFiles3= self::glob_recursive(AJXP_INSTALL_PATH."/conf/*.php");
962+
$allPhpFiles = array_merge(array_merge($allPhpFiles1, $allPhpFiles2), $allPhpFiles3);
960963
$hooks = array();
961964
foreach ($allPhpFiles as $phpFile) {
962965
$fileContent = file($phpFile);
@@ -966,7 +969,19 @@ public static function extractHooksToDoc()
966969
$params = $matches[2];
967970
foreach ($names as $index => $hookName) {
968971
if(!isSet($hooks[$hookName])) $hooks[$hookName] = array("TRIGGERS" => array(), "LISTENERS" => array());
969-
$hooks[$hookName]["TRIGGERS"][] = array("FILE" => substr($phpFile, strlen(AJXP_INSTALL_PATH)), "LINE" => $lineNumber);
972+
$filename = substr($phpFile, strlen(AJXP_INSTALL_PATH));
973+
if(strpos($filename, "/plugins") === 0) {
974+
$source = explode("/", $filename)[2];
975+
} else {
976+
$source = str_replace(array("class.", ".php"), "", array_pop(explode("/", $filename)));
977+
}
978+
if(!isSet($hooks[$hookName]["TRIGGERS"][$source])){
979+
$hooks[$hookName]["TRIGGERS"][$source] = array();
980+
}
981+
$hooks[$hookName]["TRIGGERS"][$source][] = array(
982+
"FILE" => $filename,
983+
"LINE" => $lineNumber
984+
);
970985
$hooks[$hookName]["PARAMETER_SAMPLE"] = $params[$index];
971986
}
972987
}
@@ -979,9 +994,12 @@ public static function extractHooksToDoc()
979994
$name = $xmlHook->getAttribute("hookName");
980995
$method = $xmlHook->getAttribute("methodName");
981996
$pluginId = $xmlHook->getAttribute("pluginId");
997+
$deferred = $xmlHook->getAttribute("defer") === "true";
982998
if($pluginId == "") $pluginId = $xmlHook->parentNode->parentNode->parentNode->getAttribute("id");
983999
if(!isSet($regHooks[$name])) $regHooks[$name] = array();
984-
$regHooks[$name][] = array("PLUGIN_ID" => $pluginId, "METHOD" => $method);
1000+
$data = array("PLUGIN_ID" => $pluginId, "METHOD" => $method);
1001+
if($deferred) $data["DEFERRED"] = true;
1002+
$regHooks[$name][] = $data;
9851003
}
9861004

9871005
foreach ($hooks as $h => $data) {

core/src/core/classes/class.AuthService.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,8 @@ public static function getRole($roleId, $createIfNotExists = false)
11471147
public static function updateRole($roleObject, $userObject = null)
11481148
{
11491149
ConfService::getConfStorageImpl()->updateRole($roleObject, $userObject);
1150-
CacheService::deleteAll();
1150+
//CacheService::deleteAll(AJXP_CACHE_SERVICE_NS_SHARED);
1151+
ConfService::getInstance()->invalidateLoadedRepositories();
11511152
}
11521153
/**
11531154
* Delete a role by its id
@@ -1158,7 +1159,8 @@ public static function updateRole($roleObject, $userObject = null)
11581159
public static function deleteRole($roleId)
11591160
{
11601161
ConfService::getConfStorageImpl()->deleteRole($roleId);
1161-
CacheService::deleteAll();
1162+
//CacheService::deleteAll(AJXP_CACHE_SERVICE_NS_SHARED);
1163+
ConfService::getInstance()->invalidateLoadedRepositories();
11621164
}
11631165

11641166
public static function filterPluginParameters($pluginId, $params, $repoId = null)

core/src/core/classes/class.CacheService.php

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,72 +28,77 @@
2828
class CacheService
2929
{
3030
/**
31+
* @param $namespace
3132
* @param $id
3233
* @return bool
3334
*/
34-
public static function contains($id) {
35+
public static function contains($namespace, $id) {
3536
$cacheDriver = ConfService::getCacheDriverImpl();
3637

3738
if ($cacheDriver) {
38-
return $cacheDriver->contains($id);
39+
return $cacheDriver->contains($namespace, $id);
3940
}
4041

4142
return false;
4243
}
4344

4445
/**
46+
* @param $namespace
4547
* @param $id
4648
* @param $object
4749
* @param int $timelimit
4850
* @return bool
4951
*/
50-
public static function save($id, $object, $timelimit = 0 ) {
52+
public static function save($namespace, $id, $object, $timelimit = 0) {
5153
$cacheDriver = ConfService::getCacheDriverImpl();
5254

5355
if ($cacheDriver) {
54-
return $cacheDriver->save($id, $object, $timelimit);
56+
return $cacheDriver->save($namespace, $id, $object, $timelimit);
5557
}
5658

5759
return false;
5860
}
5961

6062
/**
63+
* @param $namespace
6164
* @param $id
6265
* @return bool|mixed
6366
*/
64-
public static function fetch($id) {
67+
public static function fetch($namespace, $id) {
6568
$cacheDriver = ConfService::getCacheDriverImpl();
6669

6770
if ($cacheDriver) {
68-
$data = $cacheDriver->fetch($id);
71+
$data = $cacheDriver->fetch($namespace, $id);
6972
return $data;
7073
}
7174

7275
return false;
7376
}
7477

7578
/**
79+
* @param $namespace
7680
* @param $id
7781
* @return bool
7882
*/
79-
public static function delete($id) {
83+
public static function delete($namespace, $id) {
8084
$cacheDriver = ConfService::getCacheDriverImpl();
8185

8286
if ($cacheDriver) {
83-
return $cacheDriver->delete($id);
87+
return $cacheDriver->delete($namespace, $id);
8488
}
8589

8690
return false;
8791
}
8892

8993
/**
94+
* @param $namespace
9095
* @return bool
9196
*/
92-
public static function deleteAll() {
97+
public static function deleteAll($namespace) {
9398
$cacheDriver = ConfService::getCacheDriverImpl();
9499

95100
if ($cacheDriver) {
96-
return $cacheDriver->deleteAll();
101+
return $cacheDriver->deleteAll($namespace);
97102
}
98103

99104
return false;

0 commit comments

Comments
 (0)