From 10ef9328d2faece273889cc1a04a3af6d3c63071 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Fri, 4 Jan 2013 07:58:45 +0000 Subject: [PATCH] * code for task#1025. --- bin/backup.bat | 2 -- bin/bat/backup.bat | 2 ++ bin/bat/checkdb.bat | 2 ++ bin/bat/computeburn.bat | 2 ++ bin/bat/getbugs.bat | 2 ++ bin/bat/todo.bat | 2 ++ bin/bat/ztcli.bat | 1 + bin/checkdb.bat | 2 -- bin/checkdb.php | 17 ----------------- bin/computeburn.bat | 2 -- bin/getbugs.bat | 2 -- bin/{ => php}/backup.php | 4 ++-- bin/{ => php}/build.php | 2 +- bin/{ => php}/check.php | 8 ++++---- bin/{ => php}/checkDemoData.php | 6 +++--- bin/php/checkdb.php | 17 +++++++++++++++++ bin/{ => php}/checkyaml.php | 2 +- bin/{ => php}/cn2tw.php | 2 +- bin/{ => php}/computeburn.php | 2 +- bin/{ => php}/copylang.php | 2 +- bin/{ => php}/exportactions.php | 0 bin/{ => php}/getallcommon.php | 2 +- bin/{ => php}/getbugs.php | 2 +- bin/{ => php}/initext.php | 4 ++-- bin/{ => php}/minifyfront.php | 2 +- bin/{ => php}/preparetest.php | 2 +- bin/{ => php}/syncext.php | 0 bin/{ => php}/tags.php | 0 bin/{ => php}/todo.php | 2 +- bin/{ => php}/win2unix.php | 2 +- bin/{ => php}/ztcli | 4 ++-- bin/shell/ztcli.sh | 1 + bin/todo.bat | 2 -- bin/ztcli.bat | 1 - bin/ztcli.sh | 1 - 35 files changed, 53 insertions(+), 53 deletions(-) delete mode 100755 bin/backup.bat create mode 100755 bin/bat/backup.bat create mode 100755 bin/bat/checkdb.bat create mode 100755 bin/bat/computeburn.bat create mode 100755 bin/bat/getbugs.bat create mode 100755 bin/bat/todo.bat create mode 100644 bin/bat/ztcli.bat delete mode 100755 bin/checkdb.bat delete mode 100755 bin/checkdb.php delete mode 100755 bin/computeburn.bat delete mode 100755 bin/getbugs.bat rename bin/{ => php}/backup.php (95%) rename bin/{ => php}/build.php (97%) rename bin/{ => php}/check.php (95%) rename bin/{ => php}/checkDemoData.php (72%) create mode 100755 bin/php/checkdb.php rename bin/{ => php}/checkyaml.php (97%) rename bin/{ => php}/cn2tw.php (92%) rename bin/{ => php}/computeburn.php (97%) rename bin/{ => php}/copylang.php (91%) rename bin/{ => php}/exportactions.php (100%) rename bin/{ => php}/getallcommon.php (95%) rename bin/{ => php}/getbugs.php (98%) rename bin/{ => php}/initext.php (95%) rename bin/{ => php}/minifyfront.php (98%) rename bin/{ => php}/preparetest.php (97%) rename bin/{ => php}/syncext.php (100%) rename bin/{ => php}/tags.php (100%) rename bin/{ => php}/todo.php (97%) rename bin/{ => php}/win2unix.php (77%) rename bin/{ => php}/ztcli (92%) create mode 100755 bin/shell/ztcli.sh delete mode 100755 bin/todo.bat delete mode 100644 bin/ztcli.bat delete mode 100755 bin/ztcli.sh diff --git a/bin/backup.bat b/bin/backup.bat deleted file mode 100755 index 319715a198..0000000000 --- a/bin/backup.bat +++ /dev/null @@ -1,2 +0,0 @@ -php backup.php -pause diff --git a/bin/bat/backup.bat b/bin/bat/backup.bat new file mode 100755 index 0000000000..f07a5a3250 --- /dev/null +++ b/bin/bat/backup.bat @@ -0,0 +1,2 @@ +php ../php/backup.php +pause diff --git a/bin/bat/checkdb.bat b/bin/bat/checkdb.bat new file mode 100755 index 0000000000..dcc8c43770 --- /dev/null +++ b/bin/bat/checkdb.bat @@ -0,0 +1,2 @@ +php ../php/checkdb.php +pause diff --git a/bin/bat/computeburn.bat b/bin/bat/computeburn.bat new file mode 100755 index 0000000000..6b63895c3f --- /dev/null +++ b/bin/bat/computeburn.bat @@ -0,0 +1,2 @@ +php ../php/computeburn.php +pause diff --git a/bin/bat/getbugs.bat b/bin/bat/getbugs.bat new file mode 100755 index 0000000000..580dedaa2f --- /dev/null +++ b/bin/bat/getbugs.bat @@ -0,0 +1,2 @@ +php ../php/getbugs.php +pause diff --git a/bin/bat/todo.bat b/bin/bat/todo.bat new file mode 100755 index 0000000000..9df869ae51 --- /dev/null +++ b/bin/bat/todo.bat @@ -0,0 +1,2 @@ +php ../php/todo.php +pause diff --git a/bin/bat/ztcli.bat b/bin/bat/ztcli.bat new file mode 100644 index 0000000000..24e2024ac7 --- /dev/null +++ b/bin/bat/ztcli.bat @@ -0,0 +1 @@ +php ../php/ztcli %* diff --git a/bin/checkdb.bat b/bin/checkdb.bat deleted file mode 100755 index 00fab0c2d9..0000000000 --- a/bin/checkdb.bat +++ /dev/null @@ -1,2 +0,0 @@ -php checkdb.php -pause diff --git a/bin/checkdb.php b/bin/checkdb.php deleted file mode 100755 index f25aae2352..0000000000 --- a/bin/checkdb.php +++ /dev/null @@ -1,17 +0,0 @@ -requestType == 'PATH_INFO') -{ - system('php ztcli "http://localhost/admin-checkdb"', $requestVar); -} -elseif($config->requestType == 'GET') -{ - system('php ztcli "http://localhost/?m=admin&f=checkdb"', $requestVar); -} - -if(!$requestVar) -{ - echo "Check DataBase successfully!\n"; -} diff --git a/bin/computeburn.bat b/bin/computeburn.bat deleted file mode 100755 index 1bdb811d29..0000000000 --- a/bin/computeburn.bat +++ /dev/null @@ -1,2 +0,0 @@ -php computeburn.php -pause diff --git a/bin/getbugs.bat b/bin/getbugs.bat deleted file mode 100755 index c328b9b424..0000000000 --- a/bin/getbugs.bat +++ /dev/null @@ -1,2 +0,0 @@ -php getbugs.php -pause diff --git a/bin/backup.php b/bin/php/backup.php similarity index 95% rename from bin/backup.php rename to bin/php/backup.php index 6625263684..1c4f75f54f 100755 --- a/bin/backup.php +++ b/bin/php/backup.php @@ -3,7 +3,7 @@ error_reporting(E_ERROR); /* Include my.php and pclzip class. */ -$pmsRoot = dirname(dirname(__FILE__)); +$pmsRoot = dirname(dirname(dirname(__FILE__))); include $pmsRoot . '/config/my.php'; include $pmsRoot . '/lib/pclzip/pclzip.class.php'; @@ -56,7 +56,7 @@ else } /* Backup the data. */ -chdir(dirname(dirname(__FILE__)) . "/www"); +chdir(dirname(dirname(dirname(__FILE__))) . "/www"); if(!is_dir('data/upload')) die(" No files needed backup.\n"); $dataFile = $destDir . "/" . "file." . date('Ymd', time()) . ".zip"; diff --git a/bin/build.php b/bin/php/build.php similarity index 97% rename from bin/build.php rename to bin/php/build.php index 778159ab19..9f451a76c4 100644 --- a/bin/build.php +++ b/bin/php/build.php @@ -26,7 +26,7 @@ $pmsTagURL = $pmsURL . $pmsTag; echo $phpTag . "'\t" . $pmsTag . "\n"; -chdir('../release/'); +chdir('../../release/'); echo `svn export $phpTagURL`; echo `svn export $pmsTagURL`; diff --git a/bin/check.php b/bin/php/check.php similarity index 95% rename from bin/check.php rename to bin/php/check.php index f9fb4fc3e2..b4d7c30057 100755 --- a/bin/check.php +++ b/bin/php/check.php @@ -6,7 +6,7 @@ class control {} /* set module root path and included the resource of group module. */ -$moduleRoot = '../module/'; +$moduleRoot = '../../module/'; include $moduleRoot . '/group/lang/resource.php'; $whiteList[] = 'api-getsessionid'; @@ -81,8 +81,8 @@ foreach(glob($moduleRoot . '*') as $modulePath) /* checking actions of every module. */ echo '-------------lang checking-----------------' . "\n"; -include '../module/common/lang/zh-cn.php'; -include '../config/config.php'; +include '../../module/common/lang/zh-cn.php'; +include '../../config/config.php'; foreach(glob($moduleRoot . '*') as $modulePath) { unset($lang); @@ -112,7 +112,7 @@ foreach(glob($moduleRoot . '*') as $modulePath) $key = trim($key); $lineNO = $lineNO + 1; echo "module $moduleName need checking, command is:"; - echo " vim -O +$lineNO ../module/$moduleName/lang/zh-cn.php +$lineNO ../module/$moduleName/lang/en.php \n"; + echo " vim -O +$lineNO ../../module/$moduleName/lang/zh-cn.php +$lineNO ../../module/$moduleName/lang/en.php \n"; break; } } diff --git a/bin/checkDemoData.php b/bin/php/checkDemoData.php similarity index 72% rename from bin/checkDemoData.php rename to bin/php/checkDemoData.php index 31e8c3bf6d..3a1548d926 100755 --- a/bin/checkDemoData.php +++ b/bin/php/checkDemoData.php @@ -1,6 +1,6 @@ db->prefix . 'group') === false ) $output .= $sql; } -file_put_contents("../db/demo.sql", $output); +file_put_contents("../../db/demo.sql", $output); diff --git a/bin/php/checkdb.php b/bin/php/checkdb.php new file mode 100755 index 0000000000..362128bb82 --- /dev/null +++ b/bin/php/checkdb.php @@ -0,0 +1,17 @@ +requestType == 'PATH_INFO') +{ + system('php ../php/ztcli "http://localhost/admin-checkdb"', $requestVar); +} +elseif($config->requestType == 'GET') +{ + system('php ../php/ztcli "http://localhost/?m=admin&f=checkdb"', $requestVar); +} + +if(!$requestVar) +{ + echo "Check DataBase successfully!\n"; +} diff --git a/bin/checkyaml.php b/bin/php/checkyaml.php similarity index 97% rename from bin/checkyaml.php rename to bin/php/checkyaml.php index 87a163be5d..6c4425235a 100644 --- a/bin/checkyaml.php +++ b/bin/php/checkyaml.php @@ -3,7 +3,7 @@ if(count($argv) != 2) die("please set the yaml file.\n"); $filename = $argv[1]; if(!is_file($filename)) die("the yaml file doesn't exit\n"); -include '../lib/spyc/spyc.class.php'; +include '../../lib/spyc/spyc.class.php'; $extension = Spyc::YAMLLoadString(file_get_contents($filename)); /* Basic info checking. */ diff --git a/bin/cn2tw.php b/bin/php/cn2tw.php similarity index 92% rename from bin/cn2tw.php rename to bin/php/cn2tw.php index 8af43a45b4..09656f3ac1 100644 --- a/bin/cn2tw.php +++ b/bin/php/cn2tw.php @@ -3,7 +3,7 @@ $langType = 'zh-tw'; $langDesc = 'zh-tw'; if(empty($langType)) die('lang') . "\n"; -foreach(glob('../module/*') as $moduleName) +foreach(glob('../../module/*') as $moduleName) { $moduleLangPath = realpath($moduleName) . '/lang/'; $defaultLangFile = $moduleLangPath . 'zh-cn.php'; diff --git a/bin/computeburn.php b/bin/php/computeburn.php similarity index 97% rename from bin/computeburn.php rename to bin/php/computeburn.php index 7154943217..4616b09d19 100755 --- a/bin/computeburn.php +++ b/bin/php/computeburn.php @@ -1,7 +1,7 @@ #!/usr/bin/env php requestType == 'PATH_INFO') { diff --git a/bin/ztcli b/bin/php/ztcli similarity index 92% rename from bin/ztcli rename to bin/php/ztcli index 1415d07f0e..bff403db52 100755 --- a/bin/ztcli +++ b/bin/php/ztcli @@ -21,7 +21,7 @@ $request = parse_url(trim($argv[1])); $_SERVER['HTTP_HOST'] = $request['host']; /* Load the framework. */ -chdir(dirname(__FILE__)); +chdir(dirname(dirname(__FILE__))); include '../framework/router.class.php'; include '../framework/control.class.php'; include '../framework/model.class.php'; @@ -40,7 +40,7 @@ else } /* Instance the app and run it. */ -$app = router::createApp('pms', dirname(dirname(__FILE__))); +$app = router::createApp('pms', dirname(dirname(dirname(__FILE__)))); $common = $app->loadCommon(); $app->parseRequest(); $app->loadModule(); diff --git a/bin/shell/ztcli.sh b/bin/shell/ztcli.sh new file mode 100755 index 0000000000..e3e3e80a8e --- /dev/null +++ b/bin/shell/ztcli.sh @@ -0,0 +1 @@ +php ../php/ztcli $* diff --git a/bin/todo.bat b/bin/todo.bat deleted file mode 100755 index d4c0d61b1f..0000000000 --- a/bin/todo.bat +++ /dev/null @@ -1,2 +0,0 @@ -php todo.php -pause diff --git a/bin/ztcli.bat b/bin/ztcli.bat deleted file mode 100644 index 68635d88b4..0000000000 --- a/bin/ztcli.bat +++ /dev/null @@ -1 +0,0 @@ -php ztcli %* diff --git a/bin/ztcli.sh b/bin/ztcli.sh deleted file mode 100755 index cdeb151459..0000000000 --- a/bin/ztcli.sh +++ /dev/null @@ -1 +0,0 @@ -php ztcli $*