aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-05-09 14:39:40 +0200
committerMario Vavti <mario@mariovavti.com>2019-05-09 14:39:40 +0200
commitf0c292e77b697bd89a529244cb23e886e5481d40 (patch)
treea7c9c2764180832741766f4115f542f84f85c5b1
parent9efd484e277578bc27f18baac64c0067852044de (diff)
downloadvolse-hubzilla-f0c292e77b697bd89a529244cb23e886e5481d40.tar.gz
volse-hubzilla-f0c292e77b697bd89a529244cb23e886e5481d40.tar.bz2
volse-hubzilla-f0c292e77b697bd89a529244cb23e886e5481d40.zip
remove the caldav and event app and make calendar the default app
-rw-r--r--Zotlabs/Lib/Apps.php5
-rw-r--r--Zotlabs/Module/Cdav.php19
-rw-r--r--Zotlabs/Update/_1234.php26
-rw-r--r--app/calendar.apd (renamed from app/caldav.apd)6
-rw-r--r--app/events.apd6
-rw-r--r--app/events.pngbin4118 -> 0 bytes
-rwxr-xr-xboot.php2
7 files changed, 33 insertions, 31 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index fefc6639d..69996b49d 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -70,7 +70,7 @@ class Apps {
'Channel Home',
'View Profile',
'Photos',
- 'Events',
+ 'Calendar',
'Directory',
'Search',
'Help',
@@ -342,7 +342,7 @@ class Apps {
'Channel Home' => t('Channel Home'),
'View Profile' => t('View Profile'),
'Photos' => t('Photos'),
- 'Events' => t('Events'),
+ 'Calendar' => t('Calendar'),
'Directory' => t('Directory'),
'Help' => t('Help'),
'Mail' => t('Mail'),
@@ -363,7 +363,6 @@ class Apps {
'Privacy Groups' => t('Privacy Groups'),
'Notifications' => t('Notifications'),
'Order Apps' => t('Order Apps'),
- 'CalDAV' => t('CalDAV'),
'CardDAV' => t('CardDAV'),
'Channel Sources' => t('Channel Sources'),
'Guest Access' => t('Guest Access'),
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php
index 9e6997c05..aa3321644 100644
--- a/Zotlabs/Module/Cdav.php
+++ b/Zotlabs/Module/Cdav.php
@@ -133,10 +133,6 @@ class Cdav extends Controller {
logger('loggedin');
- if((argv(1) == 'calendars') && (!Apps::system_app_installed(local_channel(), 'CalDAV'))) {
- killme();
- }
-
if((argv(1) == 'addressbooks') && (!Apps::system_app_installed(local_channel(), 'CardDAV'))) {
killme();
}
@@ -221,10 +217,6 @@ class Cdav extends Controller {
if(! local_channel())
return;
- if((argv(1) === 'calendar') && (! Apps::system_app_installed(local_channel(), 'CalDAV'))) {
- return;
- }
-
if((argv(1) === 'addressbook') && (! Apps::system_app_installed(local_channel(), 'CardDAV'))) {
return;
}
@@ -847,15 +839,6 @@ class Cdav extends Controller {
if(!local_channel())
return;
- if((argv(1) === 'calendar') && (! Apps::system_app_installed(local_channel(), 'CalDAV'))) {
- //Do not display any associated widgets at this point
- App::$pdl = '';
-
- $o = '<b>' . t('CalDAV App') . ' (' . t('Not Installed') . '):</b><br>';
- $o .= t('CalDAV capable calendar');
- return $o;
- }
-
if((argv(1) === 'addressbook') && (! Apps::system_app_installed(local_channel(), 'CardDAV'))) {
//Do not display any associated widgets at this point
App::$pdl = '';
@@ -884,7 +867,7 @@ class Cdav extends Controller {
}
if(argv(1) === 'calendar') {
- nav_set_selected('CalDAV');
+ nav_set_selected('Calendar');
$caldavBackend = new \Sabre\CalDAV\Backend\PDO($pdo);
$calendars = $caldavBackend->getCalendarsForUser($principalUri);
}
diff --git a/Zotlabs/Update/_1234.php b/Zotlabs/Update/_1234.php
new file mode 100644
index 000000000..b1b3b0c4e
--- /dev/null
+++ b/Zotlabs/Update/_1234.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1234 {
+
+ function run() {
+
+ q("START TRANSACTION");
+
+ $r = q("DELETE FROM app WHERE app_name = '%s' OR app_name = '%s'",
+ dbesc('Events'),
+ dbesc('CalDAV')
+ );
+
+ if($r) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+
+ }
+
+}
diff --git a/app/caldav.apd b/app/calendar.apd
index 30b45b4bd..8de046e48 100644
--- a/app/caldav.apd
+++ b/app/calendar.apd
@@ -1,6 +1,6 @@
-version: 2
+version: 1
url: $baseurl/cdav/calendar, $baseurl/settings/calendar
requires: local_channel
-name: CalDAV
+name: Calendar
photo: icon:calendar
-categories: Productivity, Personal
+categories: Productivity, nav_featured_app
diff --git a/app/events.apd b/app/events.apd
deleted file mode 100644
index b69ee35ee..000000000
--- a/app/events.apd
+++ /dev/null
@@ -1,6 +0,0 @@
-version: 2
-url: $baseurl/events, $baseurl/settings/events
-requires: local_channel
-name: Events
-photo: icon:calendar
-categories: nav_featured_app, Productivity
diff --git a/app/events.png b/app/events.png
deleted file mode 100644
index a5670fd1e..000000000
--- a/app/events.png
+++ /dev/null
Binary files differ
diff --git a/boot.php b/boot.php
index df8308a70..67a7216ff 100755
--- a/boot.php
+++ b/boot.php
@@ -53,7 +53,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '4.1.2' );
define ( 'ZOT_REVISION', '6.0a' );
-define ( 'DB_UPDATE_VERSION', 1233 );
+define ( 'DB_UPDATE_VERSION', 1234 );
define ( 'PROJECT_BASE', __DIR__ );