@@ -20,114 +20,114 @@ |
||
| 20 | 20 | |
| 21 | 21 | class OC_Theme { |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Returns the base URL |
|
| 25 | - * @return string URL |
|
| 26 | - */ |
|
| 27 | - public function getBaseUrl() { |
|
| 28 | - return 'https://nextcloud.com'; |
|
| 29 | - } |
|
| 30 | - |
|
| 31 | - /** |
|
| 32 | - * Returns the documentation URL |
|
| 33 | - * @return string URL |
|
| 34 | - */ |
|
| 35 | - public function getDocBaseUrl() { |
|
| 36 | - return 'https://docs.nextcloud.com'; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * Returns the title |
|
| 41 | - * @return string title |
|
| 42 | - */ |
|
| 43 | - public function getTitle() { |
|
| 44 | - return 'Custom Cloud'; |
|
| 45 | - } |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * Returns the short name of the software |
|
| 49 | - * @return string title |
|
| 50 | - */ |
|
| 51 | - public function getName() { |
|
| 52 | - return 'Custom Cloud'; |
|
| 53 | - } |
|
| 54 | - |
|
| 55 | - /** |
|
| 56 | - * Returns the short name of the software containing HTML strings |
|
| 57 | - * @return string title |
|
| 58 | - */ |
|
| 59 | - public function getHTMLName() { |
|
| 60 | - return 'Custom Cloud'; |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - /** |
|
| 64 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
| 65 | - * @return string entity name |
|
| 66 | - */ |
|
| 67 | - public function getEntity() { |
|
| 68 | - return 'Custom Cloud Co.'; |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * Returns slogan |
|
| 73 | - * @return string slogan |
|
| 74 | - */ |
|
| 75 | - public function getSlogan() { |
|
| 76 | - return 'Your custom cloud, personalized for you!'; |
|
| 77 | - } |
|
| 78 | - |
|
| 79 | - /** |
|
| 80 | - * Returns logo claim |
|
| 81 | - * @return string logo claim |
|
| 82 | - * @deprecated 13.0.0 not used anymore |
|
| 83 | - */ |
|
| 84 | - public function getLogoClaim() { |
|
| 85 | - return ''; |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * Returns short version of the footer |
|
| 90 | - * @return string short footer |
|
| 91 | - */ |
|
| 92 | - public function getShortFooter() { |
|
| 93 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 94 | - '<br/>' . $this->getSlogan(); |
|
| 95 | - |
|
| 96 | - return $footer; |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * Returns long version of the footer |
|
| 101 | - * @return string long footer |
|
| 102 | - */ |
|
| 103 | - public function getLongFooter() { |
|
| 104 | - $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 105 | - '<br/>' . $this->getSlogan(); |
|
| 106 | - |
|
| 107 | - return $footer; |
|
| 108 | - } |
|
| 109 | - |
|
| 110 | - public function buildDocLinkToKey($key) { |
|
| 111 | - return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - |
|
| 115 | - /** |
|
| 116 | - * Returns mail header color |
|
| 117 | - * @return string |
|
| 118 | - */ |
|
| 119 | - public function getColorPrimary() { |
|
| 120 | - return '#745bca'; |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * Returns variables to overload defaults from core/css/variables.scss |
|
| 125 | - * @return array |
|
| 126 | - */ |
|
| 127 | - public function getScssVariables() { |
|
| 128 | - return [ |
|
| 129 | - 'color-primary' => '#745bca' |
|
| 130 | - ]; |
|
| 131 | - } |
|
| 23 | + /** |
|
| 24 | + * Returns the base URL |
|
| 25 | + * @return string URL |
|
| 26 | + */ |
|
| 27 | + public function getBaseUrl() { |
|
| 28 | + return 'https://nextcloud.com'; |
|
| 29 | + } |
|
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * Returns the documentation URL |
|
| 33 | + * @return string URL |
|
| 34 | + */ |
|
| 35 | + public function getDocBaseUrl() { |
|
| 36 | + return 'https://docs.nextcloud.com'; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * Returns the title |
|
| 41 | + * @return string title |
|
| 42 | + */ |
|
| 43 | + public function getTitle() { |
|
| 44 | + return 'Custom Cloud'; |
|
| 45 | + } |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * Returns the short name of the software |
|
| 49 | + * @return string title |
|
| 50 | + */ |
|
| 51 | + public function getName() { |
|
| 52 | + return 'Custom Cloud'; |
|
| 53 | + } |
|
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * Returns the short name of the software containing HTML strings |
|
| 57 | + * @return string title |
|
| 58 | + */ |
|
| 59 | + public function getHTMLName() { |
|
| 60 | + return 'Custom Cloud'; |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + /** |
|
| 64 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
| 65 | + * @return string entity name |
|
| 66 | + */ |
|
| 67 | + public function getEntity() { |
|
| 68 | + return 'Custom Cloud Co.'; |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * Returns slogan |
|
| 73 | + * @return string slogan |
|
| 74 | + */ |
|
| 75 | + public function getSlogan() { |
|
| 76 | + return 'Your custom cloud, personalized for you!'; |
|
| 77 | + } |
|
| 78 | + |
|
| 79 | + /** |
|
| 80 | + * Returns logo claim |
|
| 81 | + * @return string logo claim |
|
| 82 | + * @deprecated 13.0.0 not used anymore |
|
| 83 | + */ |
|
| 84 | + public function getLogoClaim() { |
|
| 85 | + return ''; |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * Returns short version of the footer |
|
| 90 | + * @return string short footer |
|
| 91 | + */ |
|
| 92 | + public function getShortFooter() { |
|
| 93 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 94 | + '<br/>' . $this->getSlogan(); |
|
| 95 | + |
|
| 96 | + return $footer; |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * Returns long version of the footer |
|
| 101 | + * @return string long footer |
|
| 102 | + */ |
|
| 103 | + public function getLongFooter() { |
|
| 104 | + $footer = '© 2017 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 105 | + '<br/>' . $this->getSlogan(); |
|
| 106 | + |
|
| 107 | + return $footer; |
|
| 108 | + } |
|
| 109 | + |
|
| 110 | + public function buildDocLinkToKey($key) { |
|
| 111 | + return $this->getDocBaseUrl() . '/server/12/go.php?to=' . $key; |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + |
|
| 115 | + /** |
|
| 116 | + * Returns mail header color |
|
| 117 | + * @return string |
|
| 118 | + */ |
|
| 119 | + public function getColorPrimary() { |
|
| 120 | + return '#745bca'; |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * Returns variables to overload defaults from core/css/variables.scss |
|
| 125 | + * @return array |
|
| 126 | + */ |
|
| 127 | + public function getScssVariables() { |
|
| 128 | + return [ |
|
| 129 | + 'color-primary' => '#745bca' |
|
| 130 | + ]; |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | 133 | } |
@@ -41,17 +41,17 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | 'instanceid' => '', |
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * The salt used to hash all passwords, auto-generated by the Nextcloud |
|
| 46 | - * installer. (There are also per-user salts.) If you lose this salt you lose |
|
| 47 | - * all your passwords. This example is for documentation only, and you should |
|
| 48 | - * never use it. |
|
| 49 | - * |
|
| 50 | - * @deprecated This salt is deprecated and only used for legacy-compatibility, |
|
| 51 | - * developers should *NOT* use this value for anything nowadays. |
|
| 52 | - * |
|
| 53 | - * 'passwordsalt' => 'd3c944a9af095aa08f', |
|
| 54 | - */ |
|
| 44 | + /** |
|
| 45 | + * The salt used to hash all passwords, auto-generated by the Nextcloud |
|
| 46 | + * installer. (There are also per-user salts.) If you lose this salt you lose |
|
| 47 | + * all your passwords. This example is for documentation only, and you should |
|
| 48 | + * never use it. |
|
| 49 | + * |
|
| 50 | + * @deprecated This salt is deprecated and only used for legacy-compatibility, |
|
| 51 | + * developers should *NOT* use this value for anything nowadays. |
|
| 52 | + * |
|
| 53 | + * 'passwordsalt' => 'd3c944a9af095aa08f', |
|
| 54 | + */ |
|
| 55 | 55 | 'passwordsalt' => '', |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | * ubos-raspberry-pi.local and ubos-raspberry-pi-2.local |
| 68 | 68 | */ |
| 69 | 69 | 'trusted_domains' => |
| 70 | - array ( |
|
| 70 | + array ( |
|
| 71 | 71 | 'demo.example.org', |
| 72 | 72 | 'otherdomain.example.org', |
| 73 | - ), |
|
| 73 | + ), |
|
| 74 | 74 | |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -260,10 +260,10 @@ discard block |
||
| 260 | 260 | * IMAP (OC_User_IMAP), SMB (OC_User_SMB), and FTP (OC_User_FTP). |
| 261 | 261 | */ |
| 262 | 262 | 'user_backends' => array( |
| 263 | - array( |
|
| 264 | - 'class' => 'OC_User_IMAP', |
|
| 265 | - 'arguments' => array('{imap.gmail.com:993/imap/ssl}INBOX') |
|
| 266 | - ) |
|
| 263 | + array( |
|
| 264 | + 'class' => 'OC_User_IMAP', |
|
| 265 | + 'arguments' => array('{imap.gmail.com:993/imap/ssl}INBOX') |
|
| 266 | + ) |
|
| 267 | 267 | ), |
| 268 | 268 | |
| 269 | 269 | /** |
@@ -730,9 +730,9 @@ discard block |
||
| 730 | 730 | * Defaults to an empty array. |
| 731 | 731 | */ |
| 732 | 732 | 'log.condition' => [ |
| 733 | - 'shared_secret' => '57b58edb6637fe3059b3595cf9c41b9', |
|
| 734 | - 'users' => ['sample-user'], |
|
| 735 | - 'apps' => ['files'], |
|
| 733 | + 'shared_secret' => '57b58edb6637fe3059b3595cf9c41b9', |
|
| 734 | + 'users' => ['sample-user'], |
|
| 735 | + 'apps' => ['files'], |
|
| 736 | 736 | ], |
| 737 | 737 | |
| 738 | 738 | /** |
@@ -786,18 +786,18 @@ discard block |
||
| 786 | 786 | * *iOS client app id: ``1125420102`` |
| 787 | 787 | */ |
| 788 | 788 | 'customclient_desktop' => |
| 789 | - 'https://nextcloud.com/install/#install-clients', |
|
| 789 | + 'https://nextcloud.com/install/#install-clients', |
|
| 790 | 790 | 'customclient_android' => |
| 791 | - 'https://play.google.com/store/apps/details?id=com.nextcloud.client', |
|
| 791 | + 'https://play.google.com/store/apps/details?id=com.nextcloud.client', |
|
| 792 | 792 | 'customclient_ios' => |
| 793 | - 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8', |
|
| 793 | + 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8', |
|
| 794 | 794 | 'customclient_ios_appid' => |
| 795 | - '1125420102', |
|
| 795 | + '1125420102', |
|
| 796 | 796 | /** |
| 797 | - * Apps |
|
| 798 | - * |
|
| 799 | - * Options for the Apps folder, Apps store, and App code checker. |
|
| 800 | - */ |
|
| 797 | + * Apps |
|
| 798 | + * |
|
| 799 | + * Options for the Apps folder, Apps store, and App code checker. |
|
| 800 | + */ |
|
| 801 | 801 | |
| 802 | 802 | /** |
| 803 | 803 | * When enabled, admins may install apps from the Nextcloud app store. |
@@ -815,11 +815,11 @@ discard block |
||
| 815 | 815 | * indicates if a Web server can write files to that folder. |
| 816 | 816 | */ |
| 817 | 817 | 'apps_paths' => array( |
| 818 | - array( |
|
| 819 | - 'path'=> '/var/www/nextcloud/apps', |
|
| 820 | - 'url' => '/apps', |
|
| 821 | - 'writable' => true, |
|
| 822 | - ), |
|
| 818 | + array( |
|
| 819 | + 'path'=> '/var/www/nextcloud/apps', |
|
| 820 | + 'url' => '/apps', |
|
| 821 | + 'writable' => true, |
|
| 822 | + ), |
|
| 823 | 823 | ), |
| 824 | 824 | |
| 825 | 825 | /** |
@@ -884,8 +884,8 @@ discard block |
||
| 884 | 884 | * Defaults to ``''`` (empty string) |
| 885 | 885 | */ |
| 886 | 886 | 'preview_office_cl_parameters' => |
| 887 | - ' --headless --nologo --nofirststartwizard --invisible --norestore '. |
|
| 888 | - '--convert-to pdf --outdir ', |
|
| 887 | + ' --headless --nologo --nofirststartwizard --invisible --norestore '. |
|
| 888 | + '--convert-to pdf --outdir ', |
|
| 889 | 889 | |
| 890 | 890 | /** |
| 891 | 891 | * Only register providers that have been explicitly enabled |
@@ -928,14 +928,14 @@ discard block |
||
| 928 | 928 | * - OC\Preview\XBitmap |
| 929 | 929 | */ |
| 930 | 930 | 'enabledPreviewProviders' => array( |
| 931 | - 'OC\Preview\PNG', |
|
| 932 | - 'OC\Preview\JPEG', |
|
| 933 | - 'OC\Preview\GIF', |
|
| 934 | - 'OC\Preview\BMP', |
|
| 935 | - 'OC\Preview\XBitmap', |
|
| 936 | - 'OC\Preview\MP3', |
|
| 937 | - 'OC\Preview\TXT', |
|
| 938 | - 'OC\Preview\MarkDown' |
|
| 931 | + 'OC\Preview\PNG', |
|
| 932 | + 'OC\Preview\JPEG', |
|
| 933 | + 'OC\Preview\GIF', |
|
| 934 | + 'OC\Preview\BMP', |
|
| 935 | + 'OC\Preview\XBitmap', |
|
| 936 | + 'OC\Preview\MP3', |
|
| 937 | + 'OC\Preview\TXT', |
|
| 938 | + 'OC\Preview\MarkDown' |
|
| 939 | 939 | ), |
| 940 | 940 | |
| 941 | 941 | /** |
@@ -1018,11 +1018,11 @@ discard block |
||
| 1018 | 1018 | |
| 1019 | 1019 | /** |
| 1020 | 1020 | * Extra SSL options to be used for configuration. |
| 1021 | - * |
|
| 1021 | + * |
|
| 1022 | 1022 | * Defaults to an empty array. |
| 1023 | 1023 | */ |
| 1024 | 1024 | 'openssl' => array( |
| 1025 | - 'config' => '/absolute/location/of/openssl.cnf', |
|
| 1025 | + 'config' => '/absolute/location/of/openssl.cnf', |
|
| 1026 | 1026 | ), |
| 1027 | 1027 | |
| 1028 | 1028 | /** |
@@ -1071,11 +1071,11 @@ discard block |
||
| 1071 | 1071 | * for more information. |
| 1072 | 1072 | */ |
| 1073 | 1073 | 'redis' => [ |
| 1074 | - 'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock' |
|
| 1075 | - 'port' => 6379, |
|
| 1076 | - 'timeout' => 0.0, |
|
| 1077 | - 'password' => '', // Optional, if not defined no password will be used. |
|
| 1078 | - 'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index. |
|
| 1074 | + 'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock' |
|
| 1075 | + 'port' => 6379, |
|
| 1076 | + 'timeout' => 0.0, |
|
| 1077 | + 'password' => '', // Optional, if not defined no password will be used. |
|
| 1078 | + 'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index. |
|
| 1079 | 1079 | ], |
| 1080 | 1080 | |
| 1081 | 1081 | /** |
@@ -1101,13 +1101,13 @@ discard block |
||
| 1101 | 1101 | * See https://redis.io/topics/cluster-spec for details about the Redis cluster |
| 1102 | 1102 | */ |
| 1103 | 1103 | 'redis.cluster' => [ |
| 1104 | - 'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required |
|
| 1105 | - 'localhost:7000', |
|
| 1106 | - 'localhost:7001' |
|
| 1107 | - ], |
|
| 1108 | - 'timeout' => 0.0, |
|
| 1109 | - 'read_timeout' => 0.0, |
|
| 1110 | - 'failover_mode' => \RedisCluster::FAILOVER_ERROR |
|
| 1104 | + 'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required |
|
| 1105 | + 'localhost:7000', |
|
| 1106 | + 'localhost:7001' |
|
| 1107 | + ], |
|
| 1108 | + 'timeout' => 0.0, |
|
| 1109 | + 'read_timeout' => 0.0, |
|
| 1110 | + 'failover_mode' => \RedisCluster::FAILOVER_ERROR |
|
| 1111 | 1111 | ], |
| 1112 | 1112 | |
| 1113 | 1113 | |
@@ -1115,35 +1115,35 @@ discard block |
||
| 1115 | 1115 | * Server details for one or more memcached servers to use for memory caching. |
| 1116 | 1116 | */ |
| 1117 | 1117 | 'memcached_servers' => array( |
| 1118 | - // hostname, port and optional weight. Also see: |
|
| 1119 | - // http://www.php.net/manual/en/memcached.addservers.php |
|
| 1120 | - // http://www.php.net/manual/en/memcached.addserver.php |
|
| 1121 | - array('localhost', 11211), |
|
| 1122 | - //array('other.host.local', 11211), |
|
| 1118 | + // hostname, port and optional weight. Also see: |
|
| 1119 | + // http://www.php.net/manual/en/memcached.addservers.php |
|
| 1120 | + // http://www.php.net/manual/en/memcached.addserver.php |
|
| 1121 | + array('localhost', 11211), |
|
| 1122 | + //array('other.host.local', 11211), |
|
| 1123 | 1123 | ), |
| 1124 | 1124 | |
| 1125 | 1125 | /** |
| 1126 | 1126 | * Connection options for memcached, see http://apprize.info/php/scaling/15.html |
| 1127 | 1127 | */ |
| 1128 | 1128 | 'memcached_options' => array( |
| 1129 | - // Set timeouts to 50ms |
|
| 1130 | - \Memcached::OPT_CONNECT_TIMEOUT => 50, |
|
| 1131 | - \Memcached::OPT_RETRY_TIMEOUT => 50, |
|
| 1132 | - \Memcached::OPT_SEND_TIMEOUT => 50, |
|
| 1133 | - \Memcached::OPT_RECV_TIMEOUT => 50, |
|
| 1134 | - \Memcached::OPT_POLL_TIMEOUT => 50, |
|
| 1129 | + // Set timeouts to 50ms |
|
| 1130 | + \Memcached::OPT_CONNECT_TIMEOUT => 50, |
|
| 1131 | + \Memcached::OPT_RETRY_TIMEOUT => 50, |
|
| 1132 | + \Memcached::OPT_SEND_TIMEOUT => 50, |
|
| 1133 | + \Memcached::OPT_RECV_TIMEOUT => 50, |
|
| 1134 | + \Memcached::OPT_POLL_TIMEOUT => 50, |
|
| 1135 | 1135 | |
| 1136 | - // Enable compression |
|
| 1137 | - \Memcached::OPT_COMPRESSION => true, |
|
| 1136 | + // Enable compression |
|
| 1137 | + \Memcached::OPT_COMPRESSION => true, |
|
| 1138 | 1138 | |
| 1139 | - // Turn on consistent hashing |
|
| 1140 | - \Memcached::OPT_LIBKETAMA_COMPATIBLE => true, |
|
| 1139 | + // Turn on consistent hashing |
|
| 1140 | + \Memcached::OPT_LIBKETAMA_COMPATIBLE => true, |
|
| 1141 | 1141 | |
| 1142 | - // Enable Binary Protocol |
|
| 1143 | - \Memcached::OPT_BINARY_PROTOCOL => true, |
|
| 1142 | + // Enable Binary Protocol |
|
| 1143 | + \Memcached::OPT_BINARY_PROTOCOL => true, |
|
| 1144 | 1144 | |
| 1145 | - // Binary serializer vill be enabled if the igbinary PECL module is available |
|
| 1146 | - //\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_IGBINARY, |
|
| 1145 | + // Binary serializer vill be enabled if the igbinary PECL module is available |
|
| 1146 | + //\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_IGBINARY, |
|
| 1147 | 1147 | ), |
| 1148 | 1148 | |
| 1149 | 1149 | |
@@ -1189,53 +1189,53 @@ discard block |
||
| 1189 | 1189 | * One way to test is applying for a trystack account at http://trystack.org/ |
| 1190 | 1190 | */ |
| 1191 | 1191 | 'objectstore' => [ |
| 1192 | - 'class' => 'OC\\Files\\ObjectStore\\Swift', |
|
| 1193 | - 'arguments' => [ |
|
| 1194 | - // trystack will use your facebook id as the user name |
|
| 1195 | - 'username' => 'facebook100000123456789', |
|
| 1196 | - // in the trystack dashboard go to user -> settings -> API Password to |
|
| 1197 | - // generate a password |
|
| 1198 | - 'password' => 'Secr3tPaSSWoRdt7', |
|
| 1199 | - // must already exist in the objectstore, name can be different |
|
| 1200 | - 'container' => 'nextcloud', |
|
| 1201 | - // prefix to prepend to the fileid, default is 'oid:urn:' |
|
| 1202 | - 'objectPrefix' => 'oid:urn:', |
|
| 1203 | - // create the container if it does not exist. default is false |
|
| 1204 | - 'autocreate' => true, |
|
| 1205 | - // required, dev-/trystack defaults to 'RegionOne' |
|
| 1206 | - 'region' => 'RegionOne', |
|
| 1207 | - // The Identity / Keystone endpoint |
|
| 1208 | - 'url' => 'http://8.21.28.222:5000/v2.0', |
|
| 1209 | - // required on dev-/trystack |
|
| 1210 | - 'tenantName' => 'facebook100000123456789', |
|
| 1211 | - // dev-/trystack uses swift by default, the lib defaults to 'cloudFiles' |
|
| 1212 | - // if omitted |
|
| 1213 | - 'serviceName' => 'swift', |
|
| 1214 | - // The Interface / url Type, optional |
|
| 1215 | - 'urlType' => 'internal' |
|
| 1216 | - ], |
|
| 1192 | + 'class' => 'OC\\Files\\ObjectStore\\Swift', |
|
| 1193 | + 'arguments' => [ |
|
| 1194 | + // trystack will use your facebook id as the user name |
|
| 1195 | + 'username' => 'facebook100000123456789', |
|
| 1196 | + // in the trystack dashboard go to user -> settings -> API Password to |
|
| 1197 | + // generate a password |
|
| 1198 | + 'password' => 'Secr3tPaSSWoRdt7', |
|
| 1199 | + // must already exist in the objectstore, name can be different |
|
| 1200 | + 'container' => 'nextcloud', |
|
| 1201 | + // prefix to prepend to the fileid, default is 'oid:urn:' |
|
| 1202 | + 'objectPrefix' => 'oid:urn:', |
|
| 1203 | + // create the container if it does not exist. default is false |
|
| 1204 | + 'autocreate' => true, |
|
| 1205 | + // required, dev-/trystack defaults to 'RegionOne' |
|
| 1206 | + 'region' => 'RegionOne', |
|
| 1207 | + // The Identity / Keystone endpoint |
|
| 1208 | + 'url' => 'http://8.21.28.222:5000/v2.0', |
|
| 1209 | + // required on dev-/trystack |
|
| 1210 | + 'tenantName' => 'facebook100000123456789', |
|
| 1211 | + // dev-/trystack uses swift by default, the lib defaults to 'cloudFiles' |
|
| 1212 | + // if omitted |
|
| 1213 | + 'serviceName' => 'swift', |
|
| 1214 | + // The Interface / url Type, optional |
|
| 1215 | + 'urlType' => 'internal' |
|
| 1216 | + ], |
|
| 1217 | 1217 | ], |
| 1218 | 1218 | |
| 1219 | 1219 | /** |
| 1220 | 1220 | * To use swift V3 |
| 1221 | 1221 | */ |
| 1222 | 1222 | 'objectstore' => [ |
| 1223 | - 'class' => 'OC\\Files\\ObjectStore\\Swift', |
|
| 1224 | - 'arguments' => [ |
|
| 1225 | - 'autocreate' => true, |
|
| 1226 | - 'user' => [ |
|
| 1227 | - 'name' => 'swift', |
|
| 1228 | - 'password' => 'swift', |
|
| 1229 | - 'domain' => [ |
|
| 1230 | - 'name' => 'default', |
|
| 1231 | - ], |
|
| 1232 | - ], |
|
| 1233 | - 'tenantName' => 'service', |
|
| 1234 | - 'serviceName' => 'swift', |
|
| 1235 | - 'region' => 'regionOne', |
|
| 1236 | - 'url' => "http://yourswifthost:5000/v3", |
|
| 1237 | - 'bucket' => 'nextcloud', |
|
| 1238 | - ], |
|
| 1223 | + 'class' => 'OC\\Files\\ObjectStore\\Swift', |
|
| 1224 | + 'arguments' => [ |
|
| 1225 | + 'autocreate' => true, |
|
| 1226 | + 'user' => [ |
|
| 1227 | + 'name' => 'swift', |
|
| 1228 | + 'password' => 'swift', |
|
| 1229 | + 'domain' => [ |
|
| 1230 | + 'name' => 'default', |
|
| 1231 | + ], |
|
| 1232 | + ], |
|
| 1233 | + 'tenantName' => 'service', |
|
| 1234 | + 'serviceName' => 'swift', |
|
| 1235 | + 'region' => 'regionOne', |
|
| 1236 | + 'url' => "http://yourswifthost:5000/v3", |
|
| 1237 | + 'bucket' => 'nextcloud', |
|
| 1238 | + ], |
|
| 1239 | 1239 | ], |
| 1240 | 1240 | |
| 1241 | 1241 | |
@@ -1275,8 +1275,8 @@ discard block |
||
| 1275 | 1275 | * encryption in MySQL or specify a custom wait timeout on a cheap hoster. |
| 1276 | 1276 | */ |
| 1277 | 1277 | 'dbdriveroptions' => array( |
| 1278 | - PDO::MYSQL_ATTR_SSL_CA => '/file/path/to/ca_cert.pem', |
|
| 1279 | - PDO::MYSQL_ATTR_INIT_COMMAND => 'SET wait_timeout = 28800' |
|
| 1278 | + PDO::MYSQL_ATTR_SSL_CA => '/file/path/to/ca_cert.pem', |
|
| 1279 | + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET wait_timeout = 28800' |
|
| 1280 | 1280 | ), |
| 1281 | 1281 | |
| 1282 | 1282 | /** |
@@ -1333,10 +1333,10 @@ discard block |
||
| 1333 | 1333 | * - pgsql (PostgreSQL) |
| 1334 | 1334 | */ |
| 1335 | 1335 | 'supportedDatabases' => array( |
| 1336 | - 'sqlite', |
|
| 1337 | - 'mysql', |
|
| 1338 | - 'pgsql', |
|
| 1339 | - 'oci', |
|
| 1336 | + 'sqlite', |
|
| 1337 | + 'mysql', |
|
| 1338 | + 'pgsql', |
|
| 1339 | + 'oci', |
|
| 1340 | 1340 | ), |
| 1341 | 1341 | |
| 1342 | 1342 | /** |
@@ -35,297 +35,297 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | class OC_Defaults { |
| 37 | 37 | |
| 38 | - private $theme; |
|
| 39 | - private $l; |
|
| 38 | + private $theme; |
|
| 39 | + private $l; |
|
| 40 | 40 | |
| 41 | - private $defaultEntity; |
|
| 42 | - private $defaultName; |
|
| 43 | - private $defaultTitle; |
|
| 44 | - private $defaultBaseUrl; |
|
| 45 | - private $defaultSyncClientUrl; |
|
| 46 | - private $defaultiOSClientUrl; |
|
| 47 | - private $defaultiTunesAppId; |
|
| 48 | - private $defaultAndroidClientUrl; |
|
| 49 | - private $defaultDocBaseUrl; |
|
| 50 | - private $defaultDocVersion; |
|
| 51 | - private $defaultSlogan; |
|
| 52 | - private $defaultColorPrimary; |
|
| 53 | - private $defaultTextColorPrimary; |
|
| 41 | + private $defaultEntity; |
|
| 42 | + private $defaultName; |
|
| 43 | + private $defaultTitle; |
|
| 44 | + private $defaultBaseUrl; |
|
| 45 | + private $defaultSyncClientUrl; |
|
| 46 | + private $defaultiOSClientUrl; |
|
| 47 | + private $defaultiTunesAppId; |
|
| 48 | + private $defaultAndroidClientUrl; |
|
| 49 | + private $defaultDocBaseUrl; |
|
| 50 | + private $defaultDocVersion; |
|
| 51 | + private $defaultSlogan; |
|
| 52 | + private $defaultColorPrimary; |
|
| 53 | + private $defaultTextColorPrimary; |
|
| 54 | 54 | |
| 55 | - public function __construct() { |
|
| 56 | - $this->l = \OC::$server->getL10N('lib'); |
|
| 57 | - $config = \OC::$server->getConfig(); |
|
| 55 | + public function __construct() { |
|
| 56 | + $this->l = \OC::$server->getL10N('lib'); |
|
| 57 | + $config = \OC::$server->getConfig(); |
|
| 58 | 58 | |
| 59 | - $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
| 60 | - $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
| 61 | - $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
| 62 | - $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
| 63 | - $this->defaultSyncClientUrl = $config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients'); |
|
| 64 | - $this->defaultiOSClientUrl = $config->getSystemValue('customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'); |
|
| 65 | - $this->defaultiTunesAppId = $config->getSystemValue('customclient_ios_appid', '1125420102'); |
|
| 66 | - $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); |
|
| 67 | - $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
| 68 | - $this->defaultDocVersion = '14'; // used to generate doc links |
|
| 69 | - $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
| 70 | - $this->defaultColorPrimary = '#0082c9'; |
|
| 71 | - $this->defaultTextColorPrimary = '#ffffff'; |
|
| 59 | + $this->defaultEntity = 'Nextcloud'; /* e.g. company name, used for footers and copyright notices */ |
|
| 60 | + $this->defaultName = 'Nextcloud'; /* short name, used when referring to the software */ |
|
| 61 | + $this->defaultTitle = 'Nextcloud'; /* can be a longer name, for titles */ |
|
| 62 | + $this->defaultBaseUrl = 'https://nextcloud.com'; |
|
| 63 | + $this->defaultSyncClientUrl = $config->getSystemValue('customclient_desktop', 'https://nextcloud.com/install/#install-clients'); |
|
| 64 | + $this->defaultiOSClientUrl = $config->getSystemValue('customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'); |
|
| 65 | + $this->defaultiTunesAppId = $config->getSystemValue('customclient_ios_appid', '1125420102'); |
|
| 66 | + $this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client'); |
|
| 67 | + $this->defaultDocBaseUrl = 'https://docs.nextcloud.com'; |
|
| 68 | + $this->defaultDocVersion = '14'; // used to generate doc links |
|
| 69 | + $this->defaultSlogan = $this->l->t('a safe home for all your data'); |
|
| 70 | + $this->defaultColorPrimary = '#0082c9'; |
|
| 71 | + $this->defaultTextColorPrimary = '#ffffff'; |
|
| 72 | 72 | |
| 73 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
| 74 | - if (file_exists($themePath)) { |
|
| 75 | - // prevent defaults.php from printing output |
|
| 76 | - ob_start(); |
|
| 77 | - require_once $themePath; |
|
| 78 | - ob_end_clean(); |
|
| 79 | - if (class_exists('OC_Theme')) { |
|
| 80 | - $this->theme = new OC_Theme(); |
|
| 81 | - } |
|
| 82 | - } |
|
| 83 | - } |
|
| 73 | + $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
| 74 | + if (file_exists($themePath)) { |
|
| 75 | + // prevent defaults.php from printing output |
|
| 76 | + ob_start(); |
|
| 77 | + require_once $themePath; |
|
| 78 | + ob_end_clean(); |
|
| 79 | + if (class_exists('OC_Theme')) { |
|
| 80 | + $this->theme = new OC_Theme(); |
|
| 81 | + } |
|
| 82 | + } |
|
| 83 | + } |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * @param string $method |
|
| 87 | - */ |
|
| 88 | - private function themeExist($method) { |
|
| 89 | - if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
| 90 | - return true; |
|
| 91 | - } |
|
| 92 | - return false; |
|
| 93 | - } |
|
| 85 | + /** |
|
| 86 | + * @param string $method |
|
| 87 | + */ |
|
| 88 | + private function themeExist($method) { |
|
| 89 | + if (isset($this->theme) && method_exists($this->theme, $method)) { |
|
| 90 | + return true; |
|
| 91 | + } |
|
| 92 | + return false; |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * Returns the base URL |
|
| 97 | - * @return string URL |
|
| 98 | - */ |
|
| 99 | - public function getBaseUrl() { |
|
| 100 | - if ($this->themeExist('getBaseUrl')) { |
|
| 101 | - return $this->theme->getBaseUrl(); |
|
| 102 | - } else { |
|
| 103 | - return $this->defaultBaseUrl; |
|
| 104 | - } |
|
| 105 | - } |
|
| 95 | + /** |
|
| 96 | + * Returns the base URL |
|
| 97 | + * @return string URL |
|
| 98 | + */ |
|
| 99 | + public function getBaseUrl() { |
|
| 100 | + if ($this->themeExist('getBaseUrl')) { |
|
| 101 | + return $this->theme->getBaseUrl(); |
|
| 102 | + } else { |
|
| 103 | + return $this->defaultBaseUrl; |
|
| 104 | + } |
|
| 105 | + } |
|
| 106 | 106 | |
| 107 | - /** |
|
| 108 | - * Returns the URL where the sync clients are listed |
|
| 109 | - * @return string URL |
|
| 110 | - */ |
|
| 111 | - public function getSyncClientUrl() { |
|
| 112 | - if ($this->themeExist('getSyncClientUrl')) { |
|
| 113 | - return $this->theme->getSyncClientUrl(); |
|
| 114 | - } else { |
|
| 115 | - return $this->defaultSyncClientUrl; |
|
| 116 | - } |
|
| 117 | - } |
|
| 107 | + /** |
|
| 108 | + * Returns the URL where the sync clients are listed |
|
| 109 | + * @return string URL |
|
| 110 | + */ |
|
| 111 | + public function getSyncClientUrl() { |
|
| 112 | + if ($this->themeExist('getSyncClientUrl')) { |
|
| 113 | + return $this->theme->getSyncClientUrl(); |
|
| 114 | + } else { |
|
| 115 | + return $this->defaultSyncClientUrl; |
|
| 116 | + } |
|
| 117 | + } |
|
| 118 | 118 | |
| 119 | - /** |
|
| 120 | - * Returns the URL to the App Store for the iOS Client |
|
| 121 | - * @return string URL |
|
| 122 | - */ |
|
| 123 | - public function getiOSClientUrl() { |
|
| 124 | - if ($this->themeExist('getiOSClientUrl')) { |
|
| 125 | - return $this->theme->getiOSClientUrl(); |
|
| 126 | - } else { |
|
| 127 | - return $this->defaultiOSClientUrl; |
|
| 128 | - } |
|
| 129 | - } |
|
| 119 | + /** |
|
| 120 | + * Returns the URL to the App Store for the iOS Client |
|
| 121 | + * @return string URL |
|
| 122 | + */ |
|
| 123 | + public function getiOSClientUrl() { |
|
| 124 | + if ($this->themeExist('getiOSClientUrl')) { |
|
| 125 | + return $this->theme->getiOSClientUrl(); |
|
| 126 | + } else { |
|
| 127 | + return $this->defaultiOSClientUrl; |
|
| 128 | + } |
|
| 129 | + } |
|
| 130 | 130 | |
| 131 | - /** |
|
| 132 | - * Returns the AppId for the App Store for the iOS Client |
|
| 133 | - * @return string AppId |
|
| 134 | - */ |
|
| 135 | - public function getiTunesAppId() { |
|
| 136 | - if ($this->themeExist('getiTunesAppId')) { |
|
| 137 | - return $this->theme->getiTunesAppId(); |
|
| 138 | - } else { |
|
| 139 | - return $this->defaultiTunesAppId; |
|
| 140 | - } |
|
| 141 | - } |
|
| 131 | + /** |
|
| 132 | + * Returns the AppId for the App Store for the iOS Client |
|
| 133 | + * @return string AppId |
|
| 134 | + */ |
|
| 135 | + public function getiTunesAppId() { |
|
| 136 | + if ($this->themeExist('getiTunesAppId')) { |
|
| 137 | + return $this->theme->getiTunesAppId(); |
|
| 138 | + } else { |
|
| 139 | + return $this->defaultiTunesAppId; |
|
| 140 | + } |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - /** |
|
| 144 | - * Returns the URL to Google Play for the Android Client |
|
| 145 | - * @return string URL |
|
| 146 | - */ |
|
| 147 | - public function getAndroidClientUrl() { |
|
| 148 | - if ($this->themeExist('getAndroidClientUrl')) { |
|
| 149 | - return $this->theme->getAndroidClientUrl(); |
|
| 150 | - } else { |
|
| 151 | - return $this->defaultAndroidClientUrl; |
|
| 152 | - } |
|
| 153 | - } |
|
| 143 | + /** |
|
| 144 | + * Returns the URL to Google Play for the Android Client |
|
| 145 | + * @return string URL |
|
| 146 | + */ |
|
| 147 | + public function getAndroidClientUrl() { |
|
| 148 | + if ($this->themeExist('getAndroidClientUrl')) { |
|
| 149 | + return $this->theme->getAndroidClientUrl(); |
|
| 150 | + } else { |
|
| 151 | + return $this->defaultAndroidClientUrl; |
|
| 152 | + } |
|
| 153 | + } |
|
| 154 | 154 | |
| 155 | - /** |
|
| 156 | - * Returns the documentation URL |
|
| 157 | - * @return string URL |
|
| 158 | - */ |
|
| 159 | - public function getDocBaseUrl() { |
|
| 160 | - if ($this->themeExist('getDocBaseUrl')) { |
|
| 161 | - return $this->theme->getDocBaseUrl(); |
|
| 162 | - } else { |
|
| 163 | - return $this->defaultDocBaseUrl; |
|
| 164 | - } |
|
| 165 | - } |
|
| 155 | + /** |
|
| 156 | + * Returns the documentation URL |
|
| 157 | + * @return string URL |
|
| 158 | + */ |
|
| 159 | + public function getDocBaseUrl() { |
|
| 160 | + if ($this->themeExist('getDocBaseUrl')) { |
|
| 161 | + return $this->theme->getDocBaseUrl(); |
|
| 162 | + } else { |
|
| 163 | + return $this->defaultDocBaseUrl; |
|
| 164 | + } |
|
| 165 | + } |
|
| 166 | 166 | |
| 167 | - /** |
|
| 168 | - * Returns the title |
|
| 169 | - * @return string title |
|
| 170 | - */ |
|
| 171 | - public function getTitle() { |
|
| 172 | - if ($this->themeExist('getTitle')) { |
|
| 173 | - return $this->theme->getTitle(); |
|
| 174 | - } else { |
|
| 175 | - return $this->defaultTitle; |
|
| 176 | - } |
|
| 177 | - } |
|
| 167 | + /** |
|
| 168 | + * Returns the title |
|
| 169 | + * @return string title |
|
| 170 | + */ |
|
| 171 | + public function getTitle() { |
|
| 172 | + if ($this->themeExist('getTitle')) { |
|
| 173 | + return $this->theme->getTitle(); |
|
| 174 | + } else { |
|
| 175 | + return $this->defaultTitle; |
|
| 176 | + } |
|
| 177 | + } |
|
| 178 | 178 | |
| 179 | - /** |
|
| 180 | - * Returns the short name of the software |
|
| 181 | - * @return string title |
|
| 182 | - */ |
|
| 183 | - public function getName() { |
|
| 184 | - if ($this->themeExist('getName')) { |
|
| 185 | - return $this->theme->getName(); |
|
| 186 | - } else { |
|
| 187 | - return $this->defaultName; |
|
| 188 | - } |
|
| 189 | - } |
|
| 179 | + /** |
|
| 180 | + * Returns the short name of the software |
|
| 181 | + * @return string title |
|
| 182 | + */ |
|
| 183 | + public function getName() { |
|
| 184 | + if ($this->themeExist('getName')) { |
|
| 185 | + return $this->theme->getName(); |
|
| 186 | + } else { |
|
| 187 | + return $this->defaultName; |
|
| 188 | + } |
|
| 189 | + } |
|
| 190 | 190 | |
| 191 | - /** |
|
| 192 | - * Returns the short name of the software containing HTML strings |
|
| 193 | - * @return string title |
|
| 194 | - */ |
|
| 195 | - public function getHTMLName() { |
|
| 196 | - if ($this->themeExist('getHTMLName')) { |
|
| 197 | - return $this->theme->getHTMLName(); |
|
| 198 | - } else { |
|
| 199 | - return $this->defaultName; |
|
| 200 | - } |
|
| 201 | - } |
|
| 191 | + /** |
|
| 192 | + * Returns the short name of the software containing HTML strings |
|
| 193 | + * @return string title |
|
| 194 | + */ |
|
| 195 | + public function getHTMLName() { |
|
| 196 | + if ($this->themeExist('getHTMLName')) { |
|
| 197 | + return $this->theme->getHTMLName(); |
|
| 198 | + } else { |
|
| 199 | + return $this->defaultName; |
|
| 200 | + } |
|
| 201 | + } |
|
| 202 | 202 | |
| 203 | - /** |
|
| 204 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
| 205 | - * @return string entity name |
|
| 206 | - */ |
|
| 207 | - public function getEntity() { |
|
| 208 | - if ($this->themeExist('getEntity')) { |
|
| 209 | - return $this->theme->getEntity(); |
|
| 210 | - } else { |
|
| 211 | - return $this->defaultEntity; |
|
| 212 | - } |
|
| 213 | - } |
|
| 203 | + /** |
|
| 204 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
| 205 | + * @return string entity name |
|
| 206 | + */ |
|
| 207 | + public function getEntity() { |
|
| 208 | + if ($this->themeExist('getEntity')) { |
|
| 209 | + return $this->theme->getEntity(); |
|
| 210 | + } else { |
|
| 211 | + return $this->defaultEntity; |
|
| 212 | + } |
|
| 213 | + } |
|
| 214 | 214 | |
| 215 | - /** |
|
| 216 | - * Returns slogan |
|
| 217 | - * @return string slogan |
|
| 218 | - */ |
|
| 219 | - public function getSlogan() { |
|
| 220 | - if ($this->themeExist('getSlogan')) { |
|
| 221 | - return $this->theme->getSlogan(); |
|
| 222 | - } else { |
|
| 223 | - return $this->defaultSlogan; |
|
| 224 | - } |
|
| 225 | - } |
|
| 215 | + /** |
|
| 216 | + * Returns slogan |
|
| 217 | + * @return string slogan |
|
| 218 | + */ |
|
| 219 | + public function getSlogan() { |
|
| 220 | + if ($this->themeExist('getSlogan')) { |
|
| 221 | + return $this->theme->getSlogan(); |
|
| 222 | + } else { |
|
| 223 | + return $this->defaultSlogan; |
|
| 224 | + } |
|
| 225 | + } |
|
| 226 | 226 | |
| 227 | - /** |
|
| 228 | - * Returns logo claim |
|
| 229 | - * @return string logo claim |
|
| 230 | - * @deprecated 13.0.0 |
|
| 231 | - */ |
|
| 232 | - public function getLogoClaim() { |
|
| 233 | - return ''; |
|
| 234 | - } |
|
| 227 | + /** |
|
| 228 | + * Returns logo claim |
|
| 229 | + * @return string logo claim |
|
| 230 | + * @deprecated 13.0.0 |
|
| 231 | + */ |
|
| 232 | + public function getLogoClaim() { |
|
| 233 | + return ''; |
|
| 234 | + } |
|
| 235 | 235 | |
| 236 | - /** |
|
| 237 | - * Returns short version of the footer |
|
| 238 | - * @return string short footer |
|
| 239 | - */ |
|
| 240 | - public function getShortFooter() { |
|
| 241 | - if ($this->themeExist('getShortFooter')) { |
|
| 242 | - $footer = $this->theme->getShortFooter(); |
|
| 243 | - } else { |
|
| 244 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 245 | - ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. |
|
| 246 | - ' – ' . $this->getSlogan(); |
|
| 247 | - } |
|
| 236 | + /** |
|
| 237 | + * Returns short version of the footer |
|
| 238 | + * @return string short footer |
|
| 239 | + */ |
|
| 240 | + public function getShortFooter() { |
|
| 241 | + if ($this->themeExist('getShortFooter')) { |
|
| 242 | + $footer = $this->theme->getShortFooter(); |
|
| 243 | + } else { |
|
| 244 | + $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 245 | + ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. |
|
| 246 | + ' – ' . $this->getSlogan(); |
|
| 247 | + } |
|
| 248 | 248 | |
| 249 | - return $footer; |
|
| 250 | - } |
|
| 249 | + return $footer; |
|
| 250 | + } |
|
| 251 | 251 | |
| 252 | - /** |
|
| 253 | - * Returns long version of the footer |
|
| 254 | - * @return string long footer |
|
| 255 | - */ |
|
| 256 | - public function getLongFooter() { |
|
| 257 | - if ($this->themeExist('getLongFooter')) { |
|
| 258 | - $footer = $this->theme->getLongFooter(); |
|
| 259 | - } else { |
|
| 260 | - $footer = $this->getShortFooter(); |
|
| 261 | - } |
|
| 252 | + /** |
|
| 253 | + * Returns long version of the footer |
|
| 254 | + * @return string long footer |
|
| 255 | + */ |
|
| 256 | + public function getLongFooter() { |
|
| 257 | + if ($this->themeExist('getLongFooter')) { |
|
| 258 | + $footer = $this->theme->getLongFooter(); |
|
| 259 | + } else { |
|
| 260 | + $footer = $this->getShortFooter(); |
|
| 261 | + } |
|
| 262 | 262 | |
| 263 | - return $footer; |
|
| 264 | - } |
|
| 263 | + return $footer; |
|
| 264 | + } |
|
| 265 | 265 | |
| 266 | - /** |
|
| 267 | - * @param string $key |
|
| 268 | - * @return string URL to doc with key |
|
| 269 | - */ |
|
| 270 | - public function buildDocLinkToKey($key) { |
|
| 271 | - if ($this->themeExist('buildDocLinkToKey')) { |
|
| 272 | - return $this->theme->buildDocLinkToKey($key); |
|
| 273 | - } |
|
| 274 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
| 275 | - } |
|
| 266 | + /** |
|
| 267 | + * @param string $key |
|
| 268 | + * @return string URL to doc with key |
|
| 269 | + */ |
|
| 270 | + public function buildDocLinkToKey($key) { |
|
| 271 | + if ($this->themeExist('buildDocLinkToKey')) { |
|
| 272 | + return $this->theme->buildDocLinkToKey($key); |
|
| 273 | + } |
|
| 274 | + return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
| 275 | + } |
|
| 276 | 276 | |
| 277 | - /** |
|
| 278 | - * Returns primary color |
|
| 279 | - * @return string |
|
| 280 | - */ |
|
| 281 | - public function getColorPrimary() { |
|
| 277 | + /** |
|
| 278 | + * Returns primary color |
|
| 279 | + * @return string |
|
| 280 | + */ |
|
| 281 | + public function getColorPrimary() { |
|
| 282 | 282 | |
| 283 | - if ($this->themeExist('getColorPrimary')) { |
|
| 284 | - return $this->theme->getColorPrimary(); |
|
| 285 | - } |
|
| 286 | - if ($this->themeExist('getMailHeaderColor')) { |
|
| 287 | - return $this->theme->getMailHeaderColor(); |
|
| 288 | - } |
|
| 289 | - return $this->defaultColorPrimary; |
|
| 290 | - } |
|
| 283 | + if ($this->themeExist('getColorPrimary')) { |
|
| 284 | + return $this->theme->getColorPrimary(); |
|
| 285 | + } |
|
| 286 | + if ($this->themeExist('getMailHeaderColor')) { |
|
| 287 | + return $this->theme->getMailHeaderColor(); |
|
| 288 | + } |
|
| 289 | + return $this->defaultColorPrimary; |
|
| 290 | + } |
|
| 291 | 291 | |
| 292 | - /** |
|
| 293 | - * @return array scss variables to overwrite |
|
| 294 | - */ |
|
| 295 | - public function getScssVariables() { |
|
| 296 | - if($this->themeExist('getScssVariables')) { |
|
| 297 | - return $this->theme->getScssVariables(); |
|
| 298 | - } |
|
| 299 | - return []; |
|
| 300 | - } |
|
| 292 | + /** |
|
| 293 | + * @return array scss variables to overwrite |
|
| 294 | + */ |
|
| 295 | + public function getScssVariables() { |
|
| 296 | + if($this->themeExist('getScssVariables')) { |
|
| 297 | + return $this->theme->getScssVariables(); |
|
| 298 | + } |
|
| 299 | + return []; |
|
| 300 | + } |
|
| 301 | 301 | |
| 302 | - public function shouldReplaceIcons() { |
|
| 303 | - return false; |
|
| 304 | - } |
|
| 302 | + public function shouldReplaceIcons() { |
|
| 303 | + return false; |
|
| 304 | + } |
|
| 305 | 305 | |
| 306 | - /** |
|
| 307 | - * Themed logo url |
|
| 308 | - * |
|
| 309 | - * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
| 310 | - * @return string |
|
| 311 | - */ |
|
| 312 | - public function getLogo($useSvg = true) { |
|
| 313 | - if ($this->themeExist('getLogo')) { |
|
| 314 | - return $this->theme->getLogo($useSvg); |
|
| 315 | - } |
|
| 306 | + /** |
|
| 307 | + * Themed logo url |
|
| 308 | + * |
|
| 309 | + * @param bool $useSvg Whether to point to the SVG image or a fallback |
|
| 310 | + * @return string |
|
| 311 | + */ |
|
| 312 | + public function getLogo($useSvg = true) { |
|
| 313 | + if ($this->themeExist('getLogo')) { |
|
| 314 | + return $this->theme->getLogo($useSvg); |
|
| 315 | + } |
|
| 316 | 316 | |
| 317 | - if($useSvg) { |
|
| 318 | - $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
|
| 319 | - } else { |
|
| 320 | - $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
|
| 321 | - } |
|
| 322 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 323 | - } |
|
| 317 | + if($useSvg) { |
|
| 318 | + $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
|
| 319 | + } else { |
|
| 320 | + $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
|
| 321 | + } |
|
| 322 | + return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 323 | + } |
|
| 324 | 324 | |
| 325 | - public function getTextColorPrimary() { |
|
| 326 | - if ($this->themeExist('getTextColorPrimary')) { |
|
| 327 | - return $this->theme->getTextColorPrimary(); |
|
| 328 | - } |
|
| 329 | - return $this->defaultTextColorPrimary; |
|
| 330 | - } |
|
| 325 | + public function getTextColorPrimary() { |
|
| 326 | + if ($this->themeExist('getTextColorPrimary')) { |
|
| 327 | + return $this->theme->getTextColorPrimary(); |
|
| 328 | + } |
|
| 329 | + return $this->defaultTextColorPrimary; |
|
| 330 | + } |
|
| 331 | 331 | } |