Changeset 18380
- Timestamp:
- 2009/11/13 17:27:39 (17 years ago)
- Location:
- branches/comu-ver2/data/class
- Files:
-
- 2 edited
-
helper/SC_Helper_DB.php (modified) (2 diffs)
-
pages/admin/plugin/LC_Page_Admin_Plugin_Uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/helper/SC_Helper_DB.php
r18370 r18380 1918 1918 * 指定ファイルが存在する場合 SQL として実行 1919 1919 * 1920 * ・MySQL の場合、文字「;」を区切りとして、分割実行。 1920 1921 * XXX プラグイン用に追加。将来消すかも。 1921 1922 * … … 1927 1928 $objQuery = new SC_Query(); 1928 1929 1929 $sql = file_get_contents($sqlFilePath); 1930 if ($sql === false) SC_Utils_Ex::sfDispException('ファイルは存在するが読み込めない'); 1931 $objQuery->query($sql); 1930 $sqls = file_get_contents($sqlFilePath); 1931 if ($sqls === false) SC_Utils_Ex::sfDispException('ファイルは存在するが読み込めない'); 1932 1933 if (DB_TYPE == 'mysql') { 1934 foreach (explode(';', $sqls) as $sql) { 1935 $sql = trim($sql); 1936 if (strlen($sql) == 0) continue; 1937 $objQuery->query($sql); 1938 } 1939 } else { 1940 $objQuery->query($sqls); 1941 } 1932 1942 } 1933 1943 } -
branches/comu-ver2/data/class/pages/admin/plugin/LC_Page_Admin_Plugin_Uninstall.php
r18370 r18380 101 101 $objQuery = new SC_Query(); 102 102 103 // プラグインにて指定された SQL を実行 104 $sqlPath = PLUGIN_PATH . "$path/" . 'sql/uninstall.sql'; 105 if (file_exists($sqlPath)) { 106 $sql = file_get_contents($sqlPath); 107 if ($sql === false) SC_Utils_Ex::sfDispException('ファイルは存在するが読み込めない'); 108 $objQuery->query($sql); 109 } 103 // アンインストール SQL を実行 104 SC_Helper_DB_Ex::sfExecSqlByFile(PLUGIN_PATH . "$path/sql/uninstall.sql"); 110 105 111 106 // プラグイン XML から削除
Note: See TracChangeset
for help on using the changeset viewer.
