mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-16 17:04:11 +01:00
Compare commits
160 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94f9b16c03 | ||
|
|
311aeb0b07 | ||
|
|
68fe3f01be | ||
|
|
7ce94486bd | ||
|
|
6523b34d58 | ||
|
|
be20705449 | ||
|
|
e7abaa2838 | ||
|
|
8d73eb6dff | ||
|
|
f84995a58f | ||
|
|
7f66e26b5f | ||
|
|
a6639b067f | ||
|
|
8a6d66effd | ||
|
|
6885d64124 | ||
|
|
6fa153ae8b | ||
|
|
e226222c2a | ||
|
|
aca0143e89 | ||
|
|
1968c60770 | ||
|
|
26014f410a | ||
|
|
8912618732 | ||
|
|
7bee718a13 | ||
|
|
2705543efd | ||
|
|
1e6b885301 | ||
|
|
c768e18e2b | ||
|
|
d4b93f3bf0 | ||
|
|
6354c62c2b | ||
|
|
cf8a12fe95 | ||
|
|
36804dfcf4 | ||
|
|
6966c0498a | ||
|
|
bbffc40ee0 | ||
|
|
1b7473365d | ||
|
|
0b84e809f6 | ||
|
|
a858362622 | ||
|
|
d195c2b4c9 | ||
|
|
28b75f29e5 | ||
|
|
9d8a7bf561 | ||
|
|
8064a20718 | ||
|
|
f301a283e2 | ||
|
|
e6a8f492d5 | ||
|
|
336637a7a4 | ||
|
|
0e5a501b2a | ||
|
|
59af58a173 | ||
|
|
7f922560ba | ||
|
|
d2e286345e | ||
|
|
fb120bdc7c | ||
|
|
5548997f3e | ||
|
|
156828c448 | ||
|
|
04ef2b0454 | ||
|
|
076d2e3d46 | ||
|
|
0c6ab86e54 | ||
|
|
876db3e58f | ||
|
|
5f7fe345cc | ||
|
|
cb6f78c9e3 | ||
|
|
8c86908652 | ||
|
|
7e69256cb4 | ||
|
|
83e3c089a4 | ||
|
|
0d1059a8fc | ||
|
|
e2f15ca24a | ||
|
|
7628b85b70 | ||
|
|
525f600c18 | ||
|
|
0ffa2850ea | ||
|
|
fa3610cfee | ||
|
|
898ee95a2c | ||
|
|
730570f1f8 | ||
|
|
80ce1eb125 | ||
|
|
228a945da9 | ||
|
|
79909fadc0 | ||
|
|
746b47bb0e | ||
|
|
150d3e096d | ||
|
|
23afee514d | ||
|
|
48c5698f08 | ||
|
|
1a4ee0f977 | ||
|
|
1ca39618e1 | ||
|
|
7bb1f9f423 | ||
|
|
834297e675 | ||
|
|
21c2574cd9 | ||
|
|
6d9923be68 | ||
|
|
839bbc425f | ||
|
|
70cc19768a | ||
|
|
873d109b98 | ||
|
|
a81950571a | ||
|
|
bcd9679957 | ||
|
|
2c10913fe5 | ||
|
|
0342b89481 | ||
|
|
3c9318d56a | ||
|
|
30d10b6f11 | ||
|
|
3fd55c6dd6 | ||
|
|
f8e39877b3 | ||
|
|
0a3f7d7ef7 | ||
|
|
222eb47bd2 | ||
|
|
c15b3462d1 | ||
|
|
32f05ea917 | ||
|
|
6a50b55a2a | ||
|
|
72f11c6a4d | ||
|
|
609ea47f7b | ||
|
|
74b3cfd46c | ||
|
|
f7ea6c09cd | ||
|
|
526a7f9817 | ||
|
|
5ccb1ef72a | ||
|
|
180da03f08 | ||
|
|
7ec7626aa0 | ||
|
|
f92a980b4d | ||
|
|
5d7582bb6f | ||
|
|
7a40db94fb | ||
|
|
843798505a | ||
|
|
bf13f9fc8a | ||
|
|
289171b9f1 | ||
|
|
9b065ffb0a | ||
|
|
96d888fcf3 | ||
|
|
a182a37139 | ||
|
|
23c15c1b6c | ||
|
|
866e4ab995 | ||
|
|
75730eeea0 | ||
|
|
58fd8709be | ||
|
|
f18ea18a5b | ||
|
|
1904bfdba6 | ||
|
|
e1949cd3eb | ||
|
|
1b2d3d1e84 | ||
|
|
c5b1f02d2b | ||
|
|
f81ab4d71a | ||
|
|
0b95dbee7f | ||
|
|
db593ff85e | ||
|
|
1f750bb12d | ||
|
|
4ee66377ce | ||
|
|
432a950f8c | ||
|
|
bbc751bee4 | ||
|
|
a77ba2fbab | ||
|
|
5b60ec9edf | ||
|
|
b88b9dabdb | ||
|
|
06b17e82db | ||
|
|
2add79a473 | ||
|
|
3103f361a4 | ||
|
|
3a37e24496 | ||
|
|
621295199c | ||
|
|
b1d703bff3 | ||
|
|
a3a34a94e7 | ||
|
|
6edc365685 | ||
|
|
4b7f736af0 | ||
|
|
016fbaed36 | ||
|
|
bfcd137e52 | ||
|
|
f9af8fc912 | ||
|
|
c1a7a36896 | ||
|
|
d5fe653e51 | ||
|
|
fc2fb235a2 | ||
|
|
d7211509bd | ||
|
|
c182b1a01f | ||
|
|
ee0d231426 | ||
|
|
3282b46c9b | ||
|
|
05649ba50f | ||
|
|
40efc4cbb1 | ||
|
|
eb41d3e2ef | ||
|
|
c6b16bb52e | ||
|
|
95adbbb58f | ||
|
|
60f5c60059 | ||
|
|
c0284ecc3b | ||
|
|
fc7b772ba3 | ||
|
|
011d742ae3 | ||
|
|
5b496f4d15 | ||
|
|
97f4c32271 | ||
|
|
c002ca7902 | ||
|
|
ff22074418 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -16,6 +16,11 @@
|
||||
vendor/*
|
||||
test/vendor/*
|
||||
|
||||
# all conf but listing prevention
|
||||
/conf/**
|
||||
!/conf/.htaccess
|
||||
!/conf/web.config
|
||||
|
||||
# all datas but listing prevention
|
||||
/data/**
|
||||
!/data/.htaccess
|
||||
|
||||
@@ -101,7 +101,7 @@ if ($sMode == 'install')
|
||||
$oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd);
|
||||
if ($oMysqli->connect_errno)
|
||||
{
|
||||
die("Cannot connect to the MySQL server (".$mysqli->connect_errno . ") ".$mysqli->connect_error."\nExiting");
|
||||
die("Cannot connect to the MySQL server (".$oMysqli->connect_errno . ") ".$oMysqli->connect_error."\nExiting");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -37,57 +37,68 @@ If you want to use another license, you may [create an extension][wiki new ext].
|
||||
[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension
|
||||
|
||||
|
||||
## 🔀 Branch model
|
||||
## 🔀 iTop branch model
|
||||
|
||||
TL;DR:
|
||||
> **create a fork from iTop main repository,
|
||||
> create a branch based on the develop branch**
|
||||
When we first start with Git, we were using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. As
|
||||
there was some confusions about branches to use for current developed release and previous maintained release, and also because we were
|
||||
using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since april 2020
|
||||
we don't have anymore a `master` branch.
|
||||
|
||||
We are using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. That means we have in our repo those
|
||||
main branches:
|
||||
Here are the branches we use and their meaning :
|
||||
|
||||
- develop: ongoing development version
|
||||
- release/\*: if present, that means we are working on a beta version
|
||||
- master: previous stable version
|
||||
- support/\*: maintenance branches for older versions
|
||||
- `develop`: ongoing development version
|
||||
- `release/*`: if present, that means we are working on a alpha/beta/rc version for shipping
|
||||
- `support/*`: maintenance branches for older versions
|
||||
|
||||
For example, if no beta version is currently ongoing we could have:
|
||||
For example, if no version is currently prepared for shipping we could have:
|
||||
|
||||
- develop containing future 2.8.0 version
|
||||
- master containing 2.7.x maintenance version
|
||||
- support/2.6 containing 2.6.x maintenance version
|
||||
- support/2.5 containing 2.5.x maintenance version
|
||||
- `develop` containing future 2.8.0 version
|
||||
- `support/2.7`: 2.7.x maintenance version
|
||||
- `support/2.6`: 2.6.x maintenance version
|
||||
- `support/2.5`: 2.5.x maintenance version
|
||||
|
||||
In this example, when 2.8.0-beta is shipped that will become:
|
||||
|
||||
- develop: future 2.9.0 version
|
||||
- release/2.8: 2.8.0-beta
|
||||
- master: 2.7.x maintenance version
|
||||
- support/2.6 containing 2.6.x maintenance version
|
||||
- support/2.5 containing 2.5.x maintenance version
|
||||
- `develop`: future 2.9.0 version
|
||||
- `release/2.8`: 2.8.0-beta
|
||||
- `support/2.7`: 2.7.x maintenance version
|
||||
- `support/2.6`: 2.6.x maintenance version
|
||||
- `support/2.5`: 2.5.x maintenance version
|
||||
|
||||
And when 2.8.0 final will be out:
|
||||
|
||||
- develop: future 2.9.0 version
|
||||
- master: 2.8.x maintenance version
|
||||
- support/2.7 : 2.7.x maintenance version
|
||||
- support/2.6 containing 2.6.x maintenance version
|
||||
- support/2.5 containing 2.5.x maintenance version
|
||||
- `develop`: future 2.9.0 version
|
||||
- `support/2.8`: 2.8.x maintenance version (will host developments for 2.8.1)
|
||||
- `support/2.7`: 2.7.x maintenance version
|
||||
- `support/2.6`: 2.6.x maintenance version
|
||||
- `support/2.5`: 2.5.x maintenance version
|
||||
|
||||
Most of the time you should based your developments on the develop branch.
|
||||
That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
|
||||
Also note that we have a "micro-version" concept : each of those versions have a very small amount of modifications. They are made from
|
||||
`support/*` branches as well. For example 2.6.2-1 and 2.6.2-2 were made from the `support/2.6.2` branch.
|
||||
|
||||
|
||||
## Coding
|
||||
|
||||
### 🎨 PHP styleguide
|
||||
|
||||
Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
|
||||
|
||||
### 🌐 Translations
|
||||
|
||||
A [dedicated page](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Atranslation) is available in the official wiki.
|
||||
|
||||
### Where to start ?
|
||||
|
||||
1. Create a fork from our repository (see [Working with forks - GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks))
|
||||
2. Create a branch in this fork, based on the develop branch
|
||||
3. Code !
|
||||
|
||||
Do create a dedicated branch for each modification you want to propose : if you don't it will be very hard to merge back your work !
|
||||
|
||||
Most of the time you should based your developments on the develop branch.
|
||||
That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
|
||||
|
||||
|
||||
### 🎨 PHP styleguide
|
||||
|
||||
Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
|
||||
|
||||
### ✅ Tests
|
||||
|
||||
Please create tests that covers as much as possible the code you're submitting.
|
||||
|
||||
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -53,15 +53,16 @@ pipeline {
|
||||
junit 'var/test/phpunit-log.junit.xml'
|
||||
}
|
||||
failure {
|
||||
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
}
|
||||
fixed {
|
||||
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
|
||||
}
|
||||
}
|
||||
|
||||
environment {
|
||||
DEBUG_UNIT_TEST = '0'
|
||||
JOB_NAME_UNESCAPED = env.JOB_NAME.replaceAll("%2F", "/")
|
||||
}
|
||||
options {
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
|
||||
@@ -52,16 +52,16 @@ iTop also offers mass import tools and web services to integrate with your IT
|
||||
## Last releases
|
||||
|
||||
### Versions 2.7.*
|
||||
- 2.7.0-beta2 published on January 29, 2020
|
||||
- 2.7.1 published on April 8, 2020
|
||||
- [Changes since the previous version][62]
|
||||
- [New features][63]
|
||||
- [Migration notes][64]
|
||||
- [Download iTop 2.7.0-beta2][65]
|
||||
- [Download iTop 2.7.0-2][65]
|
||||
|
||||
[62]: https://www.itophub.io/wiki/page?id=2_7_0:release:change_log
|
||||
[63]: https://www.itophub.io/wiki/page?id=2_7_0:release:2_7_whats_new
|
||||
[64]: https://www.itophub.io/wiki/page?id=2_7_0:install:260_to_270_migration_notes
|
||||
[65]: https://sourceforge.net/projects/itop/files/itop/2.7.0-beta2
|
||||
[65]: https://sourceforge.net/projects/itop/files/itop/2.7.0-2
|
||||
|
||||
|
||||
### Versions 2.6.*
|
||||
|
||||
@@ -239,8 +239,11 @@ EOF
|
||||
foreach($_SESSION['obj_messages'][$sMessageKey] as $sMessageId => $aMessageData)
|
||||
{
|
||||
$sMsgClass = 'message_'.$aMessageData['severity'];
|
||||
$aMessages[] = "<div class=\"header_message $sMsgClass\">".$aMessageData['message']."</div>";
|
||||
$aRanks[] = $aMessageData['rank'];
|
||||
if(!in_array("<div class=\"header_message $sMsgClass\">".$aMessageData['message']."</div>",$aMessages))
|
||||
{
|
||||
$aMessages[] = "<div class=\"header_message $sMsgClass\">".$aMessageData['message']."</div>";
|
||||
$aRanks[] = $aMessageData['rank'];
|
||||
}
|
||||
}
|
||||
unset($_SESSION['obj_messages'][$sMessageKey]);
|
||||
}
|
||||
@@ -2148,20 +2151,30 @@ EOF
|
||||
$iMaxFileSize = utils::ConvertToBytes(ini_get('upload_max_filesize'));
|
||||
$sHTMLValue = "<div class=\"field_input_zone field_input_document\">\n";
|
||||
$sHTMLValue .= "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"$iMaxFileSize\" />\n";
|
||||
$sHTMLValue .= "<input type=\"hidden\" id=\"do_remove_{$iId}\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}[remove]\" value=\"0\"/>\n";
|
||||
|
||||
$sHTMLValue .= "<input name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}[filename]\" type=\"hidden\" id=\"$iId\" \" value=\"".htmlentities($sFileName,
|
||||
ENT_QUOTES, 'UTF-8')."\"/>\n";
|
||||
$sHTMLValue .= "<span id=\"name_$iInputId\"'>".htmlentities($sFileName, ENT_QUOTES,
|
||||
'UTF-8')."</span><br/>\n";
|
||||
$sHTMLValue .= "<span id=\"name_$iInputId\"' >".htmlentities($sFileName, ENT_QUOTES,
|
||||
'UTF-8')."</span>  ";
|
||||
$sHTMLValue .= "<div title=\"".htmlentities(Dict::S('UI:Button:RemoveDocument'), ENT_QUOTES, 'UTF-8'). "\" id=\"remove_attr_$iId\" class=\"button\" onClick=\"$('#file_$iId').val('');UpdateFileName('$iId', '');\" style=\"display: contents;\">";
|
||||
$sHTMLValue .= "<div class=\"ui-icon ui-icon-trash\"></div></div>";
|
||||
$sHTMLValue .= "</div>";
|
||||
$sHTMLValue .= "<br/>\n";
|
||||
$sHTMLValue .= "<input title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}[fcontents]\" type=\"file\" id=\"file_$iId\" onChange=\"UpdateFileName('$iId', this.value)\"/>\n";
|
||||
$sHTMLValue .= "</div>\n";
|
||||
$sHTMLValue .= "{$sValidationSpan}{$sReloadSpan}\n";
|
||||
if ($sFileName == '')
|
||||
{
|
||||
$oPage->add_ready_script("$('#remove_attr_{$iId}').hide();");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'Image':
|
||||
$aEventsList[] = 'validate';
|
||||
$aEventsList[] = 'change';
|
||||
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/edit_image.js');
|
||||
$oDocument = $value; // Value is an ormDocument object
|
||||
$oDocument = $value; // Value is an ormDocument objectm
|
||||
$sDefaultUrl = $oAttDef->Get('default_image');
|
||||
if (is_object($oDocument) && !$oDocument->IsEmpty())
|
||||
{
|
||||
@@ -3002,10 +3015,38 @@ HTML
|
||||
$sHTMLValue = cmdbAbstractObject::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef,
|
||||
$this->Get($sAttCode), $this->GetEditValue($sAttCode), 'att_'.$iFieldIndex, '', $iExpectCode,
|
||||
$aArgs);
|
||||
$aDetails[] = array(
|
||||
$aAttrib = array(
|
||||
'label' => '<span>'.$oAttDef->GetLabel().'</span>',
|
||||
'value' => "<span id=\"field_att_$iFieldIndex\">$sHTMLValue</span>",
|
||||
);
|
||||
|
||||
//add attrib for data-attribute
|
||||
// Prepare metadata attributes
|
||||
$sAttCode = $oAttDef->GetCode();
|
||||
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
|
||||
$sAttDefClass = get_class($oAttDef);
|
||||
$sAttLabel = MetaModel::GetLabel($sClass, $sAttCode);
|
||||
|
||||
$aAttrib['attcode'] = $sAttCode;
|
||||
$aAttrib['atttype'] = $sAttDefClass;
|
||||
$aAttrib['attlabel'] = $sAttLabel;
|
||||
// - Attribute flags
|
||||
$aAttrib['attflags'] = $this->GetFormAttributeFlags($sAttCode) ;
|
||||
// - How the field should be rendered
|
||||
$aAttrib['layout'] = (in_array($oAttDef->GetEditClass(), static::GetAttEditClassesToRenderAsLargeField())) ? 'large' : 'small';
|
||||
// - For simple fields, we get the raw (stored) value as well
|
||||
$bExcludeRawValue = false;
|
||||
foreach (static::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude)
|
||||
{
|
||||
if (is_a($sAttDefClass, $sAttDefClassToExclude, true))
|
||||
{
|
||||
$bExcludeRawValue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$aAttrib['value_raw'] = ($bExcludeRawValue === false) ? $this->Get($sAttCode) : '';
|
||||
|
||||
$aDetails[] = $aAttrib;
|
||||
$aFieldsMap[$sAttCode] = 'att_'.$iFieldIndex;
|
||||
$iFieldIndex++;
|
||||
}
|
||||
@@ -3175,11 +3216,18 @@ EOF
|
||||
if ($oAttDef->GetEditClass() == 'Document')
|
||||
{
|
||||
$oDocument = $this->Get($sAttCode);
|
||||
$sDisplayValue = $this->GetAsHTML($sAttCode);
|
||||
$sDisplayValue .= "<br/>".Dict::Format('UI:OpenDocumentInNewWindow_',
|
||||
$oDocument->GetDisplayLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
|
||||
$sDisplayValue .= "<br/>".Dict::Format('UI:DownloadDocument_',
|
||||
$oDocument->GetDownloadLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
|
||||
if (!$oDocument->IsEmpty())
|
||||
{
|
||||
$sDisplayValue = $this->GetAsHTML($sAttCode);
|
||||
$sDisplayValue .= "<br/>".Dict::Format('UI:OpenDocumentInNewWindow_',
|
||||
$oDocument->GetDisplayLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
|
||||
$sDisplayValue .= "<br/>".Dict::Format('UI:DownloadDocument_',
|
||||
$oDocument->GetDownloadLink(get_class($this), $this->GetKey(), $sAttCode)).", \n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sDisplayValue ='';
|
||||
}
|
||||
}
|
||||
elseif ($oAttDef instanceof AttributeDashboard)
|
||||
{
|
||||
@@ -3518,14 +3566,6 @@ EOF
|
||||
switch ($oAttDef->GetEditClass())
|
||||
{
|
||||
case 'Document':
|
||||
// There should be an uploaded file with the named attr_<attCode>
|
||||
$oDocument = $value['fcontents'];
|
||||
if (!$oDocument->IsEmpty())
|
||||
{
|
||||
// A new file has been uploaded
|
||||
$this->Set($sAttCode, $oDocument);
|
||||
}
|
||||
break;
|
||||
case 'Image':
|
||||
// There should be an uploaded file with the named attr_<attCode>
|
||||
if ($value['remove'])
|
||||
@@ -3751,7 +3791,8 @@ EOF
|
||||
switch ($oAttDef->GetEditClass())
|
||||
{
|
||||
case 'Document':
|
||||
$value = array('fcontents' => utils::ReadPostedDocument("attr_{$sFormPrefix}{$sAttCode}", 'fcontents'));
|
||||
$aOtherData = utils::ReadPostedParam("attr_{$sFormPrefix}{$sAttCode}", null, 'raw_data');
|
||||
$value = array('fcontents' => utils::ReadPostedDocument("attr_{$sFormPrefix}{$sAttCode}", 'fcontents'), 'remove' => $aOtherData['remove']);
|
||||
break;
|
||||
|
||||
case 'Image':
|
||||
|
||||
@@ -1574,9 +1574,16 @@ JS
|
||||
private function GetDashletObjectListAppUserPreferencesPrefix(DashletObjectList $oDashlet, $aExtraParams, $sDashletId)
|
||||
{
|
||||
$sDataTableId = Dashlet::APPUSERPREFERENCES_PREFIX.$sDashletId;
|
||||
$oFilter = $oDashlet->GetDBSearch($aExtraParams);
|
||||
$aClassAliases = $oFilter->GetSelectedClasses();
|
||||
|
||||
$aClassAliases = array();
|
||||
try{
|
||||
$oFilter = $oDashlet->GetDBSearch($aExtraParams);
|
||||
$aClassAliases = $oFilter->GetSelectedClasses();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
//on error, return default value
|
||||
return null;
|
||||
}
|
||||
return DataTableSettings::GetAppUserPreferenceKey($aClassAliases, $sDataTableId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ class DashletObjectList extends Dashlet
|
||||
$sHtmlTitle = utils::HtmlEntities(Dict::S($sTitle)); // done in the itop block
|
||||
if ($sHtmlTitle != '')
|
||||
{
|
||||
$oPage->add('<h1>'.$sHtmlTitle.'</h1>');
|
||||
$oPage->add('<div class="main_header"><h1> '.$sHtmlTitle.'</h1></div>');
|
||||
}
|
||||
$oFilter = $this->GetDBSearch($aExtraParams);
|
||||
$oBlock = new DisplayBlock($oFilter, 'list');
|
||||
@@ -1121,7 +1121,7 @@ abstract class DashletGroupBy extends Dashlet
|
||||
$this->sFunction = null;
|
||||
}
|
||||
|
||||
if (empty($this->aProperties['order_direction']))
|
||||
if ((!is_null($this->sClass)) && empty($this->aProperties['order_direction']))
|
||||
{
|
||||
$aAttributeTypes = $this->oModelReflection->ListAttributes($this->sClass);
|
||||
if (isset($aAttributeTypes[$this->sGroupByAttCode]))
|
||||
@@ -1272,10 +1272,10 @@ abstract class DashletGroupBy extends Dashlet
|
||||
break;
|
||||
}
|
||||
|
||||
$oPage->add('<div style="text-align:center" class="dashlet-content">');
|
||||
$oPage->add('<div class="dashlet-content">');
|
||||
if ($sHtmlTitle != '')
|
||||
{
|
||||
$oPage->add('<h1>'.$sHtmlTitle.'</h1>');
|
||||
$oPage->add('<div class="main_header"><h1> '.$sHtmlTitle.'</h1></div>');
|
||||
}
|
||||
$sBlockId = 'block_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occuring in the same DOM)
|
||||
$oBlock = new DisplayBlock($oFilter, $sType);
|
||||
@@ -1868,11 +1868,11 @@ class DashletGroupByTable extends DashletGroupBy
|
||||
$iTotal += $aDisplayData['value'];
|
||||
}
|
||||
|
||||
$oPage->add('<div class="dashlet-content">');
|
||||
|
||||
$sBlockId = 'block_fake_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occuring in the same DOM)
|
||||
|
||||
$oPage->add('<div id="'.$sBlockId.'" class="display_block">');
|
||||
$oPage->add('<div class="dashlet-content">');
|
||||
$oPage->add('<p>'.Dict::Format('UI:Pagination:HeaderNoSelection', $iTotal).'</p>');
|
||||
$oPage->add('<table class="listResults">');
|
||||
$oPage->add('<thead>');
|
||||
@@ -1926,7 +1926,7 @@ class DashletHeaderStatic extends Dashlet
|
||||
$oPage->add('<div class="main_header">');
|
||||
|
||||
$oPage->add('<img src="'.$sIconPath.'">');
|
||||
$oPage->add('<h1>'.$this->oModelReflection->DictString($sTitle).'</h1>');
|
||||
$oPage->add('<div class="main_header"><h1> '.$this->oModelReflection->DictString($sTitle).'</h1></div>');
|
||||
|
||||
$oPage->add('</div>');
|
||||
$oPage->add('</div>');
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
class DataTable
|
||||
{
|
||||
protected $iListId; // Unique ID inside the web page
|
||||
/** @var string */
|
||||
private $sDatatableContainerId;
|
||||
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
|
||||
protected $oSet; // The set of objects to display
|
||||
protected $aClassAliases; // The aliases (alias => class) inside the set
|
||||
@@ -29,10 +31,10 @@ class DataTable
|
||||
protected $bShowObsoleteData;
|
||||
|
||||
/**
|
||||
* @param $iListId mixed Unique ID for this div/table in the page
|
||||
* @param $oSet DBObjectSet The set of data to display
|
||||
* @param $aClassAliases array The list of classes/aliases to be displayed in this set $sAlias => $sClassName
|
||||
* @param $sTableId mixed A string (or null) identifying this table in order to persist its settings
|
||||
* @param string $iListId Unique ID for this div/table in the page
|
||||
* @param DBObjectSet $oSet The set of data to display
|
||||
* @param array$aClassAliases The list of classes/aliases to be displayed in this set $sAlias => $sClassName
|
||||
* @param string $sTableId A string (or null) identifying this table in order to persist its settings
|
||||
*
|
||||
* @throws \CoreException
|
||||
* @throws \MissingQueryArgument
|
||||
@@ -42,6 +44,7 @@ class DataTable
|
||||
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
|
||||
{
|
||||
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
|
||||
$this->sDatatableContainerId = 'datatable_'.utils::GetSafeId($iListId);
|
||||
$this->oSet = $oSet;
|
||||
$this->aClassAliases = $aClassAliases;
|
||||
$this->sTableId = $sTableId;
|
||||
@@ -165,7 +168,7 @@ class DataTable
|
||||
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
|
||||
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
|
||||
|
||||
$sHtml = "<table id=\"datatable_{$this->iListId}\" class=\"datatable\">";
|
||||
$sHtml = "<table id=\"{$this->sDatatableContainerId}\" class=\"datatable\">";
|
||||
$sHtml .= "<tr><td>";
|
||||
$sHtml .= "<table style=\"width:100%;\">";
|
||||
$sHtml .= "<tr><td class=\"pagination_container\">$sObjectsCount</td><td class=\"menucontainer\">$sToolkitMenu $sActionsMenu</td></tr>";
|
||||
@@ -201,7 +204,7 @@ class DataTable
|
||||
$aOptions['oDefaultSettings'] = $this->GetAsHash($this->oDefaultSettings);
|
||||
}
|
||||
$sJSOptions = json_encode($aOptions);
|
||||
$oPage->add_ready_script("$('#datatable_{$this->iListId}').datatable($sJSOptions);");
|
||||
$oPage->add_ready_script("$('#{$this->sDatatableContainerId}').datatable($sJSOptions);");
|
||||
|
||||
return $sHtml;
|
||||
}
|
||||
@@ -418,15 +421,15 @@ EOF;
|
||||
$sHtml .= "<input id=\"dtbl_dlg_all_{$this->iListId}\" type=\"radio\" name=\"scope\" $sGenericChecked value=\"defaults\"><label for=\"dtbl_dlg_all_{$this->iListId}\"> ".Dict::S('UI:ForAllLists').'</label></p>';
|
||||
$sHtml .= "</fieldset>";
|
||||
$sHtml .= '<table style="width:100%"><tr><td style="text-align:center;">';
|
||||
$sHtml .= '<button type="button" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
|
||||
$sHtml .= '<button type="button" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
|
||||
$sHtml .= '</td><td style="text-align:center;">';
|
||||
$sHtml .= '<button type="submit" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
|
||||
$sHtml .= '<button type="submit" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
|
||||
$sHtml .= '</td></tr></table>';
|
||||
$sHtml .= "</form>";
|
||||
$sHtml .= "</div>";
|
||||
|
||||
$sDlgTitle = addslashes(Dict::S('UI:ListConfigurationTitle'));
|
||||
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#datatable_{$this->iListId}').datatable('onDlgCancel'); } });");
|
||||
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#{$this->sDatatableContainerId}').datatable('onDlgCancel'); } });");
|
||||
|
||||
return $sHtml;
|
||||
}
|
||||
@@ -745,12 +748,25 @@ EOF;
|
||||
}
|
||||
$sOQL = addslashes($this->oSet->GetFilter()->serialize());
|
||||
$oPage->add_ready_script(
|
||||
<<<EOF
|
||||
var oTable = $('#{$this->iListId} table.listResults');
|
||||
<<<JS
|
||||
var oTable = $('#{$this->sDatatableContainerId} table.listResults');
|
||||
oTable.tableHover();
|
||||
oTable.tablesorter( { $sHeaders widgets: ['myZebra', 'truncatedList']} ).tablesorterPager({container: $('#pager{$this->iListId}'), totalRows:$iCount, size: $iPageSize, filter: '$sOQL', extra_params: '$sExtraParams', select_mode: '$sSelectModeJS', displayKey: $sDisplayKey, table_id: '{$this->iListId}', columns: $sJSColumns, class_aliases: $sJSClassAliases $sCssCount});
|
||||
EOF
|
||||
);
|
||||
oTable
|
||||
.tablesorter({ $sHeaders widgets: ['myZebra', 'truncatedList']})
|
||||
.tablesorterPager({
|
||||
container: $('#pager{$this->iListId}'),
|
||||
totalRows:$iCount,
|
||||
size: $iPageSize,
|
||||
filter: '$sOQL',
|
||||
extra_params: '$sExtraParams',
|
||||
select_mode: '$sSelectModeJS',
|
||||
displayKey: $sDisplayKey,
|
||||
table_id: '{$this->sDatatableContainerId}',
|
||||
columns: $sJSColumns,
|
||||
class_aliases: $sJSClassAliases $sCssCount
|
||||
});
|
||||
JS
|
||||
);
|
||||
if ($sFakeSortList != '')
|
||||
{
|
||||
$oPage->add_ready_script("oTable.trigger(\"fakesorton\", [$sFakeSortList]);");
|
||||
|
||||
@@ -837,7 +837,8 @@ class DisplayBlock
|
||||
|
||||
foreach($aStates as $sStateValue)
|
||||
{
|
||||
$aStateLabels[$sStateValue] = htmlentities($oAttDef->GetValueLabel($sStateValue), ENT_QUOTES, 'UTF-8');
|
||||
$sHtmlValue=$aGroupBy['group1']->MakeValueLabel($this->m_oFilter, $sStateValue, $sStateValue);
|
||||
$aStateLabels[$sStateValue] = html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
$aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults))
|
||||
? $aCountsQueryResults[$sStateValue]
|
||||
@@ -946,7 +947,7 @@ class DisplayBlock
|
||||
$iChartCounter++;
|
||||
|
||||
$sChartType = isset($aExtraParams['chart_type']) ? $aExtraParams['chart_type'] : 'pie';
|
||||
$sTitle = isset($aExtraParams['chart_title']) ? '<h1 style="text-align:center">'.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1>' : '';
|
||||
$sTitle = isset($aExtraParams['chart_title']) ? '<div class="main_header"><h1> '.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1></div>' : '';
|
||||
$sHtml = "$sTitle<div style=\"height:200px;width:100%\" class=\"dashboard_chart\" id=\"my_chart_$sId{$iChartCounter}\"><div style=\"height:200px;line-height:200px;vertical-align:center;text-align:center;width:100%\"><img src=\"../images/indicator.gif\"></div></div>\n";
|
||||
$sGroupBy = isset($aExtraParams['group_by']) ? $aExtraParams['group_by'] : '';
|
||||
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '¶ms[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
|
||||
|
||||
82
application/errorpage.class.inc.php
Normal file
82
application/errorpage.class.inc.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
class ErrorPage extends NiceWebPage
|
||||
{
|
||||
public function __construct($sTitle)
|
||||
{
|
||||
parent::__construct($sTitle);
|
||||
$this->add_linked_script("../js/jquery.blockUI.js");
|
||||
$this->add_linked_script("../setup/setup.js");
|
||||
$this->add_saas("css/setup.scss");
|
||||
}
|
||||
|
||||
public function info($sText)
|
||||
{
|
||||
$this->add("<p class=\"info\">$sText</p>\n");
|
||||
$this->log_info($sText);
|
||||
}
|
||||
|
||||
public function ok($sText)
|
||||
{
|
||||
$this->add("<div class=\"message message-valid\"><span class=\"message-title\">Success:</span>$sText</div>");
|
||||
$this->log_ok($sText);
|
||||
}
|
||||
|
||||
public function warning($sText)
|
||||
{
|
||||
$this->add("<div class=\"message message-warning\"><span class=\"message-title\">Warning:</span>$sText</div>");
|
||||
$this->log_warning($sText);
|
||||
}
|
||||
|
||||
public function error($sText)
|
||||
{
|
||||
$this->add("<div class=\"message message-error\">$sText</div>");
|
||||
$this->log_error($sText);
|
||||
}
|
||||
|
||||
public function output()
|
||||
{
|
||||
$sLogo = utils::GetAbsoluteUrlAppRoot().'/images/itop-logo.png';
|
||||
$sTimeStamp = utils::GetCacheBusterTimestamp();
|
||||
$sTitle = utils::HtmlEntities($this->s_title);
|
||||
$this->s_content = <<<HTML
|
||||
<div id="header" class="error_page">
|
||||
<h1><a href="http://www.combodo.com/itop" target="_blank"><img title="iTop by Combodo" alt=" " src="{$sLogo}?t={$sTimeStamp}"></a> {$sTitle}</h1>
|
||||
</div>
|
||||
<div id="setup" class="error_page">
|
||||
{$this->s_content}
|
||||
</div>
|
||||
HTML;
|
||||
return parent::output();
|
||||
}
|
||||
|
||||
public static function log_error($sText)
|
||||
{
|
||||
IssueLog::Error($sText);
|
||||
}
|
||||
|
||||
public static function log_warning($sText)
|
||||
{
|
||||
IssueLog::Warning($sText);
|
||||
}
|
||||
|
||||
public static function log_info($sText)
|
||||
{
|
||||
IssueLog::Info($sText);
|
||||
}
|
||||
|
||||
public static function log_ok($sText)
|
||||
{
|
||||
IssueLog::Ok($sText);
|
||||
}
|
||||
|
||||
public static function log($sText)
|
||||
{
|
||||
IssueLog::Ok($sText);
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,10 @@ class LoginBasic extends AbstractLoginFSMExtension
|
||||
{
|
||||
$_SESSION['login_mode'] = 'basic';
|
||||
}
|
||||
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
||||
{
|
||||
$_SESSION['login_mode'] = 'basic';
|
||||
}
|
||||
elseif (isset($_SERVER['PHP_AUTH_USER']))
|
||||
{
|
||||
$_SESSION['login_mode'] = 'basic';
|
||||
@@ -36,7 +40,7 @@ class LoginBasic extends AbstractLoginFSMExtension
|
||||
|
||||
protected function OnReadCredentials(&$iErrorCode)
|
||||
{
|
||||
if ($_SESSION['login_mode'] == 'basic')
|
||||
if (!isset($_SESSION['login_mode']) || $_SESSION['login_mode'] == 'basic')
|
||||
{
|
||||
list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword();
|
||||
$_SESSION['login_temp_auth_user'] = $sAuthUser;
|
||||
@@ -92,9 +96,19 @@ class LoginBasic extends AbstractLoginFSMExtension
|
||||
{
|
||||
$sAuthUser = '';
|
||||
$sAuthPwd = null;
|
||||
$sAuthorization = '';
|
||||
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION']))
|
||||
{
|
||||
list($sAuthUser, $sAuthPwd) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
|
||||
$sAuthorization = $_SERVER['HTTP_AUTHORIZATION'];
|
||||
}
|
||||
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
||||
{
|
||||
$sAuthorization = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
||||
}
|
||||
|
||||
if (!empty($sAuthorization))
|
||||
{
|
||||
list($sAuthUser, $sAuthPwd) = explode(':', base64_decode(substr($sAuthorization, 6)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -121,4 +135,4 @@ class LoginBasic extends AbstractLoginFSMExtension
|
||||
}
|
||||
return array($sAuthUser, $sAuthPwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,15 @@ class LoginExternal extends AbstractLoginFSMExtension
|
||||
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||
}
|
||||
|
||||
protected function OnError(&$iErrorCode)
|
||||
{
|
||||
if ($_SESSION['login_mode'] == 'external')
|
||||
{
|
||||
LoginWebPage::HTTP401Error();
|
||||
}
|
||||
return LoginWebPage::LOGIN_FSM_CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -790,12 +790,13 @@ class LoginWebPage extends NiceWebPage
|
||||
$oPerson = null;
|
||||
try
|
||||
{
|
||||
$sOrigin = 'External User provisioning';
|
||||
CMDBObject::SetTrackOrigin('custom-extension');
|
||||
$sInfo = 'External User provisioning';
|
||||
if (isset($_SESSION['login_mode']))
|
||||
{
|
||||
$sOrigin .= " ({$_SESSION['login_mode']})";
|
||||
$sInfo .= " ({$_SESSION['login_mode']})";
|
||||
}
|
||||
CMDBObject::SetTrackOrigin($sOrigin);
|
||||
CMDBObject::SetTrackInfo($sInfo);
|
||||
|
||||
$oPerson = MetaModel::NewObject('Person');
|
||||
$oPerson->Set('first_name', $sFirstName);
|
||||
@@ -843,6 +844,14 @@ class LoginWebPage extends NiceWebPage
|
||||
$oUser = null;
|
||||
try
|
||||
{
|
||||
CMDBObject::SetTrackOrigin('custom-extension');
|
||||
$sInfo = 'External User provisioning';
|
||||
if (isset($_SESSION['login_mode']))
|
||||
{
|
||||
$sInfo .= " ({$_SESSION['login_mode']})";
|
||||
}
|
||||
CMDBObject::SetTrackInfo($sInfo);
|
||||
|
||||
$oUser = MetaModel::GetObjectByName('UserExternal', $sAuthUser, false);
|
||||
if (is_null($oUser))
|
||||
{
|
||||
@@ -985,7 +994,7 @@ class LoginWebPage extends NiceWebPage
|
||||
else
|
||||
{
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
$oP = new SetupPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP->add("<h1>".Dict::S('UI:Login:Error:AccessAdmin')."</h1>\n");
|
||||
$oP->p("<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/logoff.php\">".Dict::S('UI:LogOffMenu')."</a>");
|
||||
$oP->output();
|
||||
|
||||
@@ -34,7 +34,7 @@ function _MaintenanceSetupPageMessage($sTitle, $sMessage)
|
||||
@include_once(APPROOT.'setup/setuppage.class.inc.php');
|
||||
if (class_exists('SetupPage'))
|
||||
{
|
||||
$oP = new SetupPage($sTitle);
|
||||
$oP = new ErrorPage($sTitle);
|
||||
$oP->p("<h2 class=\"center\">$sMessage</h2>");
|
||||
$oP->add_ready_script(
|
||||
<<<JS
|
||||
|
||||
@@ -128,7 +128,7 @@ class ApplicationMenu
|
||||
if (is_null($oMenuNode) || !$oMenuNode->IsEnabled())
|
||||
{
|
||||
require_once(APPROOT.'/setup/setuppage.class.inc.php');
|
||||
$oP = new SetupPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
|
||||
$oP->add("<h1>".Dict::S('UI:Login:Error:AccessRestricted')."</h1>\n");
|
||||
$oP->p("<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/logoff.php\">".Dict::S('UI:LogOffMenu')."</a>");
|
||||
$oP->output();
|
||||
|
||||
@@ -636,15 +636,22 @@ HTML
|
||||
$oSet->SetShowObsoleteData(utils::ShowObsoleteData());
|
||||
|
||||
$sHKAttCode = MetaModel::IsHierarchicalClass($this->sTargetClass);
|
||||
$this->DumpTree($oPage, $oSet, $sHKAttCode, $currValue);
|
||||
$bHasChildLeafs = $this->DumpTree($oPage, $oSet, $sHKAttCode, $currValue);
|
||||
|
||||
$oPage->add('</td></tr></table>');
|
||||
$oPage->add('</div>');
|
||||
|
||||
if ($bHasChildLeafs)
|
||||
{
|
||||
$oPage->add('<div class="treecontrol" id="treecontrolid"><a href="?#">'.Dict::S("UI:Treeview:CollapseAll").'</a> | <a href="?#">'.Dict::S("UI:Treeview:ExpandAll").'</a></div>');
|
||||
}
|
||||
|
||||
$oPage->add("<input type=\"button\" id=\"btn_cancel_{$this->iId}\" value=\"".Dict::S('UI:Button:Cancel')."\" onClick=\"$('#dlg_tree_{$this->iId}').dialog('close');\"> ");
|
||||
$oPage->add("<input type=\"button\" id=\"btn_ok_{$this->iId}\" value=\"".Dict::S('UI:Button:Ok')."\" onClick=\"oACWidget_{$this->iId}.DoHKOk();\">");
|
||||
|
||||
$oPage->add('</div></div>');
|
||||
$oPage->add_ready_script("\$('#tree_$this->iId ul').treeview();\n");
|
||||
|
||||
$oPage->add_ready_script("\$('#tree_$this->iId ul').treeview({ control: '#treecontrolid', persist: 'false'});\n");
|
||||
$oPage->add_ready_script("\$('#dlg_tree_$this->iId').dialog({ width: 'auto', height: 'auto', autoOpen: true, modal: true, title: '$sDialogTitle', resizeStop: oACWidget_{$this->iId}.OnHKResize, close: oACWidget_{$this->iId}.OnHKClose });\n");
|
||||
}
|
||||
|
||||
@@ -673,6 +680,18 @@ HTML
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param WebPage $oP
|
||||
* @param \DBObjectSet $oSet
|
||||
* @param string $sParentAttCode
|
||||
* @param string $currValue
|
||||
*
|
||||
* @return bool true if there are at least one child leaf, false if only roots nodes are present
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
function DumpTree($oP, $oSet, $sParentAttCode, $currValue)
|
||||
{
|
||||
$aTree = array();
|
||||
@@ -701,6 +720,9 @@ HTML
|
||||
{
|
||||
$this->DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue);
|
||||
}
|
||||
|
||||
$bHasOnlyRootNodes = (count($aTree) === 1);
|
||||
return !$bHasOnlyRootNodes;
|
||||
}
|
||||
|
||||
function DumpNodes($oP, $iRootId, $aTree, $aNodes, $currValue)
|
||||
@@ -728,7 +750,7 @@ HTML
|
||||
$sSelect = '<input id="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'" type="radio" value="'.$aNodes[$id]->GetKey().'" name="selectObject" '.$sChecked.'> ';
|
||||
}
|
||||
}
|
||||
$oP->add('<li>'.$sSelect.'<label for="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'">'.$aNodes[$id]->GetName().'</label>');
|
||||
$oP->add('<li class="closed">'.$sSelect.'<label for="input_'.$fUniqueId.'_'.$aNodes[$id]->GetKey().'">'.$aNodes[$id]->GetName().'</label>');
|
||||
$this->DumpNodes($oP, $id, $aTree, $aNodes, $currValue);
|
||||
$oP->add("</li>\n");
|
||||
}
|
||||
|
||||
@@ -491,6 +491,18 @@ class utils
|
||||
|
||||
// Paginated selection
|
||||
$aSelectedIds = utils::ReadParam('storedSelection', array());
|
||||
$aSelectedObjIds = utils::ReadParam('selectObject', array());
|
||||
|
||||
//it means that the user has selected all the results of the search query
|
||||
if (count($aSelectedObjIds) > 0 )
|
||||
{
|
||||
$sFilter=utils::ReadParam("sFilter",'',false,'raw_data');
|
||||
if ($sFilter!='')
|
||||
{
|
||||
$oFullSetFilter=DBSearch::unserialize($sFilter);
|
||||
|
||||
}
|
||||
}
|
||||
if (count($aSelectedIds) > 0 )
|
||||
{
|
||||
if ($sSelectionMode == 'positive')
|
||||
@@ -2182,7 +2194,7 @@ class utils
|
||||
* * not contained in base path
|
||||
* Otherwise return the real path (see realpath())
|
||||
*
|
||||
* @since 2.7.0 N°2538
|
||||
* @since 2.6.5 2.7.0 N°2538
|
||||
*/
|
||||
final public static function RealPath($sPath, $sBasePath)
|
||||
{
|
||||
|
||||
@@ -1584,7 +1584,7 @@ EOF
|
||||
$sTabs .= "<div class=\"printable-tab\" id=\"$sTabId\"><h2 class=\"printable-tab-title\">$sTabTitleForHtml</h2><div class=\"printable-tab-content\">".$sTabHtml."</div></div>\n";
|
||||
$oPage->add_ready_script(
|
||||
<<< EOF
|
||||
oHiddeableChapters['$sTabId'] = '$sTabCodeForJs';
|
||||
oHiddeableChapters['$sTabId'] = '$sTabTitleForHtml';
|
||||
EOF
|
||||
);
|
||||
$i++;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"ext-json": "*",
|
||||
"ext-mysqli": "*",
|
||||
"ext-soap": "*",
|
||||
"combodo/tcpdf": "6.3.4",
|
||||
"combodo/tcpdf": "6.3.5",
|
||||
"nikic/php-parser": "^3.1",
|
||||
"pear/archive_tar": "1.4.9",
|
||||
"pelago/emogrifier": "2.1.0",
|
||||
|
||||
12
composer.lock
generated
12
composer.lock
generated
@@ -4,20 +4,20 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "b29eb2767d269b9ec2cf4d148dc083bc",
|
||||
"content-hash": "ad359769d05acd25a9fc31d69acbe43a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "combodo/tcpdf",
|
||||
"version": "6.3.4",
|
||||
"version": "6.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
|
||||
"reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d"
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
|
||||
"reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
|
||||
"url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"reference": "abbfedb8ca59843dec11c97ca3f308742265c3fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -64,7 +64,7 @@
|
||||
],
|
||||
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
|
||||
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
|
||||
"time": "2020-02-12T14:16:56+00:00"
|
||||
"time": "2020-06-05T13:06:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<authorization>
|
||||
<deny users="*" /> <!-- Denies all users -->
|
||||
</authorization>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<fileExtensions applyToWebDAV="false" allowUnlisted="false"></fileExtensions>
|
||||
</requestFiltering>
|
||||
<authorization>
|
||||
<deny users="*" /> <!-- Denies all users -->
|
||||
</authorization>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
@@ -156,7 +156,7 @@ abstract class AttributeDefinition
|
||||
*/
|
||||
public function IsSearchable()
|
||||
{
|
||||
return static::SEARCH_WIDGET_TYPE != static::SEARCH_WIDGET_TYPE_RAW;
|
||||
return $this->GetSearchType() != static::SEARCH_WIDGET_TYPE_RAW;
|
||||
}
|
||||
|
||||
/** @var string */
|
||||
@@ -7015,6 +7015,15 @@ class AttributeExternalField extends AttributeDefinition
|
||||
return self::SEARCH_WIDGET_TYPE_RAW;
|
||||
}
|
||||
|
||||
function IsSearchable()
|
||||
{
|
||||
if ($this->IsFriendlyName())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return parent::IsSearchable();
|
||||
}
|
||||
|
||||
public static function ListExpectedParams()
|
||||
{
|
||||
return array_merge(parent::ListExpectedParams(), array("extkey_attcode", "target_attcode"));
|
||||
@@ -7706,10 +7715,17 @@ class AttributeBlob extends AttributeDefinition
|
||||
// (temporary tables created on disk)
|
||||
// We will have to remove the blobs from the list of attributes when doing the select
|
||||
// then the use of Get() should finalize the load
|
||||
if ($value instanceOf ormDocument && !$value->IsEmpty())
|
||||
if ($value instanceOf ormDocument)
|
||||
{
|
||||
$aValues = array();
|
||||
$aValues[$this->GetCode().'_data'] = $value->GetData();
|
||||
if (!$value->IsEmpty())
|
||||
{
|
||||
$aValues[$this->GetCode().'_data'] = $value->GetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
$aValues[$this->GetCode().'_data'] = '';
|
||||
}
|
||||
$aValues[$this->GetCode().'_mimetype'] = $value->GetMimeType();
|
||||
$aValues[$this->GetCode().'_filename'] = $value->GetFileName();
|
||||
}
|
||||
@@ -9625,7 +9641,7 @@ class AttributePropertySet extends AttributeTable
|
||||
$sValue = '*****';
|
||||
}
|
||||
$sRes .= "<TR>";
|
||||
$sCell = str_replace("\n", "<br>\n", Str::pure2html((string)$sValue));
|
||||
$sCell = str_replace("\n", "<br>\n", Str::pure2html(@(string)$sValue));
|
||||
$sRes .= "<TD class=\"label\">$sProperty</TD><TD>$sCell</TD>";
|
||||
$sRes .= "</TR>";
|
||||
}
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
<?php
|
||||
// Copyright (C) 2010-2013 Combodo SARL
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// iTop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
|
||||
/**
|
||||
* interface iProcess
|
||||
* Something that can be executed
|
||||
* Copyright (C) 2010-2020 Combodo SARL
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2012 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
|
||||
interface iProcess
|
||||
{
|
||||
/**
|
||||
@@ -78,21 +72,27 @@ interface iScheduledProcess extends iProcess
|
||||
* * week_days
|
||||
* * time
|
||||
*
|
||||
* Param names and some of their default values are in constant that can be overriden.
|
||||
* Param names and some of their default values are in constant that can be overridden.
|
||||
*
|
||||
* Other info (module name and time default value) should be provided using a method that needs to be implemented.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @since 2.7.0 PR #89
|
||||
* @since 2.7.0-2 N°2580 Fix {@link GetNextOccurrence} returning wrong value
|
||||
*/
|
||||
abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
{
|
||||
// param have default names/values but can be overriden
|
||||
// param have default names/values but can be overridden
|
||||
const MODULE_SETTING_ENABLED = 'enabled';
|
||||
const DEFAULT_MODULE_SETTING_ENABLED = true;
|
||||
const MODULE_SETTING_WEEKDAYS = 'week_days';
|
||||
const DEFAULT_MODULE_SETTING_WEEKDAYS = 'monday, tuesday, wednesday, thursday, friday, saturday, sunday';
|
||||
const MODULE_SETTING_TIME = 'time';
|
||||
|
||||
/**
|
||||
* @var Config can be used to mock config for tests
|
||||
*/
|
||||
protected $oConfig;
|
||||
|
||||
/**
|
||||
* Module must be declared in each implementation
|
||||
*
|
||||
@@ -106,6 +106,20 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
*/
|
||||
abstract protected function GetDefaultModuleSettingTime();
|
||||
|
||||
/**
|
||||
* @return \Config
|
||||
*/
|
||||
public function getOConfig()
|
||||
{
|
||||
if (!isset($this->oConfig))
|
||||
{
|
||||
$this->oConfig = MetaModel::GetConfig();
|
||||
}
|
||||
|
||||
return $this->oConfig;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Interpret current setting for the week days
|
||||
*
|
||||
@@ -124,7 +138,7 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
'sunday' => 7,
|
||||
);
|
||||
$aDays = array();
|
||||
$sWeekDays = MetaModel::GetConfig()->GetModuleSetting(
|
||||
$sWeekDays = $this->getOConfig()->GetModuleSetting(
|
||||
$this->GetModuleName(),
|
||||
static::MODULE_SETTING_WEEKDAYS,
|
||||
static::DEFAULT_MODULE_SETTING_WEEKDAYS
|
||||
@@ -157,21 +171,26 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the exact time at which the process must be run next time
|
||||
* @param string $sCurrentTime Date string to extract time dependency
|
||||
* this parameter is not present in the interface but as it is optional it's ok
|
||||
*
|
||||
* @return DateTime
|
||||
* @throws Exception
|
||||
* @return DateTime the exact time at which the process must be run next time
|
||||
* @throws \ProcessInvalidConfigException
|
||||
*/
|
||||
public function GetNextOccurrence()
|
||||
public function GetNextOccurrence($sCurrentTime = 'now')
|
||||
{
|
||||
$bEnabled = MetaModel::GetConfig()->GetModuleSetting(
|
||||
$bEnabled = $this->getOConfig()->GetModuleSetting(
|
||||
$this->GetModuleName(),
|
||||
static::MODULE_SETTING_ENABLED,
|
||||
static::DEFAULT_MODULE_SETTING_ENABLED
|
||||
);
|
||||
|
||||
$sItopTimeZone = $this->getOConfig()->Get('timezone');
|
||||
$timezone = new DateTimeZone($sItopTimeZone);
|
||||
|
||||
if (!$bEnabled)
|
||||
{
|
||||
return new DateTime('3000-01-01');
|
||||
return new DateTime('3000-01-01', $timezone);
|
||||
}
|
||||
|
||||
// 1st - Interpret the list of days as ordered numbers (monday = 1)
|
||||
@@ -180,7 +199,7 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
|
||||
// 2nd - Find the next active week day
|
||||
//
|
||||
$sProcessTime = MetaModel::GetConfig()->GetModuleSetting(
|
||||
$sProcessTime = $this->getOConfig()->GetModuleSetting(
|
||||
$this->GetModuleName(),
|
||||
static::MODULE_SETTING_TIME,
|
||||
static::GetDefaultModuleSettingTime()
|
||||
@@ -189,9 +208,11 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
{
|
||||
throw new ProcessInvalidConfigException($this->GetModuleName().": wrong format for setting '".static::MODULE_SETTING_TIME."' (found '$sProcessTime')");
|
||||
}
|
||||
$oNow = new DateTime();
|
||||
|
||||
$oNow = new DateTime($sCurrentTime, $timezone);
|
||||
$iNextPos = false;
|
||||
for ($iDay = $oNow->format('N'); $iDay <= 7; $iDay++)
|
||||
$sDay = $oNow->format('N');
|
||||
for ($iDay = (int) $sDay; $iDay <= 7; $iDay++)
|
||||
{
|
||||
$iNextPos = array_search($iDay, $aDays, true);
|
||||
if ($iNextPos !== false)
|
||||
@@ -223,6 +244,7 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
$oRet->modify('+'.$iMove.' days');
|
||||
}
|
||||
list($sHours, $sMinutes) = explode(':', $sProcessTime);
|
||||
/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection non used new parameter in PHP 7.1 */
|
||||
$oRet->setTime((int)$sHours, (int)$sMinutes);
|
||||
|
||||
return $oRet;
|
||||
@@ -241,13 +263,14 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
|
||||
/**
|
||||
* Exception for {@link iProcess} implementations.<br>
|
||||
* An error happened during the processing but we can go on with the next implementations.
|
||||
* @since 2.5.0 N°1195
|
||||
*/
|
||||
class ProcessException extends CoreException
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7.0
|
||||
* @since 2.7.0 PR #89
|
||||
*/
|
||||
class ProcessInvalidConfigException extends ProcessException
|
||||
{
|
||||
@@ -257,6 +280,7 @@ class ProcessInvalidConfigException extends ProcessException
|
||||
* Class ProcessFatalException
|
||||
* Exception for iProcess implementations.<br>
|
||||
* A big error occurred, we have to stop the iProcess processing.
|
||||
* @since 2.5.0 N°1195
|
||||
*/
|
||||
class ProcessFatalException extends CoreException
|
||||
{
|
||||
|
||||
@@ -544,7 +544,7 @@ class CMDBChangeOpSetAttributeEncrypted extends CMDBChangeOpSetAttribute
|
||||
// The attribute was renamed or removed from the object ?
|
||||
$sAttName = $this->Get('attcode');
|
||||
}
|
||||
$sPrevString = $this->Get('prevstring');
|
||||
$sPrevString = $this->GetAsHTML('prevstring');
|
||||
$sResult = Dict::Format('Change:AttName_Changed_PreviousValue_OldValue', $sAttName, $sPrevString);
|
||||
}
|
||||
return $sResult;
|
||||
|
||||
@@ -119,7 +119,18 @@ class CMDBSource
|
||||
const ENUM_DB_VENDOR_MYSQL = 'MySQL';
|
||||
const ENUM_DB_VENDOR_MARIADB = 'MariaDB';
|
||||
const ENUM_DB_VENDOR_PERCONA = 'Percona';
|
||||
|
||||
|
||||
/**
|
||||
* Error: 1205 SQLSTATE: HY000 (ER_LOCK_WAIT_TIMEOUT)
|
||||
* Message: Lock wait timeout exceeded; try restarting transaction
|
||||
*/
|
||||
const MYSQL_ERRNO_WAIT_TIMEOUT = 1205;
|
||||
/**
|
||||
* Error: 1213 SQLSTATE: 40001 (ER_LOCK_DEADLOCK)
|
||||
* Message: Deadlock found when trying to get lock; try restarting transaction
|
||||
*/
|
||||
const MYSQL_ERRNO_DEADLOCK = 1213;
|
||||
|
||||
protected static $m_sDBHost;
|
||||
protected static $m_sDBUser;
|
||||
protected static $m_sDBPwd;
|
||||
@@ -661,6 +672,7 @@ class CMDBSource
|
||||
}
|
||||
catch (mysqli_sql_exception $e)
|
||||
{
|
||||
self::LogDeadLock($e);
|
||||
throw new MySQLException('Failed to issue SQL query', array('query' => $sSql, $e));
|
||||
}
|
||||
$oKPI->ComputeStats('Query exec (mySQL)', $sSql);
|
||||
@@ -674,13 +686,55 @@ class CMDBSource
|
||||
{
|
||||
throw new MySQLHasGoneAwayException(self::GetError(), $aContext);
|
||||
}
|
||||
|
||||
throw new MySQLException('Failed to issue SQL query', $aContext);
|
||||
$e = new MySQLException('Failed to issue SQL query', $aContext);
|
||||
self::LogDeadLock($e);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $oResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Exception $e
|
||||
*
|
||||
* @since 2.7.1
|
||||
*/
|
||||
private static function LogDeadLock(Exception $e)
|
||||
{
|
||||
// checks MySQL error code
|
||||
$iMySqlErrorNo = self::$m_oMysqli->errno;
|
||||
if (!in_array($iMySqlErrorNo, array(self::MYSQL_ERRNO_WAIT_TIMEOUT, self::MYSQL_ERRNO_DEADLOCK)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get error info
|
||||
$sUser = UserRights::GetUser();
|
||||
$oError = self::$m_oMysqli->query('SHOW ENGINE INNODB STATUS');
|
||||
if ($oError !== false)
|
||||
{
|
||||
$aData = $oError->fetch_all(MYSQLI_ASSOC);
|
||||
$sInnodbStatus = $aData[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sInnodbStatus = 'Get status query cannot execute';
|
||||
}
|
||||
|
||||
// log !
|
||||
$sMessage = "deadlock detected: user= $sUser; errno=$iMySqlErrorNo";
|
||||
$aLogContext = array(
|
||||
'userinfo' => $sUser,
|
||||
'errno' => $iMySqlErrorNo,
|
||||
'ex_msg' => $e->getMessage(),
|
||||
'callstack' => $e->getTraceAsString(),
|
||||
'data' => $sInnodbStatus,
|
||||
);
|
||||
DeadLockLog::Info($sMessage, $iMySqlErrorNo, $aLogContext);
|
||||
|
||||
IssueLog::Error($sMessage, 'DeadLock', $e->getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* If nested transaction, we are not starting a new one : only one global transaction will exist.
|
||||
*
|
||||
@@ -1194,9 +1248,9 @@ class CMDBSource
|
||||
*/
|
||||
private static function GetFieldDataTypeAndOptions($sCompleteFieldType)
|
||||
{
|
||||
preg_match('/^([a-zA-Z]+)(\(([^\)]+)\))?( .+)?$/', $sCompleteFieldType, $aMatches);
|
||||
preg_match('/^([a-zA-Z]+)(\(([^\)]+)\))?( .+)?/', $sCompleteFieldType, $aMatches);
|
||||
|
||||
$sDataType = $aMatches[1];
|
||||
$sDataType = isset($aMatches[1]) ? $aMatches[1] : '';
|
||||
$sTypeOptions = isset($aMatches[2]) ? $aMatches[3] : '';
|
||||
$sOtherOptions = isset($aMatches[4]) ? $aMatches[4] : '';
|
||||
|
||||
|
||||
@@ -2914,9 +2914,9 @@ abstract class DBObject implements iDisplay
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Persist an object to the DB, for the first time
|
||||
*
|
||||
/**
|
||||
* Persist an object to the DB, for the first time
|
||||
*
|
||||
* @api
|
||||
* @see DBWrite
|
||||
*
|
||||
@@ -3695,21 +3695,38 @@ abstract class DBObject implements iDisplay
|
||||
*/
|
||||
public function ApplyStimulus($sStimulusCode, $bDoNotWrite = false)
|
||||
{
|
||||
$sStateAttCode = MetaModel::GetStateAttributeCode(get_class($this));
|
||||
$sClass = get_class($this);
|
||||
$sStateAttCode = MetaModel::GetStateAttributeCode($sClass);
|
||||
if (empty($sStateAttCode))
|
||||
{
|
||||
throw new CoreException('No lifecycle for the class '.get_class($this));
|
||||
throw new CoreException('No lifecycle for the class '.$sClass);
|
||||
}
|
||||
|
||||
MyHelpers::CheckKeyInArray('object lifecycle stimulus', $sStimulusCode, MetaModel::EnumStimuli(get_class($this)));
|
||||
MyHelpers::CheckKeyInArray('object lifecycle stimulus', $sStimulusCode, MetaModel::EnumStimuli($sClass));
|
||||
|
||||
$aStateTransitions = $this->EnumTransitions();
|
||||
if (!array_key_exists($sStimulusCode, $aStateTransitions))
|
||||
{
|
||||
// This simulus has no effect in the current state... do nothing
|
||||
IssueLog::Error(get_class($this).": Transition $sStimulusCode is not allowed in ".$this->Get($sStateAttCode));
|
||||
// This stimulus has no effect in the current state... do nothing
|
||||
IssueLog::Error("$sClass: Transition $sStimulusCode is not allowed in ".$this->Get($sStateAttCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
// save current object values in case of an action failure (in memory rollback)
|
||||
$aBackupValues = array();
|
||||
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
$value = $this->m_aCurrValues[$sAttCode];
|
||||
if (is_object($value))
|
||||
{
|
||||
$aBackupValues[$sAttCode] = clone $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
$aBackupValues[$sAttCode] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$aTransitionDef = $aStateTransitions[$sStimulusCode];
|
||||
|
||||
// Change the state before proceeding to the actions, this is necessary because an action might
|
||||
@@ -3728,11 +3745,11 @@ abstract class DBObject implements iDisplay
|
||||
{
|
||||
// Old (pre-2.1.0 modules) action definition without any parameter
|
||||
$aActionCallSpec = array($this, $actionHandler);
|
||||
$sActionDesc = get_class($this).'::'.$actionHandler;
|
||||
$sActionDesc = $sClass.'::'.$actionHandler;
|
||||
|
||||
if (!is_callable($aActionCallSpec))
|
||||
{
|
||||
throw new CoreException("Unable to call action: ".get_class($this)."::$actionHandler");
|
||||
throw new CoreException("Unable to call action: $sClass::$actionHandler");
|
||||
}
|
||||
$bRet = call_user_func($aActionCallSpec, $sStimulusCode);
|
||||
}
|
||||
@@ -3740,7 +3757,7 @@ abstract class DBObject implements iDisplay
|
||||
{
|
||||
// New syntax: 'verb' and typed parameters
|
||||
$sAction = $actionHandler['verb'];
|
||||
$sActionDesc = get_class($this).'::'.$sAction;
|
||||
$sActionDesc = "$sClass::$sAction";
|
||||
$aParams = array();
|
||||
foreach($actionHandler['params'] as $aDefinition)
|
||||
{
|
||||
@@ -3776,14 +3793,12 @@ abstract class DBObject implements iDisplay
|
||||
// (in case there is no returned value, null is obtained and means "ok")
|
||||
if ($bRet === false)
|
||||
{
|
||||
IssueLog::Info("Lifecycle action $sActionDesc returned false on object #".$this->GetKey());
|
||||
IssueLog::Info("Lifecycle action $sActionDesc returned false on object #$sClass:".$this->GetKey());
|
||||
$bSuccess = false;
|
||||
}
|
||||
}
|
||||
if ($bSuccess)
|
||||
{
|
||||
$sClass = get_class($this);
|
||||
|
||||
// Stop watches
|
||||
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
@@ -3826,6 +3841,14 @@ abstract class DBObject implements iDisplay
|
||||
$oTrigger->DoActivate($this->ToArgs('this'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// At least one action failed, rollback the object value to its previous value
|
||||
foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
$this->m_aCurrValues[$sAttCode] = $aBackupValues[$sAttCode];
|
||||
}
|
||||
}
|
||||
|
||||
return $bSuccess;
|
||||
}
|
||||
@@ -3851,7 +3874,32 @@ abstract class DBObject implements iDisplay
|
||||
*/
|
||||
public function Copy($sDestAttCode, $sSourceAttCode)
|
||||
{
|
||||
$this->Set($sDestAttCode, $this->Get($sSourceAttCode));
|
||||
$oTypeValueToCopy = MetaModel::GetAttributeDef(get_class($this), $sSourceAttCode);
|
||||
$oTypeValueDest = MetaModel::GetAttributeDef(get_class($this), $sDestAttCode);
|
||||
if ($oTypeValueToCopy instanceof AttributeText && $oTypeValueDest instanceof AttributeText)
|
||||
{
|
||||
if ($oTypeValueToCopy->GetFormat() == $oTypeValueDest->GetFormat())
|
||||
{
|
||||
$sValueToCopy = $this->Get($sSourceAttCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($oTypeValueToCopy->GetFormat() == 'text')// and $oTypeValueDest->GetFormat()=='HTML'
|
||||
{
|
||||
$sValueToCopy = $this->GetAsHTML($sSourceAttCode);
|
||||
}
|
||||
else
|
||||
{// $oTypeValueToCopy->GetFormat() == 'HTML' and $oTypeValueDest->GetFormat()=='Text'
|
||||
$sValueToCopy = utils::HtmlToText($this->Get($sSourceAttCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sValueToCopy = $this->Get($sSourceAttCode);
|
||||
}
|
||||
$this->Set($sDestAttCode, $sValueToCopy);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5209,10 +5257,6 @@ abstract class DBObject implements iDisplay
|
||||
throw new Exception('Missing argument #1: stimulus');
|
||||
}
|
||||
$sStimulus = $aParams[0];
|
||||
if (!in_array($sStimulus, MetaModel::EnumStimuli(get_class($this))))
|
||||
{
|
||||
throw new Exception("Unknown stimulus ".get_class($this)."::".$sStimulus);
|
||||
}
|
||||
$this->ApplyStimulus($sStimulus);
|
||||
break;
|
||||
|
||||
|
||||
@@ -223,9 +223,9 @@ class DBObjectSearch extends DBSearch
|
||||
public function RenameAlias($sOldName, $sNewName)
|
||||
{
|
||||
$bFound = false;
|
||||
if (array_key_exists($sOldName, $this->m_aClasses))
|
||||
if (!array_key_exists($sOldName, $this->m_aClasses))
|
||||
{
|
||||
$bFound = true;
|
||||
return false;
|
||||
}
|
||||
if (array_key_exists($sNewName, $this->m_aClasses))
|
||||
{
|
||||
@@ -313,6 +313,11 @@ class DBObjectSearch extends DBSearch
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move conditions from $oFilter to $this
|
||||
* @param \DBSearch $oFilter
|
||||
* @param $aTranslation
|
||||
*/
|
||||
protected function TransferConditionExpression($oFilter, $aTranslation)
|
||||
{
|
||||
// Prevent collisions in the parameter names by renaming them if needed
|
||||
@@ -335,6 +340,7 @@ class DBObjectSearch extends DBSearch
|
||||
$oTranslated = $oFilter->GetCriteria()->Translate($aTranslation, false, false /* leave unresolved fields */);
|
||||
$this->AddConditionExpression($oTranslated);
|
||||
$this->m_aParams = array_merge($this->m_aParams, $oFilter->m_aParams);
|
||||
$oFilter->ResetCondition();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
@@ -522,6 +528,8 @@ class DBObjectSearch extends DBSearch
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for IN / NOT IN conditions : values won't be parsed in the expression tree, that will save some time !
|
||||
*
|
||||
* @param string $sFilterCode attribute code to use
|
||||
* @param array $aValues
|
||||
* @param bool $bPositiveMatch if true will add a IN filter, else a NOT IN
|
||||
@@ -632,7 +640,10 @@ class DBObjectSearch extends DBSearch
|
||||
|
||||
$oNewCond = new BinaryExpression($oTextFields, 'LIKE', $oFlexNeedle);
|
||||
$this->AddConditionExpression($oNewCond);
|
||||
$this->m_aParams[$sQueryParam] = $sNeedle;
|
||||
//replace in order to search the character "_" ("_" in mysql is like "%" for only one character).
|
||||
$sFullText = str_replace('_', '\_', $sNeedle);
|
||||
|
||||
$this->m_aParams[$sQueryParam] = $sFullText;
|
||||
}
|
||||
|
||||
protected function AddToNameSpace(&$aClassAliases, &$aAliasTranslation, $bTranslateMainAlias = true)
|
||||
@@ -1036,7 +1047,7 @@ class DBObjectSearch extends DBSearch
|
||||
public function Filter($sClassAlias, DBSearch $oFilter)
|
||||
{
|
||||
// If the conditions are the correct ones for Intersect
|
||||
if (($this->GetFirstJoinedClass() == $oFilter->GetFirstJoinedClass()))
|
||||
if (MetaModel::IsParentClass($oFilter->GetFirstJoinedClass(),$this->GetFirstJoinedClass()))
|
||||
{
|
||||
return $this->Intersect($oFilter);
|
||||
}
|
||||
@@ -1068,7 +1079,6 @@ class DBObjectSearch extends DBSearch
|
||||
{
|
||||
if (($oSearch->GetFirstJoinedClassAlias() == $sClassAlias))
|
||||
{
|
||||
$oSearch->ResetCondition();
|
||||
$oSearch = $oSearch->IntersectSubClass($oFilter, $aRootClasses);
|
||||
return $oSearch->GetCriteria();
|
||||
}
|
||||
@@ -2087,4 +2097,9 @@ class DBObjectSearch extends DBSearch
|
||||
}
|
||||
return $oExpression;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return $this->GetCriteria()->ListParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ class DBObjectSet implements iDBObjectSetIterator
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param bool $bWithId
|
||||
* @param bool $bWithId if true array key will be set to object id
|
||||
*
|
||||
* @return DBObject[]
|
||||
*
|
||||
|
||||
@@ -507,6 +507,7 @@ abstract class DBSearch
|
||||
}
|
||||
else
|
||||
{
|
||||
/** @var \DBObjectSearch $oFilter */
|
||||
if ($iDirection === static::JOIN_POINTING_TO)
|
||||
{
|
||||
$oSourceFilter->AddCondition_PointingTo($oFilter, $sExtKeyAttCode, $iOperatorCode, $aRealiasingMap);
|
||||
@@ -979,7 +980,7 @@ abstract class DBSearch
|
||||
$aAttToLoad = array();
|
||||
$oSQLQuery = $oQueryFilter->GetSQLQuery(array(), $aArgs, $aAttToLoad, null, 0, 0, false, $aGroupByExpr, $aSelectExpr);
|
||||
|
||||
$aScalarArgs = MetaModel::PrepareQueryArguments($aArgs, $this->GetInternalParams());
|
||||
$aScalarArgs = MetaModel::PrepareQueryArguments($aArgs, $this->GetInternalParams(), $this->GetExpectedArguments());
|
||||
try
|
||||
{
|
||||
$bBeautifulSQL = self::$m_bTraceQueries || self::$m_bDebugQuery || self::$m_bIndentQueries;
|
||||
@@ -997,6 +998,10 @@ abstract class DBSearch
|
||||
return $sRes;
|
||||
}
|
||||
|
||||
function GetExpectedArguments()
|
||||
{
|
||||
return $this->GetCriteria()->ListParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a SQL query from the current search
|
||||
@@ -1076,7 +1081,7 @@ abstract class DBSearch
|
||||
else
|
||||
{
|
||||
// The complete list of arguments will include magic arguments (e.g. current_user->attcode)
|
||||
$aScalarArgs = MetaModel::PrepareQueryArguments($aArgs, $this->GetInternalParams());
|
||||
$aScalarArgs = MetaModel::PrepareQueryArguments($aArgs, $this->GetInternalParams(), $this->GetExpectedArguments());
|
||||
}
|
||||
try
|
||||
{
|
||||
@@ -1174,8 +1179,7 @@ abstract class DBSearch
|
||||
if (is_object($oVisibleObjects))
|
||||
{
|
||||
$oVisibleObjects->AllowAllData();
|
||||
$oSearch = $this->Filter($sClassAlias, $oVisibleObjects);
|
||||
/** @var DBSearch $oSearch */
|
||||
$oSearch = $oSearch->Filter($sClassAlias, $oVisibleObjects);
|
||||
$oSearch->SetDataFiltered();
|
||||
}
|
||||
}
|
||||
@@ -1226,6 +1230,8 @@ abstract class DBSearch
|
||||
*/
|
||||
public abstract function GetCriteria();
|
||||
|
||||
public abstract function ListParameters();
|
||||
|
||||
/**
|
||||
* Shortcut to add efficient IN condition
|
||||
*
|
||||
|
||||
@@ -667,6 +667,16 @@ class DBUnionSearch extends DBSearch
|
||||
return $oSQLQuery;
|
||||
}
|
||||
|
||||
function GetExpectedArguments()
|
||||
{
|
||||
$aVariableCriteria = array();
|
||||
foreach ($this->aSearches as $oSearch)
|
||||
{
|
||||
$aVariableCriteria = array_merge($aVariableCriteria, $oSearch->GetExpectedArguments());
|
||||
}
|
||||
|
||||
return $aVariableCriteria;
|
||||
}
|
||||
/**
|
||||
* @return \Expression
|
||||
*/
|
||||
@@ -718,4 +728,14 @@ class DBUnionSearch extends DBSearch
|
||||
$oSearch->AddConditionExpression($oInCondition);
|
||||
}
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aParameters = array();
|
||||
foreach ($this->aSearches as $oSearch)
|
||||
{
|
||||
$aParameters = array_merge($aParameters, $oSearch->ListParameters());
|
||||
}
|
||||
return $aParameters;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,8 +304,12 @@ class EMail
|
||||
$oHeaders = $this->m_oMessage->getHeaders();
|
||||
switch(strtolower($sKey))
|
||||
{
|
||||
case 'return-path':
|
||||
$this->m_oMessage->setReturnPath($sValue);
|
||||
break;
|
||||
|
||||
default:
|
||||
$oHeaders->addTextHeader($sKey, $sValue);
|
||||
$oHeaders->addTextHeader($sKey, $sValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class EventIssue extends Event
|
||||
MetaModel::Init_AddAttribute(new AttributePropertySet("data", array("allowed_values"=>null, "sql"=>"data", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
|
||||
|
||||
// Display lists
|
||||
MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'issue', 'impact', 'page', 'arguments_post', 'arguments_get', 'callstack', 'data')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('details', array('date', 'message', 'userinfo', 'issue', 'impact', 'page', 'arguments_post', 'arguments_get', 'callstack', 'data')); // Attributes to be displayed for the complete details
|
||||
MetaModel::Init_SetZListItems('list', array('date', 'userinfo', 'issue', 'impact')); // Attributes to be displayed for a list
|
||||
// Search criteria
|
||||
// MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form
|
||||
|
||||
@@ -216,7 +216,14 @@ EOF
|
||||
}
|
||||
else if (array_key_exists('formatted_text', $this->aStatusInfo) && $this->aStatusInfo['formatted_text'])
|
||||
{
|
||||
$sRet = $oAttDef->GetEditValue($value, $oObj);
|
||||
if ($oAttDef instanceof AttributeText && $oAttDef->GetFormat()=='html')
|
||||
{
|
||||
$sRet = str_replace(">", ">", $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sRet = $oAttDef->GetEditValue($value, $oObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -176,26 +176,32 @@ class InlineImage extends DBObject
|
||||
$sOQL = 'SELECT InlineImage WHERE temp_id = :temp_id';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('temp_id' => $sTempId));
|
||||
$aInlineImagesId = array();
|
||||
while($oInlineImage = $oSet->Fetch())
|
||||
{
|
||||
$aInlineImagesId[] = $oInlineImage->GetKey();
|
||||
$oInlineImage->SetItem($oObject);
|
||||
$oInlineImage->Set('temp_id', '');
|
||||
$oInlineImage->DBUpdate();
|
||||
}
|
||||
IssueLog::Trace('FinalizeInlineImages (see $aInlineImagesId for the id list)', 'InlineImage', array(
|
||||
'$sObjectClass' => get_class($oObject),
|
||||
'$sTransactionId' => $iTransactionId,
|
||||
'$sTempId' => $sTempId,
|
||||
'$aInlineImagesId' => $aInlineImagesId,
|
||||
'$sUser' => UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
));
|
||||
}
|
||||
// For tracing issues with Inline Images... but beware not all updates are interactive, so this trace happens when creating objects non-interactively (REST, Synchro...)
|
||||
// else
|
||||
// {
|
||||
// IssueLog::Error('InlineImage: Error during FinalizeInlineImages(), no transaction ID for object '.get_class($oObject).'#'.$oObject->GetKey().'.');
|
||||
//
|
||||
// IssueLog::Error('|- Call stack:');
|
||||
// $oException = new Exception();
|
||||
// $sStackTrace = $oException->getTraceAsString();
|
||||
// IssueLog::Error($sStackTrace);
|
||||
//
|
||||
// IssueLog::Error('|- POST vars:');
|
||||
// IssueLog::Error(print_r($_POST, true));
|
||||
// }
|
||||
else
|
||||
{
|
||||
IssueLog::Trace('FinalizeInlineImages "error" $iTransactionId is null', 'InlineImage', array(
|
||||
'$sObjectClass' => get_class($oObject),
|
||||
'$sTransactionId' => $iTransactionId,
|
||||
'$sUser' => UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,10 +214,18 @@ class InlineImage extends DBObject
|
||||
$sOQL = 'SELECT InlineImage WHERE temp_id = :temp_id';
|
||||
$oSearch = DBObjectSearch::FromOQL($sOQL);
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('temp_id' => $sTempId));
|
||||
$aInlineImagesId = array();
|
||||
while($oInlineImage = $oSet->Fetch())
|
||||
{
|
||||
$aInlineImagesId[] = $oInlineImage->GetKey();
|
||||
$oInlineImage->DBDelete();
|
||||
}
|
||||
IssueLog::Trace('OnFormCancel', 'InlineImage', array(
|
||||
'$sTempId' => $sTempId,
|
||||
'$aInlineImagesId' => $aInlineImagesId,
|
||||
'$sUser' => UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -548,19 +562,72 @@ EOF
|
||||
JS
|
||||
;
|
||||
}
|
||||
|
||||
protected function AfterInsert()
|
||||
{
|
||||
IssueLog::Trace(__METHOD__, 'InlineImage', array(
|
||||
'id' => $this->GetKey(),
|
||||
'expire' => $this->Get('expire'),
|
||||
'temp_id' => $this->Get('temp_id'),
|
||||
'item_class' => $this->Get('item_class'),
|
||||
'item_id' => $this->Get('item_id'),
|
||||
'item_org_id' => $this->Get('item_org_id'),
|
||||
'secret' => $this->Get('secret'),
|
||||
'user' => $sUser = UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
'REQUEST_URI' => @$_SERVER['REQUEST_URI'],
|
||||
));
|
||||
|
||||
parent::AfterInsert();
|
||||
}
|
||||
|
||||
protected function AfterUpdate()
|
||||
{
|
||||
IssueLog::Trace(__METHOD__, 'InlineImage', array(
|
||||
'id' => $this->GetKey(),
|
||||
'expire' => $this->Get('expire'),
|
||||
'temp_id' => $this->Get('temp_id'),
|
||||
'item_class' => $this->Get('item_class'),
|
||||
'item_id' => $this->Get('item_id'),
|
||||
'item_org_id' => $this->Get('item_org_id'),
|
||||
'secret' => $this->Get('secret'),
|
||||
'user' => $sUser = UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
'REQUEST_URI' => @$_SERVER['REQUEST_URI'],
|
||||
));
|
||||
|
||||
parent::AfterUpdate();
|
||||
}
|
||||
|
||||
protected function AfterDelete()
|
||||
{
|
||||
IssueLog::Trace(__METHOD__, 'InlineImage', array(
|
||||
'id' => $this->GetKey(),
|
||||
'expire' => $this->Get('expire'),
|
||||
'temp_id' => $this->Get('temp_id'),
|
||||
'item_class' => $this->Get('item_class'),
|
||||
'item_id' => $this->Get('item_id'),
|
||||
'item_org_id' => $this->Get('item_org_id'),
|
||||
'secret' => $this->Get('secret'),
|
||||
'user' => $sUser = UserRights::GetUser(),
|
||||
'HTTP_REFERER' => @$_SERVER['HTTP_REFERER'],
|
||||
'REQUEST_URI' => @$_SERVER['REQUEST_URI'],
|
||||
));
|
||||
|
||||
parent::AfterDelete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Garbage collector for cleaning "old" temporary InlineImages (and Attachments).
|
||||
* This background process runs every hour and deletes all temporary InlineImages and Attachments
|
||||
* whic are are older than one hour.
|
||||
*/
|
||||
class InlineImageGC implements iBackgroundProcess
|
||||
{
|
||||
public function GetPeriodicity()
|
||||
{
|
||||
return 1; // Runs every 8 hours
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -593,6 +660,9 @@ class InlineImageGC implements iBackgroundProcess
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove $sClass instance based on their `expire` field value.
|
||||
* This `expire` field contains current time + draft_attachments_lifetime config parameter, it is initialized on object creation.
|
||||
*
|
||||
* @param string $sClass
|
||||
* @param int $iTimeLimit
|
||||
* @param string $sDateLimit
|
||||
|
||||
@@ -308,7 +308,7 @@ class DailyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder
|
||||
public function GetCronProcessNextOccurrence(DateTime $oNow)
|
||||
{
|
||||
$oOccurrence = clone $oNow;
|
||||
$oOccurrence->modify('tomorrow');
|
||||
$oOccurrence->modify('tomorrow midnight');
|
||||
|
||||
return $oOccurrence;
|
||||
}
|
||||
@@ -359,8 +359,7 @@ class WeeklyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder
|
||||
public function GetCronProcessNextOccurrence(DateTime $oNow)
|
||||
{
|
||||
$oOccurrence = clone $oNow;
|
||||
$oOccurrence->modify('Monday next week');
|
||||
$oOccurrence->setTime(0, 0, 0);
|
||||
$oOccurrence->modify('Monday next week midnight');
|
||||
|
||||
return $oOccurrence;
|
||||
}
|
||||
@@ -411,8 +410,7 @@ class MonthlyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder
|
||||
public function GetCronProcessNextOccurrence(DateTime $oNow)
|
||||
{
|
||||
$oOccurrence = clone $oNow;
|
||||
$oOccurrence->modify('first day of next month');
|
||||
$oOccurrence->setTime(0, 0, 0);
|
||||
$oOccurrence->modify('first day of next month midnight');
|
||||
|
||||
return $oOccurrence;
|
||||
}
|
||||
@@ -544,6 +542,12 @@ abstract class LogAPI
|
||||
const LEVEL_OK = 'Ok';
|
||||
const LEVEL_DEBUG = 'Debug';
|
||||
const LEVEL_TRACE = 'Trace';
|
||||
/**
|
||||
* @var string default log level, can be overrided
|
||||
* @see GetMinLogLevel
|
||||
* @since 2.7.1 N°2977
|
||||
*/
|
||||
const LEVEL_DEFAULT = self::LEVEL_OK;
|
||||
|
||||
protected static $aLevelsPriority = array(
|
||||
self::LEVEL_ERROR => 400,
|
||||
@@ -641,21 +645,22 @@ abstract class LogAPI
|
||||
/**
|
||||
* @param $sChannel
|
||||
*
|
||||
* @return mixed|null
|
||||
* @return string one of the LEVEL_* const value
|
||||
* @uses \LogAPI::LEVEL_DEFAULT
|
||||
*/
|
||||
private static function GetMinLogLevel($sChannel)
|
||||
{
|
||||
$oConfig = (static::$m_oMockMetaModelConfig !== null) ? static::$m_oMockMetaModelConfig : \MetaModel::GetConfig();
|
||||
if (!$oConfig instanceof Config)
|
||||
{
|
||||
return self::LEVEL_OK;
|
||||
return static::LEVEL_DEFAULT;
|
||||
}
|
||||
|
||||
$sLogLevelMin = $oConfig->Get('log_level_min');
|
||||
|
||||
if (empty($sLogLevelMin))
|
||||
{
|
||||
return self::LEVEL_OK;
|
||||
return static::LEVEL_DEFAULT;
|
||||
}
|
||||
|
||||
if (!is_array($sLogLevelMin))
|
||||
@@ -673,7 +678,7 @@ abstract class LogAPI
|
||||
return $sLogLevelMin[$sChannel];
|
||||
}
|
||||
|
||||
return self::LEVEL_OK;
|
||||
return static::LEVEL_DEFAULT;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -681,6 +686,12 @@ abstract class LogAPI
|
||||
class SetupLog extends LogAPI
|
||||
{
|
||||
const CHANNEL_DEFAULT = 'SetupLog';
|
||||
/**
|
||||
* @inheritDoc
|
||||
*
|
||||
* As this object is used during setup, without any conf file available, customizing the level can be done by changing this constant !
|
||||
*/
|
||||
const LEVEL_DEFAULT = self::LEVEL_INFO;
|
||||
|
||||
protected static $m_oFileLog = null;
|
||||
}
|
||||
@@ -699,6 +710,59 @@ class ToolsLog extends LogAPI
|
||||
protected static $m_oFileLog = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \CMDBSource::LogDeadLock()
|
||||
* @since 2.7.1
|
||||
*/
|
||||
class DeadLockLog extends LogAPI
|
||||
{
|
||||
const CHANNEL_WAIT_TIMEOUT = 'Deadlock-WaitTimeout';
|
||||
const CHANNEL_DEADLOCK_FOUND = 'Deadlock-Found';
|
||||
const CHANNEL_DEFAULT = self::CHANNEL_WAIT_TIMEOUT;
|
||||
|
||||
/** @var \FileLog we want our own instance ! */
|
||||
protected static $m_oFileLog = null;
|
||||
|
||||
public static function Enable($sTargetFile = null)
|
||||
{
|
||||
if (empty($sTargetFile))
|
||||
{
|
||||
$sTargetFile = APPROOT.'log/deadlocks.log';
|
||||
}
|
||||
parent::Enable($sTargetFile);
|
||||
}
|
||||
|
||||
private static function GetChannelFromMysqlErrorNo($iMysqlErrorNo)
|
||||
{
|
||||
switch ($iMysqlErrorNo)
|
||||
{
|
||||
case 1205:
|
||||
return self::CHANNEL_WAIT_TIMEOUT;
|
||||
break;
|
||||
case 1213:
|
||||
return self::CHANNEL_DEADLOCK_FOUND;
|
||||
break;
|
||||
default:
|
||||
return self::CHANNEL_DEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $iMySQLErrNo will be converted to channel using {@link GetChannelFromMysqlErrorNo}
|
||||
* @param string $sMessage
|
||||
* @param null $iMysqlErroNo
|
||||
* @param array $aContext
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function Log($iMySQLErrNo, $sMessage, $iMysqlErroNo = null, $aContext = array())
|
||||
{
|
||||
$sChannel = self::GetChannelFromMysqlErrorNo($iMysqlErroNo);
|
||||
parent::Log($iMySQLErrNo, $sMessage, $sChannel, $aContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LogFileRotationProcess implements iScheduledProcess
|
||||
{
|
||||
|
||||
@@ -3496,7 +3496,7 @@ abstract class MetaModel
|
||||
}
|
||||
if (array_key_exists($sAttCode, self::$m_aAttribDefs[$sTargetClass]))
|
||||
{
|
||||
throw new Exception("Declaration of $sTargetClass: attempting to redeclare the inherited attribute '$sAttCode', originaly declared in ".self::$m_aAttribOrigins[$sTargetClass][$sAttCode]);
|
||||
throw new Exception("Declaration of $sTargetClass: attempting to redeclare the inherited attribute '$sAttCode', originally declared in ".self::$m_aAttribOrigins[$sTargetClass][$sAttCode]);
|
||||
}
|
||||
|
||||
// Set the "host class" as soon as possible, since HierarchicalKeys use it for their 'target class' as well
|
||||
@@ -4127,44 +4127,52 @@ abstract class MetaModel
|
||||
*
|
||||
* @param array $aArgs Context arguments (some can be persistent objects)
|
||||
* @param array $aMoreArgs Other query parameters
|
||||
* @param array $aExpectedArgs variables present in the query
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function PrepareQueryArguments($aArgs, $aMoreArgs = array())
|
||||
public static function PrepareQueryArguments($aArgs, $aMoreArgs = array(), $aExpectedArgs = null)
|
||||
{
|
||||
$aScalarArgs = array();
|
||||
foreach(array_merge($aArgs, $aMoreArgs) as $sArgName => $value)
|
||||
if (is_null($aExpectedArgs) || count($aExpectedArgs) > 0 || count($aMoreArgs)>0)
|
||||
{
|
||||
if (self::IsValidObject($value))
|
||||
foreach (array_merge($aArgs, $aMoreArgs) as $sArgName => $value)
|
||||
{
|
||||
if (strpos($sArgName, '->object()') === false)
|
||||
if (self::IsValidObject($value))
|
||||
{
|
||||
// Normalize object arguments
|
||||
$aScalarArgs[$sArgName.'->object()'] = $value;
|
||||
if (strpos($sArgName, '->object()') === false)
|
||||
{
|
||||
// Normalize object arguments
|
||||
$aScalarArgs[$sArgName.'->object()'] = $value;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Leave as is
|
||||
$aScalarArgs[$sArgName] = $value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Leave as is
|
||||
$aScalarArgs[$sArgName] = $value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_scalar($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = (string)$value;
|
||||
}
|
||||
elseif (is_null($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = null;
|
||||
}
|
||||
elseif (is_array($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = $value;
|
||||
if (is_scalar($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = (string)$value;
|
||||
}
|
||||
elseif (is_null($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = null;
|
||||
}
|
||||
elseif (is_array($value))
|
||||
{
|
||||
$aScalarArgs[$sArgName] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return static::AddMagicPlaceholders($aScalarArgs, $aExpectedArgs);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
return static::AddMagicPlaceholders($aScalarArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4172,21 +4180,68 @@ abstract class MetaModel
|
||||
*
|
||||
* @return array of placeholder (or name->object()) => value (or object)
|
||||
*/
|
||||
public static function AddMagicPlaceholders($aPlaceholders)
|
||||
public static function AddMagicPlaceholders($aPlaceholders, $aExpectedArgs = null)
|
||||
{
|
||||
// Add standard magic arguments
|
||||
//
|
||||
$aPlaceholders['current_contact_id'] = UserRights::GetContactId(); // legacy
|
||||
|
||||
$oUser = UserRights::GetUserObject();
|
||||
if (!is_null($oUser))
|
||||
if (is_null($aExpectedArgs))
|
||||
{
|
||||
$aPlaceholders['current_user->object()'] = $oUser;
|
||||
$aPlaceholders['current_contact_id'] = UserRights::GetContactId(); // legacy
|
||||
|
||||
$oContact = UserRights::GetContactObject();
|
||||
if (!is_null($oContact))
|
||||
$oUser = UserRights::GetUserObject();
|
||||
if (!is_null($oUser))
|
||||
{
|
||||
$aPlaceholders['current_contact->object()'] = $oContact;
|
||||
$aPlaceholders['current_user->object()'] = $oUser;
|
||||
|
||||
$oContact = UserRights::GetContactObject();
|
||||
if (!is_null($oContact))
|
||||
{
|
||||
$aPlaceholders['current_contact->object()'] = $oContact;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$aCurrentUser = array();
|
||||
$aCurrentContact = array();
|
||||
foreach ($aExpectedArgs as $expression)
|
||||
{
|
||||
$aName = explode('->', $expression->GetName());
|
||||
if ($aName[0] == 'current_contact_id')
|
||||
{
|
||||
$aPlaceholders['current_contact_id'] = UserRights::GetContactId();
|
||||
}
|
||||
if ($aName[0] == 'current_user')
|
||||
{
|
||||
array_push($aCurrentUser, $aName[1]);
|
||||
}
|
||||
if ($aName[0] == 'current_contact')
|
||||
{
|
||||
array_push($aCurrentContact, $aName[1]);
|
||||
}
|
||||
}
|
||||
if (count($aCurrentUser) > 0)
|
||||
{
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT User WHERE id = :id");
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('id' => UserRights::GetUserId()));
|
||||
$oSet->OptimizeColumnLoad($aCurrentUser);
|
||||
$oUser = $oSet->fetch();
|
||||
$aPlaceholders['current_user->object()'] = $oUser;
|
||||
foreach ($aCurrentUser as $sField)
|
||||
{
|
||||
$aPlaceholders['current_user->'.$sField] = $oUser->Get($sField);
|
||||
}
|
||||
}
|
||||
if (count($aCurrentContact) > 0)
|
||||
{
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Contact WHERE id = :id");
|
||||
$oSet = new DBObjectSet($oSearch, array(), array('id' => UserRights::GetContactId()));
|
||||
$oSet->OptimizeColumnLoad($aCurrentContact);
|
||||
$oUser = $oSet->fetch();
|
||||
foreach ($aCurrentContact as $sField)
|
||||
{
|
||||
$aPlaceholders['current_contact->'.$sField] = $oUser->Get($sField);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4879,7 +4934,7 @@ abstract class MetaModel
|
||||
//
|
||||
foreach(self::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
// Skip this attribute if not originaly defined in this class
|
||||
// Skip this attribute if not originally defined in this class
|
||||
if (self::$m_aAttribOrigins[$sClass][$sAttCode] != $sClass)
|
||||
{
|
||||
continue;
|
||||
@@ -5253,7 +5308,7 @@ abstract class MetaModel
|
||||
$sClassRes .= self::MakeDictEntry("Class:$sClass+", self::GetClassDescription_Obsolete($sClass), '', $bNotInDico);
|
||||
foreach(self::ListAttributeDefs($sClass) as $sAttCode => $oAttDef)
|
||||
{
|
||||
// Skip this attribute if not originaly defined in this class
|
||||
// Skip this attribute if not originally defined in this class
|
||||
if (self::$m_aAttribOrigins[$sClass][$sAttCode] != $sClass)
|
||||
{
|
||||
continue;
|
||||
@@ -5417,7 +5472,7 @@ abstract class MetaModel
|
||||
{
|
||||
if (!$oAttDef->CopyOnAllTables())
|
||||
{
|
||||
// Skip this attribute if not originaly defined in this class
|
||||
// Skip this attribute if not originally defined in this class
|
||||
if (self::$m_aAttribOrigins[$sClass][$sAttCode] != $sClass)
|
||||
{
|
||||
continue;
|
||||
@@ -5692,6 +5747,15 @@ abstract class MetaModel
|
||||
{
|
||||
$sTableItems = implode(', ', $aCreateTableItems[$sTable]);
|
||||
$aCondensedQueries[] = "CREATE TABLE `$sTable` ($sTableItems) $sTableOptions";
|
||||
// Add request right after the CREATE TABLE
|
||||
if (isset($aPostTableAlteration[$sTable]))
|
||||
{
|
||||
foreach ($aPostTableAlteration[$sTable] as $sQuery)
|
||||
{
|
||||
$aCondensedQueries[] = $sQuery;
|
||||
}
|
||||
unset($aPostTableAlteration[$sTable]);
|
||||
}
|
||||
}
|
||||
foreach ($aAlterTableMetaData as $sTableAlterQuery)
|
||||
{
|
||||
@@ -5708,9 +5772,19 @@ abstract class MetaModel
|
||||
{
|
||||
$aCondensedQueries[] = $sQuery;
|
||||
}
|
||||
unset($aPostTableAlteration[$sTable]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add alterations not yet managed
|
||||
foreach ($aPostTableAlteration as $aQueries)
|
||||
{
|
||||
foreach ($aQueries as $sQuery)
|
||||
{
|
||||
$aCondensedQueries[] = $sQuery;
|
||||
}
|
||||
}
|
||||
|
||||
return array($aErrors, $aSugFix, $aCondensedQueries);
|
||||
}
|
||||
|
||||
@@ -6316,6 +6390,7 @@ abstract class MetaModel
|
||||
self::$m_bLogWebService = self::$m_oConfig->GetLogWebService();
|
||||
|
||||
ToolsLog::Enable(APPROOT.'log/tools.log');
|
||||
DeadLockLog::Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -158,6 +158,9 @@ abstract class Expression
|
||||
// recursively builds an array of [classAlias][fieldName] => value
|
||||
abstract public function ListConstantFields();
|
||||
|
||||
// recursively builds an array of parameters to give to current request
|
||||
abstract public function ListParameters();
|
||||
|
||||
public function RequiresField($sClass, $sFieldName)
|
||||
{
|
||||
// #@# todo - optimize : this is called quite often when building a single query !
|
||||
@@ -354,6 +357,11 @@ class SQLExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
// Do nothing, since there is nothing to rename
|
||||
@@ -593,6 +601,13 @@ class BinaryExpression extends Expression
|
||||
return $aResult;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aLeft = $this->GetLeftExpr()->ListParameters();
|
||||
$aRight = $this->GetRightExpr()->ListParameters();
|
||||
return array_merge($aLeft, $aRight);
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->GetLeftExpr()->RenameParam($sOldName, $sNewName);
|
||||
@@ -934,6 +949,11 @@ class UnaryExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
// Do nothing
|
||||
@@ -1848,6 +1868,12 @@ class VariableExpression extends UnaryExpression
|
||||
}
|
||||
return $oRet;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return array($this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Temporary, until we implement functions and expression casting!
|
||||
@@ -2001,6 +2027,16 @@ class ListExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aRes = array();
|
||||
foreach ($this->m_aExpressions as $oExpr)
|
||||
{
|
||||
$aRes = array_merge($aRes, $oExpr->ListParameters());
|
||||
}
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aExpressions as $key => $oExpr)
|
||||
@@ -2142,6 +2178,11 @@ class NestedQueryExpression extends Expression
|
||||
return $this->m_oNestedQuery->ListConstantFields();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return $this->m_oNestedQuery->ListParameters();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->m_oNestedQuery->RenameParam($sOldName, $sNewName);
|
||||
@@ -2289,6 +2330,17 @@ class FunctionExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
|
||||
$aRes = array();
|
||||
foreach ($this->m_aArgs as $oExpr)
|
||||
{
|
||||
$aRes = array_merge($aRes, $oExpr->ListParameters());
|
||||
}
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aArgs as $key => $oExpr)
|
||||
@@ -2570,6 +2622,11 @@ class IntervalExpression extends Expression
|
||||
return array();
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
return $this->m_oValue->ListParameters();
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
$this->m_oValue->RenameParam($sOldName, $sNewName);
|
||||
@@ -2716,6 +2773,16 @@ class CharConcatExpression extends Expression
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function ListParameters()
|
||||
{
|
||||
$aRes = array();
|
||||
foreach ($this->m_aExpressions as $oExpr)
|
||||
{
|
||||
$aRes = array_merge($aRes, $oExpr->ListParameters());
|
||||
}
|
||||
return $aRes;
|
||||
}
|
||||
|
||||
public function RenameParam($sOldName, $sNewName)
|
||||
{
|
||||
foreach ($this->m_aExpressions as $key => $oExpr)
|
||||
|
||||
@@ -145,7 +145,8 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
|
||||
/**
|
||||
* @param DBObject $oObject
|
||||
* @param string $sClassAlias
|
||||
* @deprecated Since iTop 2.4, use ormLinkset->AddItem() instead.
|
||||
*
|
||||
* @deprecated Since iTop 2.4, use {@link \ormLinkSet::AddItem()} instead.
|
||||
*/
|
||||
public function AddObject(DBObject $oObject, $sClassAlias = '')
|
||||
{
|
||||
|
||||
@@ -225,6 +225,7 @@ class ValueSetObjects extends ValueSetDefinition
|
||||
else
|
||||
{
|
||||
$oFilter = DBObjectSearch::FromOQL($this->m_sFilterExpr);
|
||||
$oFilter->SetShowObsoleteData(utils::ShowObsoleteData());
|
||||
}
|
||||
if (!$oFilter) return false;
|
||||
if (!is_null($this->m_oExtraCondition))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
// Beware the version number MUST be enclosed with quotes otherwise v2.3.0 becomes v2 0.3 .0
|
||||
$version: "v2.7.0-1";
|
||||
$version: "v2.7.1";
|
||||
$approot-relative: "../../../../../" !default; // relative to env-***/branding/themes/***/main.css
|
||||
|
||||
// Base colors
|
||||
@@ -118,6 +118,9 @@ $primary-text-color: #333333 !default;
|
||||
$secondary-text-color: $grey-color !default;
|
||||
$error-text-color: $white !default;
|
||||
$highlight-text-color: #363636 !default;
|
||||
$button-content-background-color: $gray-extra-light !default;
|
||||
$button-header-background-color: $gray-extra-light !default;
|
||||
$main-menu-background-color: $gray-extra-light !default;
|
||||
$hover-background-color: #fde17c !default;
|
||||
$border-highlight-color: $brand-primary-dark !default;
|
||||
$highlight-item-color: $white !default;
|
||||
|
||||
@@ -2371,6 +2371,16 @@ fieldset .details>.field_container {
|
||||
display: inline-block;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.button{
|
||||
cursor: pointer;
|
||||
margin-bottom: 3px;
|
||||
padding: 2px;
|
||||
.ui-icon {
|
||||
background-image: url($approot-relative + "css/ui-lightness/images/ui-icons_ffffff_256x240.png?v=" + $version);
|
||||
background-color: $highlight-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.field_input_image{
|
||||
@@ -2680,7 +2690,7 @@ td.prop_icon {
|
||||
font-size: 16px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashlet-content .display_block {
|
||||
.main_header h1 {
|
||||
text-align:left;
|
||||
}
|
||||
.dashlet-unknown, .dashlet-proxy {
|
||||
@@ -3547,7 +3557,7 @@ table.listResults .originColor{
|
||||
|
||||
background: #fdfdfd none;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px 1px rgb(241, 241, 241, 0.7);
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px 1px rgba(241, 241, 241, 0.7);
|
||||
|
||||
color: $gray-darker;
|
||||
text-shadow: none;
|
||||
@@ -3881,3 +3891,16 @@ input:checked + .slider:before {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.ui-dialog .ui-dialog-content .treecontrol {
|
||||
padding-bottom:0.3em;
|
||||
padding-left: 0.2em;
|
||||
margin-top: -0.3em;
|
||||
padding-top: 0;
|
||||
|
||||
}
|
||||
.ui-dialog .ui-dialog-content .treecontrol a {
|
||||
font-size: small;
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
background-position: 0 50%;
|
||||
}
|
||||
}
|
||||
@keyframes bg-pan-left {
|
||||
@@ -41,7 +41,7 @@
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
background-position: 0 50%;
|
||||
}
|
||||
}
|
||||
/* Theme */
|
||||
@@ -51,7 +51,7 @@ body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 10pt;
|
||||
font-family: Tahoma, Verdana, Arial, Helvetica;
|
||||
font-family: Tahoma, Verdana, Arial, Helvetica, serif;
|
||||
overflow-y: auto;
|
||||
}
|
||||
h1 {
|
||||
@@ -92,9 +92,7 @@ a:hover {
|
||||
margin-right: 20px;
|
||||
}
|
||||
#header h1 {
|
||||
vertical-align: middle;
|
||||
height: 54px;
|
||||
noline-height: 54px;
|
||||
margin: 0;
|
||||
}
|
||||
#setup {
|
||||
@@ -153,8 +151,6 @@ td.input {
|
||||
}
|
||||
table.formTable {
|
||||
border: 0;
|
||||
cellpadding: 2px;
|
||||
cellspacing: 0;
|
||||
}
|
||||
.wizlabel, .wizinput {
|
||||
color: #000;
|
||||
|
||||
@@ -65,7 +65,7 @@ $progress-bar-error-bg-color: #F56565 !default;
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
background-position: 0 50%;
|
||||
}
|
||||
}
|
||||
@keyframes bg-pan-left {
|
||||
@@ -73,7 +73,7 @@ $progress-bar-error-bg-color: #F56565 !default;
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
background-position: 0 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 10pt;
|
||||
font-family: Tahoma, Verdana, Arial, Helvetica;
|
||||
font-family: Tahoma, Verdana, Arial, Helvetica, serif;
|
||||
overflow-y: auto;
|
||||
}
|
||||
h1 {
|
||||
@@ -126,9 +126,7 @@ a{
|
||||
margin-right: 20px;
|
||||
}
|
||||
h1 {
|
||||
vertical-align: middle;
|
||||
height: 54px;
|
||||
noline-height: 54px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -191,8 +189,6 @@ td.input {
|
||||
}
|
||||
table.formTable {
|
||||
border: 0;
|
||||
cellpadding: 2px;
|
||||
cellspacing: 0;
|
||||
}
|
||||
.wizlabel, .wizinput {
|
||||
color: #000;
|
||||
|
||||
@@ -1024,7 +1024,7 @@ body {
|
||||
}
|
||||
.ui-state-default {
|
||||
border: 1px solid #cccccc;
|
||||
background: #f1f1f1;
|
||||
background: $button-content-background-color;
|
||||
font-weight: bold;
|
||||
color: $secondary-text-color;
|
||||
}
|
||||
@@ -1092,7 +1092,7 @@ body {
|
||||
}
|
||||
.ui-state-default {
|
||||
border: 1px solid #cccccc;
|
||||
background: #f1f1f1;
|
||||
background: $button-header-background-color;
|
||||
font-weight: bold;
|
||||
color: $secondary-text-color;
|
||||
}
|
||||
@@ -1152,7 +1152,7 @@ body {
|
||||
}
|
||||
.ui-state-default {
|
||||
border: 1px solid #cccccc;
|
||||
background: #f1f1f1;
|
||||
background: $main-menu-background-color;
|
||||
font-weight: bold;
|
||||
color: $secondary-text-color;
|
||||
a {
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<authorization>
|
||||
<deny users="*" /> <!-- Denies all users -->
|
||||
</authorization>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<fileExtensions applyToWebDAV="false" allowUnlisted="false"></fileExtensions>
|
||||
</requestFiltering>
|
||||
<authorization>
|
||||
<deny users="*" /> <!-- Denies all users -->
|
||||
</authorization>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'authent-local/2.7.0',
|
||||
'authent-local/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -30,5 +30,5 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
|
||||
'Error:UserLocalPasswordValidator:UserPasswordPolicyRegex:ValidationFailed' => 'Пароль должен содержать не менее 8 символов и включать прописные, строчные, числовые и специальные символы.',
|
||||
|
||||
'UserLocal:password:expiration' => 'The fields below require an extension~~'
|
||||
'UserLocal:password:expiration' => 'Поля требуют наличия доп. расширения'
|
||||
));
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -48,6 +48,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Ungültiger Wert für %1$s (Spalte: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Manche Benutzerkonten haben keinerlei zugewiesenes Profi',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch-Count-Fehler in `%1$s`, %2$d Einträge geholt (fetched) / %3$d gezählt',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -52,7 +52,7 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value than `%3$s`.`%1$s`',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class',
|
||||
));
|
||||
|
||||
|
||||
@@ -23,65 +23,67 @@
|
||||
// Database inconsistencies
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array(
|
||||
// Dictionary entries go here
|
||||
'Menu:DBToolsMenu' => 'DB Tools~~',
|
||||
'DBTools:Class' => 'Class~~',
|
||||
'DBTools:Title' => 'Database Maintenance Tools~~',
|
||||
'DBTools:ErrorsFound' => 'Errors Found~~',
|
||||
'DBTools:Error' => 'Error~~',
|
||||
'DBTools:Count' => 'Count~~',
|
||||
'DBTools:SQLquery' => 'SQL query~~',
|
||||
'DBTools:FixitSQLquery' => 'SQL query To Fix it (indication)~~',
|
||||
'DBTools:SQLresult' => 'SQL result~~',
|
||||
'DBTools:NoError' => 'The database is OK~~',
|
||||
'DBTools:HideIds' => 'Error List~~',
|
||||
'DBTools:ShowIds' => 'Detailed view~~',
|
||||
'DBTools:ShowReport' => 'Report~~',
|
||||
'DBTools:IntegrityCheck' => 'Integrity check~~',
|
||||
'Menu:DBToolsMenu' => 'Herramientas de bases de datos',
|
||||
'DBTools:Class' => 'Clase',
|
||||
'DBTools:Title' => 'Herramientas de mantenimiento de base de datos',
|
||||
'DBTools:ErrorsFound' => 'Errores encontrados',
|
||||
'DBTools:Error' => 'Error',
|
||||
'DBTools:Count' => 'Cantidad',
|
||||
'DBTools:SQLquery' => 'Consulta SQL',
|
||||
'DBTools:FixitSQLquery' => 'Consulta SQL para solucioner el problema (sugerencia)',
|
||||
'DBTools:SQLresult' => 'Resultado SQL',
|
||||
'DBTools:NoError' => 'La base de datos está correcta',
|
||||
'DBTools:HideIds' => 'Lista de errores',
|
||||
'DBTools:ShowIds' => 'Vista detallada',
|
||||
'DBTools:ShowReport' => 'Reporte',
|
||||
'DBTools:IntegrityCheck' => 'Verificación de integridad',
|
||||
'DBTools:FetchCheck' => 'Fetch Check (long)~~',
|
||||
|
||||
'DBTools:Analyze' => 'Analyze~~',
|
||||
'DBTools:Details' => 'Show Details~~',
|
||||
'DBTools:ShowAll' => 'Show All Errors~~',
|
||||
'DBTools:Analyze' => 'Analizar',
|
||||
'DBTools:Details' => 'Mostrar detalles',
|
||||
'DBTools:ShowAll' => 'Mostrar todos los errores',
|
||||
|
||||
'DBTools:Inconsistencies' => 'Database inconsistencies~~',
|
||||
'DBTools:Inconsistencies' => 'Inconsistencias de base de datos',
|
||||
|
||||
'DBAnalyzer-Integrity-OrphanRecord' => 'Orphan record in `%1$s`, it should have its counterpart in table `%2$s`~~',
|
||||
'DBAnalyzer-Integrity-InvalidExtKey' => 'Invalid external key %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-MissingExtKey' => 'Missing external key %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Integrity-OrphanRecord' => 'Registro huérfano en `%1$s`, debería tener su contraparte en la tabla `%2$s`',
|
||||
'DBAnalyzer-Integrity-InvalidExtKey' => 'Llave externa inválida %1$s (columna: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-MissingExtKey' => 'Llave externa perdida %1$s (columna: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Valor inválido para %1$s (columna: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Algunas cuentas de usuario no tienen perfil asignado',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array(
|
||||
'DBTools:DatabaseInfo' => 'Database Information~~',
|
||||
'DBTools:Base' => 'Base~~',
|
||||
'DBTools:Size' => 'Size~~',
|
||||
'DBTools:DatabaseInfo' => 'Información de base de datos',
|
||||
'DBTools:Base' => 'Base',
|
||||
'DBTools:Size' => 'Tamaño',
|
||||
));
|
||||
|
||||
// Lost attachments
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array(
|
||||
'DBTools:LostAttachments' => 'Lost attachments~~',
|
||||
'DBTools:LostAttachments:Disclaimer' => 'Here you can search your database for lost or misplaced attachments. This is NOT a data recovery tool, is does not retrieve deleted data.~~',
|
||||
'DBTools:LostAttachments' => 'Adjuntos perdidos',
|
||||
'DBTools:LostAttachments:Disclaimer' => 'Aquí usted puede buscar adjuntos perdidos o desplazados. Esta NO es una herramienta de recuperación de datos, no obtiene datos borrados.',
|
||||
|
||||
'DBTools:LostAttachments:Button:Analyze' => 'Analyze~~',
|
||||
'DBTools:LostAttachments:Button:Restore' => 'Restore~~',
|
||||
'DBTools:LostAttachments:Button:Restore:Confirm' => 'This action cannot be undone, please confirm that you want to restore the selected files.~~',
|
||||
'DBTools:LostAttachments:Button:Busy' => 'Please wait...~~',
|
||||
'DBTools:LostAttachments:Button:Analyze' => 'Analizar',
|
||||
'DBTools:LostAttachments:Button:Restore' => 'Restaurar',
|
||||
'DBTools:LostAttachments:Button:Restore:Confirm' => 'Esta acción no se puede deshacer, por favor confirme que quiere restaurar los archivos seleccionados.',
|
||||
'DBTools:LostAttachments:Button:Busy' => 'Por favor espere...',
|
||||
|
||||
'DBTools:LostAttachments:Step:Analyze' => 'First, search for lost/misplaced attachments by analyzing the database.~~',
|
||||
'DBTools:LostAttachments:Step:Analyze' => 'Primero, buscaremos adjuntos perdidos/desplazados analizando la base de datos.',
|
||||
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults' => 'Analyze results:~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:None' => 'Great! Every thing seems to be at the right place.~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Some' => 'Some attachments (%1$d) seem to be misplaced. Take a look at the following list and check the ones you would like to move.~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:Filename' => 'Filename~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:CurrentLocation' => 'Current location~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:TargetLocation' => 'Move to...~~',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults' => 'Analizar resultados:',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:None' => 'Genial! Todo parece estar en el lugar correcto.',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Some' => 'Algunos adjuntos (%1$d) parecen estar desplazados. Mire la siguiente lista y verifique los que quiera mover.',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:Filename' => 'Nombre de archivo',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:CurrentLocation' => 'Ubicación actual',
|
||||
'DBTools:LostAttachments:Step:AnalyzeResults:Item:TargetLocation' => 'Mover a...',
|
||||
|
||||
'DBTools:LostAttachments:Step:RestoreResults' => 'Restore results:~~',
|
||||
'DBTools:LostAttachments:Step:RestoreResults:Results' => '%1$d/%2$d attachments were restored.~~',
|
||||
'DBTools:LostAttachments:Step:RestoreResults' => 'Resultados de restauración:',
|
||||
'DBTools:LostAttachments:Step:RestoreResults:Results' => '%1$d/%2$d adjuntos fueron restaurados.',
|
||||
|
||||
'DBTools:LostAttachments:StoredAsInlineImage' => 'Stored as inline image~~',
|
||||
'DBTools:LostAttachments:History' => 'Attachment "%1$s" restored with DB tools~~'
|
||||
'DBTools:LostAttachments:StoredAsInlineImage' => 'Almacenado como imagen en línea',
|
||||
'DBTools:LostAttachments:History' => 'Adjunto "%1$s" restaurado con herramientas de base de datos'
|
||||
));
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'combodo-db-tools/2.7.0',
|
||||
'combodo-db-tools/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -53,6 +53,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Ongeldige waarde voor %1$s (kolom: "%2$s.%3$s")',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Sommige gebruikersaccounts hebben geen profiel',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Opvraag-fout in "%1$s", %2$d records opgevraagd / %3$d geteld',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -38,6 +38,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Недопустимое значение для %1$s (столбец: `%2$s.%3$s`)',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Некоторые учетные записи пользователей не имеют профилей',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => 'Invalid value for %1$s (column: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value as `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -51,6 +51,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'DBAnalyzer-Integrity-InvalidValue' => '无效的值 %1$s (列: `%2$s.%3$s`)~~',
|
||||
'DBAnalyzer-Integrity-UsersWithoutProfile' => 'Some user accounts have no profile at all~~',
|
||||
'DBAnalyzer-Fetch-Count-Error' => 'Fetch count error in `%1$s`, %2$d entries fetched / %3$d counted~~',
|
||||
'DBAnalyzer-Integrity-FinalClass' => 'Field `%2$s`.`%1$s` must have the same value than `%3$s`.`%1$s`~~',
|
||||
'DBAnalyzer-Integrity-RootFinalClass' => 'Field `%2$s`.`%1$s` must contains a valid class~~',
|
||||
));
|
||||
|
||||
// Database Info
|
||||
|
||||
@@ -46,7 +46,7 @@ function RenderAttachments(ajax_page $oPage, $iTransactionId)
|
||||
: AttachmentPlugIn::IsReadonlyState($oObject, $oObject->GetState(), AttachmentPlugIn::ENUM_GUI_BACKOFFICE);
|
||||
if ($bEditMode && !$bIsReadOnlyState)
|
||||
{
|
||||
$oAttachmentsRenderer->RenderEditAttachmentsList($aAttachmentsDeleted);
|
||||
$oAttachmentsRenderer->AddAttachmentsListContent(true, $aAttachmentsDeleted);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,6 +89,10 @@ try
|
||||
try
|
||||
{
|
||||
$oDoc = utils::ReadPostedDocument('file');
|
||||
if ($oDoc->IsEmpty())
|
||||
{
|
||||
throw new FileUploadException(Dict::S('Attachments:Error:UploadedFileEmpty'));
|
||||
}
|
||||
/** @var Attachment $oAttachment */
|
||||
$oAttachment = MetaModel::NewObject('Attachment');
|
||||
$oAttachment->Set('expire', time() + MetaModel::GetConfig()->Get('draft_attachments_lifetime'));
|
||||
|
||||
@@ -38,6 +38,9 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Attachments:NoAttachment' => 'Žádná příloha. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Pro tento typ přílohy není náhled k dispozici.',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -35,6 +35,9 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Attachments:NoAttachment' => 'Intet vedhæftet. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -37,6 +37,9 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Attachments:NoAttachment' => 'Kein Attachment. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Vorschau für diesen Attachment-Typ nicht verfügbar.',
|
||||
'Attachments:Error:FileTooLarge' => 'Die Datei ist zu groß für den Upload: %1$s',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Als Icons anzeigen',
|
||||
'Attachments:Render:Table' => 'Als Liste anzeigen',
|
||||
));
|
||||
|
||||
@@ -32,6 +32,9 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Attachments:NoAttachment' => 'No attachment. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.',
|
||||
'Attachments:Render:Icons' => 'Display as icons',
|
||||
'Attachments:Render:Table' => 'Display as list',
|
||||
));
|
||||
|
||||
@@ -37,6 +37,9 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array(
|
||||
'Attachments:NoAttachment' => 'No hay Anexo. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Vista preliminar no disponible para este tipo de Anexo.',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -31,6 +31,9 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Attachments:NoAttachment' => 'Aucune pièce jointe.',
|
||||
'Attachments:PreviewNotAvailable' => 'Pas d\'aperçu pour ce type de pièce jointe.',
|
||||
'Attachments:Error:FileTooLarge' => 'Le fichier est trop gros pour être chargé. %1$s',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'Le fichier téléchargé est vide et ne peut pas être attaché.
|
||||
Soit vous avez attaché un fichier vide,
|
||||
Soit demandez à votre administrateur système s\'il reste de la place disque disponible sur le serveur',
|
||||
'Attachments:Render:Icons' => 'Affichage en icônes',
|
||||
'Attachments:Render:Table' => 'Affichage en liste',
|
||||
));
|
||||
|
||||
@@ -35,6 +35,9 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Attachments:NoAttachment' => 'No attachment. ~~',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -35,6 +35,9 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Attachments:NoAttachment' => 'No attachment. ~~',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -34,6 +34,9 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Attachments:NoAttachment' => '添付はありません。',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-attachments/2.7.0',
|
||||
'itop-attachments/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -40,6 +40,9 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Attachments:NoAttachment' => 'Geen bijlage. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Er is geen voorbeeld beschikbaar voor dit type bijlage.',
|
||||
'Attachments:Error:FileTooLarge' => 'Het bestand is te groot om geüpload te worden: %1$s',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Toon als pictogram',
|
||||
'Attachments:Render:Table' => 'Toon als lijst',
|
||||
));
|
||||
|
||||
@@ -36,6 +36,9 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Attachments:NoAttachment' => 'Nenhum anexo. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -69,6 +69,14 @@ abstract class AbstractAttachmentsRenderer
|
||||
*/
|
||||
const MAX_SIZE_FOR_PREVIEW = 500000;
|
||||
|
||||
/**
|
||||
* Attachments list container HTML id, that must be generated in {@link RenderEditAttachmentsList}
|
||||
*
|
||||
* @since 2.7.0-2 N°2968 ajax buttons (on especially the #attachment_plugin hidden input) should not be refreshed
|
||||
* so we are refreshing only the content of this container
|
||||
*/
|
||||
const ATTACHMENTS_LIST_CONTAINER_ID = 'AttachmentsListContainer';
|
||||
|
||||
/** @var \WebPage */
|
||||
protected $oPage;
|
||||
/**
|
||||
@@ -129,13 +137,38 @@ abstract class AbstractAttachmentsRenderer
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be overriden to change display order, but must generate an HTML container of ID {@link ATTACHMENTS_LIST_CONTAINER_ID} for JS refresh.
|
||||
*
|
||||
* @param int[] $aAttachmentsDeleted Attachments id that should be deleted after form submission
|
||||
*
|
||||
* @return string
|
||||
* @return void will print using {@link oPage}
|
||||
*/
|
||||
abstract public function RenderEditAttachmentsList($aAttachmentsDeleted = array());
|
||||
public function RenderEditAttachmentsList($aAttachmentsDeleted = array())
|
||||
{
|
||||
$this->AddUploadButton();
|
||||
|
||||
abstract public function RenderViewAttachmentsList();
|
||||
$this->oPage->add('<div id="'.self::ATTACHMENTS_LIST_CONTAINER_ID.'">');
|
||||
$this->AddAttachmentsListContent(true, $aAttachmentsDeleted);
|
||||
$this->oPage->add('</div>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the attachments list content
|
||||
*
|
||||
* @param bool $bWithDeleteButton
|
||||
* @param array $aAttachmentsDeleted
|
||||
*
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
abstract public function AddAttachmentsListContent($bWithDeleteButton, $aAttachmentsDeleted = array());
|
||||
|
||||
public function RenderViewAttachmentsList()
|
||||
{
|
||||
$this->AddAttachmentsListContent(false, array());
|
||||
}
|
||||
|
||||
protected function AddUploadButton()
|
||||
{
|
||||
@@ -154,9 +187,9 @@ abstract class AbstractAttachmentsRenderer
|
||||
|
||||
$this->oPage->add_ready_script(
|
||||
<<<JS
|
||||
function RefreshAttachmentsDisplay()
|
||||
function RefreshAttachmentsDisplay(dataUpload)
|
||||
{
|
||||
var sContentNode = '#AttachmentsContent',
|
||||
var sContentNode = '#AttachmentsContent>div#AttachmentsListContainer',
|
||||
aAttachmentsDeletedHiddenInputs = $('table.attachmentsList>tbody>tr[id^="display_attachment_"]>td input[name="removed_attachments[]"]'),
|
||||
aAttachmentsDeletedIds = aAttachmentsDeletedHiddenInputs.map(function() { return $(this).val() }).toArray();
|
||||
$(sContentNode).block();
|
||||
@@ -172,8 +205,10 @@ abstract class AbstractAttachmentsRenderer
|
||||
function(data) {
|
||||
$(sContentNode).html(data);
|
||||
$(sContentNode).unblock();
|
||||
|
||||
$('#attachment_plugin').trigger('add_attachment', [dataUpload.result.att_id, dataUpload.result.msg, false]);
|
||||
}
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
$('#file').fileupload({
|
||||
@@ -181,7 +216,17 @@ abstract class AbstractAttachmentsRenderer
|
||||
formData: { operation: 'add', temp_id: '$this->sTransactionId', obj_class: '$sClass' },
|
||||
dataType: 'json',
|
||||
pasteZone: null, // Don't accept files via Chrome's copy/paste
|
||||
done: RefreshAttachmentsDisplay,
|
||||
done: function(e, data) {
|
||||
if(typeof(data.result.error) != 'undefined')
|
||||
{
|
||||
if(data.result.error !== '')
|
||||
{
|
||||
alert(data.result.error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
RefreshAttachmentsDisplay(data);
|
||||
},
|
||||
send: function(e, data){
|
||||
// Don't send attachment if size is greater than PHP post_max_size, otherwise it will break the request and all its parameters (\$_REQUEST, \$_POST, ...)
|
||||
// Note: We loop on the files as the data structures is an array but in this case, we only upload 1 file at a time.
|
||||
@@ -325,16 +370,7 @@ JS;
|
||||
*/
|
||||
class TableDetailsAttachmentsRenderer extends AbstractAttachmentsRenderer
|
||||
{
|
||||
/**
|
||||
* @param bool $bWithDeleteButton
|
||||
* @param array $aAttachmentsDeleted
|
||||
*
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
private function AddAttachmentsTable($bWithDeleteButton, $aAttachmentsDeleted = array())
|
||||
public function AddAttachmentsListContent($bWithDeleteButton, $aAttachmentsDeleted = array())
|
||||
{
|
||||
if ($this->GetAttachmentsCount() === 0)
|
||||
{
|
||||
@@ -522,22 +558,4 @@ JS
|
||||
HTML
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function RenderEditAttachmentsList($aAttachmentsDeleted = array())
|
||||
{
|
||||
$this->AddUploadButton();
|
||||
|
||||
$this->AddAttachmentsTable(true, $aAttachmentsDeleted);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function RenderViewAttachmentsList()
|
||||
{
|
||||
$this->AddAttachmentsTable(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Attachments:NoAttachment' => 'Нет вложений.',
|
||||
'Attachments:PreviewNotAvailable' => 'Предварительный просмотр не доступен для этого типа вложений.',
|
||||
'Attachments:Error:FileTooLarge' => 'Файл слишком велик для загрузки. %1$s',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
@@ -50,22 +53,22 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Attachments:File:Thumbnail' => 'Icon~~',
|
||||
'Attachments:File:Name' => 'File name~~',
|
||||
'Attachments:File:Date' => 'Upload date~~',
|
||||
'Attachments:File:Uploader' => 'Uploaded by~~',
|
||||
'Attachments:File:Size' => 'Size~~',
|
||||
'Attachments:File:MimeType' => 'Type~~',
|
||||
'Attachments:File:Thumbnail' => 'Предпросмотр',
|
||||
'Attachments:File:Name' => 'Имя файла',
|
||||
'Attachments:File:Date' => 'Дата',
|
||||
'Attachments:File:Uploader' => 'Пользователь',
|
||||
'Attachments:File:Size' => 'Размер',
|
||||
'Attachments:File:MimeType' => 'Тип',
|
||||
));
|
||||
//
|
||||
// Class: Attachment
|
||||
//
|
||||
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Class:Attachment/Attribute:creation_date' => 'Creation date~~',
|
||||
'Class:Attachment/Attribute:creation_date+' => '~~',
|
||||
'Class:Attachment/Attribute:user_id' => 'User id~~',
|
||||
'Class:Attachment/Attribute:user_id+' => '~~',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Contact id~~',
|
||||
'Class:Attachment/Attribute:contact_id+' => '~~',
|
||||
'Class:Attachment/Attribute:creation_date' => 'Дата создания',
|
||||
'Class:Attachment/Attribute:creation_date+' => '',
|
||||
'Class:Attachment/Attribute:user_id' => 'Пользователь',
|
||||
'Class:Attachment/Attribute:user_id+' => '',
|
||||
'Class:Attachment/Attribute:contact_id' => 'Контакт',
|
||||
'Class:Attachment/Attribute:contact_id+' => '',
|
||||
));
|
||||
|
||||
@@ -35,6 +35,9 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Attachments:NoAttachment' => 'Bez prílohy. ',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -35,6 +35,9 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Attachments:NoAttachment' => 'No attachment. ~~',
|
||||
'Attachments:PreviewNotAvailable' => 'Preview not available for this type of attachment.~~',
|
||||
'Attachments:Error:FileTooLarge' => 'File is too large to be uploaded. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => 'Display as icons~~',
|
||||
'Attachments:Render:Table' => 'Display as list~~',
|
||||
));
|
||||
|
||||
@@ -31,6 +31,9 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Attachments:NoAttachment' => '没有附件. ',
|
||||
'Attachments:PreviewNotAvailable' => '该附件类型不支持预览.',
|
||||
'Attachments:Error:FileTooLarge' => '上传的文件过大. %1$s~~',
|
||||
'Attachments:Error:UploadedFileEmpty' => 'The received file is empty and cannot be attached.
|
||||
Either you have pushed an empty file,
|
||||
or ask your iTop administrator if the iTop server disk is full.~~',
|
||||
'Attachments:Render:Icons' => '显示为图标',
|
||||
'Attachments:Render:Table' => '显示为列表',
|
||||
));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
* Copyright (C) 2010-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
@@ -25,77 +25,140 @@ require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
|
||||
require_once(APPROOT.'core/mutex.class.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* @param WebPage $oPage
|
||||
* @param string $sHtmlErrorMessage the whole HTML error, cinluding div/p/...
|
||||
* @param int|string $exitCode
|
||||
*
|
||||
* @uses \die() https://www.php.net/manual/fr/function.die.php
|
||||
*
|
||||
* @since 2.6.5 2.7.1 N°2989
|
||||
*/
|
||||
function DisplayErrorAndDie($oPage, $sHtmlErrorMessage, $exitCode = null)
|
||||
{
|
||||
$oPage->add($sHtmlErrorMessage);
|
||||
$oPage->output();
|
||||
|
||||
die($exitCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
|
||||
$oPage = new ajax_page('');
|
||||
$oPage->no_cache();
|
||||
$oPage->SetContentType('text/html');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check security
|
||||
*/
|
||||
switch ($sOperation)
|
||||
{
|
||||
/**
|
||||
* Can't use normal check methods (DoLogin for ex) as the datamodel can't be loaded here
|
||||
* So we're only using a token generated in the restore_token operation
|
||||
*/
|
||||
case 'restore_exec':
|
||||
IssueLog::Enable(APPROOT.'log/error.log');
|
||||
if (utils::GetConfig()->Get('demo_mode'))
|
||||
{
|
||||
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, '.ITOP_APPLICATION_SHORT.' is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
||||
}
|
||||
|
||||
$sToken = utils::ReadParam('token', '', false, 'raw_data');
|
||||
$sBasePath = APPROOT.'/data/';
|
||||
$sTokenFile = $sBasePath.'restore.'.$sToken.'.tok';
|
||||
$tokenRealPath = utils::RealPath($sTokenFile, $sBasePath);
|
||||
if (($tokenRealPath === false) || (!is_file($tokenRealPath)))
|
||||
{
|
||||
IssueLog::Error("ajax.backup.php operation=$sOperation ERROR = inexisting token $sToken");
|
||||
$sEscapedToken = utils::HtmlEntities($sToken);
|
||||
DisplayErrorAndDie($oPage, "<p>Error: missing token file: '$sEscapedToken'</p>");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
|
||||
LoginWebPage::DoLogin();
|
||||
|
||||
$sTransactionId = utils::ReadParam('transaction_id', '', true, 'transaction_id');
|
||||
// the consumer page is not reloaded after download, we need to keep the transaction_id
|
||||
$bRemoveTransactionId = ($sOperation !== 'download');
|
||||
if (!utils::IsTransactionValid($sTransactionId, $bRemoveTransactionId))
|
||||
{
|
||||
$sEscapedOperation = utils::HtmlEntities($sOperation);
|
||||
DisplayErrorAndDie($oPage, "<div data-error-stimulus=\"Error\">Error: invalid Transaction ID. The operation '$sEscapedOperation' was NOT performed!</div>");
|
||||
}
|
||||
|
||||
ApplicationMenu::CheckMenuIdEnabled('BackupStatus');
|
||||
|
||||
if (utils::GetConfig()->Get('demo_mode'))
|
||||
{
|
||||
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, '.ITOP_APPLICATION_SHORT.' is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Backup from an interactive session
|
||||
*/
|
||||
try
|
||||
{
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
|
||||
switch ($sOperation)
|
||||
{
|
||||
case 'backup':
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
ApplicationMenu::CheckMenuIdEnabled('BackupStatus');
|
||||
$oPage = new ajax_page("");
|
||||
$oPage->no_cache();
|
||||
$oPage->SetContentType('text/html');
|
||||
try
|
||||
{
|
||||
set_time_limit(0);
|
||||
$oBB = new BackupExec(APPROOT.'data/backups/manual/', 0 /*iRetentionCount*/);
|
||||
$sRes = $oBB->Process(time() + 36000); // 10 hours to complete should be sufficient!
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
|
||||
if (utils::GetConfig()->Get('demo_mode'))
|
||||
{
|
||||
$oPage->add("<div data-error-stimulus=\"Error\">Sorry, iTop is in <b>demonstration mode</b>: the feature is disabled.</div>");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
set_time_limit(0);
|
||||
$oBB = new BackupExec(APPROOT.'data/backups/manual/', 0 /*iRetentionCount*/);
|
||||
$sRes = $oBB->Process(time() + 36000); // 10 hours to complete should be sufficient!
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
$oPage->output();
|
||||
break;
|
||||
|
||||
/*
|
||||
* Fix a token :
|
||||
* Fix a specific token :
|
||||
* We can't load the MetaModel because in DBRestore, after restore is done we're launching a compile !
|
||||
* So as \LoginWebPage::DoLogin needs a loaded DataModel, we can't use it
|
||||
* So as LoginWebPage::DoLogin needs a loaded DataModel, we can't use it
|
||||
* Also, we can't use \utils::IsTransactionValid as it uses \MetaModel::GetConfig
|
||||
* As a result we're setting a token file to make sure the restore is called by an authenticated user with the correct rights !
|
||||
*/
|
||||
case 'restore_get_token':
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
ApplicationMenu::CheckMenuIdEnabled('BackupStatus');
|
||||
|
||||
$oPage = new ajax_page("");
|
||||
$oPage->no_cache();
|
||||
$oPage->SetContentType('text/html');
|
||||
|
||||
$sEnvironment = utils::ReadParam('environment', 'production', false, 'raw_data');
|
||||
$oRestoreMutex = new iTopMutex('restore.'.$sEnvironment);
|
||||
if (!$oRestoreMutex->IsLocked())
|
||||
if ($oRestoreMutex->IsLocked())
|
||||
{
|
||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$sToken = str_replace(' ', '', (string)microtime());
|
||||
$sTokenFile = APPROOT.'/data/restore.'.$sToken.'.tok';
|
||||
file_put_contents($sTokenFile, $sFile);
|
||||
DisplayErrorAndDie($oPage, '<p>'.Dict::S('bkp-restore-running').'</p>');
|
||||
}
|
||||
|
||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$sToken = str_replace(' ', '', (string)microtime()).$sTransactionId;
|
||||
$sTokenFile = APPROOT.'/data/restore.'.$sToken.'.tok';
|
||||
file_put_contents($sTokenFile, $sFile);
|
||||
|
||||
$oPage->add_ready_script(
|
||||
<<<JS
|
||||
$("#restore_token").val('$sToken');
|
||||
JS
|
||||
);
|
||||
|
||||
$oPage->add_ready_script(
|
||||
<<<EOF
|
||||
$("#restore_token").val('$sToken');
|
||||
EOF
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oPage->p(Dict::S('bkp-restore-running'));
|
||||
}
|
||||
$oPage->output();
|
||||
break;
|
||||
|
||||
@@ -109,72 +172,47 @@ EOF
|
||||
require_once(APPROOT.'/setup/backup.class.inc.php');
|
||||
require_once(dirname(__FILE__).'/dbrestore.class.inc.php');
|
||||
|
||||
IssueLog::Enable(APPROOT.'log/error.log');
|
||||
|
||||
$oPage = new ajax_page("");
|
||||
$oPage->no_cache();
|
||||
$oPage->SetContentType('text/html');
|
||||
|
||||
if (utils::GetConfig()->Get('demo_mode'))
|
||||
$sEnvironment = utils::ReadParam('environment', 'production', false, 'raw_data');
|
||||
$oRestoreMutex = new iTopMutex('restore.'.$sEnvironment);
|
||||
IssueLog::Info("Backup Restore - Acquiring the LOCK 'restore.$sEnvironment'");
|
||||
$oRestoreMutex->Lock();
|
||||
IssueLog::Info('Backup Restore - LOCK acquired, executing...');
|
||||
try
|
||||
{
|
||||
$oPage->add("<div data-error-stimulus=\"Error\">Sorry, iTop is in <b>demonstration mode</b>: the feature is disabled.</div>");
|
||||
set_time_limit(0);
|
||||
|
||||
// Get the file and destroy the token (single usage)
|
||||
$sFile = file_get_contents($tokenRealPath);
|
||||
|
||||
// Loading config file : we don't have the MetaModel but we have the current env !
|
||||
$sConfigFilePath = utils::GetConfigFilePath($sEnvironment);
|
||||
$oItopConfig = new Config($sConfigFilePath, true);
|
||||
$sMySQLBinDir = $oItopConfig->GetModuleSetting('itop-backup', 'mysql_bindir', '');
|
||||
|
||||
$oDBRS = new DBRestore($oItopConfig);
|
||||
$oDBRS->SetMySQLBinDir($sMySQLBinDir);
|
||||
|
||||
$sBackupDir = APPROOT.'data/backups/';
|
||||
$sBackupFile = $sBackupDir.$sFile;
|
||||
$sRes = $oDBRS->RestoreFromCompressedBackup($sBackupFile, $sEnvironment);
|
||||
|
||||
IssueLog::Info('Backup Restore - Done, releasing the LOCK');
|
||||
}
|
||||
else
|
||||
catch (Exception $e)
|
||||
{
|
||||
$sEnvironment = utils::ReadParam('environment', 'production', false, 'raw_data');
|
||||
$oRestoreMutex = new iTopMutex('restore.'.$sEnvironment);
|
||||
IssueLog::Info("Backup Restore - Acquiring the LOCK 'restore.$sEnvironment'");
|
||||
$oRestoreMutex->Lock();
|
||||
IssueLog::Info('Backup Restore - LOCK acquired, executing...');
|
||||
try
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
// Get the file and destroy the token (single usage)
|
||||
$sToken = utils::ReadParam('token', '', false, 'raw_data');
|
||||
$sTokenFile = APPROOT.'/data/restore.'.$sToken.'.tok';
|
||||
if (!is_file($sTokenFile))
|
||||
{
|
||||
throw new Exception("Error: missing token file: '$sTokenFile'");
|
||||
}
|
||||
$sFile = file_get_contents($sTokenFile);
|
||||
unlink($sTokenFile);
|
||||
|
||||
// Loading config file : we don't have the MetaModel but we have the current env !
|
||||
$sConfigFilePath = utils::GetConfigFilePath($sEnvironment);
|
||||
$oItopConfig = new Config($sConfigFilePath, true);
|
||||
$sMySQLBinDir = $oItopConfig->GetModuleSetting('itop-backup', 'mysql_bindir', '');
|
||||
|
||||
$oDBRS = new DBRestore($oItopConfig);
|
||||
$oDBRS->SetMySQLBinDir($sMySQLBinDir);
|
||||
|
||||
$sBackupDir = APPROOT.'data/backups/';
|
||||
$sBackupFile = $sBackupDir.$sFile;
|
||||
$sRes = $oDBRS->RestoreFromCompressedBackup($sBackupFile, $sEnvironment);
|
||||
|
||||
IssueLog::Info('Backup Restore - Done, releasing the LOCK');
|
||||
$oRestoreMutex->Unlock();
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$oRestoreMutex->Unlock();
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
$oPage->p('Error: '.$e->getMessage());
|
||||
IssueLog::Error($sOperation.' - '.$e->getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
unlink($tokenRealPath);
|
||||
$oRestoreMutex->Unlock();
|
||||
}
|
||||
|
||||
$oPage->output();
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
ApplicationMenu::CheckMenuIdEnabled('BackupStatus');
|
||||
|
||||
if (utils::GetConfig()->Get('demo_mode'))
|
||||
{
|
||||
throw new Exception('iTop is in demonstration mode: the feature is disabled');
|
||||
}
|
||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$oBackup = new DBBackupScheduled();
|
||||
$sBackupDir = APPROOT.'data/backups/';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Developer's notes:
|
||||
// Duplicated code: sys_get_temp_dir, the computation of the target filename, etc.
|
||||
|
||||
// Recommended usage in CRON
|
||||
// Recommended usage in cron
|
||||
// /usr/bin/php -q /var/www/combodo/modules/itop-backup/check-backup.php --backup_file=/home/backups/combodo-crm-%Y-%m-%d
|
||||
// Do not forget to set the 'itop_backup_incident' configuration file parameter !
|
||||
|
||||
|
||||
@@ -69,10 +69,11 @@ class DBRestore extends DBBackup
|
||||
{
|
||||
$sPortOption = '--port='.$this->iDBPort.' ';
|
||||
}
|
||||
$sTlsOptions = self::GetMysqlCliTlsOptions($this->oConfig);
|
||||
|
||||
$sDataFileEscaped = self::EscapeShellArg($sDataFile);
|
||||
$sCommand = "$sMySQLExe --default-character-set=".DEFAULT_CHARACTER_SET." --host=$sHost $sPortOption --user=$sUser --password=$sPwd $sDBName <$sDataFileEscaped 2>&1";
|
||||
$sCommandDisplay = "$sMySQLExe --default-character-set=".DEFAULT_CHARACTER_SET." --host=$sHost $sPortOption --user=xxxx --password=xxxx $sDBName <$sDataFileEscaped 2>&1";
|
||||
$sCommand = "$sMySQLExe --default-character-set=".DEFAULT_CHARACTER_SET." --host=$sHost $sPortOption --user=$sUser --password=$sPwd $sTlsOptions $sDBName <$sDataFileEscaped 2>&1";
|
||||
$sCommandDisplay = "$sMySQLExe --default-character-set=".DEFAULT_CHARACTER_SET." --host=$sHost $sPortOption --user=xxxx --password=xxxx $sTlsOptions $sDBName <$sDataFileEscaped 2>&1";
|
||||
|
||||
// Now run the command for real
|
||||
$this->LogInfo("Executing command: $sCommandDisplay");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-backup/2.7.0',
|
||||
'itop-backup/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013-2019 Combodo SARL
|
||||
* Copyright (C) 2010-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
@@ -33,13 +33,9 @@ require_once(APPROOT.'application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
ApplicationMenu::CheckMenuIdEnabled('BackupStatus');
|
||||
|
||||
//$sOperation = utils::ReadParam('operation', 'menu');
|
||||
//$oAppContext = new ApplicationContext();
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$sTransactionId = utils::GetNewTransactionId();
|
||||
$oP = new iTopWebPage(Dict::S('bkp-status-title'));
|
||||
$oP->set_base(utils::GetAbsoluteUrlAppRoot().'pages/');
|
||||
|
||||
@@ -186,7 +182,13 @@ try
|
||||
}
|
||||
else
|
||||
{
|
||||
$sAjax = utils::GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php', array('operation' => 'download', 'file' => $sFilePath));
|
||||
$sAjax = utils::GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php',
|
||||
array(
|
||||
'operation' => 'download',
|
||||
'file' => $sFilePath,
|
||||
'transaction_id' => $sTransactionId,
|
||||
)
|
||||
);
|
||||
$sName = "<a href=\"$sAjax\">".$sFileName.'</a>';
|
||||
}
|
||||
$sSize = SetupUtils::HumanReadableSize(filesize($sBackupFile));
|
||||
@@ -234,7 +236,13 @@ try
|
||||
}
|
||||
else
|
||||
{
|
||||
$sAjax = utils::GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php', array('operation' => 'download', 'file' => $sFilePath));
|
||||
$sAjax = utils::GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php',
|
||||
array(
|
||||
'operation' => 'download',
|
||||
'file' => $sFilePath,
|
||||
'transaction_id' => $sTransactionId,
|
||||
)
|
||||
);
|
||||
$sName = "<a href=\"$sAjax\">".$sFileName.'</a>';
|
||||
}
|
||||
$sSize = SetupUtils::HumanReadableSize(filesize($sBackupFile));
|
||||
@@ -298,9 +306,9 @@ try
|
||||
$sDBSubName = addslashes(MetaModel::GetConfig()->Get('db_subname'));
|
||||
|
||||
$sEnvironment = addslashes(utils::GetCurrentEnvironment());
|
||||
|
||||
|
||||
$oP->add_script(
|
||||
<<<EOF
|
||||
<<<JS
|
||||
function LaunchBackupNow()
|
||||
{
|
||||
$('#backup_success').hide();
|
||||
@@ -312,6 +320,7 @@ function LaunchBackupNow()
|
||||
|
||||
var oParams = {};
|
||||
oParams.operation = 'backup';
|
||||
oParams.transaction_id = "$sTransactionId";
|
||||
$.post(GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php'), oParams, function(data){
|
||||
if (data.search(/error|exceptio|notice|warning/i) != -1)
|
||||
{
|
||||
@@ -337,7 +346,8 @@ function LaunchRestoreNow(sBackupFile, sConfirmationMessage)
|
||||
|
||||
var oParams = {};
|
||||
oParams.operation = 'restore_get_token';
|
||||
oParams.file = sBackupFile;
|
||||
oParams.file = sBackupFile;
|
||||
oParams.transaction_id = "$sTransactionId";
|
||||
$.post(GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php'), oParams, function(data){
|
||||
|
||||
// Get the value of restore_token
|
||||
@@ -347,6 +357,7 @@ function LaunchRestoreNow(sBackupFile, sConfirmationMessage)
|
||||
oParams.operation = 'restore_exec';
|
||||
oParams.token = $("#restore_token").val(); // token to check auth + rights without loading MetaModel
|
||||
oParams.environment = '$sEnvironment'; // needed to load the config
|
||||
oParams.transaction_id = "$sTransactionId";
|
||||
if (oParams.token.length > 0)
|
||||
{
|
||||
$.post(GetAbsoluteUrlModulePage('itop-backup', 'ajax.backup.php'), oParams, function(data){
|
||||
@@ -373,7 +384,7 @@ function LaunchRestoreNow(sBackupFile, sConfirmationMessage)
|
||||
});
|
||||
}
|
||||
}
|
||||
EOF
|
||||
JS
|
||||
);
|
||||
|
||||
if (MetaModel::GetConfig()->Get('demo_mode'))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-config-mgmt/2.7.0',
|
||||
'itop-config-mgmt/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -1882,9 +1882,9 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Server:moreinfo' => 'Спецификация',
|
||||
'Server:otherinfo' => 'Дополнительно',
|
||||
'Server:power' => 'Электропитание',
|
||||
'Person:info' => 'Основное',
|
||||
'UserLocal:info' => 'General information~~',
|
||||
'Person:personal_info' => 'Персональная информация',
|
||||
'Person:info' => 'Основная информация',
|
||||
'UserLocal:info' => 'Основная информация',
|
||||
'Person:personal_info' => 'Личная информация',
|
||||
'Person:notifiy' => 'Уведомления',
|
||||
'Class:Subnet/Tab:IPUsage' => 'Использование IP-адресов',
|
||||
'Class:Subnet/Tab:IPUsage-explain' => 'Интерфейсы с IP-адресом в диапазоне: <em>%1$s</em> - <em>%2$s</em>',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Dateisystemprüfung fehlgeschlagen (Datei nicht vorhanden %1$s)',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Dateisystemprüfung fehlgeschlagen',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Anwendungsupgrade kann durchgeführt werden',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Anwendungsupgrade nicht möglich: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Anwendungsupgrade nicht möglich: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Bereit zum Upgrade',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking files failed (File not exist %1$s)',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking files failed',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start',
|
||||
|
||||
@@ -21,97 +21,98 @@
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array(
|
||||
'iTopUpdate:UI:PageTitle' => 'Application Upgrade~~',
|
||||
'iTopUpdate:UI:PageTitle' => 'Actualización de aplicación',
|
||||
'itop-core-update:UI:SelectUpdateFile' => 'Application Upgrade~~',
|
||||
'itop-core-update:UI:ConfirmUpdate' => 'Application Upgrade~~',
|
||||
'itop-core-update:UI:UpdateCoreFiles' => 'Application Upgrade~~',
|
||||
'iTopUpdate:UI:MaintenanceModeActive' => 'The application is currently under maintenance, no user can access the application. You have to run a setup or restore the application archive to return in normal mode.~~',
|
||||
'iTopUpdate:UI:MaintenanceModeActive' => 'La aplicación está actualmente en mantenimiento, ningún usuario puede acceder. UStede debe ejecutar la instalación o restaturar la aplicación para regresar al modo normal.',
|
||||
'itop-core-update:UI:UpdateDone' => 'Application Upgrade~~',
|
||||
|
||||
'itop-core-update/Operation:SelectUpdateFile/Title' => 'Application Upgrade~~',
|
||||
'itop-core-update/Operation:ConfirmUpdate/Title' => 'Confirm Application Upgrade~~',
|
||||
'itop-core-update/Operation:UpdateCoreFiles/Title' => 'Application Upgrading~~',
|
||||
'itop-core-update/Operation:UpdateDone/Title' => 'Application Upgrade Done~~',
|
||||
'itop-core-update/Operation:ConfirmUpdate/Title' => 'Confirmar actualización de la aplicación',
|
||||
'itop-core-update/Operation:UpdateCoreFiles/Title' => 'Actualizando aplicación',
|
||||
'itop-core-update/Operation:UpdateDone/Title' => 'Actualización de aplicación terminada',
|
||||
|
||||
'iTopUpdate:UI:SelectUpdateFile' => 'Select an upgrade file to upload~~',
|
||||
'iTopUpdate:UI:CheckUpdate' => 'Verify upgrade file~~',
|
||||
'iTopUpdate:UI:ConfirmInstallFile' => 'You are about to install %1$s~~',
|
||||
'iTopUpdate:UI:DoUpdate' => 'Upgrade~~',
|
||||
'iTopUpdate:UI:CurrentVersion' => 'Current installed version~~',
|
||||
'iTopUpdate:UI:NewVersion' => 'Newly installed version~~',
|
||||
'iTopUpdate:UI:Back' => 'Back~~',
|
||||
'iTopUpdate:UI:Cancel' => 'Cancel~~',
|
||||
'iTopUpdate:UI:Continue' => 'Continue~~',
|
||||
'iTopUpdate:UI:RunSetup' => 'Run Setup~~',
|
||||
'iTopUpdate:UI:WithDBBackup' => 'Database backup~~',
|
||||
'iTopUpdate:UI:WithFilesBackup' => 'Application files backup~~',
|
||||
'iTopUpdate:UI:WithoutBackup' => 'No backup is planned~~',
|
||||
'iTopUpdate:UI:Backup' => 'Backup generated before update~~',
|
||||
'iTopUpdate:UI:DoFilesArchive' => 'Archive application files~~',
|
||||
'iTopUpdate:UI:UploadArchive' => 'Select a package to upload~~',
|
||||
'iTopUpdate:UI:ServerFile' => 'Path of a package already on the server~~',
|
||||
'iTopUpdate:UI:WarningReadOnlyDuringUpdate' => 'During the upgrade, the application will be read-only.~~',
|
||||
'iTopUpdate:UI:SelectUpdateFile' => 'Seleccione un archivo de actualización para subir',
|
||||
'iTopUpdate:UI:CheckUpdate' => 'Verificar archivo de actualización',
|
||||
'iTopUpdate:UI:ConfirmInstallFile' => 'Usted va a instalar %1$s',
|
||||
'iTopUpdate:UI:DoUpdate' => 'Actualizar',
|
||||
'iTopUpdate:UI:CurrentVersion' => 'Versión instalada actualmente',
|
||||
'iTopUpdate:UI:NewVersion' => 'Nueva versión instalada',
|
||||
'iTopUpdate:UI:Back' => 'Volver',
|
||||
'iTopUpdate:UI:Cancel' => 'Cancelar',
|
||||
'iTopUpdate:UI:Continue' => 'Continuar',
|
||||
'iTopUpdate:UI:RunSetup' => 'Ejecutar instalación',
|
||||
'iTopUpdate:UI:WithDBBackup' => 'Respaldo de base de datos',
|
||||
'iTopUpdate:UI:WithFilesBackup' => 'Respaldo de archivos de aplicación',
|
||||
'iTopUpdate:UI:WithoutBackup' => 'No hay respaldos planificados',
|
||||
'iTopUpdate:UI:Backup' => 'Respaldo generado antes de actualizar',
|
||||
'iTopUpdate:UI:DoFilesArchive' => 'Respaldar archivos de aplicación',
|
||||
'iTopUpdate:UI:UploadArchive' => 'Selecione un paquete para subir',
|
||||
'iTopUpdate:UI:ServerFile' => 'Ruta del paquete disponible en el servidor',
|
||||
'iTopUpdate:UI:WarningReadOnlyDuringUpdate' => 'Durante la actualización, la aplicación estará en modo sólo lectura.',
|
||||
|
||||
'iTopUpdate:UI:Status' => 'Status~~',
|
||||
'iTopUpdate:UI:Action' => 'Update~~',
|
||||
'iTopUpdate:UI:History' => 'Versions History~~',
|
||||
'iTopUpdate:UI:Progress' => 'Progress of the upgrade~~',
|
||||
'iTopUpdate:UI:Status' => 'Estado',
|
||||
'iTopUpdate:UI:Action' => 'Actualización',
|
||||
'iTopUpdate:UI:History' => 'Historial de versiones',
|
||||
'iTopUpdate:UI:Progress' => 'Progreso de actualización',
|
||||
|
||||
'iTopUpdate:UI:DoBackup:Label' => 'Backup files and database~~',
|
||||
'iTopUpdate:UI:DoBackup:Warning' => 'Backup is not recommended due to limited available disk space~~',
|
||||
'iTopUpdate:UI:DoBackup:Label' => 'Respaldo de archivos y base de datos',
|
||||
'iTopUpdate:UI:DoBackup:Warning' => 'El respaldo no está recomendado por el limitado espacio en el dispositivo',
|
||||
|
||||
'iTopUpdate:UI:DiskFreeSpace' => 'Disk free space~~',
|
||||
'iTopUpdate:UI:ItopDiskSpace' => 'iTop disk space~~',
|
||||
'iTopUpdate:UI:DBDiskSpace' => 'Database disk space~~',
|
||||
'iTopUpdate:UI:FileUploadMaxSize' => 'File upload max size~~',
|
||||
'iTopUpdate:UI:DiskFreeSpace' => 'Espaciolibre en el dispositivo',
|
||||
'iTopUpdate:UI:ItopDiskSpace' => 'Espacio en diso de iTop',
|
||||
'iTopUpdate:UI:DBDiskSpace' => 'Espacio en diso de base de datos',
|
||||
'iTopUpdate:UI:FileUploadMaxSize' => 'Máximo tamaño de subida de archivos',
|
||||
|
||||
'iTopUpdate:UI:PostMaxSize' => 'PHP ini value post_max_size: %1$s~~',
|
||||
'iTopUpdate:UI:UploadMaxFileSize' => 'PHP ini value upload_max_filesize: %1$s~~',
|
||||
'iTopUpdate:UI:PostMaxSize' => 'Valor post_max_size en PHP ini: %1$s~~',
|
||||
'iTopUpdate:UI:UploadMaxFileSize' => 'Valor upload_max_filesize en PHP ini: %1$s~~',
|
||||
|
||||
'iTopUpdate:UI:CanCoreUpdate:Loading' => 'Checking filesystem~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Error' => 'Checking filesystem failed (%1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Loading' => 'Revisando sistema de archivos',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Error' => 'La revisión del sistema de archivos falló (%1$s)',
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'La revisión del sistema de archivos falló (Archivo no existe %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'La revisión del sistema de archivos falló',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'La aplicación puede ser actualizada',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'La aplicación no puede ser actualizada: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
'iTopUpdate:UI:SetupMessage:EnterMaintenance' => 'Entering maintenance mode~~',
|
||||
'iTopUpdate:UI:SetupMessage:Backup' => 'Database backup~~',
|
||||
'iTopUpdate:UI:SetupMessage:FilesArchive' => 'Archive application files~~',
|
||||
'iTopUpdate:UI:SetupMessage:CopyFiles' => 'Copy new version files~~',
|
||||
'iTopUpdate:UI:SetupMessage:CheckCompile' => 'Check application upgrade~~',
|
||||
'iTopUpdate:UI:SetupMessage:Compile' => 'Upgrade application and database~~',
|
||||
'iTopUpdate:UI:SetupMessage:UpdateDatabase' => 'Upgrade database~~',
|
||||
'iTopUpdate:UI:SetupMessage:ExitMaintenance' => 'Exiting maintenance mode~~',
|
||||
'iTopUpdate:UI:SetupMessage:UpdateDone' => 'Upgrade completed~~',
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Listo para empezar',
|
||||
'iTopUpdate:UI:SetupMessage:EnterMaintenance' => 'Entrando en modo mantenimiento',
|
||||
'iTopUpdate:UI:SetupMessage:Backup' => 'Respaldo de base de datos',
|
||||
'iTopUpdate:UI:SetupMessage:FilesArchive' => 'Respaldar archivos de aplicación',
|
||||
'iTopUpdate:UI:SetupMessage:CopyFiles' => 'Copiar archivos de nueva version',
|
||||
'iTopUpdate:UI:SetupMessage:CheckCompile' => 'Revisar actualización de aplicación',
|
||||
'iTopUpdate:UI:SetupMessage:Compile' => 'Actualizar aplicación y base de datos',
|
||||
'iTopUpdate:UI:SetupMessage:UpdateDatabase' => 'Actualizar base de datos',
|
||||
'iTopUpdate:UI:SetupMessage:ExitMaintenance' => 'Saliendo del modo mantenimiento',
|
||||
'iTopUpdate:UI:SetupMessage:UpdateDone' => 'Actualización completada',
|
||||
|
||||
// Errors
|
||||
'iTopUpdate:Error:MissingFunction' => 'Impossible to start upgrade, missing function~~',
|
||||
'iTopUpdate:Error:MissingFile' => 'Missing file: %1$s~~',
|
||||
'iTopUpdate:Error:CorruptedFile' => 'File %1$s is corrupted~~',
|
||||
'iTopUpdate:Error:BadFileFormat' => 'Upgrade file is not a zip file~~',
|
||||
'iTopUpdate:Error:BadFileContent' => 'Upgrade file is not an application archive~~',
|
||||
'iTopUpdate:Error:BadItopProduct' => 'Upgrade file is not compatible with your application~~',
|
||||
'iTopUpdate:Error:Copy' => 'Error, cannot copy \'%1$s\' to \'%2$s\'~~',
|
||||
'iTopUpdate:Error:FileNotFound' => 'File not found~~',
|
||||
'iTopUpdate:Error:NoFile' => 'No file provided~~',
|
||||
'iTopUpdate:Error:InvalidToken' => 'Invalid token~~',
|
||||
'iTopUpdate:Error:UpdateFailed' => 'Upgrade failed ~~',
|
||||
'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'The upload max size seems too small for update. Please change the PHP configuration.~~',
|
||||
'iTopUpdate:Error:MissingFunction' => 'Imposible comenzar actualización, función no disponible',
|
||||
'iTopUpdate:Error:MissingFile' => 'Archivo no encontrado: %1$s~~',
|
||||
'iTopUpdate:Error:CorruptedFile' => 'El archivo %1$s está corrupto',
|
||||
'iTopUpdate:Error:BadFileFormat' => 'El archivo de actualización no es un archivo zip',
|
||||
'iTopUpdate:Error:BadFileContent' => 'El archivo de actualización no es correcto',
|
||||
'iTopUpdate:Error:BadItopProduct' => 'El archivo de actualización no es compatible con su producto',
|
||||
'iTopUpdate:Error:Copy' => 'Error, no puedo copiar \'%1$s\' a \'%2$s\'~~',
|
||||
'iTopUpdate:Error:FileNotFound' => 'Archivo no encontrado',
|
||||
'iTopUpdate:Error:NoFile' => 'Archivo no seleccionado',
|
||||
'iTopUpdate:Error:InvalidToken' => 'Token inválido',
|
||||
'iTopUpdate:Error:UpdateFailed' => 'La actualización ha fallado',
|
||||
'iTopUpdate:Error:FileUploadMaxSizeTooSmall' => 'El archivo de actualización parece demasiado pequeño. Por favor cambie la configuración PHP.',
|
||||
|
||||
'iTopUpdate:UI:RestoreArchive' => 'You can restore your application from the archive \'%1$s\'~~',
|
||||
'iTopUpdate:UI:RestoreBackup' => 'You can restore the database from \'%1$s\'~~',
|
||||
'iTopUpdate:UI:UpdateDone' => 'Upgrade successful~~',
|
||||
'Menu:iTopUpdate' => 'Application Upgrade~~',
|
||||
'Menu:iTopUpdate+' => 'Application Upgrade~~',
|
||||
'iTopUpdate:UI:RestoreArchive' => 'Usted puede restaurar su aplicación desde el archivo \'%1$s\'',
|
||||
'iTopUpdate:UI:RestoreBackup' => 'Usted puede restaurar la base de datos desde \'%1$s\'',
|
||||
'iTopUpdate:UI:UpdateDone' => 'Actualización exitosa',
|
||||
'Menu:iTopUpdate' => 'Actualización de aplicación',
|
||||
'Menu:iTopUpdate+' => 'Actualización de aplicación',
|
||||
|
||||
// Missing itop entries
|
||||
'Class:ModuleInstallation/Attribute:installed' => 'Installed on~~',
|
||||
'Class:ModuleInstallation/Attribute:name' => 'Name~~',
|
||||
'Class:ModuleInstallation/Attribute:version' => 'Version~~',
|
||||
'Class:ModuleInstallation/Attribute:comment' => 'Comment~~',
|
||||
'Class:ModuleInstallation/Attribute:installed' => 'Instalado en',
|
||||
'Class:ModuleInstallation/Attribute:name' => 'Nombre',
|
||||
'Class:ModuleInstallation/Attribute:version' => 'Versión',
|
||||
'Class:ModuleInstallation/Attribute:comment' => 'Commentario',
|
||||
));
|
||||
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Échec de la vérification des fichiers',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'L\'application peut être mise à jour',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'L\'application ne peut pas être mise à jour : %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Attention : la mise à jour de l\'application peut échouer : %1$s',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Prêt pour l\\installation',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
SetupWebPage::AddModule(
|
||||
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
|
||||
'itop-core-update/2.7.0',
|
||||
'itop-core-update/2.7.1',
|
||||
array(
|
||||
// Identification
|
||||
//
|
||||
|
||||
@@ -75,7 +75,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Controle van het bestandssysteem mislukt (Bestand bestaat niet: %1$s)',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Controle van het bestandssysteem is mislukt',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Updaten van toepassing is mogelijk',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Updaten van de toepassing is niet mogelijk: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Updaten van de toepassing is niet mogelijk: %1$s',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Klaar om verder te gaan',
|
||||
|
||||
@@ -73,7 +73,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'iTopUpdate:UI:CanCoreUpdate:ErrorFileNotExist' => 'Checking filesystem failed (File not exist %1$s)~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Failed' => 'Checking filesystem failed~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Yes' => 'Application can be updated~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:No' => 'Application cannot be updated: %1$s~~',
|
||||
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Warning: application update can fail: %1$s~~',
|
||||
|
||||
// Setup Messages
|
||||
'iTopUpdate:UI:SetupMessage:Ready' => 'Ready to start~~',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user