Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Christoph Flathmann
SobiPro
Commits
d1e94e8b
Commit
d1e94e8b
authored
6 years ago
by
Sigrid Suski
Browse files
Options
Download
Email Patches
Plain Diff
(#) Editing entry in multi-lingual mode always change main language (Issue #115)
parent
a40f5cd1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
5 deletions
+15
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
Site/opt/fields/category.php
Site/opt/fields/category.php
+2
-1
Site/opt/fields/email.php
Site/opt/fields/email.php
+2
-1
Site/opt/fields/inbox.php
Site/opt/fields/inbox.php
+6
-1
Site/opt/fields/textarea.php
Site/opt/fields/textarea.php
+2
-1
Site/opt/fields/url.php
Site/opt/fields/url.php
+2
-1
No files found.
CHANGELOG.md
View file @
d1e94e8b
...
...
@@ -62,6 +62,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
(#) Wrong icon class syntax in category edit screen in back-end
(#) Application installation in 'media:' does not work
(#) Reverting solution for issue #77 as it breaks the usage of HTML code in the description
(#) Editing entry in multi-lingual mode always change main language (Issue #115)
### 1.4.7.3 (11 May 2018)
...
...
This diff is collapsed.
Click to expand it.
Site/opt/fields/category.php
View file @
d1e94e8b
...
...
@@ -791,7 +791,8 @@ class SPField_Category extends SPFieldType implements SPFieldInterface
}
/* if it wasn't edited in the default language, we have to try to insert it also for def lang */
if
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
{
/* 30 August 2018, Sigrid: if the entry wasn't ADDED in the default language, we have to insert it also for the default language */
if
(
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
&&
(
$entry
->
get
(
'version'
)
==
1
)
)
{
$params
[
'lang'
]
=
Sobi
::
DefLang
();
try
{
$db
->
insert
(
'spdb_field_data'
,
$params
,
true
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Site/opt/fields/email.php
View file @
d1e94e8b
...
...
@@ -314,7 +314,8 @@ class SPField_Email extends SPField_Url implements SPFieldInterface
}
/* if it wasn't edited in the default language, we have to try to insert it also for def lang */
if
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
{
/* 30 August 2018, Sigrid: if the entry wasn't ADDED in the default language, we have to insert it also for the default language */
if
(
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
&&
(
$entry
->
get
(
'version'
)
==
1
)
)
{
$params
[
'lang'
]
=
Sobi
::
DefLang
();
try
{
$db
->
insert
(
'spdb_field_data'
,
$params
,
true
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Site/opt/fields/inbox.php
View file @
d1e94e8b
...
...
@@ -204,6 +204,7 @@ class SPField_Inbox extends SPFieldType implements SPFieldInterface
$data
=
null
;
}
$this
->
setData
(
$data
);
return
$data
;
}
...
...
@@ -280,7 +281,8 @@ class SPField_Inbox extends SPFieldType implements SPFieldInterface
}
/* if it wasn't edited in the default language, we have to try to insert it also for def lang */
if
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
{
/* 30 August 2018, Sigrid: if the entry wasn't ADDED in the default language, we have to insert it also for the default language */
if
(
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
&&
(
$entry
->
get
(
'version'
)
==
1
)
)
{
$params
[
'lang'
]
=
Sobi
::
DefLang
();
try
{
$db
->
insert
(
'spdb_field_data'
,
$params
,
true
,
true
);
...
...
@@ -427,6 +429,7 @@ class SPField_Inbox extends SPFieldType implements SPFieldInterface
catch
(
SPException
$x
)
{
Sobi
::
Error
(
$this
->
name
(),
SPLang
::
e
(
'CANNOT_SEARCH_DB_ERR'
,
$x
->
getMessage
()
),
SPC
::
WARNING
,
0
,
__LINE__
,
__FILE__
);
}
return
$terms
;
}
...
...
@@ -451,6 +454,7 @@ class SPField_Inbox extends SPFieldType implements SPFieldInterface
catch
(
SPException
$x
)
{
Sobi
::
Error
(
$this
->
name
(),
SPLang
::
e
(
'CANNOT_SEARCH_DB_ERR'
,
$x
->
getMessage
()
),
SPC
::
WARNING
,
0
,
__LINE__
,
__FILE__
);
}
return
$sids
;
}
...
...
@@ -464,6 +468,7 @@ class SPField_Inbox extends SPFieldType implements SPFieldInterface
}
else
{
$request
=
preg_quote
(
$request
);
return
$this
->
search
(
"REGEXP:^
{
$request
}
$"
,
$section
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Site/opt/fields/textarea.php
View file @
d1e94e8b
...
...
@@ -332,7 +332,8 @@ class SPField_Textarea extends SPField_Inbox implements SPFieldInterface
}
/* if it wasn't edited in the default language, we have to try to insert it also for def lang */
if
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
{
/* 30 August 2018, Sigrid: if the entry wasn't ADDED in the default language, we have to insert it also for the default language */
if
(
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
&&
(
$entry
->
get
(
'version'
)
==
1
)
)
{
$params
[
'lang'
]
=
Sobi
::
DefLang
();
try
{
$db
->
insert
(
'spdb_field_data'
,
$params
,
true
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Site/opt/fields/url.php
View file @
d1e94e8b
...
...
@@ -566,7 +566,8 @@ class SPField_Url extends SPField_Inbox implements SPFieldInterface
}
/* if it wasn't edited in the default language, we have to try to insert it also for def lang */
if
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
{
/* 30 August 2018, Sigrid: if the entry wasn't ADDED in the default language, we have to insert it also for the default language */
if
(
(
Sobi
::
Lang
()
!=
Sobi
::
DefLang
()
)
&&
(
$entry
->
get
(
'version'
)
==
1
)
)
{
$params
[
'lang'
]
=
Sobi
::
DefLang
();
try
{
$db
->
insert
(
'spdb_field_data'
,
$params
,
true
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Legal Notice / Impressum
|
Data Protection / Datenschutzinformation