1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
16:
17: 18: 19: 20: 21: 22: 23:
24: class cUpgradeJob_0009 extends cUpgradeJobAbstract {
25:
26: public $maxVersion = "4.9.0";
27:
28: public function _execute() {
29: if ($this->_setupType !== 'setup') {
30: return;
31: }
32:
33: switch ($_SESSION["clientmode"]) {
34: case "NOCLIENT":
35: break;
36: case "CLIENTEXAMPLES":
37:
38: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "css")) {
39: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "css");
40: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "css");
41: }
42: cDirHandler::recursiveCopy("data/examples/css", $this->_aCfgClient[1]["path"]["frontend"] . "css");
43:
44:
45: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "js")) {
46: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "js");
47: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "js");
48: }
49:
50: cDirHandler::recursiveCopy("data/examples/js", $this->_aCfgClient[1]["path"]["frontend"] . "js");
51:
52:
53: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "templates")) {
54: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "templates");
55: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "templates");
56: }
57: cDirHandler::recursiveCopy("data/examples/templates", $this->_aCfgClient[1]["path"]["frontend"] . "templates");
58:
59:
60: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "upload")) {
61: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "upload");
62: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "upload");
63: }
64: cDirHandler::recursiveCopy("data/examples/upload", $this->_aCfgClient[1]["path"]["frontend"] . "upload");
65:
66:
67: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "data/layouts")) {
68: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "data/layouts");
69: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "data/layouts");
70: }
71: cDirHandler::recursiveCopy("data/examples/data/layouts", $this->_aCfgClient[1]["path"]["frontend"] . "data/layouts");
72: case "CLIENTMODULES":
73:
74: if (cFileHandler::exists($this->_aCfgClient[1]["path"]["frontend"] . "data/modules")) {
75: cDirHandler::recursiveRmdir($this->_aCfgClient[1]["path"]["frontend"] . "data/modules");
76: mkdir($this->_aCfgClient[1]["path"]["frontend"] . "data/modules");
77: }
78: cDirHandler::recursiveCopy("data/examples/data/modules", $this->_aCfgClient[1]["path"]["frontend"] . "data/modules");
79: }
80: }
81:
82: }
83:
84: ?>