Changeset 23492
- Timestamp:
- 2014/06/02 13:29:24 (9 years ago)
- Location:
- branches/version-2_13-dev/data/class
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/SC_SessionFactory.php
r23124 r23492 49 49 * @return SC_SessionFactory 50 50 */ 51 public function getInstance()51 public static function getInstance() 52 52 { 53 53 $type = defined('SESSION_KEEP_METHOD') -
branches/version-2_13-dev/data/class/helper/SC_Helper_FileManager.php
r23389 r23492 411 411 * @return void 412 412 */ 413 public function deleteFile($path, $del_myself = true)413 public static function deleteFile($path, $del_myself = true) 414 414 { 415 415 $flg = false; -
branches/version-2_13-dev/data/class/helper/SC_Helper_Session.php
r23491 r23492 214 214 * @return void 215 215 */ 216 public function destroyToken()216 public static function destroyToken() 217 217 { 218 218 unset($_SESSION[TRANSACTION_ID_NAME]); -
branches/version-2_13-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
r23490 r23492 145 145 $path_exists = SC_Utils::checkFileExistsWithInBasePath($objFormParam->getValue('select_file'),USER_REALDIR); 146 146 if (SC_Utils_Ex::isBlank($this->arrErr) && ($path_exists)) { 147 $objFileManager->deleteFile($objFormParam->getValue('select_file'));147 SC_Helper_FileManager_Ex::deleteFile($objFormParam->getValue('select_file')); 148 148 } 149 149 break; -
branches/version-2_13-dev/data/class/util/GC_Utils.php
r23490 r23492 392 392 * @return bool フロント機能か 393 393 */ 394 public function isFrontFunction()394 public static function isFrontFunction() 395 395 { 396 396 return defined('FRONT_FUNCTION') && FRONT_FUNCTION === true; … … 402 402 * @return bool インストール機能か 403 403 */ 404 public function isInstallFunction()404 public static function isInstallFunction() 405 405 { 406 406 return defined('INSTALL_FUNCTION') && INSTALL_FUNCTION === true; -
branches/version-2_13-dev/data/class/util/SC_Utils.php
r23477 r23492 36 36 { 37 37 // インストール初期処理 38 public function sfInitInstall()38 public static function sfInitInstall() 39 39 { 40 40 // インストール済みが定義されていない。 … … 65 65 * @return string インストーラの URL 66 66 */ 67 public function searchInstallerPath($path)67 public static function searchInstallerPath($path) 68 68 { 69 69 $installer = 'install/' . DIR_INDEX_PATH; … … 104 104 * @return string $url を絶対パスに変換した URL 105 105 */ 106 public function getRealURL($url)106 public static function getRealURL($url) 107 107 { 108 108 $parse = parse_url($url); … … 125 125 126 126 // 装飾付きエラーメッセージの表示 127 public function sfErrorHeader($mess, $print = false)127 public static function sfErrorHeader($mess, $print = false) 128 128 { 129 129 global $GLOBAL_ERR; … … 137 137 138 138 /* エラーページの表示 */ 139 public function sfDispError($type)139 public static function sfDispError($type) 140 140 { 141 141 require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_DispError_Ex.php'; … … 149 149 150 150 /* サイトエラーページの表示 */ 151 public function sfDispSiteError($type, $objSiteSess = '', $return_top = false, $err_msg = '')151 public static function sfDispSiteError($type, $objSiteSess = '', $return_top = false, $err_msg = '') 152 152 { 153 153 require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_Ex.php'; … … 220 220 * @return string アスタリスクへ変換した文字列 221 221 */ 222 public function sfPassLen($passlen)222 public static function sfPassLen($passlen) 223 223 { 224 224 $ret = ''; … … 236 236 * @return bool 237 237 */ 238 public function sfIsHTTPS()238 public static function sfIsHTTPS() 239 239 { 240 240 // HTTPS時には$_SERVER['HTTPS']には空でない値が入る … … 250 250 * 正規の遷移がされているかを判定 251 251 * 前画面でuniqidを埋め込んでおく必要がある 252 * 253 * 使用されていない. 254 * 252 255 * @param obj SC_Session, SC_SiteSession 253 256 * @return bool … … 282 285 283 286 /* DB用日付日時文字列取得 */ 284 public function sfGetTimestampistime($year, $month, $day, $hour, $minutes, $last = false)287 public static function sfGetTimestampistime($year, $month, $day, $hour, $minutes, $last = false) 285 288 { 286 289 if ($year != '' && $month != '' && $day != '' && $hour != '' && $minutes != '') { … … 330 333 } 331 334 332 public function sfGetCSVData($data, $prefix = '')335 public static function sfGetCSVData($data, $prefix = '') 333 336 { 334 337 if ($prefix == '') { … … 349 352 350 353 /* 1階層上のディレクトリ名を取得する */ 351 public function sfUpDirName()354 public static function sfUpDirName() 352 355 { 353 356 $path = $_SERVER['SCRIPT_NAME']; … … 499 502 500 503 // キーと値をセットした配列を取得 501 public function sfArrKeyValue($arrList, $keyname, $valname, $len_max = '', $keysize = '')504 public static function sfArrKeyValue($arrList, $keyname, $valname, $len_max = '', $keysize = '') 502 505 { 503 506 $arrRet = array(); … … 525 528 } 526 529 527 // キーと値をセットした配列を取得(値が複数の場合) 530 /** 531 * キーと値をセットした配列を取得(値が複数の場合) 532 * 使用されていない 533 */ 528 534 public function sfArrKeyValues($arrList, $keyname, $valname, $len_max = '', $keysize = '', $connect = '') 529 535 { … … 581 587 582 588 /* 配列の要素をCSVフォーマットで出力する。*/ 583 public function sfGetCSVList($array)589 public static function sfGetCSVList($array) 584 590 { 585 591 $line = ''; … … 597 603 } 598 604 599 /*-----------------------------------------------------------------*/ 600 /* check_set_term 601 /* 年月日に別れた2つの期間の妥当性をチェックし、整合性と期間を返す 602 /* 引数 (開始年,開始月,開始日,終了年,終了月,終了日) 603 /* 戻値 array(1,2,3) 604 /* 1.開始年月日 (YYYY/MM/DD 000000) 605 /* 2.終了年月日 (YYYY/MM/DD 235959) 606 /* 3.エラー (0 = OK, 1 = NG) 607 /*-----------------------------------------------------------------*/ 605 /** 606 * check_set_term 607 * 年月日に別れた2つの期間の妥当性をチェックし、整合性と期間を返す 608 * 引数 (開始年,開始月,開始日,終了年,終了月,終了日) 609 * 戻値 array(1,2,3) 610 * 1.開始年月日 (YYYY/MM/DD 000000) 611 * 2.終了年月日 (YYYY/MM/DD 235959) 612 * 3.エラー (0 = OK, 1 = NG) 613 * 614 * 使用されていない 615 */ 608 616 public function sfCheckSetTerm($start_year, $start_month, $start_day, $end_year, $end_month, $end_day) 609 617 { … … 718 726 } 719 727 720 // 桁数を指定して四捨五入 728 /** 729 * 桁数を指定して四捨五入 730 * 731 * 使用されていない 732 */ 721 733 public function sfRound($value, $pow = 0) 722 734 { … … 751 763 752 764 /* 規格分類の件数取得 */ 753 public function sfGetClassCatCount()765 public static function sfGetClassCatCount() 754 766 { 755 767 $sql = 'select count(dtb_class.class_id) as count, dtb_class.class_id '; … … 772 784 * @return int 773 785 */ 774 public function sfGetProductClassId($product_id, $classcategory_id1=0, $classcategory_id2=0)786 public static function sfGetProductClassId($product_id, $classcategory_id1=0, $classcategory_id2=0) 775 787 { 776 788 $where = 'product_id = ? AND classcategory_id1 = ? AND classcategory_id2 = ?'; … … 788 800 789 801 /* 文末の「/」をなくす */ 790 public function sfTrimURL($url)802 public static function sfTrimURL($url) 791 803 { 792 804 $ret = rtrim($url, '/'); … … 847 859 * @return array 連想配列の値のみの配列 848 860 */ 849 public function getHash2Array($hash, $requires = array())861 public static function getHash2Array($hash, $requires = array()) 850 862 { 851 863 $array = array(); … … 882 894 * @return integer 加算ポイント 883 895 */ 884 public function sfGetAddPoint($totalpoint, $use_point, $point_rate)896 public static function sfGetAddPoint($totalpoint, $use_point, $point_rate) 885 897 { 886 898 // 購入商品の合計ポイントから利用したポイントのポイント換算価値を引く方式 … … 895 907 896 908 /* 一意かつ予測されにくいID */ 897 public function sfGetUniqRandomId($head = '')909 public static function sfGetUniqRandomId($head = '') 898 910 { 899 911 // 予測されないようにランダム文字列を付与する。 … … 911 923 * @return string 912 924 */ 913 public function sfRmDupSlash($istr)925 public static function sfRmDupSlash($istr) 914 926 { 915 927 if (preg_match('|^http://|', $istr)) { … … 1025 1037 1026 1038 // 年、月、締め日から、先月の締め日+1、今月の締め日を求める。 1027 public function sfTermMonth($year, $month, $close_day)1039 public static function sfTermMonth($year, $month, $close_day) 1028 1040 { 1029 1041 $end_year = $year; … … 1068 1080 1069 1081 // 再帰的に多段配列を検索して一次元配列(Hidden引渡し用配列)に変換する。 1070 public function sfMakeHiddenArray($arrSrc, $arrDst = array(), $parent_key = '')1082 public static function sfMakeHiddenArray($arrSrc, $arrDst = array(), $parent_key = '') 1071 1083 { 1072 1084 if (is_array($arrSrc)) { … … 1089 1101 1090 1102 // DB取得日時をタイムに変換 1091 public function sfDBDatetoTime($db_date)1103 public static function sfDBDatetoTime($db_date) 1092 1104 { 1093 1105 $date = preg_replace("|\..*$|",'',$db_date); … … 1125 1137 1126 1138 /* 階層構造のテーブルから与えられたIDの直属の子を取得する */ 1127 public function sfGetUnderChildrenArray($arrData, $pid_name, $id_name, $parent)1139 public static function sfGetUnderChildrenArray($arrData, $pid_name, $id_name, $parent) 1128 1140 { 1129 1141 $max = count($arrData); … … 1144 1156 * @deprecated SC_Query::quote() を使用すること 1145 1157 */ 1146 public function sfQuoteSmart($in)1158 public static function sfQuoteSmart($in) 1147 1159 { 1148 1160 if (is_int($in) || is_double($in)) { … … 1158 1170 1159 1171 // ディレクトリを再帰的に生成する 1160 public function sfMakeDir($path)1172 public static function sfMakeDir($path) 1161 1173 { 1162 1174 static $count = 0; … … 1187 1199 1188 1200 // ディレクトリ以下のファイルを再帰的にコピー 1189 public function sfCopyDir($src, $des, $mess = '', $override = false)1201 public static function sfCopyDir($src, $des, $mess = '', $override = false) 1190 1202 { 1191 1203 if (!is_dir($src)) { … … 1217 1229 } 1218 1230 1231 $matches = array(); 1219 1232 mb_ereg("^(.*[\/])(.*)",$data_, $matches); 1220 1233 $data=$matches[2]; … … 1244 1257 * 1245 1258 * @param boolean|string $output 半角スペース256文字+改行を出力するか。または、送信する文字列を指定。 1259 * @param int $sleep 1246 1260 * @return void 1247 1261 */ 1248 public function sfFlush($output = false, $sleep = 0)1262 public static function sfFlush($output = false, $sleep = 0) 1249 1263 { 1250 1264 // 出力をバッファリングしない(==日本語自動変換もしない) … … 1268 1282 } 1269 1283 1270 // @versionの記載があるファイルからバージョンを取得する。 1284 /** 1285 * @versionの記載があるファイルからバージョンを取得する。 1286 * 1287 * 使用されていない 1288 */ 1271 1289 public function sfGetFileVersion($path) 1272 1290 { … … 1291 1309 * $array の要素を $arrConvList で指定した方式で mb_convert_kana を適用する. 1292 1310 * 1311 * 使用されていない 1312 * 1293 1313 * @param array $array 変換する文字列の配列 1294 1314 * @param array $arrConvList mb_convert_kana の適用ルール … … 1314 1334 * @return array 添字を定義した配列 1315 1335 */ 1316 public function arrayDefineIndexes($array, $defineIndexes)1336 public static function arrayDefineIndexes($array, $defineIndexes) 1317 1337 { 1318 1338 foreach ($defineIndexes as $key) { … … 1356 1376 * 配列をテーブルタグで出力する。 1357 1377 * 1378 * 使用されていない 1379 * 1380 * @param array $array 1358 1381 * @return string 1359 1382 */ … … 1386 1409 * @return string $file 画像のパス、画像が存在しない場合、NO_IMAGE_REALFILEを返す 1387 1410 */ 1388 public function getSaveImagePath($filename)1411 public static function getSaveImagePath($filename) 1389 1412 { 1390 1413 $file = NO_IMAGE_REALFILE; … … 1429 1452 1430 1453 /* デバッグ用 ------------------------------------------------------------------------------------------------*/ 1431 public function sfPrintR($obj)1454 public static function sfPrintR($obj) 1432 1455 { 1433 1456 echo '<div style="font-size: 12px;color: #00FF00;">' . "\n"; … … 1445 1468 * @return string ランダムな文字列 1446 1469 */ 1447 public function sfGetRandomString($length = 1)1470 public static function sfGetRandomString($length = 1) 1448 1471 { 1449 1472 return Text_Password::create($length); … … 1511 1534 1512 1535 // 郵便番号から住所の取得 1513 public function sfGetAddress($zipcode)1536 public static function sfGetAddress($zipcode) 1514 1537 { 1515 1538 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 1630 1653 * @return boolean 1631 1654 */ 1632 public function sfIsInternalDomain($url)1655 public static function sfIsInternalDomain($url) 1633 1656 { 1634 1657 $netURL = new Net_URL(HTTP_URL); … … 1648 1671 * @return string ハッシュ暗号化された文字列 1649 1672 */ 1650 public function sfGetHashString($str, $salt)1673 public static function sfGetHashString($str, $salt) 1651 1674 { 1652 1675 if ($salt == '') { … … 1670 1693 * @return boolean 一致判定 1671 1694 */ 1672 public function sfIsMatchHashPassword($pass, $hashpass, $salt)1695 public static function sfIsMatchHashPassword($pass, $hashpass, $salt) 1673 1696 { 1674 1697 $res = false; … … 1750 1773 * @see Services_JSON::decode() 1751 1774 */ 1752 public function jsonDecode($json)1775 public static function jsonDecode($json) 1753 1776 { 1754 1777 if (function_exists('json_decode')) { … … 1768 1791 * この関数は, パスの存在チェックを行なわないため注意すること. 1769 1792 * 1770 * @param string チェック対象のパス1793 * @param string $realpath チェック対象のパス 1771 1794 * @return boolean 絶対パスの場合 true 1772 1795 */ 1773 public function isAbsoluteRealPath($realpath)1796 public static function isAbsoluteRealPath($realpath) 1774 1797 { 1775 1798 if (strpos(PHP_OS, 'WIN') === false) { … … 1790 1813 * @see http://jp.php.net/mkdir 1791 1814 */ 1792 public function recursiveMkdir($pathname, $mode = 0777)1815 public static function recursiveMkdir($pathname, $mode = 0777) 1793 1816 { 1794 1817 /* … … 1801 1824 } 1802 1825 1803 public function isAppInnerUrl($url)1826 public static function isAppInnerUrl($url) 1804 1827 { 1805 1828 $pattern = '/^(' . preg_quote(HTTP_URL, '/') . '|' . preg_quote(HTTPS_URL, '/') . ')/'; … … 1816 1839 * @return boolean 成功=true, 失敗=false 1817 1840 */ 1818 public function extendTimeOut($seconds = null)1841 public static function extendTimeOut($seconds = null) 1819 1842 { 1820 1843 $safe_mode = (boolean) ini_get('safe_mode'); … … 1839 1862 * @return void 1840 1863 */ 1841 public function clearCompliedTemplate()1864 public static function clearCompliedTemplate() 1842 1865 { 1843 1866 // コンパイルファイルの削除処理 … … 1854 1877 * @return void 1855 1878 */ 1856 public function copyDirectory($source_path, $dest_path)1879 public static function copyDirectory($source_path, $dest_path) 1857 1880 { 1858 1881 $handle=opendir($source_path); … … 1892 1915 * @return string RFC3986エンコード文字列 1893 1916 */ 1894 public function encodeRFC3986($str)1917 public static function encodeRFC3986($str) 1895 1918 { 1896 1919 return str_replace('%7E', '~', rawurlencode($str)); … … 2082 2105 * @return bool true = exists / false does not exist 2083 2106 */ 2084 public function checkFileExistsWithInBasePath($file,$base_path)2107 public static function checkFileExistsWithInBasePath($file,$base_path) 2085 2108 { 2086 2109 $arrPath = explode('/', str_replace('\\', '/',$file));
Note: See TracChangeset
for help on using the changeset viewer.