* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @category Wikidot * @package Wikidot_Tools * @version $Id$ * @copyright Copyright (c) 2008, Wikidot Inc. (http://www.wikidot-inc.com) * @license http://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License */ chdir(dirname(__FILE__)); // unifies CLI/CGI cwd handling require '../php/setup.php'; define('SMARTY_DIR', PathManager::smartyDir()); require_once SMARTY_DIR . 'Smarty.class.php'; $logger = OzoneLogger::instance(); $loggerFileOutput = new OzoneLoggerFileOutput(); $loggerFileOutput->setLogFileName(WIKIDOT_ROOT . "/logs/om-generation.log"); $logger->addLoggerOutput($loggerFileOutput); $logger->setDebugLevel("debug"); $logger->debug("request processing started, logger initialized"); if (in_array('--drop-tables', $argv)) { $dropTables = true; } else { $dropTables = false; } $executeSql = true; if (in_array('-o', $argv)) { // output to a file