Compare commits

..

12 Commits

546 changed files with 37378 additions and 22737 deletions

View File

@@ -79,8 +79,6 @@ Then, **for a method** of an eligible class:
## Installation
Note : PHP7 is required. Migrating to PHP8 requires some additional work which is questionable as an alternative way to generate a documentation is being considered.
```
cd .doc
composer require phpdocumentor/phpdocumentor:~2 --dev

View File

@@ -25,34 +25,12 @@
if (count($argv) === 1) {
echo "⚠ You must pass the base tag/sha1 as parameter\n";
echo '⚠ You must pass the base tag/sha1 as parameter';
exit(1);
}
$sBaseReference = $argv[1];
/**
* Replace the Github emojis codes by their UTF-8 character equivalent
*/
function ReplaceGitmojis(string $sLine)
{
static $aGitmojis = null;
if ($aGitmojis === null) {
$aRawGitmojis = json_decode(trim(file_get_contents(__DIR__.'/gitmojis.json')), true);
if ($aRawGitmojis === false) {
echo "\nFailed to parse ".__DIR__."/gitmojis.json, emoji codes will not be replaced by their unicode equivalent.\n";
} else {
foreach($aRawGitmojis["gitmojis"] as $aGitmoji) {
$aGitmojis[$aGitmoji['code']] = $aGitmoji['emoji'];
}
}
}
if (is_array($aGitmojis)) {
return str_replace(array_keys($aGitmojis), array_values($aGitmojis), $sLine);
}
}
//--- Get log
$sGitLogCommand = 'git log --decorate --pretty="%h;%s" --date-order --no-merges '.$sBaseReference.'..HEAD';
$sGitLogRaw = shell_exec($sGitLogCommand);
@@ -95,5 +73,5 @@ echo "\n";
echo "# Logs line without bug referenced\n";
echo "sha1;subject\n";
foreach ($aLogLineNoBug as $sLogLine) {
echo ReplaceGitmojis($sLogLine)."\n";
}
echo "$sLogLine\n";
}

View File

@@ -1,589 +0,0 @@
{
"$schema": "https://gitmoji.dev/api/gitmojis/schema",
"gitmojis": [
{
"emoji": "🎨",
"entity": "🎨",
"code": ":art:",
"description": "Improve structure / format of the code.",
"name": "art",
"semver": null
},
{
"emoji": "⚡️",
"entity": "⚡",
"code": ":zap:",
"description": "Improve performance.",
"name": "zap",
"semver": "patch"
},
{
"emoji": "🔥",
"entity": "🔥",
"code": ":fire:",
"description": "Remove code or files.",
"name": "fire",
"semver": null
},
{
"emoji": "🐛",
"entity": "🐛",
"code": ":bug:",
"description": "Fix a bug.",
"name": "bug",
"semver": "patch"
},
{
"emoji": "🚑️",
"entity": "🚑",
"code": ":ambulance:",
"description": "Critical hotfix.",
"name": "ambulance",
"semver": "patch"
},
{
"emoji": "✨",
"entity": "✨",
"code": ":sparkles:",
"description": "Introduce new features.",
"name": "sparkles",
"semver": "minor"
},
{
"emoji": "📝",
"entity": "📝",
"code": ":memo:",
"description": "Add or update documentation.",
"name": "memo",
"semver": null
},
{
"emoji": "🚀",
"entity": "🚀",
"code": ":rocket:",
"description": "Deploy stuff.",
"name": "rocket",
"semver": null
},
{
"emoji": "💄",
"entity": "&#ff99cc;",
"code": ":lipstick:",
"description": "Add or update the UI and style files.",
"name": "lipstick",
"semver": "patch"
},
{
"emoji": "🎉",
"entity": "🎉",
"code": ":tada:",
"description": "Begin a project.",
"name": "tada",
"semver": null
},
{
"emoji": "✅",
"entity": "✅",
"code": ":white_check_mark:",
"description": "Add, update, or pass tests.",
"name": "white-check-mark",
"semver": null
},
{
"emoji": "🔒️",
"entity": "🔒",
"code": ":lock:",
"description": "Fix security or privacy issues.",
"name": "lock",
"semver": "patch"
},
{
"emoji": "🔐",
"entity": "🔐",
"code": ":closed_lock_with_key:",
"description": "Add or update secrets.",
"name": "closed-lock-with-key",
"semver": null
},
{
"emoji": "🔖",
"entity": "🔖",
"code": ":bookmark:",
"description": "Release / Version tags.",
"name": "bookmark",
"semver": null
},
{
"emoji": "🚨",
"entity": "🚨",
"code": ":rotating_light:",
"description": "Fix compiler / linter warnings.",
"name": "rotating-light",
"semver": null
},
{
"emoji": "🚧",
"entity": "🚧",
"code": ":construction:",
"description": "Work in progress.",
"name": "construction",
"semver": null
},
{
"emoji": "💚",
"entity": "💚",
"code": ":green_heart:",
"description": "Fix CI Build.",
"name": "green-heart",
"semver": null
},
{
"emoji": "⬇️",
"entity": "⬇️",
"code": ":arrow_down:",
"description": "Downgrade dependencies.",
"name": "arrow-down",
"semver": "patch"
},
{
"emoji": "⬆️",
"entity": "⬆️",
"code": ":arrow_up:",
"description": "Upgrade dependencies.",
"name": "arrow-up",
"semver": "patch"
},
{
"emoji": "📌",
"entity": "📌",
"code": ":pushpin:",
"description": "Pin dependencies to specific versions.",
"name": "pushpin",
"semver": "patch"
},
{
"emoji": "👷",
"entity": "👷",
"code": ":construction_worker:",
"description": "Add or update CI build system.",
"name": "construction-worker",
"semver": null
},
{
"emoji": "📈",
"entity": "📈",
"code": ":chart_with_upwards_trend:",
"description": "Add or update analytics or track code.",
"name": "chart-with-upwards-trend",
"semver": "patch"
},
{
"emoji": "♻️",
"entity": "♻",
"code": ":recycle:",
"description": "Refactor code.",
"name": "recycle",
"semver": null
},
{
"emoji": "",
"entity": "➕",
"code": ":heavy_plus_sign:",
"description": "Add a dependency.",
"name": "heavy-plus-sign",
"semver": "patch"
},
{
"emoji": "",
"entity": "➖",
"code": ":heavy_minus_sign:",
"description": "Remove a dependency.",
"name": "heavy-minus-sign",
"semver": "patch"
},
{
"emoji": "🔧",
"entity": "🔧",
"code": ":wrench:",
"description": "Add or update configuration files.",
"name": "wrench",
"semver": "patch"
},
{
"emoji": "🔨",
"entity": "🔨",
"code": ":hammer:",
"description": "Add or update development scripts.",
"name": "hammer",
"semver": null
},
{
"emoji": "🌐",
"entity": "🌐",
"code": ":globe_with_meridians:",
"description": "Internationalization and localization.",
"name": "globe-with-meridians",
"semver": "patch"
},
{
"emoji": "✏️",
"entity": "",
"code": ":pencil2:",
"description": "Fix typos.",
"name": "pencil2",
"semver": "patch"
},
{
"emoji": "💩",
"entity": "",
"code": ":poop:",
"description": "Write bad code that needs to be improved.",
"name": "poop",
"semver": null
},
{
"emoji": "⏪️",
"entity": "⏪",
"code": ":rewind:",
"description": "Revert changes.",
"name": "rewind",
"semver": "patch"
},
{
"emoji": "🔀",
"entity": "🔀",
"code": ":twisted_rightwards_arrows:",
"description": "Merge branches.",
"name": "twisted-rightwards-arrows",
"semver": null
},
{
"emoji": "📦️",
"entity": "&#1F4E6;",
"code": ":package:",
"description": "Add or update compiled files or packages.",
"name": "package",
"semver": "patch"
},
{
"emoji": "👽️",
"entity": "&#1F47D;",
"code": ":alien:",
"description": "Update code due to external API changes.",
"name": "alien",
"semver": "patch"
},
{
"emoji": "🚚",
"entity": "&#1F69A;",
"code": ":truck:",
"description": "Move or rename resources (e.g.: files, paths, routes).",
"name": "truck",
"semver": null
},
{
"emoji": "📄",
"entity": "&#1F4C4;",
"code": ":page_facing_up:",
"description": "Add or update license.",
"name": "page-facing-up",
"semver": null
},
{
"emoji": "💥",
"entity": "💥",
"code": ":boom:",
"description": "Introduce breaking changes.",
"name": "boom",
"semver": "major"
},
{
"emoji": "🍱",
"entity": "&#1F371",
"code": ":bento:",
"description": "Add or update assets.",
"name": "bento",
"semver": "patch"
},
{
"emoji": "♿️",
"entity": "♿",
"code": ":wheelchair:",
"description": "Improve accessibility.",
"name": "wheelchair",
"semver": "patch"
},
{
"emoji": "💡",
"entity": "💡",
"code": ":bulb:",
"description": "Add or update comments in source code.",
"name": "bulb",
"semver": null
},
{
"emoji": "🍻",
"entity": "🍻",
"code": ":beers:",
"description": "Write code drunkenly.",
"name": "beers",
"semver": null
},
{
"emoji": "💬",
"entity": "💬",
"code": ":speech_balloon:",
"description": "Add or update text and literals.",
"name": "speech-balloon",
"semver": "patch"
},
{
"emoji": "🗃️",
"entity": "🗃",
"code": ":card_file_box:",
"description": "Perform database related changes.",
"name": "card-file-box",
"semver": "patch"
},
{
"emoji": "🔊",
"entity": "🔊",
"code": ":loud_sound:",
"description": "Add or update logs.",
"name": "loud-sound",
"semver": null
},
{
"emoji": "🔇",
"entity": "🔇",
"code": ":mute:",
"description": "Remove logs.",
"name": "mute",
"semver": null
},
{
"emoji": "👥",
"entity": "👥",
"code": ":busts_in_silhouette:",
"description": "Add or update contributor(s).",
"name": "busts-in-silhouette",
"semver": null
},
{
"emoji": "🚸",
"entity": "🚸",
"code": ":children_crossing:",
"description": "Improve user experience / usability.",
"name": "children-crossing",
"semver": "patch"
},
{
"emoji": "🏗️",
"entity": "&#1f3d7;",
"code": ":building_construction:",
"description": "Make architectural changes.",
"name": "building-construction",
"semver": null
},
{
"emoji": "📱",
"entity": "📱",
"code": ":iphone:",
"description": "Work on responsive design.",
"name": "iphone",
"semver": "patch"
},
{
"emoji": "🤡",
"entity": "🤡",
"code": ":clown_face:",
"description": "Mock things.",
"name": "clown-face",
"semver": null
},
{
"emoji": "🥚",
"entity": "🥚",
"code": ":egg:",
"description": "Add or update an easter egg.",
"name": "egg",
"semver": "patch"
},
{
"emoji": "🙈",
"entity": "&#8bdfe7;",
"code": ":see_no_evil:",
"description": "Add or update a .gitignore file.",
"name": "see-no-evil",
"semver": null
},
{
"emoji": "📸",
"entity": "📸",
"code": ":camera_flash:",
"description": "Add or update snapshots.",
"name": "camera-flash",
"semver": null
},
{
"emoji": "⚗️",
"entity": "⚗",
"code": ":alembic:",
"description": "Perform experiments.",
"name": "alembic",
"semver": "patch"
},
{
"emoji": "🔍️",
"entity": "🔍",
"code": ":mag:",
"description": "Improve SEO.",
"name": "mag",
"semver": "patch"
},
{
"emoji": "🏷️",
"entity": "🏷",
"code": ":label:",
"description": "Add or update types.",
"name": "label",
"semver": "patch"
},
{
"emoji": "🌱",
"entity": "🌱",
"code": ":seedling:",
"description": "Add or update seed files.",
"name": "seedling",
"semver": null
},
{
"emoji": "🚩",
"entity": "🚩",
"code": ":triangular_flag_on_post:",
"description": "Add, update, or remove feature flags.",
"name": "triangular-flag-on-post",
"semver": "patch"
},
{
"emoji": "🥅",
"entity": "🥅",
"code": ":goal_net:",
"description": "Catch errors.",
"name": "goal-net",
"semver": "patch"
},
{
"emoji": "💫",
"entity": "💫",
"code": ":dizzy:",
"description": "Add or update animations and transitions.",
"name": "dizzy",
"semver": "patch"
},
{
"emoji": "🗑️",
"entity": "🗑",
"code": ":wastebasket:",
"description": "Deprecate code that needs to be cleaned up.",
"name": "wastebasket",
"semver": "patch"
},
{
"emoji": "🛂",
"entity": "🛂",
"code": ":passport_control:",
"description": "Work on code related to authorization, roles and permissions.",
"name": "passport-control",
"semver": "patch"
},
{
"emoji": "🩹",
"entity": "🩹",
"code": ":adhesive_bandage:",
"description": "Simple fix for a non-critical issue.",
"name": "adhesive-bandage",
"semver": "patch"
},
{
"emoji": "🧐",
"entity": "🧐",
"code": ":monocle_face:",
"description": "Data exploration/inspection.",
"name": "monocle-face",
"semver": null
},
{
"emoji": "⚰️",
"entity": "⚰",
"code": ":coffin:",
"description": "Remove dead code.",
"name": "coffin",
"semver": null
},
{
"emoji": "🧪",
"entity": "🧪",
"code": ":test_tube:",
"description": "Add a failing test.",
"name": "test-tube",
"semver": null
},
{
"emoji": "👔",
"entity": "👔",
"code": ":necktie:",
"description": "Add or update business logic.",
"name": "necktie",
"semver": "patch"
},
{
"emoji": "🩺",
"entity": "🩺",
"code": ":stethoscope:",
"description": "Add or update healthcheck.",
"name": "stethoscope",
"semver": null
},
{
"emoji": "🧱",
"entity": "🧱",
"code": ":bricks:",
"description": "Infrastructure related changes.",
"name": "bricks",
"semver": null
},
{
"emoji": "🧑‍💻",
"entity": "🧑‍💻",
"code": ":technologist:",
"description": "Improve developer experience.",
"name": "technologist",
"semver": null
},
{
"emoji": "💸",
"entity": "💸",
"code": ":money_with_wings:",
"description": "Add sponsorships or money related infrastructure.",
"name": "money-with-wings",
"semver": null
},
{
"emoji": "🧵",
"entity": "🧵",
"code": ":thread:",
"description": "Add or update code related to multithreading or concurrency.",
"name": "thread",
"semver": null
},
{
"emoji": "🦺",
"entity": "🦺",
"code": ":safety_vest:",
"description": "Add or update code related to validation.",
"name": "safety-vest",
"semver": null
}
]
}

View File

@@ -1,5 +1,9 @@
<p align="center"><a href="https://www.combodo.com/itop-193" target="_blank">
<img src="https://www.combodo.com/logos/logo-itop-baseline.svg" width=350>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/images/logos/logo-itop-baseline-light.svg">
<source media="(prefers-color-scheme: light)" srcset="/images/logos/logo-itop-baseline-dark.svg">
<img src="/images/logos/logo-itop-baseline-light.svg" width="350" alt="Logo iTop with baseline" />
</picture>
</a></p>
@@ -76,9 +80,7 @@ We would like to give a special thank you 🤗 to the people from the community
### Names
- Al Hallak, Amr (a.k.a [@v4yne1](https://github.com/v4yne1))
- Alves, David
- Audon, Florian
- Beck, Pedro
- Beer, Christian (a.k.a [@ChristianBeer](https://www.github.com/ChristianBeer))
- Bilger, Jean-François
@@ -90,26 +92,19 @@ We would like to give a special thank you 🤗 to the people from the community
- Colantoni, Maria Laura
- Couronné, Guy
- Dejin, Bie (a.k.a [@bdejin](https://github.com/bdejin))
- Delicado, Elodie
- Dvořák, Lukáš
- Goethals, Stefan
- Giuva, Vincenzo Katriel (a.k.a [@DarkNight97boss](https://github.com/DarkNight97boss))
- Gumble, David
- Heloir, Arthur
- Janssens, Jelle (a.k.a [@janssensjelle](https://github.com/janssensjelle))
- Ji, Leeb (冀利斌) (a.k.a [@chileeb](https://github.com/chileeb))
- Kaltefleiter, Lars (a.k.a [@larhip](https://www.github.com/larhip))
- Khamit, Shamil
- Kincel, Martin
- Konečný, Kamil
- Kunin, Vladimir
- Lassiter, Denis (a.k.a [@delassiter](https://github.com/delassiter))
- Lassiter, Dennis
- Lazcano, Federico
- Lucas, Jonathan
- Malik, Remie
- Mantel, Ina
- Martin, Pierre (a.k.a [@Worty](https://github.com/worty-syn))
- Melchiorre, Romain
- Mindêllo de Andrade, Lucas (a.k.a [@rokam](https://www.github.com/rokam))
- Mozart de Oliveira, Eduardo (a.k.a [@eduardomozart](https://github.com/eduardomozart))
- Raenker, Martin
@@ -121,12 +116,10 @@ We would like to give a special thank you 🤗 to the people from the community
- Seki, Shoji
- Shilov, Vladimir
- Stetina, Pavel (a.k.a [@Stetinac](https://github.com/Stetinac))
- Stukalov, Ilya (a.k.a [@ilya](https://www.github.com/ilya-stukalov))
- Stukalov, Ilya (a.k.a [@ilya](https://www.github.com/ilya)-stukalov)
- Tarjányi, Csaba (a.k.a [@tacsaby](https://github.com/tacsaby))
- Toraya, Chairat (a.k.a [@Kyokito1412](https://github.com/Kyokito1412))
- Tulio, Marco
- Turrubiates, Miguel
- Višnjić, Aldin (a.k.a[@viliald](https://github.com/viliald))
- Vlk, Karel (a.k.a [@vlk-charles](https://www.github.com/vlk-charles))
### Aliases
@@ -148,6 +141,4 @@ We would like to give a special thank you 🤗 to the people from the community
- [ITOMIG](https://www.itomig.de/)
- [Pimkie](https://www.pimkie.com/)
- [Super-Visions](https://www.super-visions.com/)
- [Defence Tech Cyber Security - Malware Lab](https://github.com/DefenceTechSecurity)
- Orange Cyberdefense
- MipihSIB

View File

@@ -399,25 +399,25 @@ class URP_ActionGrant extends UserRightsBaseClass
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_actions",
"db_key_field" => "id",
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_actions",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
// Common to all grant classes (could be factorized by class inheritence, but this has to be benchmarked)
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass" => "URP_Profiles", "jointype" => "", "allowed_values" => null, "sql" => "profileid", "is_null_allowed" => false, "on_target_delete" => DEL_SILENT, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values" => null, "extkey_attcode" => 'profileid', "target_attcode" => "name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category" => "", "more_values" => "", "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values" => new ValueSetEnum('yes,no'), "sql" => "permission", "default_value" => "yes", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass"=>"URP_Profiles", "jointype"=> "", "allowed_values"=>null, "sql"=>"profileid", "is_null_allowed"=>false, "on_target_delete"=>DEL_SILENT, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values"=>null, "extkey_attcode"=> 'profileid', "target_attcode"=>"name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category"=>"", "more_values"=>"", "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values" => null, "sql" => "action", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('profileid', 'class', 'permission', 'action')); // Attributes to be displayed for the complete details
@@ -435,25 +435,25 @@ class URP_StimulusGrant extends UserRightsBaseClass
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_stimulus",
"db_key_field" => "id",
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_stimulus",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
// Common to all grant classes (could be factorized by class inheritence, but this has to be benchmarked)
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass" => "URP_Profiles", "jointype" => "", "allowed_values" => null, "sql" => "profileid", "is_null_allowed" => false, "on_target_delete" => DEL_SILENT, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values" => null, "extkey_attcode" => 'profileid', "target_attcode" => "name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category" => "", "more_values" => "", "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values" => new ValueSetEnum('yes,no'), "sql" => "permission", "default_value" => "yes", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass"=>"URP_Profiles", "jointype"=> "", "allowed_values"=>null, "sql"=>"profileid", "is_null_allowed"=>false, "on_target_delete"=>DEL_SILENT, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values"=>null, "extkey_attcode"=> 'profileid', "target_attcode"=>"name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category"=>"", "more_values"=>"", "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values" => null, "sql" => "action", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('profileid', 'class', 'permission', 'stimulus')); // Attributes to be displayed for the complete details

View File

@@ -402,7 +402,7 @@ class URP_ClassProjection extends UserRightsBaseClass
MetaModel::Init_AddAttribute(new AttributeExternalKey("dimensionid", array("targetclass"=>"URP_Dimensions", "jointype"=> "", "allowed_values"=>null, "sql"=>"dimensionid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("dimension", array("allowed_values"=>null, "extkey_attcode"=> 'dimensionid', "target_attcode"=>"name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category" => "", "more_values" => "", "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category"=>"", "more_values"=>"", "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("value", array("allowed_values"=>null, "sql"=>"value", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("attribute", array("allowed_values"=>null, "sql"=>"attribute", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
@@ -459,25 +459,25 @@ class URP_ActionGrant extends UserRightsBaseClass
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_actions",
"db_key_field" => "id",
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_actions",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
// Common to all grant classes (could be factorized by class inheritence, but this has to be benchmarked)
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass" => "URP_Profiles", "jointype" => "", "allowed_values" => null, "sql" => "profileid", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values" => null, "extkey_attcode" => 'profileid', "target_attcode" => "name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category" => "", "more_values" => "", "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values" => new ValueSetEnum('yes,no'), "sql" => "permission", "default_value" => "yes", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass"=>"URP_Profiles", "jointype"=> "", "allowed_values"=>null, "sql"=>"profileid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values"=>null, "extkey_attcode"=> 'profileid', "target_attcode"=>"name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category"=>"", "more_values"=>"", "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values" => null, "sql" => "action", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('profileid', 'class', 'permission', 'action')); // Attributes to be displayed for the complete details
@@ -495,25 +495,25 @@ class URP_StimulusGrant extends UserRightsBaseClass
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_stimulus",
"db_key_field" => "id",
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "profileid",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_urp_grant_stimulus",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
// Common to all grant classes (could be factorized by class inheritence, but this has to be benchmarked)
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass" => "URP_Profiles", "jointype" => "", "allowed_values" => null, "sql" => "profileid", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values" => null, "extkey_attcode" => 'profileid', "target_attcode" => "name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category" => "", "more_values" => "", "sql" => "class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values" => new ValueSetEnum('yes,no'), "sql" => "permission", "default_value" => "yes", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("profileid", array("targetclass"=>"URP_Profiles", "jointype"=> "", "allowed_values"=>null, "sql"=>"profileid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("profile", array("allowed_values"=>null, "extkey_attcode"=> 'profileid', "target_attcode"=>"name")));
MetaModel::Init_AddAttribute(new AttributeClass("class", array("class_category"=>"", "more_values"=>"", "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values" => null, "sql" => "action", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('profileid', 'class', 'permission', 'stimulus')); // Attributes to be displayed for the complete details

View File

@@ -1711,11 +1711,6 @@ interface iRestServiceProvider
public function ExecOperation($sVersion, $sVerb, $aParams);
}
/**
* A REST service provider implementing this interface will have its input JSON data sanitized for logging purposes
* @since 2.7.13, 3.2.1-1
* @see \iRestServiceProvider
*/
interface iRestInputSanitizer
{
public function SanitizeJsonInput(string $sJsonInput): string;

View File

@@ -698,10 +698,10 @@ HTML
$sLinkedClass = $oAttDef->GetLinkedClass();
// Filter out links pointing to obsolete objects (if relevant)
$oOrmLinkSet = $this->Get($sAttCode);
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
$iCount = $oLinkSet->Count();
$oOrmLinkSet = $this->Get($sAttCode);
$oLinkSet = $oOrmLinkSet->ToDBObjectSet(utils::ShowObsoleteData());
$iCount = $oLinkSet->Count();
if ($this->IsNew()) {
$iFlags = $this->GetInitialStateAttributeFlags($sAttCode);
} else {
@@ -766,9 +766,9 @@ HTML
$oPage->add($sHTMLValue);
} else {
if ($oAttDef->IsIndirect()) {
$oBlockLinkSetViewTable = new BlockIndirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly, $iCount);
$oBlockLinkSetViewTable = new BlockIndirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly);
} else {
$oBlockLinkSetViewTable = new BlockDirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly, $iCount);
$oBlockLinkSetViewTable = new BlockDirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly);
}
$oPage->AddUiBlock($oBlockLinkSetViewTable);
}
@@ -805,16 +805,16 @@ HTML
if (!$this->IsNew()) {
// Look for any trigger that considers this object as "In Scope"
// If any trigger has been found then display a tab with notifications
// If all triggers on an object have been deleted, we consider that we no longer need the event notification information
//
$aTriggers = $this->GetRelatedTriggersIDs();
if (count($aTriggers) > 0) {
$iId = $this->GetKey();
$aParams = array('class' => get_class($this), 'id' => $iId);
$aParams = array('triggers' => $aTriggers, 'id' => $iId);
$aNotifSearches = array();
$iNotifsCount = 0;
$aNotificationClasses = MetaModel::EnumChildClasses('EventNotification');
foreach ($aNotificationClasses as $sNotifClass) {
$aNotifSearches[$sNotifClass] = DBObjectSearch::FromOQL("SELECT $sNotifClass AS Ev WHERE Ev.object_id = :id AND Ev.object_class = :class");
$aNotifSearches[$sNotifClass] = DBObjectSearch::FromOQL("SELECT $sNotifClass AS Ev JOIN Trigger AS T ON Ev.trigger_id = T.id WHERE T.id IN (:triggers) AND Ev.object_id = :id");
$aNotifSearches[$sNotifClass]->SetInternalParams($aParams);
$oNotifSet = new DBObjectSet($aNotifSearches[$sNotifClass], array());
$iNotifsCount += $oNotifSet->Count();
@@ -5207,7 +5207,7 @@ HTML
$aKeys = array_keys($aValues[$sAttCode]);
$currValue = $aKeys[0]; // The only value is the first key
if ($oAttDef->GetEditClass() == 'LinkedSet') {
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
LinkSetDataTransformer::StringToOrmLinkSet($aValues[$sAttCode][$currValue]['edit_value'], $oOrmLinkSet);
} else {
@@ -5261,7 +5261,7 @@ HTML
}
$oDummyObj->Set($sAttCode, $oTagSet);
} else if ($oAttDef->GetEditClass() == 'LinkedSet') {
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
$oOrmLinkSet = $oDummyObj->Get($sAttCode);
foreach ($aMultiValues as $key => $sValue) {
LinkSetDataTransformer::StringToOrmLinkSet($sValue['edit_value'], $oOrmLinkSet);
}

View File

@@ -296,21 +296,21 @@ abstract class Dashboard
public function FromParams($aParams)
{
$this->sLayoutClass = $aParams['layout_class'];
if (!is_subclass_of($this->sLayoutClass,DashboardLayout::class)) {
throw new InvalidParameterException('Invalid parameter layout_class "'.$aParams['layout_class'].'"');
}
$this->sTitle = $aParams['title'];
$this->bAutoReload = $aParams['auto_reload'] == 'true';
$this->iAutoReloadSec = max(MetaModel::GetConfig()->Get('min_reload_interval'), (int) $aParams['auto_reload_sec']);
foreach($aParams['cells'] as $aCell) {
foreach($aParams['cells'] as $aCell)
{
$aCellDashlets = array();
foreach($aCell as $aDashletParams) {
foreach($aCell as $aDashletParams)
{
$sDashletClass = $aDashletParams['dashlet_class'];
$sId = $aDashletParams['dashlet_id'];
/** @var \Dashlet $oNewDashlet */
$oNewDashlet = new $sDashletClass($this->oMetaModel, $sId);
if (isset($aDashletParams['dashlet_type'])) {
if (isset($aDashletParams['dashlet_type']))
{
$oNewDashlet->SetDashletType($aDashletParams['dashlet_type']);
}
$oForm = $oNewDashlet->GetForm();

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<classes>
<class id="AbstractResource" _delta="define">
<parent>cmdbAbstractObject</parent>
@@ -45,7 +45,7 @@
<properties>
<comment>/** Acknowledge welcome popup messages */</comment>
<abstract>false</abstract>
<category/>
<category></category>
<key_type>autoincrement</key_type>
<db_table>priv_welcome_popup_acknowledge</db_table>
</properties>

View File

@@ -263,8 +263,6 @@ class DisplayBlock
/** param for export.php */
'refresh_action',
/**to add refresh button in datatable*/
'object_count',
/** int number of objects in list */
], DataTableUIBlockFactory::GetAllowedParams()),
static::ENUM_STYLE_LIST_SEARCH => array_merge([
'update_history',
@@ -1865,11 +1863,7 @@ class MenuBlock extends DisplayBlock
$aSelectedClasses = $this->GetFilter()->GetSelectedClasses();
$bIsForLinkset = isset($aExtraParams['target_attr']);
$oSet = new CMDBObjectSet($this->GetFilter());
if(isset($aExtraParams['object_count'])){
$iSetCount = $aExtraParams['object_count'];
} else {
$iSetCount = $oSet->Count();
}
$iSetCount = $oSet->Count();
/** @var string $sRefreshAction JS snippet to run when clicking on the refresh button of the menu */
$sRefreshAction = $aExtraParams['refresh_action'] ?? '';
$bIsCreationInModal = isset($aExtraParams['creation_in_modal']) && $aExtraParams['creation_in_modal'] === true;

View File

@@ -303,7 +303,7 @@ class ExcelExporter
{
if ($this->sOutputFilePath == null)
{
return utils::GetDataPath().'bulk_export/'.$this->sToken.'.xlsx';
return APPROOT.'data/bulk_export/'.$this->sToken.'.xlsx';
}
else
{
@@ -313,14 +313,14 @@ class ExcelExporter
public static function GetExcelFileFromToken($sToken)
{
return @file_get_contents(utils::GetDataPath().'bulk_export/'.$sToken.'.xlsx');
return @file_get_contents(APPROOT.'data/bulk_export/'.$sToken.'.xlsx');
}
public static function CleanupFromToken($sToken)
{
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.status');
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.data');
@unlink(utils::GetDataPath().'bulk_export/'.$sToken.'.xlsx');
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.status');
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.data');
@unlink(APPROOT.'data/bulk_export/'.$sToken.'.xlsx');
}
public function Cleanup()
@@ -334,7 +334,7 @@ class ExcelExporter
*/
public static function CleanupOldFiles()
{
$aFiles = glob(utils::GetDataPath().'bulk_export/*.*');
$aFiles = glob(APPROOT.'data/bulk_export/*.*');
$iDelay = MetaModel::GetConfig()->Get('xlsx_exporter_cleanup_old_files_delay');
if($iDelay > 0)
@@ -416,14 +416,14 @@ class ExcelExporter
protected function CheckDataDir()
{
if(!is_dir(utils::GetDataPath()."bulk_export"))
if(!is_dir(APPROOT."data/bulk_export"))
{
@mkdir(utils::GetDataPath()."bulk_export", 0777, true /* recursive */);
@mkdir(APPROOT."data/bulk_export", 0777, true /* recursive */);
clearstatcache();
}
if (!is_writable(utils::GetDataPath()."bulk_export"))
if (!is_writable(APPROOT."data/bulk_export"))
{
throw new Exception('Data directory "'.utils::GetDataPath().'bulk_export" could not be written.');
throw new Exception('Data directory "'.APPROOT.'data/bulk_export" could not be written.');
}
}
@@ -433,12 +433,12 @@ class ExcelExporter
{
$sToken = $this->sToken;
}
return utils::GetDataPath()."bulk_export/$sToken.status";
return APPROOT."data/bulk_export/$sToken.status";
}
protected function GetDataFile()
{
return utils::GetDataPath().'bulk_export/'.$this->sToken.'.data';
return APPROOT.'data/bulk_export/'.$this->sToken.'.data';
}
protected function GetNewToken()

View File

@@ -63,14 +63,14 @@ class CoreCannotSaveObjectException extends CoreException
public function getTextMessage()
{
$sTitle = Dict::S('UI:Error:SaveFailed');
$sContent = utils::HtmlEntities($sTitle);
$sContent = $sTitle;
if (count($this->aIssues) == 1) {
$sIssue = reset($this->aIssues);
$sContent .= utils::HtmlEntities($sIssue);
$sContent .= $sIssue;
} else {
foreach ($this->aIssues as $sError) {
$sContent .= " ".utils::HtmlEntities($sError).", ";
$sContent .= " " . $sError . ", ";
}
}

View File

@@ -36,30 +36,29 @@ class InputOutputTask extends cmdbAbstractObject
{
$aParams = array
(
"category" => "application",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_iotask",
"db_key_field" => "id",
"category" => "application",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_iotask",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values" => new ValueSetEnum('Input, Ouput'), "sql" => "category", "default_value" => "Input", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values" => new ValueSetEnum('File, Database, Web Service'), "sql" => "source_type", "default_value" => "File", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype",
array("allowed_values" => new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql" => "source_subtype", "default_value" => "CSV", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values" => null, "sql" => "source_path", "default_value" => "", "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category" => "", "more_values" => "", "sql" => "objects_class", "default_value" => null, "is_null_allowed" => true, "depends_on" => array(), "class_exclusion_list" => null)));
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "test_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values" => new ValueSetEnum('Yes,No'), "sql" => "verbose_mode", "default_value" => 'No', "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values" => new ValueSetEnum('Full, Update Only, Creation Only'), "sql" => "options", "default_value" => 'Full', "is_null_allowed" => true, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values"=>new ValueSetEnum('Input, Ouput'), "sql"=>"category", "default_value"=>"Input", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values"=>new ValueSetEnum('File, Database, Web Service'), "sql"=>"source_type", "default_value"=>"File", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype", array("allowed_values"=>new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql"=>"source_subtype", "default_value"=>"CSV", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values"=>null, "sql"=>"source_path", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category"=>"", "more_values"=>"", "sql"=>"objects_class", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"test_mode", "default_value"=>'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"verbose_mode", "default_value" => 'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values"=>new ValueSetEnum('Full, Update Only, Creation Only'), "sql"=>"options", "default_value"=> 'Full', "is_null_allowed"=>true, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path', 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path' , 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the std search form

View File

@@ -228,7 +228,7 @@ class privUITransactionFile
*/
public static function GetNewTransactionId()
{
if (!is_dir(utils::GetDataPath().'transactions'))
if (!is_dir(APPROOT.'data/transactions'))
{
if (!is_writable(APPROOT.'data'))
{
@@ -236,22 +236,22 @@ class privUITransactionFile
}
// condition avoids race condition N°2345
// See https://github.com/kalessil/phpinspectionsea/blob/master/docs/probable-bugs.md#mkdir-race-condition
if (!mkdir($concurrentDirectory = utils::GetDataPath().'transactions') && !is_dir($concurrentDirectory))
if (!mkdir($concurrentDirectory = APPROOT.'data/transactions') && !is_dir($concurrentDirectory))
{
throw new Exception('Failed to create the directory "'.utils::GetDataPath().'transactions". Ajust the rights on the parent directory or let an administrator create the transactions directory and give the web sever enough rights to write into it.');
throw new Exception('Failed to create the directory "'.APPROOT.'data/transactions". Ajust the rights on the parent directory or let an administrator create the transactions directory and give the web sever enough rights to write into it.');
}
}
if (!is_writable(utils::GetDataPath().'transactions'))
if (!is_writable(APPROOT.'data/transactions'))
{
throw new Exception('The directory "'.utils::GetDataPath().'transactions" must be writable to the application.');
throw new Exception('The directory "'.APPROOT.'data/transactions" must be writable to the application.');
}
$iCurrentUserId = static::GetCurrentUserId();
self::CleanupOldTransactions();
$sTransactionIdFullPath = tempnam(utils::GetDataPath().'transactions', static::GetUserPrefix());
$sTransactionIdFullPath = tempnam(APPROOT.'data/transactions', static::GetUserPrefix());
file_put_contents($sTransactionIdFullPath, $iCurrentUserId, LOCK_EX);
$sTransactionIdFileName = basename($sTransactionIdFullPath);
@@ -274,8 +274,8 @@ class privUITransactionFile
*/
public static function IsTransactionValid($id, $bRemoveTransaction = true)
{
// Constraint the transaction file within utils::GetDataPath().'transactions'
$sTransactionDir = realpath(utils::GetDataPath().'transactions');
// Constraint the transaction file within APPROOT.'data/transactions'
$sTransactionDir = realpath(APPROOT.'data/transactions');
$sFilepath = utils::RealPath($sTransactionDir.'/'.$id, $sTransactionDir);
if (($sFilepath === false) || (strlen($sTransactionDir) == strlen($sFilepath)))
{
@@ -348,7 +348,7 @@ class privUITransactionFile
clearstatcache();
$iLimit = time() - 24*3600;
$sPattern = $sTransactionDir ? "$sTransactionDir/*" : utils::GetDataPath().'transactions/*';
$sPattern = $sTransactionDir ? "$sTransactionDir/*" : APPROOT.'data/transactions/*';
$aTransactions = glob($sPattern);
foreach($aTransactions as $sFileName)
{
@@ -368,7 +368,7 @@ class privUITransactionFile
{
clearstatcache();
$aResult = array();
$aTransactions = glob(utils::GetDataPath().'transactions/'.self::GetUserPrefix().'*');
$aTransactions = glob(APPROOT.'data/transactions/'.self::GetUserPrefix().'*');
foreach($aTransactions as $sFileName)
{
$aResult[] = date('Y-m-d H:i:s', filemtime($sFileName)).' - '.basename($sFileName);

View File

@@ -1556,8 +1556,7 @@ class utils
$aResult[] = new JSPopupMenuItem('UI:Menu:AddToDashboard', Dict::S('UI:Menu:AddToDashboard'), "DashletCreationDlg('$sOQL', '$sContext')");
$aResult[] = new JSPopupMenuItem('UI:Menu:ShortcutList', Dict::S('UI:Menu:ShortcutList'), "ShortcutListDlg('$sOQL', '$sDataTableId', '$sContext')");
if (ApplicationMenu::IsMenuIdEnabled('RunQueriesMenu')) {
$oMenuItemPlay = new JSPopupMenuItem('UI:Menu:OpenOQL', Dict::S('UI:Edit:TestQuery'), "OpenOql('$sOQL')");
$oMenuItemPlay->SetIconClass('fas fa-play');
$oMenuItemPlay = new JSPopupMenuItem('UI:Menu:OpenOQL', Dict::S('UI:Menu:OpenOQL'), "OpenOql('$sOQL')");
$aResult[] = $oMenuItemPlay;
}

View File

@@ -11,7 +11,7 @@ define('APPCONF', APPROOT.'conf/');
*
* @see ITOP_CORE_VERSION to get full iTop core version
*/
define('ITOP_DESIGN_LATEST_VERSION', '3.3');
define('ITOP_DESIGN_LATEST_VERSION', '3.2');
/**
* Constant containing the iTop core version, whatever application was built
@@ -23,7 +23,7 @@ define('ITOP_DESIGN_LATEST_VERSION', '3.3');
* @used-by utils::GetItopVersionWikiSyntax()
* @used-by iTopModulesPhpVersionIntegrationTest
*/
define('ITOP_CORE_VERSION', '3.3.0');
define('ITOP_CORE_VERSION', '3.2.1');
/**
* @var string

View File

@@ -566,7 +566,6 @@ class ActionEmail extends ActionNotification
$oLog->Set('trigger_id', $oTrigger->GetKey());
$oLog->Set('action_id', $this->GetKey());
$oLog->Set('object_id', $aContextArgs['this->object()']->GetKey());
$oLog->Set('object_class', get_class($aContextArgs['this->object()']));
// Must be inserted now so that it gets a valid id that will make the link
// between an eventual asynchronous task (queued) and the log
$oLog->DBInsertNoReload();

View File

@@ -3793,7 +3793,7 @@ class AttributeClass extends AttributeString
public static function ListExpectedParams()
{
return array_merge(parent::ListExpectedParams(), array('class_category', 'more_values'));
return array_merge(parent::ListExpectedParams(), array("class_category", "more_values"));
}
public function __construct($sCode, $aParams)
@@ -3819,35 +3819,10 @@ class AttributeClass extends AttributeString
return $sDefault;
}
/**
* @param array $aArgs
* @param string $sContains
*
* @return array|null
* @throws \CoreException
*/
public function GetAllowedValues($aArgs = array(), $sContains = '')
{
$oValSetDef = $this->GetValuesDef();
if (!$oValSetDef) {
return null;
}
$aListClass = $oValSetDef->GetValues($aArgs, $sContains);
/* @since 3.3.0 remove elements in class_exclusion_list*/
$sClassExclusionList = $this->GetOptional('class_exclusion_list',null);
if (!empty($sClassExclusionList)) {
foreach (explode(',', $sClassExclusionList) as $sClassName) {
unset($aListClass[trim($sClassName)]);
}
}
return $aListClass;
}
public function GetAsHTML($sValue, $oHostObject = null, $bLocalize = true)
{
if (empty($sValue)) {
if (empty($sValue))
{
return '';
}

View File

@@ -472,10 +472,8 @@ class BulkChange
protected $m_bLocalizedValues;
/** @var array Cache for resolving external keys based on the given search criterias */
protected $m_aExtKeysMappingCache;
/** @var int number of columns */
protected $m_iNbCol;
public function __construct($sClass, $aData, $aAttList, $aExtKeys, $aReconcilKeys, $sSynchroScope = null, $aOnDisappear = null, $sDateFormat = null, $bLocalize = false, $iNbCol = 0)
public function __construct($sClass, $aData, $aAttList, $aExtKeys, $aReconcilKeys, $sSynchroScope = null, $aOnDisappear = null, $sDateFormat = null, $bLocalize = false)
{
$this->m_sClass = $sClass;
$this->m_aData = $aData;
@@ -487,7 +485,6 @@ class BulkChange
$this->m_sDateFormat = $sDateFormat;
$this->m_bLocalizedValues = $bLocalize;
$this->m_aExtKeysMappingCache = array();
$this->m_iNbCol =$iNbCol;
}
protected function ResolveExternalKey($aRowData, $sAttCode, &$aResults)
@@ -522,7 +519,7 @@ class BulkChange
foreach ($this->m_aExtKeys[$sAttCode] as $sForeignAttCode => $iCol)
{
// The foreign attribute is one of our reconciliation key
if (isset($aRowData[$iCol]) && strlen($aRowData[$iCol]) > 0)
if (strlen($aRowData[$iCol]) > 0)
{
return false;
}
@@ -1184,9 +1181,6 @@ class BulkChange
foreach($this->m_aData as $iRow => $aRowData)
{
$sFormat = $sDateTimeFormat;
if(!isset($this->m_aData[$iRow][$iCol])){
continue;
}
$sValue = $this->m_aData[$iRow][$iCol];
if (!empty($sValue))
{
@@ -1244,12 +1238,6 @@ class BulkChange
try {
foreach ($this->m_aData as $iRow => $aRowData) {
set_time_limit(intval($iLoopTimeLimit));
// Stop if not the good number of cols in $aRowData
if($this->m_iNbCol>0 && count($aRowData) != $this->m_iNbCol){
$aResult[$iRow]["__STATUS__"] = new RowStatus_Issue(Dict::Format('UI:CSVReport-Row-Issue-NbField',count($aRowData),$this->m_iNbCol) );
continue;
}
if (isset($aResult[$iRow]["__STATUS__"])) {
// An issue at the earlier steps - skip the rest
continue;
@@ -1360,11 +1348,7 @@ class BulkChange
{
if (!array_key_exists($iCol, $aResult[$iRow]))
{
if(isset($aRowData[$iCol])) {
$aResult[$iRow][$iCol] = new CellStatus_Void($aRowData[$iCol]);
} else {
$aResult[$iRow][$iCol] = new CellStatus_Issue('', null, Dict::S('UI:CSVReport-Value-Issue-NoValue'));
}
$aResult[$iRow][$iCol] = new CellStatus_Void($aRowData[$iCol]);
}
}
foreach($this->m_aExtKeys as $sAttCode => $aForeignAtts)
@@ -1378,11 +1362,7 @@ class BulkChange
if (!array_key_exists($iCol, $aResult[$iRow]))
{
// The foreign attribute is one of our reconciliation key
if(isset($aRowData[$iCol])) {
$aResult[$iRow][$iCol] = new CellStatus_Void($aRowData[$iCol]);
} else {
$aResult[$iRow][$iCol] = new CellStatus_Issue('', null, 'UI:CSVReport-Value-Issue-NoValue');
}
$aResult[$iRow][$iCol] = new CellStatus_Void($aRowData[$iCol]);
}
}
}

View File

@@ -474,14 +474,14 @@ abstract class BulkExport
*/
protected function MakeTmpFile($sExtension)
{
if(!is_dir(utils::GetDataPath()."bulk_export"))
if(!is_dir(APPROOT."data/bulk_export"))
{
@mkdir(utils::GetDataPath()."bulk_export", 0777, true /* recursive */);
@mkdir(APPROOT."data/bulk_export", 0777, true /* recursive */);
clearstatcache();
}
if (!is_writable(utils::GetDataPath()."bulk_export"))
if (!is_writable(APPROOT."data/bulk_export"))
{
throw new Exception('Data directory "'.utils::GetDataPath().'bulk_export" could not be written.');
throw new Exception('Data directory "'.APPROOT.'data/bulk_export" could not be written.');
}
$iNum = rand();
@@ -489,7 +489,7 @@ abstract class BulkExport
{
$iNum++;
$sToken = sprintf("%08x", $iNum);
$sFileName = utils::GetDataPath()."bulk_export/$sToken.".$sExtension;
$sFileName = APPROOT."data/bulk_export/$sToken.".$sExtension;
$hFile = @fopen($sFileName, 'x');
}
while($hFile === false);

View File

@@ -29,7 +29,7 @@ define('ITOP_APPLICATION_SHORT', 'iTop');
*
* @see ITOP_CORE_VERSION to get iTop core version
*/
define('ITOP_VERSION', '3.3.0-dev');
define('ITOP_VERSION', '3.2.0-dev');
define('ITOP_VERSION_NAME', 'Fullmoon');
define('ITOP_REVISION', 'svn');
@@ -1444,14 +1444,6 @@ class Config
'quick_create.max_history_results' => [
'type' => 'integer',
'description' => 'Max. number of elements in the history',
'default' => 5,
'value' => 5,
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'quick_create.max_popular_results' => [
'type' => 'integer',
'description' => 'Max. number of elements in the popular classes section',
'default' => 10,
'value' => 10,
'source_of_value' => '',
@@ -1811,13 +1803,6 @@ class Config
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'http.request.user_agent' => [
'type' => 'string',
'description' => 'HTTP request user agent, use this to set a custom agent on external requests.',
'default' => ITOP_APPLICATION.'/'.ITOP_VERSION,
'source_of_value' => '',
'show_in_conf_sample' => false,
]
];
public function IsProperty($sPropCode)

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<classes>
<class id="lnkActionNotificationToContact" _delta="define">
<parent>cmdbAbstractObject</parent>
@@ -99,7 +99,7 @@
</presentation>
<methods/>
</class>
<class id="ActionNewsroom" _delta="define">
<class id="ActionNewsroom" _delta="define">
<php_parent>
<name>ActionNotification</name>
</php_parent>
@@ -148,7 +148,7 @@
<display_max_height>96</display_max_height>
<storage_max_width>256</storage_max_width>
<storage_max_height>256</storage_max_height>
<default_image/>
<default_image />
</field>
<field id="priority" xsi:type="AttributeEnum">
<sql>priority</sql>
@@ -183,7 +183,7 @@
</field>
<field id="url" xsi:type="AttributeString">
<sql>url</sql>
<default_value>$this-&gt;url()$</default_value>
<default_value>$this->url()$</default_value>
<is_null_allowed>false</is_null_allowed>
</field>
</fields>
@@ -355,37 +355,21 @@
}
}
try {
if ($bIsAsync === true) {
AsyncSendNewsroom::AddToQueue($this->GetKey(), $oTrigger->GetKey(), $aRecipientsIds, $sMessage, $sTitle, $sUrl, $iObjectId, $sObjectClass);
} else {
foreach ($aRecipientsIds as $iRecipientId) {
$oEvent = Combodo\iTop\Service\Notification\Event\EventNotificationNewsroomService::MakeEventFromAction($this, $iRecipientId, $oTrigger->GetKey(), $sMessage, $sTitle, $sUrl, $iObjectId, $sObjectClass);
$oEvent->DBInsertNoReload();
}
}
} catch (CoreCannotSaveObjectException $e) {
ExceptionLog::LogException($e);
foreach($aRecipientsIds as $iRecipientId) {
$oEvent = Combodo\iTop\Service\Notification\Event\EventNotificationNewsroomService::MakeEventFromAction($this,
$iRecipientId,
$oTrigger->GetKey(),
Dict::S('Core:EventNotificationNewsroom:ErrorOnDBInsert'),
Dict::S('Core:EventNotificationNewsroom:ErrorNotificationNotSent'),
$sUrl,
$iObjectId,
$sObjectClass
);
$oEvent->DBInsertNoReload();
}
}
if ($bIsAsync === true) {
AsyncSendNewsroom::AddToQueue($this->GetKey(), $oTrigger->GetKey(), $aRecipientsIds, $sMessage, $sTitle, $sUrl, $iObjectId, $sObjectClass);
} else {
foreach ($aRecipientsIds as $iRecipientId) {
$oEvent = Combodo\iTop\Service\Notification\Event\EventNotificationNewsroomService::MakeEventFromAction($this, $iRecipientId, $oTrigger->GetKey(), $sMessage, $sTitle, $sUrl, $iObjectId, $sObjectClass);
$oEvent->DBInsertNoReload();
}
}
$this->SetNotificationLanguage($sPreviousLanguage, $aPreviousPluginProperties['language_code'] ?? null);
}
]]></code>
</method>
<method id="GetAsynchronousGlobalSetting">
<comment/>
<comment></comment>
<static>true</static>
<access>public</access>
<code><![CDATA[
@@ -397,7 +381,7 @@
</method>
</methods>
</class>
<class id="EventNotificationNewsroom" _delta="define">
<class id="EventNotificationNewsroom" _delta="define">
<php_parent>
<name>EventNotification</name>
</php_parent>
@@ -421,7 +405,7 @@
</reconciliation>
<order>
<columns>
<column id="date" ascending="false"/>
<column id="date" ascending="false" />
</columns>
</order>
</properties>
@@ -435,7 +419,7 @@
<sql>icon</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
<default_image/>
<default_image />
</field>
<field id="priority" xsi:type="AttributeEnum">
<sql>priority</sql>
@@ -517,14 +501,14 @@
</items>
</details>
<summary>
<items>
<item id="date">
<rank>10</rank>
</item>
<item id="message">
<rank>20</rank>
</item>
</items>
<items>
<item id="date">
<rank>10</rank>
</item>
<item id="message">
<rank>20</rank>
</item>
</items>
</summary>
<list>
<items>
@@ -1024,12 +1008,6 @@
<type>string</type>
<default/>
</property>
<property id="class_exclusion_list">
<php_param>class_exclusion_list</php_param>
<mandatory>false</mandatory>
<type>string</type>
<default/>
</property>
<property id="min_up">
<php_param>min_up</php_param>
<mandatory>true</mandatory>

View File

@@ -1552,13 +1552,13 @@ abstract class DBSearch
}
$sLogFile = 'queries.latest';
file_put_contents(utils::GetDataPath().$sLogFile.'.html', $sHtml);
file_put_contents(APPROOT.'data/'.$sLogFile.'.html', $sHtml);
$sLog = "<?php\n\$aQueriesLog = ".var_export(self::$m_aQueriesLog, true).";";
file_put_contents(utils::GetDataPath().$sLogFile.'.log', $sLog);
file_put_contents(APPROOT.'data/'.$sLogFile.'.log', $sLog);
// Cumulate the queries
$sAllQueries = utils::GetDataPath().'queries.log';
$sAllQueries = APPROOT.'data/queries.log';
if (file_exists($sAllQueries))
{
// Merge the new queries into the existing log

View File

@@ -501,8 +501,7 @@ class DesignElement extends \DOMElement
{
$sSearchId = $oRefNode->getAttribute('id');
}
$sQuotedId = DesignDocument::XPathQuote($sSearchId);
$sXPath = './'.$oRefNode->tagName."[@id=$sQuotedId]";
$sXPath = './'.$oRefNode->tagName."[@id='$sSearchId']";
$oRes = $oXPath->query($sXPath, $oRoot);
}

View File

@@ -453,11 +453,6 @@ class DisplayableNode extends GraphNode
}
}
public static function GetTooltipAttributes($sClass)
{
return MetaModel::GetZListItems($sClass, 'list');
}
public function GetTooltip($aContextDefs)
{
$sHtml = '';
@@ -479,7 +474,7 @@ class DisplayableNode extends GraphNode
$sHtml .= '<hr/>';
}
$sHtml .= '<table><tbody>';
foreach(static::GetTooltipAttributes($sSubClass) as $sAttCode)
foreach(MetaModel::GetZListItems($sSubClass, 'list') as $sAttCode)
{
$oAttDef = MetaModel::GetAttributeDef($sSubClass, $sAttCode);
$sHtml .= '<tr><td>'.$oAttDef->GetLabel().':&nbsp;</td><td>'.$oCurrObj->GetAsHtml($sAttCode).'</td></tr>';
@@ -869,7 +864,6 @@ class DisplayableGraph extends SimpleGraph
*/
public static function FromRelationGraph(RelationGraph $oGraph, $iGroupingThreshold = 20, $bDirectionDown = true, $bForPdf = false)
{
$oKPI = new ExecutionKPI();
$oNewGraph = new DisplayableGraph();
$oNewGraph->bDirectionDown = $bDirectionDown;
$iPreviousTimeLimit = ini_get('max_execution_time');
@@ -1023,7 +1017,6 @@ class DisplayableGraph extends SimpleGraph
}
set_time_limit(intval($iPreviousTimeLimit));
$oKPI->ComputeStats('FromRelationGraph', '');
return $oNewGraph;
}
@@ -1034,7 +1027,6 @@ class DisplayableGraph extends SimpleGraph
*/
public function InitFromGraphviz()
{
$oKPI = new ExecutionKPI();
$sDot = $this->DumpAsXDot();
if (strpos($sDot, 'digraph') === false)
{
@@ -1062,7 +1054,6 @@ class DisplayableGraph extends SimpleGraph
}
}
}
$oKPI->ComputeStats('InitFromGraphviz', '');
}
public function GetBoundingBox()

View File

@@ -131,7 +131,7 @@ class EventNotification extends Event
"db_finalclass_field" => "",
"order_by_default" => array('date' => false),
'indexes' => array(
array( 'object_class', 'object_id'),
array('object_id'),
)
);
MetaModel::Init_Params($aParams);
@@ -139,11 +139,9 @@ class EventNotification extends Event
MetaModel::Init_AddAttribute(new AttributeExternalKey("trigger_id", array("targetclass"=>"Trigger", "jointype"=> "", "allowed_values"=>null, "sql"=>"trigger_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("action_id", array("targetclass" => "Action", "jointype" => "", "allowed_values" => null, "sql" => "action_id", "is_null_allowed" => false, "on_target_delete" => DEL_AUTO, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeInteger("object_id", array("allowed_values" => null, "sql" => "object_id", "default_value" => 0, "is_null_allowed" => false, "depends_on" => array())));
//@since 3.2.0
MetaModel::Init_AddAttribute(new AttributeClass("object_class", array("class_category"=>"", "more_values"=>"", "sql"=>"object_class", "default_value"=>null, "is_null_allowed"=>true /*to avoid setting AbstractResource as default in database*/, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('date', 'message', 'userinfo', 'trigger_id', 'action_id', 'object_class', 'object_id')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('details', array('date', 'message', 'userinfo', 'trigger_id', 'action_id', 'object_id')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('date', 'message')); // Attributes to be displayed for a list
// Search criteria
// MetaModel::Init_SetZListItems('standard_search', array('name')); // Criteria of the std search form
@@ -178,7 +176,7 @@ class EventNotificationEmail extends EventNotification
MetaModel::Init_AddAttribute(new AttributeTable("attachments", array("allowed_values"=>null, "sql"=>"attachments", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'message', 'trigger_id', 'action_id', 'object_class', 'object_id', 'to', 'cc', 'bcc', 'from', 'subject', 'body', 'attachments')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('details', array('date', 'userinfo', 'message', 'trigger_id', 'action_id', 'object_id', 'to', 'cc', 'bcc', 'from', 'subject', 'body', 'attachments')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('date', 'message', 'to', 'subject', 'attachments')); // Attributes to be displayed for a list
// Search criteria

View File

@@ -469,7 +469,7 @@ class ExecutionKPI
// Invoke extensions to log the KPI operation
/** @var \iKPILoggerExtension $oExtensionInstance */
foreach (MetaModel::EnumPlugins('iKPILoggerExtension') as $oExtensionInstance) {
//$sExtension = ModuleService::GetInstance()->GetModuleNameFromCallStack(1);
//$sExtension = ModuleService::GetInstance()->GetModuleNameFromCallStack(1);
$sExtension = '';
$oKPILogData = new KpiLogData(
KpiLogData::TYPE_STATS,

View File

@@ -7081,7 +7081,7 @@ abstract class MetaModel
* @param array $aParams
* @param bool $bAllowAllData
*
* @return \DBObject
* @return \DBObject|null
* @throws \OQLException
*/
public static function GetObjectFromOQL($sQuery, $aParams = null, $bAllowAllData = false)
@@ -7112,7 +7112,7 @@ abstract class MetaModel
if ($iKey < 0) {
return "$sTargetClass: $iKey (invalid value)";
}
$oObj = self::GetObject($sTargetClass, $iKey, false);
$oObj = self::GetObject($sTargetClass, $iKey, false);
if (is_null($oObj)) {
// Whatever we are looking for, the root class is the key to search for
$sRootClass = self::GetRootClass($sTargetClass);

File diff suppressed because it is too large Load Diff

View File

@@ -71,24 +71,28 @@ class_list(A) ::= class_list(L) COMA class_name(X). {
where_statement(A) ::= WHERE condition(C). { A = C;}
where_statement(A) ::= . { A = null;}
join_statement(A) ::= join_statement(S) JOIN join_item(J). {
join_statement(A) ::= join_item(J) join_statement(S). {
// insert the join statement on top of the existing list
array_push(S, J);
array_unshift(S, J);
// and return the updated array
A = S;
}
join_statement(A) ::= . { A = [];}
join_statement(A) ::= join_item(J). {
A = Array(J);
}
join_statement(A) ::= . { A = null;}
join_item(A) ::= class_name(X) AS_ALIAS class_name(Y) ON join_condition(C).
join_item(A) ::= JOIN class_name(X) AS_ALIAS class_name(Y) ON join_condition(C).
{
// create an array with one single item
A = new OqlJoinSpec(X, Y, C);
}
join_item(A) ::= class_name(X) ON join_condition(C).
join_item(A) ::= JOIN class_name(X) ON join_condition(C).
{
// create an array with one single item
A = new OqlJoinSpec(X, X, C);
}
join_condition(A) ::= field_id(X) EQ field_id(Y). { A = new BinaryOqlExpression(X, '=', Y); }
join_condition(A) ::= field_id(X) BELOW field_id(Y). { A = new BinaryOqlExpression(X, 'BELOW', Y); }
join_condition(A) ::= field_id(X) BELOW_STRICT field_id(Y). { A = new BinaryOqlExpression(X, 'BELOW_STRICT', Y); }

View File

@@ -203,7 +203,6 @@ class RelationEdge extends GraphEdge
*/
class RelationGraph extends SimpleGraph
{
private static bool $bOptimizationEnabled = true;
protected $aSourceNodes; // Index of source nodes (for a quicker access)
protected $aSinkNodes; // Index of sink nodes (for a quicker access)
protected $aRedundancySettings; // Cache of user settings
@@ -218,16 +217,6 @@ class RelationGraph extends SimpleGraph
$this->aContextSearches = array();
}
static public function GetOptimizationEnabled(): bool
{
return static::$bOptimizationEnabled;
}
static public function SetOptimizationEnabled(bool $bEnabled)
{
static::$bOptimizationEnabled = $bEnabled;
}
/**
* Add an object that will be the starting point for building the relations downstream
*
@@ -272,23 +261,16 @@ class RelationGraph extends SimpleGraph
IssueLog::Error("Invalid context query '$sOQL'. A context query must contain at least two columns.");
throw new Exception("Invalid context query '$sOQL'. A context query must contain at least two columns. Columns: ".implode(', ', $aAliases).'. ');
}
if (static::GetOptimizationEnabled()) {
$sClass = $oSearch->GetClass();
$this->aContextSearches[$sClass][] = array('key' => $key, 'search' => $oSearch);
}
else {
$aAliasNames = array_keys($aAliases);
$oCondition = new BinaryExpression(new FieldExpression('id', $aAliasNames[0]), '=', new VariableExpression('id'));
$oSearch->AddConditionExpression($oCondition);
$sClass = $oSearch->GetClass();
if (!array_key_exists($sClass, $this->aContextSearches))
{
$this->aContextSearches[$sClass] = array();
}
$this->aContextSearches[$sClass][] = array('key' => $key, 'search' => $oSearch);
$aAliasNames = array_keys($aAliases);
$oCondition = new BinaryExpression(new FieldExpression('id', $aAliasNames[0]), '=', new VariableExpression('id'));
$oSearch->AddConditionExpression($oCondition);
$sClass = $oSearch->GetClass();
if (!array_key_exists($sClass, $this->aContextSearches))
{
$this->aContextSearches[$sClass] = array();
}
$this->aContextSearches[$sClass][] = array('key' => $key, 'search' => $oSearch);
}
/**
@@ -301,8 +283,6 @@ class RelationGraph extends SimpleGraph
*/
public function IsPartOfContext(DBObject $oObj, &$aRootCauses)
{
$oKPI = new ExecutionKPI();
$bRet = false;
$sFinalClass = get_class($oObj);
$aParentClasses = MetaModel::EnumParentClasses($sFinalClass, ENUM_PARENT_CLASSES_ALL);
@@ -333,7 +313,6 @@ class RelationGraph extends SimpleGraph
}
}
}
$oKPI->ComputeStats(__METHOD__, get_class($oObj));
return $bRet;
}
@@ -350,7 +329,6 @@ class RelationGraph extends SimpleGraph
*/
public function ComputeRelatedObjectsDown($sRelCode, $iMaxDepth, $bEnableRedundancy, $aUnreachableObjects = array())
{
$oKPI = new ExecutionKPI();
//echo "<h5>Sources only...</h5>\n".$this->DumpAsHtmlImage()."<br/>\n";
// Build the graph out of the sources
foreach ($this->aSourceNodes as $oSourceNode)
@@ -358,10 +336,8 @@ class RelationGraph extends SimpleGraph
$this->AddRelatedObjects($sRelCode, true, $oSourceNode, $iMaxDepth, $bEnableRedundancy);
//echo "<h5>After processing of {$oSourceNode->GetId()}</h5>\n".$this->DumpAsHtmlImage()."<br/>\n";
}
$oKPI->ComputeAndReport(__FUNCTION__.' - AddRelatedObjects');
// Mark the unreachable nodes
$oKPI = new ExecutionKPI();
foreach ($aUnreachableObjects as $oObj)
{
$sNodeId = RelationObjectNode::MakeId($oObj);
@@ -371,26 +347,29 @@ class RelationGraph extends SimpleGraph
$oNode->SetProperty('is_reached_allowed', false);
}
}
$oKPI->ComputeAndReport(__FUNCTION__.' - Mark unreachable nodes');
// Determine the reached nodes
$oKPI = new ExecutionKPI();
foreach ($this->aSourceNodes as $oSourceNode)
{
$oSourceNode->ReachDown('is_reached', true);
//echo "<h5>After reaching from {$oSourceNode->GetId()}</h5>\n".$this->DumpAsHtmlImage()."<br/>\n";
}
$oKPI->ComputeAndReport(__FUNCTION__.' - Determine reached nodes');
$oKPI = new ExecutionKPI();
$this->MarkContextNodesAsReached();
$oKPI->ComputeAndReport(__FUNCTION__.' - Mark context nodes as reached');
$oKPI = new ExecutionKPI();
// Mark also the "context" nodes as reached and record the "root causes" for each node
$oIterator = new RelationTypeIterator($this, 'Node');
foreach($oIterator as $oNode)
{
$oObj = $oNode->GetProperty('object');
$aRootCauses = array();
if (!is_null($oObj) && $this->IsPartOfContext($oObj, $aRootCauses))
{
$oNode->SetProperty('context_root_causes', $aRootCauses);
$oNode->ReachDown('is_reached', true);
}
}
if ( MetaModel::GetConfig()->Get('relations.complete_analysis')) {
$this->ApplyUserRightsOnGraph();
}
$oKPI->ComputeAndReport(__FUNCTION__.' - Apply user rights on graph');
}
/**
@@ -405,7 +384,6 @@ class RelationGraph extends SimpleGraph
*/
public function ComputeRelatedObjectsUp($sRelCode, $iMaxDepth, $bEnableRedundancy)
{
$oKPI = new ExecutionKPI();
//echo "<h5>Sinks only...</h5>\n".$this->DumpAsHtmlImage()."<br/>\n";
// Build the graph out of the sinks
foreach ($this->aSinkNodes as $oSinkNode)
@@ -429,7 +407,6 @@ class RelationGraph extends SimpleGraph
if ( MetaModel::GetConfig()->Get('relations.complete_analysis')) {
$this->ApplyUserRightsOnGraph();
}
$oKPI->ComputeStats('GetRelatedObjects-Up', '');
}
@@ -446,11 +423,6 @@ class RelationGraph extends SimpleGraph
*/
protected function AddRelatedObjects($sRelCode, $bDown, $oObjectNode, $iMaxDepth, $bEnableRedundancy)
{
if (static::GetOptimizationEnabled()) {
$this->AddRelatedObjects_Optimized();
return;
}
if ($iMaxDepth > 0)
{
if ($oObjectNode instanceof RelationRedundancyNode)
@@ -541,64 +513,6 @@ class RelationGraph extends SimpleGraph
}
}
public function AddRelatedObjects_Optimized()
{
$sRelCode = 'impact';
// TODO : dehardcode against the source nodes
$sSQLQuery = file_get_contents(APPROOT.'/impact_server1.sql');
$aRes = CMDBSource::QueryToArray($sSQLQuery, MYSQLI_ASSOC);
$oKPI = new ExecutionKPI();
$aClassToId = [];
foreach ($aRes as $aRow) {
if (is_null($aRow['parent_class']) || is_null($aRow['parent_id'])) {
// No parent => source node already present in the graph
continue;
}
$aClassToId[$aRow['class']][$aRow['id']] = $aRow['name'];
}
$oKPI->ComputeAndReport('AddRelatedObjectsDown - Create aClassToId');
$oKPI = new ExecutionKPI();
// One query per class => not too bad
// Note: it is not possible to use the root class as we need to load the tooltip attributes
foreach ($aClassToId as $sClass => $aIds) {
$oSearch = new DBObjectSearch($sClass);
$oSearch->AllowAllData();
$oSearch->AddCondition('id', array_keys($aIds), 'IN');
$oSet = new DBObjectSet($oSearch);
$oSet->OptimizeColumnLoad([$oSearch->GetClassAlias() => DisplayableNode::GetTooltipAttributes($sClass)]);
while ($oObj = $oSet->Fetch()) {
$sNodeId = RelationObjectNode::MakeId($oObj);
if (!isset($this->aNodes[$sNodeId])) {
$this->aNodes[$sNodeId] = new RelationObjectNode($this, $oObj);
}
}
}
$oKPI->ComputeAndReport('AddRelatedObjectsDown - Query each class and create nodes: '.count($aClassToId));
$oKPI = new ExecutionKPI();
foreach ($aRes as $aRow) {
if (is_null($aRow['parent_class']) || is_null($aRow['parent_id'])) {
// No parent, so no edge
continue;
}
if ($aRow['backtracking'] == 0) {
$oSourceNode = $this->GetNode("{$aRow['parent_class']}::{$aRow['parent_id']}");
$oSinkNode = $this->GetNode("{$aRow['class']}::{$aRow['id']}");
}
else {
$oSourceNode = $this->GetNode("{$aRow['class']}::{$aRow['id']}");
$oSinkNode = $this->GetNode("{$aRow['parent_class']}::{$aRow['parent_id']}");
}
new RelationEdge($this, $oSourceNode, $oSinkNode);
}
$oKPI->ComputeAndReport('AddRelatedObjectsDown - Create edges : '.count($aRes));
}
/**
* Determine if there is a redundancy (or use the existing one) and add the corresponding nodes/edges
*
@@ -833,71 +747,4 @@ class RelationGraph extends SimpleGraph
}
}
/**
* Mark "context" nodes as reached and record the "root causes" for each node
*/
private function MarkContextNodesAsReached()
{
if (static::GetOptimizationEnabled()) {
$this->MarkContextNodesAsReached_Optimized();
return;
}
$oIterator = new RelationTypeIterator($this, 'Node');
foreach($oIterator as $oNode)
{
$oObj = $oNode->GetProperty('object');
$aRootCauses = array();
if (!is_null($oObj) && $this->IsPartOfContext($oObj, $aRootCauses))
{
$oNode->SetProperty('context_root_causes', $aRootCauses);
$oNode->ReachDown('is_reached', true);
}
}
}
private function MarkContextNodesAsReached_Optimized()
{
$oIterator = new RelationTypeIterator($this, 'Node');
// 1. Group all nodes by class
$aClassToId = [];
foreach ($oIterator as $oNode) {
$oObj = $oNode->GetProperty('object');
if ($oObj) {
$aClassToId[get_class($oObj)][$oObj->GetKey()] = $oNode;
}
}
// 2. For each class, perform a search to find the context objects
$aContextNodes = [];
foreach ($aClassToId as $sClass => $aIdToNodes) {
foreach (MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL) as $sParentClass)
{
if (!array_key_exists($sParentClass, $this->aContextSearches)) {
continue; // No context search for this class
}
foreach ($this->aContextSearches[$sParentClass] as $aContextQuery)
{
$oKPI = new ExecutionKPI();
/** @var \DBSearch $oSearch */
$oSearch = $aContextQuery['search']->DeepClone();
$oSearch->AddCondition('id', array_keys($aIdToNodes), 'IN');
$aAliasNames = array_keys($oSearch->GetSelectedClasses());
$sObjectAlias = $aAliasNames[0];
$sRootCauseAlias = $aAliasNames[1];
$oSet = new DBObjectSet($oSearch);
$oSet->OptimizeColumnLoad([$sObjectAlias => [], $sRootCauseAlias => []]);
while($aRow = $oSet->FetchAssoc()) {
$oRootCauseObject = $aRow[$sRootCauseAlias];
if (is_null($oRootCauseObject)) continue;
$oNode = $aIdToNodes[$aRow[$sObjectAlias]->GetKey()];
$aRootCauses = $oNode->GetProperty('context_root_causes', []);
$aRootCauses[$aContextQuery['key']][$oRootCauseObject->GetKey()] = $oRootCauseObject;
$oNode->SetProperty('context_root_causes', $aRootCauses);
}
$oKPI->ComputeStats('Query to find context objects', $sClass.' - '.$aContextQuery['key']);
}
}
}
}
}

View File

@@ -205,15 +205,16 @@ class ObjectResult
$this->fields[$sAttCode] = $this->MakeResultValue($oObject, $sAttCode, $bExtendedOutput);
}
public function SanitizeContent()
public function SanitizeContent()
{
foreach($this->fields as $sFieldAttCode => $fieldValue) {
foreach($this->fields as $sFieldAttCode => $fieldValue)
{
try {
$oAttDef = MetaModel::GetAttributeDef($this->class, $sFieldAttCode);
} catch (Exception $e) { // for special cases like ID
continue;
}
$this->SanitizeFieldIfSensitive($this->fields, $sFieldAttCode, $fieldValue, $oAttDef);
$this->SanitizeFieldIfSensitive($this->fields, $sFieldAttCode, $fieldValue, $oAttDef);
}
}
}
@@ -947,10 +948,6 @@ class CoreServices implements iRestServiceProvider, iRestInputSanitizer
}
}
/**
* Sanitizes sensitive fields on a "json ready" representation of a DBObject
* Useful for logging purposes
*/
trait SanitizeTrait
{
/**
@@ -964,7 +961,8 @@ trait SanitizeTrait
private function SanitizeFieldIfSensitive(array &$fields, string $sFieldAttCode, $fieldValue, $oAttDef): void
{
// for simple attribute
if ($oAttDef instanceof iAttributeNoGroupBy) { // iAttributeNoGroupBy is equivalent to sensitive attribute
if ($oAttDef instanceof iAttributeNoGroupBy) // iAttributeNoGroupBy is equivalent to sensitive attribute
{
$fields[$sFieldAttCode] = '*****';
return;
}

View File

@@ -500,27 +500,25 @@ EOF
if (file_exists($sDotExecutable))
{
// create the file with Graphviz
if (!is_dir(utils::GetDataPath()))
if (!is_dir(APPROOT."data"))
{
@mkdir(utils::GetDataPath());
@mkdir(APPROOT."data");
}
if (!is_dir(utils::GetDataPath()."tmp"))
if (!is_dir(APPROOT."data/tmp"))
{
@mkdir(utils::GetDataPath()."tmp");
@mkdir(APPROOT."data/tmp");
}
$sImageFilePath = tempnam(utils::GetDataPath()."tmp", 'png-');
$sImageFilePath = tempnam(APPROOT."data/tmp", 'png-');
$sDotDescription = $this->GetDotDescription();
$sDotFilePath = tempnam(utils::GetDataPath()."tmp", 'dot-');
$sDotFilePath = tempnam(APPROOT."data/tmp", 'dot-');
$rFile = @fopen($sDotFilePath, "w");
@fwrite($rFile, $sDotDescription);
@fclose($rFile);
$aOutput = array();
$CommandLine = "\"$sDotExecutable\" -v -Tpng < \"$sDotFilePath\" -o\"$sImageFilePath\" 2>&1";
$oKPI = new ExecutionKPI();
exec($CommandLine, $aOutput, $iRetCode);
$oKPI->ComputeStats('Graphviz execution png', 'png');
if ($iRetCode != 0)
{
$sHtml = '';
@@ -558,27 +556,25 @@ EOF
if (file_exists($sDotExecutable))
{
// create the file with Graphviz
if (!is_dir(utils::GetDataPath()))
if (!is_dir(APPROOT."data"))
{
@mkdir(utils::GetDataPath());
@mkdir(APPROOT."data");
}
if (!is_dir(utils::GetDataPath()."tmp"))
if (!is_dir(APPROOT."data/tmp"))
{
@mkdir(utils::GetDataPath()."tmp");
@mkdir(APPROOT."data/tmp");
}
$sXdotFilePath = tempnam(utils::GetDataPath()."tmp", 'xdot-');
$sXdotFilePath = tempnam(APPROOT."data/tmp", 'xdot-');
$sDotDescription = $this->GetDotDescription(true); // true => don't put (localized) labels in the file, since it makes it harder to parse
$sDotFilePath = tempnam(utils::GetDataPath()."tmp", 'dot-');
$sDotFilePath = tempnam(APPROOT."data/tmp", 'dot-');
$rFile = @fopen($sDotFilePath, "w");
@fwrite($rFile, $sDotDescription);
@fclose($rFile);
$aOutput = array();
$CommandLine = "\"$sDotExecutable\" -v -Tdot < \"$sDotFilePath\" -o\"$sXdotFilePath\" 2>&1";
$oKPI = new ExecutionKPI();
exec($CommandLine, $aOutput, $iRetCode);
$oKPI->ComputeStats('Graphviz execution dot', 'dot');
if ($iRetCode != 0)
{
$sHtml = '';

View File

@@ -17,8 +17,6 @@
* You should have received a copy of the GNU Affero General Public License
*/
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
/**
* A user defined trigger, to customize the application
* A trigger will activate an action
@@ -172,20 +170,19 @@ abstract class TriggerOnObject extends Trigger
{
$aParams = array
(
"category" => "grant_by_profile,core/cmdb",
"key_type" => "autoincrement",
"name_attcode" => "description",
"category" => "grant_by_profile,core/cmdb",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'complement'],
"state_attcode" => "",
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onobject",
"db_key_field" => "id",
"db_table" => "priv_trigger_onobject",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeClass("target_class",
array("class_category" => "bizmodel", "more_values" => "User,UserExternal,UserInternal,UserLDAP,UserLocal", "sql" => "target_class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array(), "class_exclusion_list" => "Attachment")));
MetaModel::Init_AddAttribute(new AttributeClass("target_class", array("class_category" => "bizmodel", "more_values" => "User,UserExternal,UserInternal,UserLDAP,UserLocal", "sql" => "target_class", "default_value" => null, "is_null_allowed" => false, "depends_on" => array())));
MetaModel::Init_AddAttribute(new AttributeOQL("filter", array("allowed_values" => null, "sql" => "filter", "default_value" => null, "is_null_allowed" => true, "depends_on" => array())));
// Display lists
@@ -273,36 +270,6 @@ abstract class TriggerOnObject extends Trigger
}
}
/**
* if the target class is Attachment, then the trigger is read-only
* @param $sAttCode
* @param $aReasons
* @param $sTargetState
* @return int
* @throws ArchivedObjectException
* @throws CoreException
*/
public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState='')
{
// Force the computed field to be read-only, preventing it to be written
if ($this->Get('target_class') == 'Attachment' ) {
return OPT_ATT_READONLY;
}
return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
}
public function DisplayBareHeader(WebPage $oPage, $bEditMode = false)
{
$aHeaderBlocks = parent::DisplayBareHeader($oPage, $bEditMode);
if ($this->Get('target_class') == 'Attachment' ) {
$oPage->AddUiBlock(AlertUIBlockFactory::MakeForWarning('', Dict::S('Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage')));
$oPage->add_ready_script("$('#UIMenuModify').hide();");
}
return $aHeaderBlocks;
}
/**
* Activate trigger based on attribute list given instead of changed attributes
*
@@ -562,7 +529,6 @@ class TriggerOnObjectCreate extends TriggerOnObject
MetaModel::Init_SetZListItems('standard_search', array('description', 'target_class')); // Criteria of the std search form
// MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form
}
}
/**

View File

@@ -1962,6 +1962,15 @@ class UserRights
return self::$m_aCacheUsers[$sAuthentication][$sLogin];
}
/**
* Reset the cache of users
* @return void
*/
public static function ResetCacheUsers()
{
self::$m_aCacheUsers = [ 'internal' => [], 'external' => [] ];
}
/**
* @param string$sClass
* @param array $aAllowedOrgs

View File

@@ -4,7 +4,7 @@
*/
$ibo-scrollbar--scrollbar-width: $common-scrollbar--scrollbar-width !default;
$ibo-scrollbar--scrollbar-height: $common-scrollbar--scrollbar-height !default; /* For horizontal scrollbars */
$ibo-scrollbar--scrollbar-height: $ibo-scrollbar--scrollbar-width !default; /* For horizontal scrollbars */
$ibo-scrollbar--scrollbar-track-background-color: $common-scrollbar--scrollbar-track-background-color !default;
$ibo-scrollbar--scrollbar-track-border-radius: $common-scrollbar--scrollbar-track-border-radius !default;
$ibo-scrollbar--scrollbar-thumb-background-color: $common-scrollbar--scrollbar-thumb-background-color !default;

View File

@@ -14,9 +14,9 @@ $ibo-sticky-sentinel--left: $common-sticky-sentinel--left !default;
$ibo-sticky-sentinel--right: $common-sticky-sentinel--right !default;
$ibo-sticky-sentinel--height: $common-sticky-sentinel--height !default;
$ibo-sticky-sentinel-top--top: $common-sticky-sentinel-top--top !default;
$ibo-sticky-sentinel-top--height: $common-sticky-sentinel-top--height !default;
$ibo-sticky-sentinel-top--height: $ibo-sticky-sentinel--height !default;
$ibo-sticky-sentinel-bottom--bottom: $common-sticky-sentinel-bottom--bottom !default;
$ibo-sticky-sentinel-bottom--height: $common-sticky-sentinel-bottom--height !default;
$ibo-sticky-sentinel-bottom--height: $ibo-sticky-sentinel--height !default;
/* Rules */
.ibo-sticky-sentinel {

View File

@@ -12,12 +12,12 @@ $ibo-has-description--font-size: $common-has-description--font-size !default; /*
$ibo-is-code--background-color: $common-is-code--background-color !default;
$ibo-is-code--padding: $common-is-code--padding !default;
$ibo-hyperlink-color: $common-hyperlink-color !default;
$ibo-hyperlink-text-decoration: $common-hyperlink-text-decoration !default;
$ibo-hyperlink-color--on-hover: $common-hyperlink-color--on-hover !default;
$ibo-hyperlink-text-decoration--on-hover: $common-hyperlink-text-decoration--on-hover !default;
$ibo-hyperlink-color--on-active: $common-hyperlink-color--on-active !default;
$ibo-hyperlink-text-decoration--on-active: $common-hyperlink-text-decoration--on-active !default;
$ibo-hyperlink-color: $ibo-color-primary-700 !default;
$ibo-hyperlink-text-decoration: none !default;
$ibo-hyperlink-color--on-hover: $ibo-color-primary-800 !default;
$ibo-hyperlink-text-decoration--on-hover: $ibo-hyperlink-text-decoration !default;
$ibo-hyperlink-color--on-active: $ibo-color-primary-900 !default;
$ibo-hyperlink-text-decoration--on-active: $ibo-hyperlink-text-decoration !default;
$ibo-figure--spacing-x: $common-figure--spacing-x !default; /* Mind that this matches Bulma rule for figure */
$ibo-figure--spacing-y: $common-figure--spacing-y !default;

View File

@@ -5,5 +5,5 @@
// These are the base variables used throughout the backoffice, if you don't know what to use, these are probably good :)
$ibo-base-variable--text-color: $common-base-variable--text-color !default;
$ibo-base-variable--border-radius: $common-base-variable--border-radius !default;;
$ibo-base-variable--text-color: $ibo-color-grey-900 !default;
$ibo-base-variable--border-radius: $ibo-border-radius-300 !default;;

View File

@@ -3,28 +3,27 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-spacing-0: $common-spacing-0 !default;
$ibo-spacing-100: $common-spacing-100 !default;
$ibo-spacing-200: $common-spacing-200 !default;
$ibo-spacing-300: $common-spacing-300 !default;
$ibo-spacing-400: $common-spacing-400 !default;
$ibo-spacing-500: $common-spacing-500 !default;
$ibo-spacing-600: $common-spacing-600 !default;
$ibo-spacing-700: $common-spacing-700 !default;
$ibo-spacing-800: $common-spacing-800 !default;
$ibo-spacing-900: $common-spacing-900 !default;
$ibo-spacing-950: $common-spacing-950 !default;
$ibo-spacing-0: $ibo-size-0 !default;
$ibo-spacing-100: $ibo-size-50 !default;
$ibo-spacing-200: $ibo-size-100 !default;
$ibo-spacing-300: $ibo-size-150 !default;
$ibo-spacing-400: $ibo-size-200 !default;
$ibo-spacing-500: $ibo-size-250 !default;
$ibo-spacing-600: $ibo-size-300 !default;
$ibo-spacing-700: $ibo-size-350 !default;
$ibo-spacing-800: $ibo-size-400 !default;
$ibo-spacing-900: $ibo-size-450 !default;
$ibo-spacing-950: $ibo-size-500 !default;
:root{
--ibo-spacing-0: #{$ibo-spacing-0};
--ibo-spacing-100: #{$ibo-spacing-100};
--ibo-spacing-200: #{$ibo-spacing-200};
--ibo-spacing-300: #{$ibo-spacing-300};
--ibo-spacing-400: #{$ibo-spacing-400};
--ibo-spacing-500: #{$ibo-spacing-500};
--ibo-spacing-600: #{$ibo-spacing-600};
--ibo-spacing-700: #{$ibo-spacing-700};
--ibo-spacing-800: #{$ibo-spacing-800};
--ibo-spacing-900: #{$ibo-spacing-900};
--ibo-spacing-950: #{$ibo-spacing-950};
--ibo-spacing-0: #{$ibo-size-0};
--ibo-spacing-100: #{$ibo-size-50};
--ibo-spacing-200: #{$ibo-size-100};
--ibo-spacing-300: #{$ibo-size-150};
--ibo-spacing-400: #{$ibo-size-200};
--ibo-spacing-500: #{$ibo-size-250};
--ibo-spacing-600: #{$ibo-size-300};
--ibo-spacing-700: #{$ibo-size-350};
--ibo-spacing-800: #{$ibo-size-400};
--ibo-spacing-900: #{$ibo-size-450};
}

View File

@@ -35,7 +35,7 @@ $ibo-font-weight-950: $common-font-weight-950 !default; /* 950 Extra Black (Ultr
$ibo-font-family-base: $common-font-family-base !default;
$ibo-font-family-fallbacks: $common-font-family-fallbacks !default;
$ibo-font-family-monospace: $common-font-family-monospace !default;
$ibo-font-family-code: $common-font-family-code !default;
$ibo-font-family-code: $ibo-font-family-monospace !default;
:root {
--ibo-font-size-50: #{$ibo-font-size-50};

View File

@@ -5,24 +5,24 @@
/* Lifecycle palette */
/* - For workflow */
$ibo-lifecycle-new-state-primary-color: $common-lifecycle-new-state-primary-color !default;
$ibo-lifecycle-new-state-secondary-color: $common-lifecycle-new-state-secondary-color !default;
$ibo-lifecycle-neutral-state-primary-color: $common-lifecycle-neutral-state-primary-color !default;
$ibo-lifecycle-neutral-state-secondary-color: $common-lifecycle-neutral-state-secondary-color !default;
$ibo-lifecycle-waiting-state-primary-color: $common-lifecycle-waiting-state-primary-color !default;
$ibo-lifecycle-waiting-state-secondary-color: $common-lifecycle-waiting-state-secondary-color !default;
$ibo-lifecycle-success-state-primary-color: $common-lifecycle-success-state-primary-color !default;
$ibo-lifecycle-success-state-secondary-color: $common-lifecycle-success-state-secondary-color !default;
$ibo-lifecycle-failure-state-primary-color: $common-lifecycle-failure-state-primary-color !default;
$ibo-lifecycle-failure-state-secondary-color: $common-lifecycle-failure-state-secondary-color !default;
$ibo-lifecycle-frozen-state-primary-color: $common-lifecycle-frozen-state-primary-color !default;
$ibo-lifecycle-frozen-state-secondary-color: $common-lifecycle-frozen-state-secondary-color !default;
$ibo-lifecycle-new-state-primary-color: $ibo-color-blue-800 !default;
$ibo-lifecycle-new-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-neutral-state-primary-color: $ibo-color-blue-800 !default;
$ibo-lifecycle-neutral-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-waiting-state-primary-color: $ibo-color-orange-400 !default;
$ibo-lifecycle-waiting-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-success-state-primary-color: $ibo-color-green-700 !default;
$ibo-lifecycle-success-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-failure-state-primary-color: $ibo-color-pink-700 !default;
$ibo-lifecycle-failure-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-frozen-state-primary-color: $ibo-color-grey-200 !default;
$ibo-lifecycle-frozen-state-secondary-color: $ibo-color-grey-700 !default;
/* - For basic lifecycle */
$ibo-lifecycle-active-state-primary-color: $common-lifecycle-active-state-primary-color !default;
$ibo-lifecycle-active-state-secondary-color: $common-lifecycle-active-state-secondary-color !default;
$ibo-lifecycle-inactive-state-primary-color: $common-lifecycle-inactive-state-primary-color !default;
$ibo-lifecycle-inactive-state-secondary-color: $common-lifecycle-inactive-state-secondary-color !default;
$ibo-lifecycle-active-state-primary-color: $ibo-color-green-700 !default;
$ibo-lifecycle-active-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-inactive-state-primary-color: $ibo-color-orange-400 !default;
$ibo-lifecycle-inactive-state-secondary-color: $ibo-color-white-100 !default;
$ibo-lifecycle-states-colors: (
'new': (

View File

@@ -5,99 +5,99 @@
/* Semantic palettes */
/* - Primary color of the brand */
$ibo-color-primary-100: $common-color-primary-100 !default;
$ibo-color-primary-200: $common-color-primary-200 !default;
$ibo-color-primary-300: $common-color-primary-300 !default;
$ibo-color-primary-400: $common-color-primary-400 !default;
$ibo-color-primary-500: $common-color-primary-500 !default;
$ibo-color-primary-600: $common-color-primary-600 !default;
$ibo-color-primary-700: $common-color-primary-700 !default;
$ibo-color-primary-800: $common-color-primary-800 !default;
$ibo-color-primary-900: $common-color-primary-900 !default;
$ibo-color-primary-950: $common-color-primary-950 !default;
$ibo-color-primary-100: $ibo-color-orange-100 !default;
$ibo-color-primary-200: $ibo-color-orange-200 !default;
$ibo-color-primary-300: $ibo-color-orange-300 !default;
$ibo-color-primary-400: $ibo-color-orange-400 !default;
$ibo-color-primary-500: $ibo-color-orange-500 !default;
$ibo-color-primary-600: $ibo-color-orange-600 !default;
$ibo-color-primary-700: $ibo-color-orange-700 !default;
$ibo-color-primary-800: $ibo-color-orange-800 !default;
$ibo-color-primary-900: $ibo-color-orange-900 !default;
$ibo-color-primary-950: $ibo-color-orange-950 !default;
/* - Secondary color of the brand */
$ibo-color-secondary-100: $common-color-secondary-100 !default;
$ibo-color-secondary-200: $common-color-secondary-200 !default;
$ibo-color-secondary-300: $common-color-secondary-300 !default;
$ibo-color-secondary-400: $common-color-secondary-400 !default;
$ibo-color-secondary-500: $common-color-secondary-500 !default;
$ibo-color-secondary-600: $common-color-secondary-600 !default;
$ibo-color-secondary-700: $common-color-secondary-700 !default;
$ibo-color-secondary-800: $common-color-secondary-800 !default;
$ibo-color-secondary-900: $common-color-secondary-900 !default;
$ibo-color-secondary-950: $common-color-secondary-950 !default;
$ibo-color-secondary-100: $ibo-color-grey-100 !default;
$ibo-color-secondary-200: $ibo-color-grey-200 !default;
$ibo-color-secondary-300: $ibo-color-grey-300 !default;
$ibo-color-secondary-400: $ibo-color-grey-400 !default;
$ibo-color-secondary-500: $ibo-color-grey-500 !default;
$ibo-color-secondary-600: $ibo-color-grey-600 !default;
$ibo-color-secondary-700: $ibo-color-grey-700 !default;
$ibo-color-secondary-800: $ibo-color-grey-800 !default;
$ibo-color-secondary-900: $ibo-color-grey-900 !default;
$ibo-color-secondary-950: $ibo-color-grey-950 !default;
/* - Information: messages / actions that should neither seem as success, warning or failure */
$ibo-color-information-100: $common-color-information-100 !default;
$ibo-color-information-200: $common-color-information-200 !default;
$ibo-color-information-300: $common-color-information-300 !default;
$ibo-color-information-400: $common-color-information-400 !default;
$ibo-color-information-500: $common-color-information-500 !default;
$ibo-color-information-600: $common-color-information-600 !default;
$ibo-color-information-700: $common-color-information-700 !default;
$ibo-color-information-800: $common-color-information-800 !default;
$ibo-color-information-900: $common-color-information-900 !default;
$ibo-color-information-950: $common-color-information-950 !default;
$ibo-color-information-100: $ibo-color-blue-100 !default;
$ibo-color-information-200: $ibo-color-blue-200 !default;
$ibo-color-information-300: $ibo-color-blue-300 !default;
$ibo-color-information-400: $ibo-color-blue-400 !default;
$ibo-color-information-500: $ibo-color-blue-500 !default;
$ibo-color-information-600: $ibo-color-blue-600 !default;
$ibo-color-information-700: $ibo-color-blue-700 !default;
$ibo-color-information-800: $ibo-color-blue-800 !default;
$ibo-color-information-900: $ibo-color-blue-900 !default;
$ibo-color-information-950: $ibo-color-blue-950 !default;
/* Success: messages of success, safe actions, ... */
$ibo-color-success-100: $common-color-success-100 !default;
$ibo-color-success-200: $common-color-success-200 !default;
$ibo-color-success-300: $common-color-success-300 !default;
$ibo-color-success-400: $common-color-success-400 !default;
$ibo-color-success-500: $common-color-success-500 !default;
$ibo-color-success-600: $common-color-success-600 !default;
$ibo-color-success-700: $common-color-success-700 !default;
$ibo-color-success-800: $common-color-success-800 !default;
$ibo-color-success-900: $common-color-success-900 !default;
$ibo-color-success-950: $common-color-success-950 !default;
$ibo-color-success-100: $ibo-color-green-100 !default;
$ibo-color-success-200: $ibo-color-green-200 !default;
$ibo-color-success-300: $ibo-color-green-300 !default;
$ibo-color-success-400: $ibo-color-green-400 !default;
$ibo-color-success-500: $ibo-color-green-500 !default;
$ibo-color-success-600: $ibo-color-green-600 !default;
$ibo-color-success-700: $ibo-color-green-700 !default;
$ibo-color-success-800: $ibo-color-green-800 !default;
$ibo-color-success-900: $ibo-color-green-900 !default;
$ibo-color-success-950: $ibo-color-green-950 !default;
/* Warning: messages of warning, actions that would be done carefully, ... */
$ibo-color-warning-100: $common-color-warning-100 !default;
$ibo-color-warning-200: $common-color-warning-200 !default;
$ibo-color-warning-300: $common-color-warning-300 !default;
$ibo-color-warning-400: $common-color-warning-400 !default;
$ibo-color-warning-500: $common-color-warning-500 !default;
$ibo-color-warning-600: $common-color-warning-600 !default;
$ibo-color-warning-700: $common-color-warning-700 !default;
$ibo-color-warning-800: $common-color-warning-800 !default;
$ibo-color-warning-900: $common-color-warning-900 !default;
$ibo-color-warning-950: $common-color-warning-950 !default;
$ibo-color-warning-100: $ibo-color-orange-100 !default;
$ibo-color-warning-200: $ibo-color-orange-200 !default;
$ibo-color-warning-300: $ibo-color-orange-300 !default;
$ibo-color-warning-400: $ibo-color-orange-400 !default;
$ibo-color-warning-500: $ibo-color-orange-500 !default;
$ibo-color-warning-600: $ibo-color-orange-600 !default;
$ibo-color-warning-700: $ibo-color-orange-700 !default;
$ibo-color-warning-800: $ibo-color-orange-800 !default;
$ibo-color-warning-900: $ibo-color-orange-900 !default;
$ibo-color-warning-950: $ibo-color-orange-950 !default;
/* Danger: messages of failure, error, ... */
$ibo-color-error-100: $common-color-error-100 !default;
$ibo-color-error-200: $common-color-error-200 !default;
$ibo-color-error-300: $common-color-error-300 !default;
$ibo-color-error-400: $common-color-error-400 !default;
$ibo-color-error-500: $common-color-error-500 !default;
$ibo-color-error-600: $common-color-error-600 !default;
$ibo-color-error-700: $common-color-error-700 !default;
$ibo-color-error-800: $common-color-error-800 !default;
$ibo-color-error-900: $common-color-error-900 !default;
$ibo-color-error-950: $common-color-error-950 !default;
$ibo-color-error-100: $ibo-color-red-100 !default;
$ibo-color-error-200: $ibo-color-red-200 !default;
$ibo-color-error-300: $ibo-color-red-300 !default;
$ibo-color-error-400: $ibo-color-red-400 !default;
$ibo-color-error-500: $ibo-color-red-500 !default;
$ibo-color-error-600: $ibo-color-red-600 !default;
$ibo-color-error-700: $ibo-color-red-700 !default;
$ibo-color-error-800: $ibo-color-red-800 !default;
$ibo-color-error-900: $ibo-color-red-900 !default;
$ibo-color-error-950: $ibo-color-red-950 !default;
/* Danger: messages of danger, actions that cannot be undone, ... */
$ibo-color-danger-100: $common-color-danger-100 !default;
$ibo-color-danger-200: $common-color-danger-200 !default;
$ibo-color-danger-300: $common-color-danger-300 !default;
$ibo-color-danger-400: $common-color-danger-400 !default;
$ibo-color-danger-500: $common-color-danger-500 !default;
$ibo-color-danger-600: $common-color-danger-600 !default;
$ibo-color-danger-700: $common-color-danger-700 !default;
$ibo-color-danger-800: $common-color-danger-800 !default;
$ibo-color-danger-900: $common-color-danger-900 !default;
$ibo-color-danger-950: $common-color-danger-950 !default;
$ibo-color-danger-100: $ibo-color-red-100 !default;
$ibo-color-danger-200: $ibo-color-red-200 !default;
$ibo-color-danger-300: $ibo-color-red-300 !default;
$ibo-color-danger-400: $ibo-color-red-400 !default;
$ibo-color-danger-500: $ibo-color-red-500 !default;
$ibo-color-danger-600: $ibo-color-red-600 !default;
$ibo-color-danger-700: $ibo-color-red-700 !default;
$ibo-color-danger-800: $ibo-color-red-800 !default;
$ibo-color-danger-900: $ibo-color-red-900 !default;
$ibo-color-danger-950: $ibo-color-red-950 !default;
$ibo-semantic-colors: $common-semantic-colors !default;
$ibo-semantic-colors: ('primary', 'secondary', 'information', 'success', 'warning', 'danger');
$ibo-caselog-highlight-color-1: $common-caselog-highlight-color-1 !default;
$ibo-caselog-highlight-color-2: $common-caselog-highlight-color-2 !default;
$ibo-caselog-highlight-color-3: $common-caselog-highlight-color-3 !default;
$ibo-caselog-highlight-color-4: $common-caselog-highlight-color-4 !default;
$ibo-caselog-highlight-color-5: $common-caselog-highlight-color-5 !default;
$ibo-caselog-highlight-color-6: $common-caselog-highlight-color-6 !default;
$ibo-caselog-highlight-color-7: $common-caselog-highlight-color-7 !default;
$ibo-caselog-highlight-colors: $common-caselog-highlight-colors !default;
$ibo-caselog-highlight-color-1: $ibo-color-green-700 !default;
$ibo-caselog-highlight-color-2: $ibo-color-pink-700 !default;
$ibo-caselog-highlight-color-3: $ibo-color-orange-400 !default;
$ibo-caselog-highlight-color-4: $ibo-color-blue-600 !default;
$ibo-caselog-highlight-color-5: $ibo-color-cyan-200 !default;
$ibo-caselog-highlight-color-6: $ibo-color-green-200 !default;
$ibo-caselog-highlight-color-7: $ibo-color-pink-300 !default;
$ibo-caselog-highlight-colors: ($ibo-caselog-highlight-color-1, $ibo-caselog-highlight-color-2, $ibo-caselog-highlight-color-3, $ibo-caselog-highlight-color-4, $ibo-caselog-highlight-color-5, $ibo-caselog-highlight-color-6, $ibo-caselog-highlight-color-7) !default;
/* CSS variables */
:root {

5
css/c3.min.css vendored Normal file
View File

@@ -0,0 +1,5 @@
/*
* @deprecated 3.2.0 N°5621 Moved to NPM
*/
.c3 svg{font:10px sans-serif;-webkit-tap-highlight-color:transparent}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-item-hidden{opacity:.15}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-title{font:14px sans-serif}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000}

View File

@@ -4,7 +4,7 @@
*/
/* SCSS variables */
$common-has-description--content: "\1F6C8" !default;
$common-has-description--content: "?" !default;
$common-has-description--padding-left: $common-spacing-200 !default;
$common-has-description--color: $common-color-grey-600 !default;
$common-has-description--font-size: 0.7em !default; /* Font size is em on purpose as we want it to be proportional to its context */

146
css/jquery.contextMenu.css Executable file
View File

@@ -0,0 +1,146 @@
/**
* @deprecated 3.2.0 N°5621 Moved to NPM
*/
/*!
* jQuery contextMenu - Plugin for simple contextMenu handling
*
* Version: git-master
*
* Authors: Rodney Rehm, Addy Osmani (patches for FF)
* Web: http://medialize.github.com/jQuery-contextMenu/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
* GPL v3 http://opensource.org/licenses/GPL-3.0
*
*/
.context-menu-list {
margin:0;
padding:0;
min-width: 120px;
max-width: 250px;
display: inline-block;
position: absolute;
list-style-type: none;
border: 1px solid #DDD;
background: #EEE;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.context-menu-item {
padding: 2px 2px 2px 24px;
background-color: #EEE;
position: relative;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
.context-menu-separator {
padding-bottom:0;
border-bottom: 1px solid #DDD;
}
.context-menu-item > label > input,
.context-menu-item > label > textarea {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.context-menu-item.hover {
cursor: pointer;
background-color: #39F;
}
.context-menu-item.disabled {
color: #666;
}
.context-menu-input.hover,
.context-menu-item.disabled.hover {
cursor: default;
background-color: #EEE;
}
.context-menu-submenu:after {
content: ">";
color: #666;
position: absolute;
top: 0;
right: 3px;
z-index: 1;
}
/* icons
#protip:
In case you want to use sprites for icons (which I would suggest you do) have a look at
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
.context-menu-item.icon:before {}
*/
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
.context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); }
.context-menu-item.icon-cut { background-image: url(images/cut.png); }
.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); }
.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); }
.context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); }
.context-menu-item.icon-add { background-image: url(images/page_white_add.png); }
.context-menu-item.icon-quit { background-image: url(images/door.png); }
/* vertically align inside labels */
.context-menu-input > label > * { vertical-align: top; }
/* position checkboxes and radios as icons */
.context-menu-input > label > input[type="checkbox"],
.context-menu-input > label > input[type="radio"] {
margin-left: -17px;
}
.context-menu-input > label > span {
margin-left: 5px;
}
.context-menu-input > label,
.context-menu-input > label > input[type="text"],
.context-menu-input > label > textarea,
.context-menu-input > label > select {
display: block;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
.context-menu-input > label > textarea {
height: 100px;
}
.context-menu-item > .context-menu-list {
display: none;
/* re-positioned by js */
right: -5px;
top: 5px;
}
.context-menu-item.hover > .context-menu-list {
display: block;
}
.context-menu-accesskey {
text-decoration: underline;
}

378
css/magnific-popup.css Normal file
View File

@@ -0,0 +1,378 @@
/*
* @deprecated 3.2.0 N°5621 Moved to NPM
*/
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1042;
overflow: hidden;
position: fixed;
background: #0b0b0b;
opacity: 0.8;
filter: alpha(opacity=80); }
.mfp-wrap {
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1043;
position: fixed;
outline: none !important;
-webkit-backface-visibility: hidden; }
.mfp-container {
text-align: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
padding: 0 8px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.mfp-container:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle; }
.mfp-align-top .mfp-container:before {
display: none; }
.mfp-content {
position: relative;
display: inline-block;
vertical-align: middle;
margin: 0 auto;
text-align: left;
z-index: 1045; }
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
width: 100%;
cursor: auto; }
.mfp-ajax-cur {
cursor: progress; }
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
cursor: -moz-zoom-out;
cursor: -webkit-zoom-out;
cursor: zoom-out; }
.mfp-zoom {
cursor: pointer;
cursor: -webkit-zoom-in;
cursor: -moz-zoom-in;
cursor: zoom-in; }
.mfp-auto-cursor .mfp-content {
cursor: auto; }
.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none; }
.mfp-loading.mfp-figure {
display: none; }
.mfp-hide {
display: none !important; }
.mfp-preloader {
color: #CCC;
position: absolute;
top: 50%;
width: auto;
text-align: center;
margin-top: -0.8em;
left: 8px;
right: 8px;
z-index: 1044; }
.mfp-preloader a {
color: #CCC; }
.mfp-preloader a:hover {
color: #FFF; }
.mfp-s-ready .mfp-preloader {
display: none; }
.mfp-s-error .mfp-content {
display: none; }
button.mfp-close, button.mfp-arrow {
overflow: visible;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
display: block;
outline: none;
padding: 0;
z-index: 1046;
-webkit-box-shadow: none;
box-shadow: none; }
button::-moz-focus-inner {
padding: 0;
border: 0; }
.mfp-close {
width: 44px;
height: 44px;
line-height: 44px;
position: absolute;
right: 0;
top: 0;
text-decoration: none;
text-align: center;
opacity: 0.65;
filter: alpha(opacity=65);
padding: 0 0 18px 10px;
color: #FFF;
font-style: normal;
font-size: 28px;
font-family: Arial, Baskerville, monospace; }
.mfp-close:hover, .mfp-close:focus {
opacity: 1;
filter: alpha(opacity=100); }
.mfp-close:active {
top: 1px; }
.mfp-close-btn-in .mfp-close {
color: #333; }
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
color: #FFF;
right: -6px;
text-align: right;
padding-right: 6px;
width: 100%; }
.mfp-counter {
position: absolute;
top: 0;
right: 0;
color: #CCC;
font-size: 12px;
line-height: 18px;
white-space: nowrap; }
.mfp-arrow {
position: absolute;
opacity: 0.65;
filter: alpha(opacity=65);
margin: 0;
top: 50%;
margin-top: -55px;
padding: 0;
width: 90px;
height: 110px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
.mfp-arrow:active {
margin-top: -54px; }
.mfp-arrow:hover, .mfp-arrow:focus {
opacity: 1;
filter: alpha(opacity=100); }
.mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: 0;
top: 0;
margin-top: 35px;
margin-left: 35px;
border: medium inset transparent; }
.mfp-arrow:after, .mfp-arrow .mfp-a {
border-top-width: 13px;
border-bottom-width: 13px;
top: 8px; }
.mfp-arrow:before, .mfp-arrow .mfp-b {
border-top-width: 21px;
border-bottom-width: 21px;
opacity: 0.7; }
.mfp-arrow-left {
left: 0; }
.mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
border-right: 17px solid #FFF;
margin-left: 31px; }
.mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
margin-left: 25px;
border-right: 27px solid #3F3F3F; }
.mfp-arrow-right {
right: 0; }
.mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
border-left: 17px solid #FFF;
margin-left: 39px; }
.mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
border-left: 27px solid #3F3F3F; }
.mfp-iframe-holder {
padding-top: 40px;
padding-bottom: 40px; }
.mfp-iframe-holder .mfp-content {
line-height: 0;
width: 100%;
max-width: 900px; }
.mfp-iframe-holder .mfp-close {
top: -40px; }
.mfp-iframe-scaler {
width: 100%;
height: 0;
overflow: hidden;
padding-top: 56.25%; }
.mfp-iframe-scaler iframe {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #000; }
/* Main image in popup */
img.mfp-img {
width: auto;
max-width: 100%;
height: auto;
display: block;
line-height: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 40px 0 40px;
margin: 0 auto; }
/* The shadow behind the image */
.mfp-figure {
line-height: 0; }
.mfp-figure:after {
content: '';
position: absolute;
left: 0;
top: 40px;
bottom: 40px;
display: block;
right: 0;
width: auto;
height: auto;
z-index: -1;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
background: #444; }
.mfp-figure small {
color: #BDBDBD;
display: block;
font-size: 12px;
line-height: 14px; }
.mfp-figure figure {
margin: 0; }
.mfp-bottom-bar {
margin-top: -36px;
position: absolute;
top: 100%;
left: 0;
width: 100%;
cursor: auto; }
.mfp-title {
text-align: left;
line-height: 18px;
color: #F3F3F3;
word-wrap: break-word;
padding-right: 36px; }
.mfp-image-holder .mfp-content {
max-width: 100%; }
.mfp-gallery .mfp-image-holder .mfp-figure {
cursor: pointer; }
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
/**
* Remove all paddings around the image on small screen
*/
.mfp-img-mobile .mfp-image-holder {
padding-left: 0;
padding-right: 0; }
.mfp-img-mobile img.mfp-img {
padding: 0; }
.mfp-img-mobile .mfp-figure:after {
top: 0;
bottom: 0; }
.mfp-img-mobile .mfp-figure small {
display: inline;
margin-left: 5px; }
.mfp-img-mobile .mfp-bottom-bar {
background: rgba(0, 0, 0, 0.6);
bottom: 0;
margin: 0;
top: auto;
padding: 3px 5px;
position: fixed;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.mfp-img-mobile .mfp-bottom-bar:empty {
padding: 0; }
.mfp-img-mobile .mfp-counter {
right: 5px;
top: 3px; }
.mfp-img-mobile .mfp-close {
top: 0;
right: 0;
width: 35px;
height: 35px;
line-height: 35px;
background: rgba(0, 0, 0, 0.6);
position: fixed;
text-align: center;
padding: 0; }
}
@media all and (max-width: 900px) {
.mfp-arrow {
-webkit-transform: scale(0.75);
transform: scale(0.75); }
.mfp-arrow-left {
-webkit-transform-origin: 0;
transform-origin: 0; }
.mfp-arrow-right {
-webkit-transform-origin: 100%;
transform-origin: 100%; }
.mfp-container {
padding-left: 6px;
padding-right: 6px; }
}
.mfp-ie7 .mfp-img {
padding: 0; }
.mfp-ie7 .mfp-bottom-bar {
width: 600px;
left: 50%;
margin-left: -300px;
margin-top: 5px;
padding-bottom: 5px; }
.mfp-ie7 .mfp-container {
padding: 0; }
.mfp-ie7 .mfp-content {
padding-top: 44px; }
.mfp-ie7 .mfp-close {
top: 0;
right: 0;
padding-top: 0; }

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<constants>
</constants>
<classes>

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-cas/3.3.0',
'authent-cas/3.2.1',
array(
// Identification
//

View File

@@ -27,7 +27,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-external/3.3.0',
'authent-external/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<classes>
<class id="UserLDAP" _delta="define">
<parent>cmdbAbstractObject</parent>

View File

@@ -9,7 +9,7 @@ if (function_exists('ldap_connect'))
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'authent-ldap/3.3.0',
'authent-ldap/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<module_parameters>
<parameters id="authent-local" _delta="define">
<password_validation.pattern>^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$</password_validation.pattern>

View File

@@ -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/3.3.0',
'authent-local/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<branding>
<themes>
<theme id="darkmoon" _delta="define">

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'combodo-backoffice-darkmoon-theme/3.3.0',
'combodo-backoffice-darkmoon-theme/3.2.1',
array(
// Identification
//

View File

@@ -21,29 +21,6 @@ $ibo-color-red-600: $nord11;
$ibo-color-red-700: darken($nord11, 7%);
$ibo-color-red-800: darken($nord11, 15%);
$ibo-color-red-900: darken($nord11, 22%);
$ibo-color-red-950: darken($nord11, 25%);
$ibo-color-error-100: $ibo-color-red-100;
$ibo-color-error-200: $ibo-color-red-200;
$ibo-color-error-300: $ibo-color-red-300;
$ibo-color-error-400: $ibo-color-red-400;
$ibo-color-error-500: $ibo-color-red-500;
$ibo-color-error-600: $ibo-color-red-600;
$ibo-color-error-700: $ibo-color-red-700;
$ibo-color-error-800: $ibo-color-red-800;
$ibo-color-error-900: $ibo-color-red-900;
$ibo-color-error-950: $ibo-color-red-950;
$ibo-color-danger-100: $ibo-color-red-100;
$ibo-color-danger-200: $ibo-color-red-200;
$ibo-color-danger-300: $ibo-color-red-300;
$ibo-color-danger-400: $ibo-color-red-400;
$ibo-color-danger-500: $ibo-color-red-500;
$ibo-color-danger-600: $ibo-color-red-600;
$ibo-color-danger-700: $ibo-color-red-700;
$ibo-color-danger-800: $ibo-color-red-800;
$ibo-color-danger-900: $ibo-color-red-900;
$ibo-color-danger-950: $ibo-color-red-950;
$ibo-color-primary-100: lighten($nord8, 15%);
$ibo-color-primary-200: darken($ibo-color-primary-100, 7%);

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<branding>
<themes>
<theme id="fullmoon-high-contrast" _delta="define">

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'combodo-backoffice-fullmoon-high-contrast-theme/3.3.0',
'combodo-backoffice-fullmoon-high-contrast-theme/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<branding>
<themes>
<theme id="fullmoon-protanopia-deuteranopia" _delta="define">

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme/3.3.0',
'combodo-backoffice-fullmoon-protanopia-deuteranopia-theme/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<branding>
<themes>
<theme id="fullmoon-tritanopia" _delta="define">

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'combodo-backoffice-fullmoon-tritanopia-theme/3.3.0',
'combodo-backoffice-fullmoon-tritanopia-theme/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<menus>
<menu id="DBToolsMenu" xsi:type="WebPageMenuNode" _delta="define">
<rank>30</rank>

View File

@@ -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/3.3.0',
'combodo-db-tools/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<classes>
<class id="Attachment" _delta="define">
<parent>DBObject</parent>

View File

@@ -85,11 +85,4 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -84,11 +84,4 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
Dict::Add('DA DA', 'Danish', 'Dansk', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -84,11 +84,4 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
Dict::Add('DE DE', 'German', 'Deutsch', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (beim Herunterladen eines Attachment eines Objekts)',
'Class:TriggerOnAttachmentDownload+' => 'Trigger für das Herunterladen des Attachments der angegebenen Klasse oder einer Unterklasse',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -89,13 +89,6 @@ Dict::Add('EN US', 'English', 'English', array(
//
Dict::Add('EN US', 'English', 'English', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger',
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class',
));

View File

@@ -81,11 +81,4 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'Class:TriggerOnAttachmentDownload' => 'Disparador (al descargar el archivo adjunto del objeto)',
'Class:TriggerOnAttachmentDownload+' => 'Disparador al descargar el archivo adjunto del objeto de [una clase secundaria de] la clase dada',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('FR FR', 'French', 'Français', array(
Dict::Add('FR FR', 'French', 'Français', array(
'Class:TriggerOnAttachmentDownload' => 'Déclencheur sur le téléchargement d\'une pièce jointe d\'un objet',
'Class:TriggerOnAttachmentDownload+' => '',
'Class:TriggerOnAttachmentCreate' => 'Déclencheur sur la création d\'une pièce jointe',
'Class:TriggerOnAttachmentCreate+' => '',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Ajoute le fichier dans l\'email',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'Si coché, le fichier sera automatiquement attaché à l\'email quand l\'action email est lancée',
'Class:TriggerOnAttachmentDelete' => 'Déclencheur sur la suppression d\'une pièce jointe',
'Class:TriggerOnAttachmentDelete+' => '',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Les Triggers sur les objets ne sont pas autorisés sur la classe Attachement. Veuillez utiliser les triggers spécifiques pour cette classe',
));

View File

@@ -81,11 +81,4 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
Dict::Add('IT IT', 'Italian', 'Italiano', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (al download di un allegato dell\'oggetto)',
'Class:TriggerOnAttachmentDownload+' => 'Trigger al download di un allegato di un oggetto di [una sottoclasse di] la classe data',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
Dict::Add('JA JP', 'Japanese', '日本語', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -85,11 +85,4 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (Bij het downloaden van een bijlage)',
'Class:TriggerOnAttachmentDownload+' => 'Trigger bij het downloaden van een bijlage van een object van de opgegeven klasse (of subklasse ervan)',
'Class:TriggerOnAttachmentCreate' => 'Trigger (Bij het toevoegen van een bijlage)',
'Class:TriggerOnAttachmentCreate+' => 'Trigger bij het toevoegen van een bijlage aan een object van de opgegeven klasse (of subklasse ervan)',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Bestand toevoegen in e-mail',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+'=> 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (Bij het verwijderen van een bijlage)',
'Class:TriggerOnAttachmentDelete+' => 'Trigger bij het verwijderen van een bijlage van een object van de opgegeven klasse (of subklasse ervan)',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
Dict::Add('PL PL', 'Polish', 'Polski', array(
'Class:TriggerOnAttachmentDownload' => 'Wyzwalacz (po pobraniu załącznika obiektu)',
'Class:TriggerOnAttachmentDownload+' => 'Wyzwalacz po pobraniu załącznika obiektu [klasy podrzędnej] danej klasy',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -84,11 +84,4 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
Dict::Add('RU RU', 'Russian', 'Русский', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
'Class:TriggerOnAttachmentDownload' => 'Trigger (on object\'s attachment download)~~',
'Class:TriggerOnAttachmentDownload+' => 'Trigger on object\'s attachment download of [a child class of] the given class~~',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -83,11 +83,4 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
'Class:TriggerOnAttachmentDownload' => '触发器 (于对象附件下载时)',
'Class:TriggerOnAttachmentDownload+' => '触发器于指定类型 [子类型] 对象附件下载时',
'Class:TriggerOnAttachmentCreate' => 'Trigger (on object\'s attachment create)~~',
'Class:TriggerOnAttachmentCreate+' => 'Trigger on object\'s attachment create~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email' => 'Add file in email~~',
'Class:TriggerOnAttachmentCreate/Attribute:file_in_email+' => 'If checked, the file will be automatically attached to the email when an email action is triggered~~',
'Class:TriggerOnAttachmentDelete' => 'Trigger (on object\'s attachment delete)~~',
'Class:TriggerOnAttachmentDelete+' => 'Trigger on object\'s attachment delete~~',
'Class:TriggerOnObject:TriggerClassAttachment/ReadOnlyMessage' => 'Trigger on object is not allowed on class Attachment. Please use specific trigger~~',
));

View File

@@ -349,7 +349,9 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
{
$oAttachment->DBDelete();
// temporary attachment removed, don't even mention it in the history
} else {
}
else
{
$oAttachment->SetItem($oObject);
$oAttachment->Set('temp_id', '');
$oAttachment->DBUpdate();
@@ -769,6 +771,39 @@ class CMDBChangeOpAttachmentRemoved extends CMDBChangeOp
}
}
/**
* Class TriggerOnAttachmentDownload
*
* @since 3.1.0
*/
class TriggerOnAttachmentDownload extends TriggerOnAttributeBlobDownload
{
/**
* @inheritDoc
* @throws \CoreException
* @throws \Exception
*/
public static function Init()
{
$aParams = array
(
"category" => "grant_by_profile,core/cmdb,application",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'complement'],
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onattdownload",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
}
}
class AttachmentsHelper
{
/**

View File

@@ -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/3.3.0',
'itop-attachments/3.2.1',
array(
// Identification
//
@@ -38,9 +38,6 @@ SetupWebPage::AddModule(
'datamodel' => array(
'vendor/autoload.php',
'main.itop-attachments.php',
'src/Trigger/TriggerOnAttachmentCreate.php',
'src/Trigger/TriggerOnAttachmentDelete.php',
'src/Trigger/TriggerOnAttachmentDownload.php',
'renderers.itop-attachments.php',
),
'webservice' => array(
@@ -204,7 +201,7 @@ SQL;
}
SetupLog::Info("Initializing attachment/item_org_id - $iUpdated records have been adjusted");
if (MetaModel::GetAttributeDef('Attachment', 'contact_id') instanceof AttributeExternalKey) {
if (MetaModel::GetAttributeDef('Attachment', 'contact_id') instanceof AttributeExternalKey && version_compare($sPreviousVersion, '3.2.0', '<')) {
SetupLog::Info("Upgrading itop-attachment from '$sPreviousVersion' to '$sCurrentVersion'. Starting with 3.2.0, contact_id will be added into the DB...");
$sUserTableName = MetaModel::DBGetTable('User');
$sUserFieldContactId = MetaModel::GetAttributeDef('User', 'contactid')->Get('sql');

View File

@@ -10,7 +10,6 @@ namespace Combodo\iTop\Attachments\Hook;
use Combodo\iTop\Service\Events\EventData;
use Combodo\iTop\Service\Events\EventService;
use Combodo\iTop\Service\Events\iEventServiceSetup;
use DBObject;
use DBObjectSearch;
use DBObjectSet;
use Exception;
@@ -19,8 +18,6 @@ use LogChannels;
use MetaModel;
use ormDocument;
use TriggerOnAttachmentDownload;
use TriggerOnAttachmentCreate;
use TriggerOnAttachmentDelete;
/**
* Class EventListener
@@ -40,14 +37,6 @@ class EventListener implements iEventServiceSetup
[$this, 'OnAttachmentDownloadActivateTriggers'],
'Attachment'
);
EventService::RegisterListener(
\EVENT_ADD_ATTACHMENT_TO_OBJECT,
[$this, 'OnAttachmentAddedActivateTriggers']
);
EventService::RegisterListener(
\EVENT_REMOVE_ATTACHMENT_FROM_OBJECT,
[$this, 'OnAttachmentRemovedActivateTriggers']
);
}
/**
@@ -70,77 +59,7 @@ class EventListener implements iEventServiceSetup
/** @var \ormDocument $oDocument */
$oDocument = $oEventData->Get('document');
$this->OnAttachmentActivateTriggers(
$oHostObj,
$oAttachment,
$oDocument,
TriggerOnAttachmentDownload::class
);
}
/**
* Callback when an Attachment is added: Activate corresponding triggers
*
* @param \Combodo\iTop\Service\Events\EventData $oEventData
*
* @return void
* @throws \CoreException
*/
public function OnAttachmentAddedActivateTriggers(EventData $oEventData): void
{
/** @var DBObject $oAttachment */
$oAttachment = $oEventData->Get('attachment');
/** @var DBObject $oHostObj */
$oHostObj = $oEventData->Get('object');
/** @var ormDocument $oDocument */
$oDocument = $oAttachment->Get('contents');
$this->OnAttachmentActivateTriggers(
$oHostObj,
$oAttachment,
$oDocument,
\TriggerOnAttachmentCreate::class
);
}
/**
* Callback when an Attachment is removed: Activate corresponding triggers
*
* @param \Combodo\iTop\Service\Events\EventData $oEventData
*
* @return void
* @throws \CoreException
*/
public function OnAttachmentRemovedActivateTriggers(EventData $oEventData): void
{
/** @var DBObject $oAttachment */
$oAttachment = $oEventData->Get('attachment');
/** @var DBObject $oHostObj */
$oHostObj = $oEventData->Get('object');
/** @var ormDocument $oDocument */
$oDocument = $oAttachment->Get('contents');
$this->OnAttachmentActivateTriggers(
$oHostObj,
$oAttachment,
$oDocument,
\TriggerOnAttachmentDelete::class
);
}
/**
* Callback when an Attachment downloaded, added or removed: Activate corresponding triggers
*
* @param DBObject $oHostObj
* @param DBObject $oAttachment
* @param ormDocument $oDocument
* @param string $sTriggerClass
*
* @return void
* @throws \CoreException
*/
protected function OnAttachmentActivateTriggers(DBObject $oHostObj, DBObject $oAttachment, ormDocument $oDocument, string $sTriggerClass): void
{
$sTriggerClass = TriggerOnAttachmentDownload::class;
$aTriggerContextArgs = [
'this->object()' => $oHostObj,
'attachment->object()' => $oAttachment,
@@ -156,11 +75,7 @@ class EventListener implements iEventServiceSetup
/** @var \Trigger $oTrigger */
while ($oTrigger = $oTriggerSet->Fetch()) {
try {
$aContextArgs = $aTriggerContextArgs;
if ($oTrigger->Get('file_in_email')) {
$aContextArgs['attachments'] = [$oDocument];
}
$oTrigger->DoActivate($aContextArgs);
$oTrigger->DoActivate($aTriggerContextArgs);
} catch (Exception $oException) {
IssueLog::Error('Exception occurred during trigger activation in '.EventListener::class.'::'.__METHOD__, LogChannels::NOTIFICATIONS, [
'trigger_class' => get_class($oTrigger),

View File

@@ -1,48 +0,0 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class TriggerOnAttachmentCreate
*
* @since 3.3.0
*/
class TriggerOnAttachmentCreate extends TriggerOnObject
{
/**
* @inheritDoc
* @throws \CoreException
* @throws \Exception
*/
public static function Init()
{
$aParams = array
(
"category" => "grant_by_profile,core/cmdb,application",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'complement'],
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onattcreate",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeBoolean("file_in_email", array("sql"=>'file_in_email', "is_null_allowed"=>false, "default_value"=>'true', "allowed_values"=>null, "depends_on"=>array(), "always_load_in_tables"=>false)));
// Display lists
MetaModel::Init_SetZListItems('details', array('description', 'context', 'filter', 'action_list', 'target_class', 'file_in_email')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('finalclass', 'target_class')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('description', 'target_class')); // Criteria of the std search form
}
}

View File

@@ -1,47 +0,0 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class TriggerOnAttachmentCreate
*
* @since 3.3.0
*/
class TriggerOnAttachmentDelete extends TriggerOnObject
{
/**
* @inheritDoc
* @throws \CoreException
* @throws \Exception
*/
public static function Init()
{
$aParams = array
(
"category" => "grant_by_profile,core/cmdb,application",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'complement'],
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onattdelete",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
// Display lists
MetaModel::Init_SetZListItems('details', array('description', 'context', 'filter', 'action_list', 'target_class')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('finalclass', 'target_class')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('description', 'target_class')); // Criteria of the std search form
}
}

View File

@@ -1,33 +0,0 @@
<?php
/**
* Class TriggerOnAttachmentDownload
*
* @since 3.1.0
*/
class TriggerOnAttachmentDownload extends TriggerOnAttributeBlobDownload
{
/**
* @inheritDoc
* @throws \CoreException
* @throws \Exception
*/
public static function Init()
{
$aParams = array
(
"category" => "grant_by_profile,core/cmdb,application",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'complement'],
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onattdownload",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
}
}

View File

@@ -120,7 +120,7 @@ try
try
{
set_time_limit(0);
$oBB = new BackupExec(utils::GetDataPath().'backups/manual/', 0 /*iRetentionCount*/);
$oBB = new BackupExec(APPROOT.'data/backups/manual/', 0 /*iRetentionCount*/);
$sRes = $oBB->Process(time() + 36000); // 10 hours to complete should be sufficient!
}
catch (Exception $e)
@@ -185,7 +185,7 @@ try
$oDBRS = new DBRestore($oItopConfig);
$oDBRS->SetMySQLBinDir($sMySQLBinDir);
$sBackupDir = utils::GetDataPath().'backups/';
$sBackupDir = APPROOT.'data/backups/';
$sBackupFile = $sBackupDir.$sFile;
$sRes = $oDBRS->RestoreFromCompressedBackup($sBackupFile, $sEnvironment);
@@ -210,7 +210,7 @@ try
}
$sFile = utils::ReadParam('file', '', false, 'raw_data');
$oBackup = new DBBackupScheduled();
$sBackupDir = utils::GetDataPath().'backups/';
$sBackupDir = APPROOT.'data/backups/';
$sBackupFilePath = utils::RealPath($sBackupDir.$sFile, $sBackupDir);
if ($sBackupFilePath === false)
{

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<menus>
<menu id="BackupStatus" xsi:type="WebPageMenuNode" _delta="define">
<rank>50</rank>

View File

@@ -147,7 +147,7 @@ class DBRestore extends DBBackup
// Load the database
//
$sDataDir = utils::GetDataPath().'tmp-backup-'.rand(10000, getrandmax());
$sDataDir = APPROOT.'data/tmp-backup-'.rand(10000, getrandmax());
SetupUtils::builddir($sDataDir); // Here is the directory
$oArchive->extractTo($sDataDir);
@@ -157,7 +157,7 @@ class DBRestore extends DBBackup
// Update the code
//
$sDeltaFile = utils::GetDataPath().$sEnvironment.'.delta.xml';
$sDeltaFile = APPROOT.'data/'.$sEnvironment.'.delta.xml';
if (is_file($sDataDir.'/delta.xml')) {
// Extract and rename delta.xml => <env>.delta.xml;
@@ -165,15 +165,15 @@ class DBRestore extends DBBackup
} else {
@unlink($sDeltaFile);
}
if (is_dir(utils::GetDataPath().'production-modules/')) {
if (is_dir(APPROOT.'data/production-modules/')) {
try {
SetupUtils::rrmdir(utils::GetDataPath().'production-modules/');
SetupUtils::rrmdir(APPROOT.'data/production-modules/');
} catch (Exception $e) {
throw new BackupException("Can't remove production-modules dir", 0, $e);
}
}
if (is_dir($sDataDir.'/production-modules')) {
rename($sDataDir.'/production-modules', utils::GetDataPath().'production-modules/');
rename($sDataDir.'/production-modules', APPROOT.'data/production-modules/');
}
$sConfigFile = APPROOT.'conf/'.$sEnvironment.'/config-itop.php';

View File

@@ -109,7 +109,7 @@ class BackupExec extends AbstractWeeklyScheduledProcess
{
if (is_null($sBackupDir))
{
$this->sBackupDir = utils::GetDataPath().'backups/auto/';
$this->sBackupDir = APPROOT.'data/backups/auto/';
}
else
{

View File

@@ -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/3.3.0',
'itop-backup/3.2.1',
array(
// Identification
//

View File

@@ -126,7 +126,7 @@ try {
// Destination directory
//
// Make sure the target directory exists and is writeable
$sBackupDir = realpath(utils::GetDataPath().'backups/');
$sBackupDir = realpath(APPROOT.'data/backups/');
SetupUtils::builddir($sBackupDir);
if (!is_dir($sBackupDir)) {
$oBlockForChecks->AddSubBlock(

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<constants/>
<classes>
<class id="lnkFunctionalCIToProviderContract" _delta="define">

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-bridge-cmdb-services/3.3.0',
'itop-bridge-cmdb-services/3.2.1',
array(
// Identification
//

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2">
<constants/>
<classes>
<class id="lnkFunctionalCIToTicket" _delta="define">
@@ -142,19 +142,6 @@
</field>
</fields>
</class>
<class id="Ticket" _delta="must_exist">
<fields>
<field id="functionalcis_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkFunctionalCIToTicket</linked_class>
<ext_key_to_me>ticket_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>functionalci_id</ext_key_to_remote>
<with_php_computation>true</with_php_computation>
<duplicates/>
</field>
</fields>
</class>
</classes>
<menus>
</menus>

View File

@@ -5,7 +5,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-bridge-cmdb-ticket/3.3.0',
'itop-bridge-cmdb-ticket/3.2.1',
array(
// Identification
//

Some files were not shown because too many files have changed in this diff Show More