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

Commit f0ed3c8

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fragementOnAccessDriver
2 parents 138e882 + de33c66 commit f0ed3c8

File tree

17 files changed

+68
-29
lines changed

17 files changed

+68
-29
lines changed

core/src/plugins/access.smb/manifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<external_file filename="plugins/access.fs/manifest.xml" include="registry_contributions/client_configs/*" exclude=""/>
2323
<external_file filename="plugins/access.fs/fsActions.xml" include="client_configs/*" exclude=""/>
2424
<external_file filename="plugins/access.fs/manifest.xml" include="registry_contributions/hooks/*" exclude=""/>
25+
<client_configs>
26+
<component_config className="FoldersTree">
27+
<property name="display" value="d"/>
28+
</component_config>
29+
</client_configs>
2530
</registry_contributions>
2631
<dependencies>
2732
<pluginClass pluginName="access.fs"/>

core/src/plugins/core.access/class.AbstractAccessDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,9 @@ public function filterUserSelectionToHidden($files)
550550
public function filterNodeName($nodePath, $nodeName, &$isLeaf, $lsOptions)
551551
{
552552
$showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
553-
$isLeaf = (is_file($nodePath."/".$nodeName) || AJXP_Utils::isBrowsableArchive($nodeName));
553+
if($isLeaf === ""){
554+
$isLeaf = (is_file($nodePath."/".$nodeName) || AJXP_Utils::isBrowsableArchive($nodeName));
555+
}
554556
if (AJXP_Utils::isHidden($nodeName) && !$showHiddenFiles) {
555557
return false;
556558
}

core/src/plugins/core.conf/class.AbstractConfDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,10 @@ public function switchAction($action, $httpVars, $fileVars)
12401240
} else if (isSet($httpVars["binary_id"])) {
12411241
if (isSet($httpVars["user_id"]) && AuthService::getLoggedUser() != null && AuthService::getLoggedUser()->isAdmin()) {
12421242
$context = array("USER" => $httpVars["user_id"]);
1243-
} else {
1243+
} else if(AuthService::getLoggedUser() !== null) {
12441244
$context = array("USER" => AuthService::getLoggedUser()->getId());
1245+
} else {
1246+
$context = array();
12451247
}
12461248
$this->loadBinary($context, $httpVars["binary_id"]);
12471249
}

core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function loadUserFeed($actionName, $httpVars, $fileVars)
202202
continue;
203203
}
204204
try {
205-
$node->loadNodeInfo();
205+
@$node->loadNodeInfo();
206206
} catch (Exception $e) {
207207
continue;
208208
}

core/src/plugins/core.notifications/manifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@
105105
<processing>
106106
<clientCallback><![CDATA[
107107
if(window.Notification){
108-
alert('Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will hapen.');
108+
alert(pydio.MessageHash["notification_center.12"]);
109109
window.Notification.requestPermission(function(grant) {
110110
['default', 'granted', 'denied'].indexOf(grant) === true
111111
});
112112
}else{
113-
alert('Your browser does not seem to support Desktop Notifications yet.');
113+
alert(pydio.MessageHash["notification_center.13"]);
114114
}
115115
]]></clientCallback>
116116
</processing>

core/src/plugins/core.notifications/res/i18n/de.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@
3737
"9" => "Aktivit&auml;ten Arbeitsumgebungen",
3838
"10" => "Ordner-Aktivit&auml;ten",
3939
"11" => "Datei-Aktivit&auml;ten",
40+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
41+
"13" => "Your browser does not seem to support Desktop Notifications yet."
4042
);

core/src/plugins/core.notifications/res/i18n/en.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
* The latest code can be found at <http://pyd.io/>.
2020
*/
2121
$mess=array(
22-
"1" => "Notifications",
23-
"2" => "Notifications feed",
24-
"3" => "Alerts",
25-
"4" => "Notifications",
26-
"5" => "All Events",
27-
"6" => "Go to ...",
28-
"7" => "Dismiss",
29-
"8" => "No alerts",
30-
"9" => "Workspace Activity",
31-
"10"=> "Folder Activity",
32-
"11"=> "File Activity",
22+
"1" => "Notifications",
23+
"2" => "Notifications feed",
24+
"3" => "Alerts",
25+
"4" => "Notifications",
26+
"5" => "All Events",
27+
"6" => "Go to ...",
28+
"7" => "Dismiss",
29+
"8" => "No alerts",
30+
"9" => "Workspace Activity",
31+
"10"=> "Folder Activity",
32+
"11"=> "File Activity",
33+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
34+
"13" => "Your browser does not seem to support Desktop Notifications yet."
3335
);

core/src/plugins/core.notifications/res/i18n/es.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
"9" => "Workspace Activity",
3131
"10" => "Folder Activity",
3232
"11" => "File Activity",
33+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
34+
"13" => "Your browser does not seem to support Desktop Notifications yet."
3335
);

core/src/plugins/core.notifications/res/i18n/fr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
"9" => "Activité du dépôt",
3131
"10" => "Activité du dossier",
3232
"11" => "Activité du fichier",
33+
"12" => "En fonction de votre navigateur, une demande de permission devrait apparaître. Cette fonctionnalité affichera des notifications sur votre bureau lorsqu'un nouveau fichier est modifié. Pour la désactiver, rendez vous dans les préférences de votre navigateur.",
34+
"13" => "Votre navigateur ne supporte pas les notifications sur le bureau."
3335
);

core/src/plugins/core.notifications/res/i18n/it.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
"9" => "Attività Workspace",
3131
"10"=> "Attività Cartella",
3232
"11"=> "Attività File",
33+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
34+
"13" => "Your browser does not seem to support Desktop Notifications yet."
3335
);

core/src/plugins/core.notifications/res/i18n/pt.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
"9" => "Workspace Activity",
3131
"10" => "Folder Activity",
3232
"11" => "File Activity",
33+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
34+
"13" => "Your browser does not seem to support Desktop Notifications yet."
3335
);

core/src/plugins/core.notifications/res/i18n/ru.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
"9" => "Активность по рабочему пространству",
3131
"10"=> "Активность по папке",
3232
"11"=> "Активность по файлу",
33+
"12" => "Depending on your browser, this will ask for a specific permission. To disable, go through your browser preferences and exceptions. If you have already enabled this feature, probably nothing will happen.",
34+
"13" => "Your browser does not seem to support Desktop Notifications yet."
3335
);

core/src/plugins/gui.ajax/manifest.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,19 @@
120120
label="CONF_MESSAGE[Background Attributes (6)]" description="CONF_MESSAGE[Attributes of the image used as a background]"
121121
mandatory="false" expose="true" default="background-repeat:repeat;background-size:140%;background-position:50% 50%;"/>
122122

123+
<global_param name="WELCOME_PAGE_BACKGROUND_LOWRES" group="CONF_MESSAGE[Page Background Images]" type="image" label="CONF_MESSAGE[Low-Resolution Background]" description="CONF_MESSAGE[Make sure to use a smaller resolution image, otherwise mobile loading is very slow.]" mandatory="false"
124+
editable="true"
125+
uploadAction="store_binary_temp"
126+
loadAction="get_global_binary_param"
127+
defaultImage="plugins/gui.ajax/res/themes/orbit/images/hires-photos/03-mobile.jpg"
128+
expose="true"
129+
/>
130+
131+
<global_param name="WELCOME_PAGE_BACKGROUND_ATTRIBUTES_LOWRES" group="CONF_MESSAGE[Page Background Images]" type="select"
132+
choices="background-repeat:no-repeat;background-position:50% 50%;|CONF_MESSAGE[Center in Page (no-repeat)],background-repeat:repeat;background-size:140%;background-position:50% 50%;|CONF_MESSAGE[Fetch Window (repeat vertically)],background-repeat:no-repeat;background-size:100%; background-position:center center;|CONF_MESSAGE[Fetch Window (no repeat)],background-repeat:repeat;|CONF_MESSAGE[Tile (repeat both directions)]"
133+
label="CONF_MESSAGE[Background Attributes (Low Resolution)]" description="CONF_MESSAGE[Attributes of the image used as a background]"
134+
mandatory="false" expose="true" default="background-repeat:repeat;background-size:140%;background-position:50% 50%;"/>
135+
123136
<global_param name="CUSTOM_SHAREPAGE_BACKGROUND_1" group="CONF_MESSAGE[Minisite]" type="image" label="CONF_MESSAGE[Custom Background (1)]" description="CONF_MESSAGE[Image used as a background]" mandatory="false"
124137
editable="true"
125138
uploadAction="store_binary_temp"

core/src/plugins/gui.ajax/res/js/ui/prototype/class.AjxpPane.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@ Class.create("AjxpPane", {
519519
bStyles.push("background-image:url('"+bgrounds[paramPrefix+index]+"');" + (bgrounds[paramPrefix + 'ATTRIBUTES_'+index]?bgrounds[paramPrefix + 'ATTRIBUTES_'+index]:''));
520520
index++;
521521
}
522+
if(document.viewport.getWidth() < 600 && bgrounds[paramPrefix+'LOWRES']){
523+
// This is probably a mobile, let's force switching to low res.
524+
bStyles = ["background-image:url('"+bgrounds[paramPrefix+'LOWRES']+"');" + (bgrounds[paramPrefix + 'ATTRIBUTES_'+'LOWRES']?bgrounds[paramPrefix + 'ATTRIBUTES_'+'LOWRES']:'')];
525+
}
522526
if (bStyles.length) {
523527
i = Math.floor( Math.random() * bStyles.length);
524528
var bg = bStyles[i];

core/src/plugins/gui.ajax/res/themes/orbit/css/media.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@ and (max-width : 420px){
180180
font-size: 20px;
181181
font-weight: lighter;
182182
text-transform: uppercase;
183-
margin: 0px 0;
184-
}
185-
186-
div#background-imager{
187-
background-image: url(../images/hires-photos/03-mobile.jpg) !important;
188-
background-position: 50% 50%;
189-
background-repeat: repeat repeat;
183+
margin: 0 0;
190184
}
191185

192186
div.dialogBox{

core/src/plugins/gui.mobile/ajxp-mobile.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@ a.m-2.disabled {
104104
background-image: url('../gui.ajax/res/themes/vision/images/grid_t.png');
105105
}
106106

107-
.ajxp_theme_orbit div#background-imager{
108-
background-image: url(../gui.ajax/res/themes/orbit/images/hires-photos/03-mobile.jpg) !important;
109-
background-position: 50% 50%;
110-
background-repeat: repeat repeat;
111-
}
112-
113107
#uploadBrowseButton{
114108
display: none !important;
115109
}

core/src/plugins/index.lucene/class.AjxpLuceneIndexer.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ public function applyAction($actionName, $httpVars, $fileVars)
193193
$hit->node_url = preg_replace("#ajxp\.[a-z_]+://#", "pydio://", $hit->node_url);
194194
if ($hit->serialized_metadata!=null) {
195195
$meta = unserialize(base64_decode($hit->serialized_metadata));
196+
if(isSet($meta["ajxp_modiftime"])){
197+
$meta["ajxp_relativetime"] = $meta["ajxp_description"] = $messages[4]." ".AJXP_Utils::relativeDate($meta["ajxp_modiftime"], $messages);
198+
}
196199
$tmpNode = new AJXP_Node(SystemTextEncoding::fromUTF8($hit->node_url), $meta);
197200
} else {
198201
$tmpNode = new AJXP_Node(SystemTextEncoding::fromUTF8($hit->node_url), array());
@@ -212,6 +215,10 @@ public function applyAction($actionName, $httpVars, $fileVars)
212215
if (!is_readable($tmpNode->getUrl())){
213216
continue;
214217
}
218+
$basename = basename($tmpNode->getPath());
219+
if (!$this->accessDriver->filterNodeName($tmpNode->getPath(), $basename, $tmpNode->isLeaf(), array("d" => true, "f" => true))){
220+
continue;
221+
}
215222
$tmpNode->search_score = sprintf("%0.2f", $hit->score);
216223
if (isSet($returnNodes)) {
217224
$returnNodes[] = $tmpNode;
@@ -286,6 +293,10 @@ public function applyAction($actionName, $httpVars, $fileVars)
286293
if (!is_readable($tmpNode->getUrl())){
287294
continue;
288295
}
296+
$basename = basename($tmpNode->getPath());
297+
if (!$this->accessDriver->filterNodeName($tmpNode->getPath(), $basename, $tmpNode->isLeaf(), array("d"=>true, "f"=>true))){
298+
continue;
299+
}
289300
$tmpNode->search_score = sprintf("%0.2f", $hit->score);
290301
if (isSet($returnNodes)) {
291302
$returnNodes[] = $tmpNode;

0 commit comments

Comments
 (0)