949eae42f7d5b80efcf7d0072adfd1981b90883e
[acontent.git] / docs / updater / patch_edit.php
1 <?php\r
2 /************************************************************************/\r
3 /* AContent                                                             */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2010                                                   */\r
6 /* Inclusive Design Institute                                           */\r
7 /*                                                                      */\r
8 /* This program is free software. You can redistribute it and/or        */\r
9 /* modify it under the terms of the GNU General Public License          */\r
10 /* as published by the Free Software Foundation.                        */\r
11 /************************************************************************/\r
12 \r
13 define('TR_INCLUDE_PATH', '../include/');\r
14 require(TR_INCLUDE_PATH.'vitals.inc.php');\r
15 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
17 require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
18  \r
19 if (!isset($_REQUEST["myown_patch_id"]))\r
20 {\r
21         $msg->addError('NO_ITEM_SELECTED');\r
22         exit;\r
23 }\r
24 \r
25 $myown_patch_id = $_REQUEST["myown_patch_id"];\r
26 \r
27 $myownPatchesDAO = new MyownPatchesDAO();\r
28 $myownPatchesDependentDAO = new MyownPatchesDependentDAO();\r
29 $myownPatchesFilesDAO = new MyownPatchesFilesDAO();\r
30 \r
31 // URL called by form action\r
32 $savant->assign('url', dirname($_SERVER['PHP_SELF']) . "/patch_creator.php?myown_patch_id=" . $myown_patch_id);\r
33 \r
34 $savant->assign('patch_row', $myownPatchesDAO->getByID($myown_patch_id));\r
35 $savant->assign('dependent_rows', $myownPatchesDependentDAO->getByPatchID($myown_patch_id));\r
36 $savant->assign('file_rows', $myownPatchesFilesDAO->getByPatchID($myown_patch_id));\r
37 \r
38 $savant->display('updater/patch_create_edit.tmpl.php');\r
39 ?>\r