Created
July 26, 2011 13:52
-
-
Save guilhem/1106814 to your computer and use it in GitHub Desktop.
Patch dumpentity to specify entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urB -x .svn branches/upstream/branches/1.1-bugfixes//front/plugin_dumpentity.getcsv.php trunk//front/plugin_dumpentity.getcsv.php | |
--- branches/upstream/branches/1.1-bugfixes//front/plugin_dumpentity.getcsv.php 2011-07-12 18:28:18.318642139 +0200 | |
+++ trunk//front/plugin_dumpentity.getcsv.php 2011-07-05 18:07:35.000000000 +0200 | |
@@ -57,6 +57,10 @@ | |
$table=""; | |
} | |
+if (isset($_GET["entity"])) { | |
+ $entity = $_GET["entity"]; | |
+} | |
+ | |
if (isset($_SESSION["glpi_plugin_dumpentity_profile"])) | |
{ | |
// called from interface | |
@@ -83,7 +87,8 @@ | |
} | |
$model = new DumpEntityModel(); | |
$model->getFromDB($client->fields["FK_model"]); | |
- $entity=$client->fields["FK_entities"]; | |
+ if (empty($_GET["entity"])) | |
+ $entity=$client->fields["FK_entities"]; | |
$recursive=$client->fields["recursive"]; | |
} | |
diff -urB -x .svn branches/upstream/branches/1.1-bugfixes//front/plugin_dumpentity.gettgz.php trunk//front/plugin_dumpentity.gettgz.php | |
--- branches/upstream/branches/1.1-bugfixes//front/plugin_dumpentity.gettgz.php 2011-07-12 18:28:18.328642139 +0200 | |
+++ trunk//front/plugin_dumpentity.gettgz.php 2011-07-26 15:41:33.412917989 +0200 | |
@@ -96,7 +96,10 @@ | |
} | |
$model = new DumpEntityModel(); | |
$model->getFromDB($client->fields["FK_model"]); | |
- $entity=$client->fields["FK_entities"]; | |
+ if (isset($_GET["entity"])) | |
+ $entity = $_GET["entity"]; | |
+ else | |
+ $entity=$client->fields["FK_entities"]; | |
} | |
$todel = array(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment