summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/setupchecks.js2
-rw-r--r--core/js/systemtags/systemtagsinputfield.js4
-rw-r--r--core/js/tests/specs/setupchecksSpec.js2
-rw-r--r--core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js9
4 files changed, 14 insertions, 3 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index c29c4137c58..41f6a6e07b6 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -117,7 +117,7 @@
}
if(data.phpSupported && data.phpSupported.eol) {
messages.push({
- msg: t('core', 'Your PHP version ({version}) is no longer <a target="_blank" href="{phpLink}">supported by PHP</a>. We encourage you to upgrade your PHP version to take advantage of performance and security updates provided by PHP.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
+ msg: t('core', 'You are currently running PHP {version}. We encourage you to upgrade your PHP version to take advantage of <a target="_blank" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
diff --git a/core/js/systemtags/systemtagsinputfield.js b/core/js/systemtags/systemtagsinputfield.js
index 148d52b57dd..45dc5b7b03e 100644
--- a/core/js/systemtags/systemtagsinputfield.js
+++ b/core/js/systemtags/systemtagsinputfield.js
@@ -320,7 +320,9 @@
*/
_createSearchChoice: function(term) {
term = term.trim();
- if (this.collection.filterByName(term).length) {
+ if (this.collection.filter(function(entry) {
+ return entry.get('name') === term;
+ }).length) {
return;
}
if (!this._newTag) {
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index fa0974c90f9..05be46781d6 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -358,7 +358,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'Your PHP version (5.4.0) is no longer <a target="_blank" href="https://secure.php.net/supported-versions.php">supported by PHP</a>. We encourage you to upgrade your PHP version to take advantage of performance and security updates provided by PHP.',
+ msg: 'You are currently running PHP 5.4.0. We encourage you to upgrade your PHP version to take advantage of <a target="_blank" href="https://secure.php.net/supported-versions.php">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();
diff --git a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
index aadf0de53f2..22bf0d2c82a 100644
--- a/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
+++ b/core/js/tests/specs/systemtags/systemtagsinputfieldSpec.js
@@ -85,6 +85,15 @@ describe('OC.SystemTags.SystemTagsInputField tests', function() {
expect(result.userVisible).toEqual(true);
expect(result.userAssignable).toEqual(true);
});
+ it('creates dummy tag when user types non-matching name even with prefix of existing tag', function() {
+ var opts = select2Stub.getCall(0).args[0];
+ var result = opts.createSearchChoice('ab');
+ expect(result.id).toEqual(-1);
+ expect(result.name).toEqual('ab');
+ expect(result.isNew).toEqual(true);
+ expect(result.userVisible).toEqual(true);
+ expect(result.userAssignable).toEqual(true);
+ });
it('creates the real tag and fires select event after user selects the dummy tag', function() {
var selectHandler = sinon.stub();
view.on('select', selectHandler);