AntonLV 2 лет назад
Родитель
Сommit
2d19d23cc7

+ 61 - 61
modules/boonex/files/updates/14.0.1_14.0.2/install/config.php

@@ -1,61 +1,61 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Files',
-    'version_from' => '14.0.1',
-    'version_to' => '14.0.2',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '14.0.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/files/updates/update_14.0.1_14.0.2/',
-    'home_uri' => 'files_update_1401_1402',
-
-    'module_dir' => 'boonex/files/',
-    'module_uri' => 'files',
-
-    'db_prefix' => 'bx_files_',
-    'class_prefix' => 'BxFiles',
-
-    'transcoders' => array(
-        'bx_files_sounds_mp3',
-    
-        'bx_files_videos_poster',
-        'bx_files_videos_poster_preview',
-        'bx_files_videos_mp4',
-        'bx_files_videos_mp4_hd'
-    ),
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 0,
-        'register_transcoders' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Files',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Files',
+    'version_from' => '14.0.1',
+    'version_to' => '14.0.2',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '14.0.0-B1'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/files/updates/update_14.0.1_14.0.2/',
+    'home_uri' => 'files_update_1401_1402',
+
+    'module_dir' => 'boonex/files/',
+    'module_uri' => 'files',
+
+    'db_prefix' => 'bx_files_',
+    'class_prefix' => 'BxFiles',
+
+    'transcoders' => array(
+        'bx_files_sounds_mp3',
+    
+        'bx_files_videos_poster',
+        'bx_files_videos_poster_preview',
+        'bx_files_videos_mp4',
+        'bx_files_videos_mp4_hd'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_files' => 1,
+        'update_languages' => 0,
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Files',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 13
modules/boonex/files/updates/14.0.1_14.0.2/install/installer.php

@@ -1,13 +1,13 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxFilesUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxFilesUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 60 - 60
modules/boonex/files/updates/14.0.1_14.0.2/install/sql/install.sql

@@ -1,60 +1,60 @@
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_files_sounds_resized` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `profile_id` int(10) unsigned NOT NULL,
-  `remote_id` varchar(128) NOT NULL,
-  `path` varchar(255) NOT NULL,
-  `file_name` varchar(255) NOT NULL,
-  `mime_type` varchar(128) NOT NULL,
-  `ext` varchar(32) NOT NULL,
-  `size` bigint(20) NOT NULL,
-  `added` int(11) NOT NULL,
-  `modified` int(11) NOT NULL,
-  `private` int(11) NOT NULL,
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `remote_id` (`remote_id`)
-);
-
-CREATE TABLE IF NOT EXISTS `bx_files_videos_resized` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `profile_id` int(10) unsigned NOT NULL,
-  `remote_id` varchar(128) NOT NULL,
-  `path` varchar(255) NOT NULL,
-  `file_name` varchar(255) NOT NULL,
-  `mime_type` varchar(128) NOT NULL,
-  `ext` varchar(32) NOT NULL,
-  `size` bigint(20) NOT NULL,
-  `added` int(11) NOT NULL,
-  `modified` int(11) NOT NULL,
-  `private` int(11) NOT NULL,
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `remote_id` (`remote_id`)
-);
-
-
--- STORAGES & TRANSCODERS
-SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
-
-DELETE FROM `sys_objects_storage` WHERE `object` IN ('bx_files_sounds_resized', 'bx_files_videos_resized');
-INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
-('bx_files_sounds_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_files_sounds_resized', 'allow-deny', '{audio}', '', 0, 0, 0, 0, 0, 0),
-('bx_files_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_files_videos_resized', 'allow-deny', '{video}', '', 0, 0, 0, 0, 0, 0);
-
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN ('bx_files_sounds_mp3', 'bx_files_videos_poster', 'bx_files_videos_poster_preview', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
-INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES 
-('bx_files_sounds_mp3', 'bx_files_sounds_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderAudio', ''),
-
-('bx_files_videos_poster', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
-('bx_files_videos_poster_preview', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
-('bx_files_videos_mp4', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
-('bx_files_videos_mp4_hd', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', '');
-
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN ('bx_files_sounds_mp3', 'bx_files_videos_poster_preview', 'bx_files_videos_poster', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
-INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
-('bx_files_sounds_mp3', 'Mp3', 'a:0:{}', 0),
-
-('bx_files_videos_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
-('bx_files_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
-('bx_files_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
-('bx_files_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
-('bx_files_videos_mp4_hd', 'Mp4', 'a:3:{s:1:"h";s:3:"720";s:13:"video_bitrate";s:4:"1536";s:10:"force_type";s:3:"mp4";}', 0);
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_files_sounds_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` bigint(20) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_files_videos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` bigint(20) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+
+-- STORAGES & TRANSCODERS
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+DELETE FROM `sys_objects_storage` WHERE `object` IN ('bx_files_sounds_resized', 'bx_files_videos_resized');
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_files_sounds_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_files_sounds_resized', 'allow-deny', '{audio}', '', 0, 0, 0, 0, 0, 0),
+('bx_files_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_files_videos_resized', 'allow-deny', '{video}', '', 0, 0, 0, 0, 0, 0);
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN ('bx_files_sounds_mp3', 'bx_files_videos_poster', 'bx_files_videos_poster_preview', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES 
+('bx_files_sounds_mp3', 'bx_files_sounds_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderAudio', ''),
+
+('bx_files_videos_poster', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_files_videos_poster_preview', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_files_videos_mp4', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_files_videos_mp4_hd', 'bx_files_videos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_files_files";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', '');
+
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN ('bx_files_sounds_mp3', 'bx_files_videos_poster_preview', 'bx_files_videos_poster', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_files_sounds_mp3', 'Mp3', 'a:0:{}', 0),
+
+('bx_files_videos_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
+('bx_files_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_files_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_files_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
+('bx_files_videos_mp4_hd', 'Mp4', 'a:3:{s:1:"h";s:3:"720";s:13:"video_bitrate";s:4:"1536";s:10:"force_type";s:3:"mp4";}', 0);

+ 8 - 6
modules/boonex/files/updates/14.0.1_14.0.2/source/install/sql/uninstall.sql

@@ -3,12 +3,14 @@
 DROP TABLE IF EXISTS `bx_files_main`, `bx_files_files`, `bx_files_photos_resized`, `bx_files_sounds_resized`, `bx_files_videos_resized`, `bx_files_cmts`, `bx_files_cmts_notes`, `bx_files_votes`, `bx_files_votes_track`, `bx_files_reactions`, `bx_files_reactions_track`, `bx_files_views_track`, `bx_files_meta_keywords`, `bx_files_meta_mentions`, `bx_files_reports`, `bx_files_reports_track`, `bx_files_favorites_track`, `bx_files_favorites_lists`, `bx_files_scores`, `bx_files_scores_track`, `bx_files_bookmarks`, `bx_files_downloading_jobs`;
 
 -- STORAGES & TRANSCODERS
-DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_files_files' OR `object` = 'bx_files_photos_resized';
-DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_files_files' OR `object` = 'bx_files_photos_resized';
-
-DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_files_preview', 'bx_files_gallery');
-DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_files_preview', 'bx_files_gallery');
-DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_files_preview', 'bx_files_gallery');
+DELETE FROM `sys_objects_storage` WHERE `object` IN ('bx_files_files', 'bx_files_photos_resized', 'bx_files_sounds_resized', 'bx_files_videos_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN ('bx_files_files', 'bx_files_photos_resized', 'bx_files_sounds_resized', 'bx_files_videos_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_files_preview', 'bx_files_gallery', 'bx_files_sounds_mp3', 'bx_files_videos_poster', 'bx_files_videos_poster_preview', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_files_preview', 'bx_files_gallery', 'bx_files_sounds_mp3', 'bx_files_videos_poster', 'bx_files_videos_poster_preview', 'bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_files_preview', 'bx_files_gallery', 'bx_files_videos_poster', 'bx_files_videos_poster_preview');
+DELETE FROM `sys_transcoder_audio_files` WHERE `transcoder_object` IN('bx_files_sounds_mp3');
+DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` IN('bx_files_videos_mp4', 'bx_files_videos_mp4_hd');
 
 -- FORMS
 DELETE FROM `sys_objects_form` WHERE `module` = 'bx_files';