Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different default values are used for parameter 'datadirectory` #3091

Closed
j-ed opened this issue Jan 16, 2017 · 1 comment · Fixed by #3176
Closed

different default values are used for parameter 'datadirectory` #3091

j-ed opened this issue Jan 16, 2017 · 1 comment · Fixed by #3176
Labels
3. to review Waiting for reviews

Comments

@j-ed
Copy link
Contributor

j-ed commented Jan 16, 2017

refers to #3069

Expected behavior

For all parameters default values should be set and the same default value should be used for all appearances in the source code.

Current behavior

Not all of the parameters are set to a fixed default value, nor have they the same default value assigned in the source code.

As far as I understood the default value of the parameter datadirectory should be \OC::$SERVERROOT.'/data' but other values have been assigned in the source code:

+ getSystemValue('datadirectory', \OC::$SERVERROOT.'/data')             # default value !!

+ getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/')          # <<< backslash at the end
  - /var/www/htdocs/nextcloud/apps/files_external/lib/config.php:261
  - /var/www/htdocs/nextcloud/apps/theming/lib/Util.php:131
  - /var/www/htdocs/nextcloud/lib/private/Repair/RepairLegacyStorages.php:162

+ getSystemValue('datadirectory', \OC::$SERVERROOT)                     # <<< '/data' missing
  - /var/www/htdocs/nextcloud/lib/private/Repair/MoveUpdaterStepFile.php:47

+ getSystemValue('datadirectory')                                       # <<< \OC::$SERVERROOT . '/data/' missing
  - /var/www/htdocs/nextcloud/apps/gallery/preview/preview.php:71
  - /var/www/htdocs/nextcloud/apps/files_trashbin/lib/Trashbin.php:893
  - /var/www/htdocs/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php:210
  - /var/www/htdocs/nextcloud/lib/private/User/User.php:264

+ getSystemValue('datadirectory', '')                                   # <<< \OC::$SERVERROOT . '/data/' missing
  - /var/www/htdocs/nextcloud/lib/private/Template/JSConfigHelper.php:124
  - /var/www/htdocs/nextcloud/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php:50
+ getSystemValue('datadirectory', null)
  - /var/www/htdocs/nextcloud/lib/private/Repair/UpdateCertificateStore.php:67

Steps to reproduce

  1. search and compare the assigned values in the getSystemValue() call.

Environment

Server Configuration

OS: Linux 3.2.82
Web server: Apache2 2.4.25
Database: MariaDB 5.5.53
PHP version: 5.6.29
Nextcloud version: 11.0.0

Client Configuration

Browser: Mozilla Firefox 50.1.0
Operating system: Windows 7

MorrisJobke added a commit that referenced this issue Jan 20, 2017
* better safe than sorry
* fixes #3091

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke
Copy link
Member

Fix is in #3176

@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants