<label for="password" class="infield"><?php p($l->t('Password')); ?></label>
<img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?>" alt=""/>
</p>
+ <?php if ($_['encryption_enabled'] === false) : ?>
<input type="checkbox" name="remember_login" value="1" id="remember_login" checked /><label
for="remember_login"><?php p($l->t('remember')); ?></label>
+ <?php endif; ?>
<input type="hidden" name="timezone-offset" id="timezone-offset"/>
<input type="submit" id="submit" class="login primary" value="<?php p($l->t('Log in')); ?>"/>
</fieldset>
|| !isset($_COOKIE["oc_token"])
|| !isset($_COOKIE["oc_username"])
|| !$_COOKIE["oc_remember_login"]
+ || OC_App::isEnabled('files_encryption')
) {
return false;
}
}
/**
- * Check for correct file permissions of data directory
- * @return array arrays with error messages and hints
- */
+ * @brief check if there are still some encrypted files stored
+ * @return boolean
+ */
+ public static function encryptedFiles() {
+ //check if encryption was enabled in the past
+ $encryptedFiles = false;
+ if (OC_App::isEnabled('files_encryption') === false) {
+ $view = new OC\Files\View('/' . OCP\User::getUser());
+ if ($view->file_exists('/files_encryption/keyfiles')) {
+ $encryptedFiles = true;
+ }
+ }
+
+ return $encryptedFiles;
+ }
+
+ /**
+ * @brief Check for correct file permissions of data directory
+ * @paran string $dataDirectory
+ * @return array arrays with error messages and hints
+ */
public static function checkDataDirectoryPermissions($dataDirectory) {
$errors = array();
if (stristr(PHP_OS, 'WIN')) {
}
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
+ $parameters['encryption_enabled'] = OC_App::isEnabled('files_encryption');
OC_Template::printGuestPage("", "login", $parameters);
}
return $value;
}
-
/**
* Check if the htaccess file is working by creating a test file in the data directory and trying to access via http
*/
}
}
-
}
/**