Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 22a2da3

Browse files
author
Charles Marion
committed
ENH: Added uuid
Improved api module
1 parent dcabde8 commit 22a2da3

Some content is hidden

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

66 files changed

+1420
-701
lines changed

core/AppController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ public function preDispatch()
184184
'deleteMessage' => $this->t('Do you really want to delete the folder'),
185185
'removeMessage' => $this->t('Do you really want to remove the item'),
186186
'share' => $this->t('Sharing settings'),
187+
'shared' => $this->t('Shared'),
188+
'public' => $this->t('Public'),
189+
'private' => $this->t('Private'),
187190
'rename' => $this->t('Rename'),
188191
'move' => $this->t('Move'),
189192
'copy' => $this->t('Copy'),

core/constant/item.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
?>

core/constant/notification.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<?php
22
define("MIDAS_NOTIFY_LOGIN", 0);
3+
define("MIDAS_NOTIFY_GET_CONFIG_TABS", 1);
34
?>

core/constant/policy.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
define("MIDAS_POLICY_READ", 0);
33
define("MIDAS_POLICY_WRITE", 1);
44
define("MIDAS_POLICY_ADMIN", 2);
5+
6+
define("MIDAS_PRIVACY_PUBLIC", 0);
7+
define("MIDAS_PRIVACY_SHARED", 1);
8+
define("MIDAS_PRIVACY_PRIVATE", 2);
59
?>

core/constant/resourcetype.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
define("MIDAS_RESOURCE_USER", 2);
55
define("MIDAS_RESOURCE_REVISION", 3);
66
define("MIDAS_RESOURCE_FOLDER", 4);
7+
define("MIDAS_RESOURCE_ASSETSTORE", 5);
8+
define("MIDAS_RESOURCE_COMMUNITY", 6);
79
?>

core/controllers/BrowseController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public function getfolderscontentAction()
214214
$tmp['deletable'] = 'true';
215215
}
216216
$tmp['policy'] = $folder->policy;
217+
$tmp['privacy_status'] = $folder->privacy_status;
217218
$jsonContent[$folder->getParentId()]['folders'][] = $tmp;
218219
unset($tmp);
219220
}
@@ -226,6 +227,7 @@ public function getfolderscontentAction()
226227
$tmp['creation'] = $this->Component->Date->ago($item->getDate(), true);
227228
$tmp['size'] = $this->Component->Utility->formatSize($item->getSizebytes());
228229
$tmp['policy'] = $item->policy;
230+
$tmp['privacy_status'] = $item->privacy_status;
229231
$jsonContent[$item->parent_id]['items'][] = $tmp;
230232
unset($tmp);
231233
}

core/controllers/UserController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ public function settingsAction()
404404
$this->view->jsonSettings['passwordErrorShort'] = $this->t('Password too short');
405405
$this->view->jsonSettings['passwordErrorMatch'] = $this->t('The passwords are not the same');
406406
$this->view->jsonSettings = JsonComponent::encode($this->view->jsonSettings);
407+
408+
$this->view->customTabs = Zend_Registry::get('notifier')->notify(MIDAS_NOTIFY_GET_CONFIG_TABS, array());
407409
}
408410

409411
/** user page action*/

core/controllers/components/InternationalizationComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static public function translate($text)
2828
$new_text = $translate->_($text);
2929
if($new_text == $text)
3030
{
31-
$translaters = Zend_Registry::get('translatersModules');
31+
$translaters = Zend_Registry::get('translatersModules');
3232
foreach($translaters as $t)
3333
{
3434
$new_text = $t->_($text);

core/database/upgrade/3.0.8.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
class Upgrade_3_0_8 extends MIDASUpgrade
4+
{
5+
public function preUpgrade()
6+
{
7+
8+
}
9+
10+
public function mysql()
11+
{
12+
$sql = "ALTER TABLE folder ADD COLUMN privacy_status integer DEFAULT 0; ";
13+
$sql = "ALTER TABLE item ADD COLUMN privacy_status integer DEFAULT 0; ";
14+
$this->db->query($sql);
15+
}
16+
17+
public function pgsql()
18+
{
19+
$sql = "ALTER TABLE folder ADD COLUMN privacy_status integer NOT NULL DEFAULT '0' ; ";
20+
$sql = "ALTER TABLE item ADD COLUMN privacy_status integer NOT NULL DEFAULT '0' ; ";
21+
$this->db->query($sql);
22+
}
23+
24+
public function postUpgrade()
25+
{
26+
27+
}
28+
}
29+
?>
30+
31+

core/database/upgrade/3.0.9.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
class Upgrade_3_0_9 extends MIDASUpgrade
4+
{
5+
public function preUpgrade()
6+
{
7+
8+
}
9+
10+
public function mysql()
11+
{
12+
$sql = "
13+
CREATE TABLE IF NOT EXISTS `uniqueidentifier` (
14+
`uniqueidentifier_id` varchar(255) NOT NULL,
15+
`resource_id` bigint(20),
16+
`resource_type` tinyint(4),
17+
PRIMARY KEY (`uniqueidentifier_id`)
18+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
19+
";
20+
$this->db->query($sql);
21+
}
22+
23+
24+
public function pgsql()
25+
{
26+
$sql = "
27+
CREATE TABLE uniqueidentifier (
28+
uniqueidentifier_id character varying(512) PRIMARY KEY,
29+
resource_type integer,
30+
resource_id bigint
31+
)
32+
; ";
33+
$this->db->query($sql);
34+
}
35+
36+
public function postUpgrade()
37+
{
38+
39+
}
40+
}
41+
?>
42+
43+

0 commit comments

Comments
 (0)