| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | -* | |
| 3 | +* | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | // Disallow direct access. |
| 7 | 7 | defined('ABSPATH') or die("Access denied"); |
| @@ -6,34 +6,34 @@ | ||
| 6 | 6 | // Disallow direct access. |
| 7 | 7 | defined('ABSPATH') or die("Access denied"); |
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | -* Provide uninstall functions | |
| 10 | +* Provide uninstall functnios | |
| 11 | 11 | * required for cleaning up the installation |
| 12 | 12 | * process! |
| 13 | -* | |
| 13 | +* | |
| 14 | 14 | * @author CJT-Team |
| 15 | 15 | */ |
| 16 | 16 | class CJTUninstallModel { |
| 17 | - | |
| 17 | + | |
| 18 | 18 | /** |
| 19 | 19 | * put your comment there... |
| 20 | - * | |
| 20 | + * | |
| 21 | 21 | */ |
| 22 | 22 | public function database() { |
| 23 | 23 | // Import dependencies. |
| 24 | 24 | cssJsToolbox::import('framework:installer:dbfile.class.php'); |
| 25 | 25 | // Load Uninstallation SQL Statements! |
| 26 | - CJTDBFileInstaller::getInstance(cssJsToolbox::resolvePath('models:uninstall:db:mysql:uninstall.sql.php')) | |
| 26 | + CJTDBFileInstaller::getInstance(cssJsToolbox::resolvePath('models:uninstall:db:mysql:uninstall.sql')) | |
| 27 | 27 | // Execute All, |
| 28 | 28 | ->exec(); |
| 29 | 29 | // Chaining! |
| 30 | 30 | return $this; |
| 31 | 31 | } |
| 32 | - | |
| 32 | + | |
| 33 | 33 | /** |
| 34 | 34 | * put your comment there... |
| 35 | - * | |
| 35 | + * | |
| 36 | 36 | */ |
| 37 | 37 | public function expressUninstall() { |
| 38 | 38 | // Clean up database |
| 39 | 39 | $this->database(); |
| @@ -41,17 +41,17 @@ | ||
| 41 | 41 | $this->fileSystem(); |
| 42 | 42 | // Chaining! |
| 43 | 43 | return $this; |
| 44 | 44 | } |
| 45 | - | |
| 45 | + | |
| 46 | 46 | /** |
| 47 | 47 | * put your comment there... |
| 48 | - * | |
| 48 | + * | |
| 49 | 49 | */ |
| 50 | 50 | public function fileSystem() { |
| 51 | 51 | global $wp_filesystem; |
| 52 | 52 | // Getting directory list! |
| 53 | - $wpContentDir = WP_CONTENT_DIR; | |
| 53 | + $wpContentDir = 'wp-content'; | |
| 54 | 54 | $fSConfig = cssJSToolbox::$config->fileSystem; |
| 55 | 55 | // Directories to create! |
| 56 | 56 | $directories = array( |
| 57 | 57 | "{$wpContentDir}/{$fSConfig->contentDir}", |
| @@ -58,11 +58,11 @@ | ||
| 58 | 58 | "{$wpContentDir}/{$fSConfig->contentDir}/{$fSConfig->templatesDir}", |
| 59 | 59 | ); |
| 60 | 60 | // Delete all directories! |
| 61 | 61 | foreach ($directories as $dir) { |
| 62 | - $wp_filesystem->delete($dir, true); | |
| 62 | + $wp_filesystem->delete(ABSPATH . "/{$dir}", true); | |
| 63 | 63 | } |
| 64 | 64 | // Chaining! |
| 65 | 65 | return $this; |
| 66 | 66 | } |
| 67 | - | |
| 67 | + | |
| 68 | 68 | } // End class. |