From 3a7d06b19e2cec3650b7e9a3ae9e6615a9b67a12 Mon Sep 17 00:00:00 2001 From: maycactus <138797510+maycactus-FOSS@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:34:00 -0400 Subject: [PATCH 01/11] Fix array element and string offset access using square brackets In accordance with the PHP RFC deprecating the curly brace syntax for accessing array elements and string offsets, this commit replaces all instances of {} with []. By making this change, we ensure the codebase remains compliant with the recommended syntax, enhancing code readability and maintainability. The deprecation of curly brace syntax was done to align with best practices and promote a consistent code style. --- .../photo_uploader/popup/php/JSON.php | 60 +++++++-------- plugin/lgxpay/lgdacom/JSON.php | 76 +++++++++---------- shop/inicis/libs/JSON.php | 76 +++++++++---------- 3 files changed, 106 insertions(+), 106 deletions(-) diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/JSON.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/JSON.php index 31a3fb2c8..7e58cf15c 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/JSON.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/JSON.php @@ -315,7 +315,7 @@ class Services_JSON */ for ($c = 0; $c < $strlen_var; ++$c) { - $ord_var_c = ord($var{$c}); + $ord_var_c = ord($var[$c]); switch (true) { case $ord_var_c == 0x08: @@ -338,12 +338,12 @@ class Services_JSON case $ord_var_c == 0x2F: case $ord_var_c == 0x5C: // double quote, slash, slosh - $ascii .= '\\'.$var{$c}; + $ascii .= '\\'.$var[$c]; break; case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var{$c}; + $ascii .= $var[$c]; break; case (($ord_var_c & 0xE0) == 0xC0): @@ -355,7 +355,7 @@ class Services_JSON break; } - $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $char = pack('C*', $ord_var_c, ord($var[$c + 1])); $c += 1; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -370,8 +370,8 @@ class Services_JSON // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - @ord($var{$c + 1}), - @ord($var{$c + 2})); + @ord($var[$c + 1]), + @ord($var[$c + 2])); $c += 2; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -386,9 +386,9 @@ class Services_JSON // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3])); $c += 3; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -403,10 +403,10 @@ class Services_JSON break; } $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4])); $c += 4; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -421,11 +421,11 @@ class Services_JSON // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4}), - ord($var{$c + 5})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4]), + ord($var[$c + 5])); $c += 5; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -618,7 +618,7 @@ class Services_JSON for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - $ord_chrs_c = ord($chrs{$c}); + $ord_chrs_c = ord($chrs[$c]); switch (true) { case $substr_chrs_c_2 == '\b': @@ -648,7 +648,7 @@ class Services_JSON case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { - $utf8 .= $chrs{++$c}; + $utf8 .= $chrs[++$c]; } break; @@ -661,7 +661,7 @@ class Services_JSON break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): - $utf8 .= $chrs{$c}; + $utf8 .= $chrs[$c]; break; case ($ord_chrs_c & 0xE0) == 0xC0: @@ -708,7 +708,7 @@ class Services_JSON } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { // array, or object notation - if ($str{0} == '[') { + if ($str[0] == '[') { $stk = array(SERVICES_JSON_IN_ARR); $arr = array(); } else { @@ -747,7 +747,7 @@ class Services_JSON $top = end($stk); $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { // found a comma that is not inside a string, array, etc., // OR we've reached the end of the character list $slice = $this->substr8($chrs, $top['where'], ($c - $top['where'])); @@ -788,12 +788,12 @@ class Services_JSON } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { // found a quote, and we are not inside a string - array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c])); //print("Found start of string at {$c}\n"); - } elseif (($chrs{$c} == $top['delim']) && + } elseif (($chrs[$c] == $top['delim']) && ($top['what'] == SERVICES_JSON_IN_STR) && (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped @@ -802,24 +802,24 @@ class Services_JSON array_pop($stk); //print("Found end of string at {$c}: ".$this->substr8($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '[') && + } elseif (($chrs[$c] == '[') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-bracket, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); //print("Found start of array at {$c}\n"); - } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + } elseif (($chrs[$c] == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { // found a right-bracket, and we're in an array array_pop($stk); //print("Found end of array at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '{') && + } elseif (($chrs[$c] == '{') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-brace, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); //print("Found start of object at {$c}\n"); - } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + } elseif (($chrs[$c] == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { // found a right-brace, and we're in an object array_pop($stk); //print("Found end of object at {$c}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); diff --git a/plugin/lgxpay/lgdacom/JSON.php b/plugin/lgxpay/lgdacom/JSON.php index 6af78c7ed..e1c4f017d 100644 --- a/plugin/lgxpay/lgdacom/JSON.php +++ b/plugin/lgxpay/lgdacom/JSON.php @@ -153,7 +153,7 @@ class Services_JSON return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); } - $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]); switch(true) { case ((0x7F & $bytes) == $bytes): @@ -206,17 +206,17 @@ class Services_JSON case 2: // return a UTF-16 character from a 2-byte UTF-8 char // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8{0}) >> 2)) - . chr((0xC0 & (ord($utf8{0}) << 6)) - | (0x3F & ord($utf8{1}))); + return chr(0x07 & (ord($utf8[0]) >> 2)) + . chr((0xC0 & (ord($utf8[0]) << 6)) + | (0x3F & ord($utf8[1]))); case 3: // return a UTF-16 character from a 3-byte UTF-8 char // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8{0}) << 4)) - | (0x0F & (ord($utf8{1}) >> 2))) - . chr((0xC0 & (ord($utf8{1}) << 6)) - | (0x7F & ord($utf8{2}))); + return chr((0xF0 & (ord($utf8[0]) << 4)) + | (0x0F & (ord($utf8[1]) >> 2))) + . chr((0xC0 & (ord($utf8[1]) << 6)) + | (0x7F & ord($utf8[2]))); } // ignoring UTF-32 for now, sorry @@ -261,7 +261,7 @@ class Services_JSON */ for ($c = 0; $c < $strlen_var; ++$c) { - $ord_var_c = ord($var{$c}); + $ord_var_c = ord($var[$c]); switch (true) { case $ord_var_c == 0x08: @@ -284,18 +284,18 @@ class Services_JSON case $ord_var_c == 0x2F: case $ord_var_c == 0x5C: // double quote, slash, slosh - $ascii .= '\\'.$var{$c}; + $ascii .= '\\'.$var[$c]; break; case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var{$c}; + $ascii .= $var[$c]; break; case (($ord_var_c & 0xE0) == 0xC0): // characters U-00000080 - U-000007FF, mask 110XXXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $char = pack('C*', $ord_var_c, ord($var[$c + 1])); $c += 1; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -305,8 +305,8 @@ class Services_JSON // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2})); + ord($var[$c + 1]), + ord($var[$c + 2])); $c += 2; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -316,9 +316,9 @@ class Services_JSON // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3])); $c += 3; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -328,10 +328,10 @@ class Services_JSON // characters U-00200000 - U-03FFFFFF, mask 111110XX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4])); $c += 4; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -341,11 +341,11 @@ class Services_JSON // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4}), - ord($var{$c + 5})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4]), + ord($var[$c + 5])); $c += 5; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -520,7 +520,7 @@ class Services_JSON for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = substr($chrs, $c, 2); - $ord_chrs_c = ord($chrs{$c}); + $ord_chrs_c = ord($chrs[$c]); switch (true) { case $substr_chrs_c_2 == '\b': @@ -550,7 +550,7 @@ class Services_JSON case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { - $utf8 .= $chrs{++$c}; + $utf8 .= $chrs[++$c]; } break; @@ -563,7 +563,7 @@ class Services_JSON break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): - $utf8 .= $chrs{$c}; + $utf8 .= $chrs[$c]; break; case ($ord_chrs_c & 0xE0) == 0xC0: @@ -610,7 +610,7 @@ class Services_JSON } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { // array, or object notation - if ($str{0} == '[') { + if ($str[0] == '[') { $stk = array(SERVICES_JSON_IN_ARR); $arr = array(); } else { @@ -649,7 +649,7 @@ class Services_JSON $top = end($stk); $substr_chrs_c_2 = substr($chrs, $c, 2); - if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { // found a comma that is not inside a string, array, etc., // OR we've reached the end of the character list $slice = substr($chrs, $top['where'], ($c - $top['where'])); @@ -691,12 +691,12 @@ class Services_JSON } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { // found a quote, and we are not inside a string - array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c])); //print("Found start of string at {$c}\n"); - } elseif (($chrs{$c} == $top['delim']) && + } elseif (($chrs[$c] == $top['delim']) && ($top['what'] == SERVICES_JSON_IN_STR) && ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped @@ -705,24 +705,24 @@ class Services_JSON array_pop($stk); //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '[') && + } elseif (($chrs[$c] == '[') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-bracket, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); //print("Found start of array at {$c}\n"); - } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + } elseif (($chrs[$c] == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { // found a right-bracket, and we're in an array array_pop($stk); //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '{') && + } elseif (($chrs[$c] == '{') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-brace, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); //print("Found start of object at {$c}\n"); - } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + } elseif (($chrs[$c] == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { // found a right-brace, and we're in an object array_pop($stk); //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); diff --git a/shop/inicis/libs/JSON.php b/shop/inicis/libs/JSON.php index c07c76767..1c127d65a 100644 --- a/shop/inicis/libs/JSON.php +++ b/shop/inicis/libs/JSON.php @@ -153,7 +153,7 @@ class Services_JSON return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); } - $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]); switch(true) { case ((0x7F & $bytes) == $bytes): @@ -206,17 +206,17 @@ class Services_JSON case 2: // return a UTF-16 character from a 2-byte UTF-8 char // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0x07 & (ord($utf8{0}) >> 2)) - . chr((0xC0 & (ord($utf8{0}) << 6)) - | (0x3F & ord($utf8{1}))); + return chr(0x07 & (ord($utf8[0]) >> 2)) + . chr((0xC0 & (ord($utf8[0]) << 6)) + | (0x3F & ord($utf8[1]))); case 3: // return a UTF-16 character from a 3-byte UTF-8 char // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr((0xF0 & (ord($utf8{0}) << 4)) - | (0x0F & (ord($utf8{1}) >> 2))) - . chr((0xC0 & (ord($utf8{1}) << 6)) - | (0x7F & ord($utf8{2}))); + return chr((0xF0 & (ord($utf8[0]) << 4)) + | (0x0F & (ord($utf8[1]) >> 2))) + . chr((0xC0 & (ord($utf8[1]) << 6)) + | (0x7F & ord($utf8[2]))); } // ignoring UTF-32 for now, sorry @@ -261,7 +261,7 @@ class Services_JSON */ for ($c = 0; $c < $strlen_var; ++$c) { - $ord_var_c = ord($var{$c}); + $ord_var_c = ord($var[$c]); switch (true) { case $ord_var_c == 0x08: @@ -284,18 +284,18 @@ class Services_JSON case $ord_var_c == 0x2F: case $ord_var_c == 0x5C: // double quote, slash, slosh - $ascii .= '\\'.$var{$c}; + $ascii .= '\\'.$var[$c]; break; case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var{$c}; + $ascii .= $var[$c]; break; case (($ord_var_c & 0xE0) == 0xC0): // characters U-00000080 - U-000007FF, mask 110XXXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $char = pack('C*', $ord_var_c, ord($var[$c + 1])); $c += 1; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -305,8 +305,8 @@ class Services_JSON // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2})); + ord($var[$c + 1]), + ord($var[$c + 2])); $c += 2; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -316,9 +316,9 @@ class Services_JSON // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3])); $c += 3; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -328,10 +328,10 @@ class Services_JSON // characters U-00200000 - U-03FFFFFF, mask 111110XX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4])); $c += 4; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -341,11 +341,11 @@ class Services_JSON // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $char = pack('C*', $ord_var_c, - ord($var{$c + 1}), - ord($var{$c + 2}), - ord($var{$c + 3}), - ord($var{$c + 4}), - ord($var{$c + 5})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3]), + ord($var[$c + 4]), + ord($var[$c + 5])); $c += 5; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -520,7 +520,7 @@ class Services_JSON for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = substr($chrs, $c, 2); - $ord_chrs_c = ord($chrs{$c}); + $ord_chrs_c = ord($chrs[$c]); switch (true) { case $substr_chrs_c_2 == '\b': @@ -550,7 +550,7 @@ class Services_JSON case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { - $utf8 .= $chrs{++$c}; + $utf8 .= $chrs[++$c]; } break; @@ -563,7 +563,7 @@ class Services_JSON break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): - $utf8 .= $chrs{$c}; + $utf8 .= $chrs[$c]; break; case ($ord_chrs_c & 0xE0) == 0xC0: @@ -610,7 +610,7 @@ class Services_JSON } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { // array, or object notation - if ($str{0} == '[') { + if ($str[0] == '[') { $stk = array(SERVICES_JSON_IN_ARR); $arr = array(); } else { @@ -649,7 +649,7 @@ class Services_JSON $top = end($stk); $substr_chrs_c_2 = substr($chrs, $c, 2); - if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + if (($c == $strlen_chrs) || (($chrs[$c] == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { // found a comma that is not inside a string, array, etc., // OR we've reached the end of the character list $slice = substr($chrs, $top['where'], ($c - $top['where'])); @@ -691,12 +691,12 @@ class Services_JSON } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + } elseif ((($chrs[$c] == '"') || ($chrs[$c] == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { // found a quote, and we are not inside a string - array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs[$c])); //print("Found start of string at {$c}\n"); - } elseif (($chrs{$c} == $top['delim']) && + } elseif (($chrs[$c] == $top['delim']) && ($top['what'] == SERVICES_JSON_IN_STR) && ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped @@ -705,24 +705,24 @@ class Services_JSON array_pop($stk); //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '[') && + } elseif (($chrs[$c] == '[') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-bracket, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); //print("Found start of array at {$c}\n"); - } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + } elseif (($chrs[$c] == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { // found a right-bracket, and we're in an array array_pop($stk); //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '{') && + } elseif (($chrs[$c] == '{') && in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { // found a left-brace, and we are in an array, object, or slice array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); //print("Found start of object at {$c}\n"); - } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + } elseif (($chrs[$c] == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { // found a right-brace, and we're in an object array_pop($stk); //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); From 12ce06c2d20ecda35504be4490fd4e0ea15acdfc Mon Sep 17 00:00:00 2001 From: maycactus <138797510+maycactus-FOSS@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:50:30 -0400 Subject: [PATCH 02/11] Refactor CSS styles for improved readability This commit refactors the CSS styles by removing unnecessary closing parentheses from the box-shadow declarations and redundant empty color declarations. Additionally, it corrects the missing CSS property values in the .btn_submit and #mb_login_notmb p rules for proper styling. The changes do not affect the visual appearance of the elements but make the CSS code cleaner and more maintainable. --- css/mobile_shop.css | 6 +++--- theme/basic/css/mobile_shop.css | 8 ++++---- theme/basic/mobile/skin/member/basic/style.css | 4 ++-- theme/basic/skin/member/basic/style.css | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 71ec6c388..af5f6ae19 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -84,8 +84,8 @@ input[type=radio] {-webkit-appearance: radio} /*카테고리*/ .menu {display:none;position:fixed;top:0;height:100%;z-index:99999;-webkit-backface-visibility:hidden;width:100%;background:#efefef} .menu .menu_wr{width:100%;height:100%;overflow-y:auto;background:#eee;position:relative;z-index:199919; - -webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4)); - -moz-box-shadow: 0 0 5px rgba(55,55,5,0.4)); + -webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4); + -moz-box-shadow: 0 0 5px rgba(55,55,5,0.4); box-shadow: 0 0 5px rgba(55,55,5,0.4);} .menu .menu_close {position:absolute;top:50%;right:0px;width:40px;height:40px;background:none;color:#fff;font-size:20px;margin-top:-20px;border:0;z-index:199999} @@ -579,7 +579,7 @@ a.btn02 {display:inline-block;padding:8px 7px 7px;border:1px solid #3b3c3f;backg a.btn02:focus, .btn02:hover {text-decoration:none} button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} .btn_confirm {text-align:center} /* 서식단계 진행 */ -.btn_submit {padding:0 5px;border:0;background:#3a8afd;border:1px solid #1c70e9;color:#fff;letter-spacing:-0.1em;border-radius:3px}} +.btn_submit {padding:0 5px;border:0;background:#3a8afd;border:1px solid #1c70e9;color:#fff;letter-spacing:-0.1em;border-radius:3px} fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} a.btn_cancel {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fff;color:#000;text-decoration:none;vertical-align:middle} button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css index 8b1d662fd..42a76b5eb 100644 --- a/theme/basic/css/mobile_shop.css +++ b/theme/basic/css/mobile_shop.css @@ -82,8 +82,8 @@ input, textarea { /*카테고리*/ .menu {display:none;position:fixed;top:0;height:100%;z-index:99999;-webkit-backface-visibility:hidden;width:100%;background:#efefef} .menu .menu_wr{width:100%;height:100%;overflow-y:auto;background:#eee;position:relative;z-index:199919; - -webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4)); - -moz-box-shadow: 0 0 5px rgba(55,55,5,0.4)); + -webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4); + -moz-box-shadow: 0 0 5px rgba(55,55,5,0.4); box-shadow: 0 0 5px rgba(55,55,5,0.4);} .menu .menu_close {position:absolute;top:50%;right:0px;width:40px;height:40px;background:none;color:#fff;font-size:20px;margin-top:-20px;border:0;z-index:199999} @@ -577,7 +577,7 @@ a.btn02 {display:inline-block;padding:8px 7px 7px;border:1px solid #3b3c3f;backg a.btn02:focus, .btn02:hover {text-decoration:none} button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none} .btn_confirm {text-align:center} /* 서식단계 진행 */ -.btn_submit {padding:0 5px;border:0;background:#3a8afd;border:1px solid #1c70e9;color:#fff;letter-spacing:-0.1em;border-radius:3px}} +.btn_submit {padding:0 5px;border:0;background:#3a8afd;border:1px solid #1c70e9;color:#fff;letter-spacing:-0.1em;border-radius:3px} fieldset .btn_submit {padding:0 7px;height:24px;line-height:1em} a.btn_cancel {display:inline-block;padding:8px 7px 7px;border:1px solid #ccc;background:#fff;color:#000;text-decoration:none;vertical-align:middle} button.btn_cancel {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none} @@ -806,7 +806,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)} .naverpay-item {padding-top:15px;clear:both} #sod_bsk_act .naverpay-cart {margin-top:15px;clear:both;position:static} -/*PC 주문서*/ +/*PC 주문서*/ #sod_frm .tbl_head03{padding:0;background:none} #sod_frm .tbl_head03 .sod_opt {padding:5px 0} diff --git a/theme/basic/mobile/skin/member/basic/style.css b/theme/basic/mobile/skin/member/basic/style.css index 11baf2d4e..74f7d3939 100644 --- a/theme/basic/mobile/skin/member/basic/style.css +++ b/theme/basic/mobile/skin/member/basic/style.css @@ -138,7 +138,7 @@ #mb_login_notmb {background:#fff;border-bottom:1px solid #ccc;padding:20px} #mb_login_notmb .chk_box input[type="checkbox"] + label{padding-left:20px} #mb_login_notmb h2 {font-size:1.25em;padding:10px;background:#f3f3f3} -#mb_login_notmb p {border:0;padding:0;margin:10px;color:#} +#mb_login_notmb p {border:0;padding:0;margin:10px;} #guest_privacy {border:1px solid #ccc;text-align:left;line-height:1.6em;color:#666;background:#fafafa;padding:10px;height:200px;margin:10px 0;overflow-y:auto} #mb_login_notmb .btn_submit {width:100%;display:block;height:40px;line-height:40px} @@ -199,7 +199,7 @@ .memo_from li.memo_view_date {display:block;color:#555;line-height:24px} .memo_from li.memo_op_btn {position:absolute} .memo_from li.list_btn {right:53px;} -.memo_from li.del_btn {right:15px;padding} +.memo_from li.del_btn {right:15px;} .memo_from:after {display:block;visibility:hidden;clear:both;content:""} .memo_btn {width:100%} diff --git a/theme/basic/skin/member/basic/style.css b/theme/basic/skin/member/basic/style.css index 31f5f73ec..ae2158460 100644 --- a/theme/basic/skin/member/basic/style.css +++ b/theme/basic/skin/member/basic/style.css @@ -213,7 +213,7 @@ .memo_from li.memo_view_date {display:block;color:#555;line-height:24px} .memo_from li.memo_op_btn {position:absolute} .memo_from li.list_btn {right:53px;} -.memo_from li.del_btn {right:15px;padding} +.memo_from li.del_btn {right:15px;} .memo_from:after {display:block;visibility:hidden;clear:both;content:""} .memo_btn {width:100%} From 2c88ef6d13c1989d74da2be156825d94f812befb Mon Sep 17 00:00:00 2001 From: maycactus <138797510+maycactus-FOSS@users.noreply.github.com> Date: Tue, 25 Jul 2023 14:06:43 -0400 Subject: [PATCH 03/11] Update CSS styles for improved consistency This commit updates the CSS styles for better consistency and correctness. The changes involve: 1. Replacing 'z-index: -1px' with 'z-index: -1' to correct the z-index value. The value should be an integer, not a length with a unit. 2. Replacing 'font-size:bold;' with 'font-weight:bold;' to set the font weight to bold properly. Please note that I haven't tested the changes yet, but they should have a positive impact on the overall appearance and functionality of the elements styled with these CSS rules. --- css/default_shop.css | 2 +- css/mobile_shop.css | 6 +++--- mobile/skin/member/basic/style.css | 4 ++-- theme/basic/css/default_shop.css | 2 +- theme/basic/css/mobile_shop.css | 6 +++--- theme/basic/mobile/skin/member/basic/style.css | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/css/default_shop.css b/css/default_shop.css index aa65ca320..bc8d361cd 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -799,7 +799,7 @@ box-shadow: 1px 2px 2px #eee;} #od_tot_price strong{font-size:1.5em;color:#ff006c} #sod_frm #sod_frm_pt_alert {margin:5px 0;color:#38b2bb } #od_pay_sl h3{font-size:1.167em;margin:20px 0 5px} -#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1px;} +#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1;} #od_pay_sl .lb_icon {display: inline-block;float:left;width:50%;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor: pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} #sod_frm_paysel {} diff --git a/css/mobile_shop.css b/css/mobile_shop.css index af5f6ae19..2f97473e2 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -359,7 +359,7 @@ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); #sod_addr .addr_btn:after {display:block;visibility:hidden;clear:both;content:""} #sod_addr .sel_address {width:32%;float:left;margin-right:1%;height:30px;background:none;border:1px solid #333;color:#333;padding:0 5px} #sod_addr .del_address {display:block;width:32%;text-align:center;float:left;margin-right:1%;border:1px solid #aaa;background:none;color:#888;padding:0 5px;height:30px;line-height:28px;vertical-align:middle} -#sod_addr input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1px} +#sod_addr input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1} #sod_addr .add_lb {display:inline-block;float:left;width:32%;text-align:center;border:1px solid #4162ff;color:#4162ff;height:30px;line-height:28px} #sod_addr input[type="radio"]:checked+.add_lb {z-index:3;background:#4162ff;color:#fff} @@ -821,7 +821,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)} .sod_right #sod_bsk_tot{margin:10px} #sod_frm_taker textarea{width:100%;height:80px} -#od_pay_sl input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1px} +#od_pay_sl input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1} #od_pay_sl .lb_icon {display:inline-block;float:left;width:150px;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor:pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} @@ -900,7 +900,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)} #od_tot_price span{float:left;font-weight:bold} #od_tot_price strong{font-size:1.5em;color:#ff006c} #od_pay_sl h3{font-size:1.167em;margin:20px 0 5px} -#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1px;} +#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1;} #od_pay_sl .lb_icon {display: inline-block;float:left;width:50%;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor: pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} #sod_frm_paysel {} diff --git a/mobile/skin/member/basic/style.css b/mobile/skin/member/basic/style.css index d7a1e8c34..c9fc6c292 100644 --- a/mobile/skin/member/basic/style.css +++ b/mobile/skin/member/basic/style.css @@ -13,7 +13,7 @@ /* 회원가입 약관 */ #fregister section {position:relative;background:#fff;border-bottom:1px solid #e5e9f0;padding:15px} -#fregister_chkall {position:relative;font-size:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} +#fregister_chkall {position:relative;font-weight:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} #fregister h2 {text-align:left;padding-bottom:15px;line-height:1.7em;font-size:1.4em} #fregister textarea {display:block;width:100%;height:180px;padding:10px;background:#fbfbfb;border:1px solid #d1d7d8;line-height:1.5em;color:#555} #fregister p {position:relative;text-align:left;color:#fff;line-height:18px;padding:15px;font-size:1.1em;background:#f2838f;margin:15px;border-radius:5px} @@ -98,7 +98,7 @@ /* 기존 회원 본인인증 */ #member_cert_refresh section {position:relative;background:#fff;border-bottom:1px solid #e5e9f0;padding:15px} -#member_cert_refresh_chkall {position:relative;font-size:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} +#member_cert_refresh_chkall {position:relative;font-weight:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} #member_cert_refresh h2 {text-align:left;padding-bottom:15px;line-height:1.7em;font-size:1.4em} #member_cert_refresh textarea {display:block;width:100%;height:180px;padding:10px;background:#fbfbfb;border:1px solid #d1d7d8;line-height:1.5em;color:#555} #member_cert_refresh p {position:relative;text-align:left;color:#fff;line-height:18px;padding:15px;font-size:1.1em;background:#f2838f;margin:15px;border-radius:5px} diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css index 19de5aef2..140570ee9 100644 --- a/theme/basic/css/default_shop.css +++ b/theme/basic/css/default_shop.css @@ -789,7 +789,7 @@ box-shadow: 1px 2px 2px #eee;} #od_tot_price strong{font-size:1.5em;color:#ff006c} #sod_frm #sod_frm_pt_alert {margin:5px 0;color:#38b2bb } #od_pay_sl h3{font-size:1.167em;margin:20px 0 5px} -#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1px;} +#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1;} #od_pay_sl .lb_icon {display: inline-block;float:left;width:50%;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor: pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} #sod_frm_paysel {} diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css index 42a76b5eb..80c31b4f1 100644 --- a/theme/basic/css/mobile_shop.css +++ b/theme/basic/css/mobile_shop.css @@ -357,7 +357,7 @@ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); #sod_addr .addr_btn:after {display:block;visibility:hidden;clear:both;content:""} #sod_addr .sel_address {width:32%;float:left;margin-right:1%;height:30px;background:none;border:1px solid #333;color:#333;padding:0 5px} #sod_addr .del_address {display:block;width:32%;text-align:center;float:left;margin-right:1%;border:1px solid #aaa;background:none;color:#888;padding:0 5px;height:30px;line-height:28px;vertical-align:middle} -#sod_addr input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1px} +#sod_addr input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1} #sod_addr .add_lb {display:inline-block;float:left;width:32%;text-align:center;border:1px solid #4162ff;color:#4162ff;height:30px;line-height:28px} #sod_addr input[type="radio"]:checked+.add_lb {z-index:3;background:#4162ff;color:#fff} @@ -819,7 +819,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)} .sod_right #sod_bsk_tot{margin:10px} #sod_frm_taker textarea{width:100%;height:80px} -#od_pay_sl input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1px} +#od_pay_sl input[type="radio"] {position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left:0;z-index:-1} #od_pay_sl .lb_icon {display:inline-block;float:left;width:150px;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor:pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} @@ -898,7 +898,7 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)} #od_tot_price span{float:left;font-weight:bold} #od_tot_price strong{font-size:1.5em;color:#ff006c} #od_pay_sl h3{font-size:1.167em;margin:20px 0 5px} -#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1px;} +#od_pay_sl input[type="radio"]{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;text-indent:-999px;left: 0;z-index: -1;} #od_pay_sl .lb_icon {display: inline-block;float:left;width:50%;background:#fff;border:1px solid #eceff4;margin:-1px 0 0 -1px;cursor: pointer;height:60px;position:relative;padding-left:65px;padding-top:20px;z-index:1} #od_pay_sl input[type="radio"]:checked+.lb_icon {border:1px solid #ff006c;z-index:3} #sod_frm_paysel {} diff --git a/theme/basic/mobile/skin/member/basic/style.css b/theme/basic/mobile/skin/member/basic/style.css index 74f7d3939..c0565e156 100644 --- a/theme/basic/mobile/skin/member/basic/style.css +++ b/theme/basic/mobile/skin/member/basic/style.css @@ -15,7 +15,7 @@ /* 회원가입 약관 */ #fregister section {position:relative;background:#fff;border-bottom:1px solid #e5e9f0;padding:15px} -#fregister_chkall {position:relative;font-size:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} +#fregister_chkall {position:relative;font-weight:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} #fregister h2 {text-align:left;padding-bottom:15px;line-height:1.7em;font-size:1.4em} #fregister textarea {display:block;width:100%;height:180px;padding:10px;background:#fbfbfb;border:1px solid #d1d7d8;line-height:1.5em;color:#555} #fregister p {position:relative;text-align:left;color:#fff;line-height:18px;padding:15px;font-size:1.1em;background:#f2838f;margin:15px;border-radius:5px} @@ -99,7 +99,7 @@ /* 기존 회원 본인인증 */ #member_cert_refresh section {position:relative;background:#fff;border-bottom:1px solid #e5e9f0;padding:15px} -#member_cert_refresh_chkall {position:relative;font-size:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} +#member_cert_refresh_chkall {position:relative;font-weight:bold;text-align:left;background:#fff;padding:15px;border-top:1px solid #e5e9f0;border-bottom:1px solid #e5e9f0;border-radius:3px} #member_cert_refresh h2 {text-align:left;padding-bottom:15px;line-height:1.7em;font-size:1.4em} #member_cert_refresh textarea {display:block;width:100%;height:180px;padding:10px;background:#fbfbfb;border:1px solid #d1d7d8;line-height:1.5em;color:#555} #member_cert_refresh p {position:relative;text-align:left;color:#fff;line-height:18px;padding:15px;font-size:1.1em;background:#f2838f;margin:15px;border-radius:5px} From 4735d62770fead238d3b03fa0aee0abd12fe2203 Mon Sep 17 00:00:00 2001 From: kkigomi <112419763+kkigomi@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:13:07 +0900 Subject: [PATCH 04/11] =?UTF-8?q?adm/view.php=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=97=90=EC=84=9C=20$sub=5Fmenu=20=EB=93=B1=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=9C=84=EC=B9=98=EB=A5=BC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `$sub_menu`, `$g5['title']` 변수를 생성처리가 `admin_request_handler_*` Event Hook 보다 이후에 실행되어 해당 Hook에서 이를 활용하지 못하는 문제를 해결합니다. --- adm/view.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adm/view.php b/adm/view.php index 937318e16..906ed4ac8 100644 --- a/adm/view.php +++ b/adm/view.php @@ -16,13 +16,13 @@ if( ! $is_admin ){ } } -run_event('admin_request_handler_'.$call, $arr_query, $token); - $sub_menu = admin_menu_find_by($call, 'sub_menu'); $g5['title'] = admin_menu_find_by($call, 'title'); +run_event('admin_request_handler_'.$call, $arr_query, $token); + include_once ('./admin.head.php'); run_event('admin_get_page_'.$call, $arr_query, $token); -include_once ('./admin.tail.php'); \ No newline at end of file +include_once ('./admin.tail.php'); From 870dcec68d667d07777d69ebea60de12430eacd2 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Tue, 1 Aug 2023 00:38:45 +0900 Subject: [PATCH 05/11] =?UTF-8?q?owl.video.play.png=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=B4=20=EC=97=86=EC=96=B4=20=EB=B0=9C=EC=83=9D=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/OwlCarousel2/OwlCarousel2/blob/develop/dist/assets/owl.video.play.png --- js/owlcarousel/owl.video.play.png | Bin 0 -> 4976 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 js/owlcarousel/owl.video.play.png diff --git a/js/owlcarousel/owl.video.play.png b/js/owlcarousel/owl.video.play.png new file mode 100644 index 0000000000000000000000000000000000000000..5d0218d4665113fc6cbde7126edf9662cc56108e GIT binary patch literal 4976 zcmaJ_XIN89x86wzRf-7GAqJ^Z5{jXBq(gwfp-KtCV1PhqQCdJnKtMzgDbhp%1?hs+ zpdt!_pfm*msY(+mO6SJ&opZkXpXYZNW&sy)SwdUPxX6*#Dr4cJLKQjOTtR}_= zHnbM~`(~u4JyVXaSI`>1U_*ysTcUSxmQ4u|=8X~O?dwm?_} z=;QD{#+OMr+sl?1>}3L0)eEkz1=Ap_(E$8#!5%QOpRa$A8d($mC$1W;|NFH(9QLP3 zFhLXkAEO*B&@g=>2?tY_L&#zgXA!WoNI9gU5(Lc_JNTi{n3erGNR~4bJs$h5ysfbkkTi1Yy4e`VI2mh_>^1it{< z%mz4;Pbkjo9Es=$`_o}HpMSRn^{;q;>3aRUEh_)2D^D{<{`a!}uVw!G6^%Q;yZ?}u zHu#73IDZ<~Ni}$Vsl%0A;2lG!!z>8L*~z#POx} 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 literal 0 HcmV?d00001 From 3da5145befc01bb16d88c29a9d9c9501f777bbe2 Mon Sep 17 00:00:00 2001 From: maycactus <138797510+maycactus-FOSS@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:48:53 -0400 Subject: [PATCH 06/11] Fix undefined variable issue in mobile login page --- mobile/skin/member/basic/login.skin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/skin/member/basic/login.skin.php b/mobile/skin/member/basic/login.skin.php index a53a15af2..67aca531a 100644 --- a/mobile/skin/member/basic/login.skin.php +++ b/mobile/skin/member/basic/login.skin.php @@ -40,7 +40,7 @@ add_stylesheet('', - + From bcbabf50f2a3ce0c3f79c265f641b0bfc72df2a0 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Fri, 11 Aug 2023 19:29:50 +0900 Subject: [PATCH 07/11] =?UTF-8?q?QA=EC=97=90=EC=84=9C=20=EC=A7=88=EB=AC=B8?= =?UTF-8?q?=EA=B8=80=20=EC=82=AD=EC=A0=9C=20=EC=8B=9C=20=EB=8B=B5=EB=B3=80?= =?UTF-8?q?=EA=B8=80=EC=9D=98=20=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EB=B0=8F=20=EC=8D=B8=EB=84=A4=EC=9D=BC=EC=9D=84=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=ED=95=98=EC=A7=80=20=EB=AA=BB=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 답변글의 정보를 잘못 가져오는 문제로 답변글의 첨부파일, 첨부파일의 썸네일, 에디터 이미지의 썸네일을 삭제하지 못하는 문제 고침 --- bbs/qadelete.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bbs/qadelete.php b/bbs/qadelete.php index fa2c43117..503284436 100644 --- a/bbs/qadelete.php +++ b/bbs/qadelete.php @@ -56,21 +56,22 @@ for($i=0; $i<$count; $i++) { delete_editor_thumbnail($row['qa_content']); // 답변이 있는 질문글이라면 답변글 삭제 - if(!$row['qa_type'] && $row['qa_status']) { - $row2 = sql_fetch(" select qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_parent = '$qa_id' "); + if (!$row['qa_type'] && $row['qa_status']) { + $answer = sql_fetch(" SELECT qa_id, qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_type = 1 AND qa_parent = {$qa_id} "); // 첨부파일 삭제 - for($k=1; $k<=2; $k++) { - @unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($row2['qa_file'.$k])); + for ($k = 1; $k <= 2; $k++) { + @unlink(G5_DATA_PATH . '/qa/' . clean_relative_paths($answer['qa_file' . $k])); // 썸네일삭제 - if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['qa_file'.$k])) { - delete_qa_thumbnail($row2['qa_file'.$k]); + if (preg_match("/\.({$config['cf_image_extension']})$/i", $answer['qa_file' . $k])) { + delete_qa_thumbnail($answer['qa_file' . $k]); } } // 에디터 썸네일 삭제 - delete_editor_thumbnail($row2['qa_content']); + delete_editor_thumbnail($answer['qa_content']); - sql_query(" delete from {$g5['qa_content_table']} where qa_type = '1' and qa_parent = '$qa_id' "); + // 답변글 삭제 + sql_query(" DELETE from {$g5['qa_content_table']} where qa_type = 1 and qa_parent = {$qa_id} "); } // 답변글 삭제시 질문글의 상태변경 From 1c4465a6927734b98bd0a80bc8c070afca11c3e1 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Fri, 11 Aug 2023 19:41:25 +0900 Subject: [PATCH 08/11] =?UTF-8?q?`qa=5Fdelete`=20Event=20Hook=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=8B=A4=EC=A0=9C=20=EC=82=AD=EC=A0=9C=EB=90=9C=20?= =?UTF-8?q?ID=20=EB=AA=A9=EB=A1=9D=EC=9D=84=20=EC=A0=84=EB=8B=AC=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `$tmp_array` 목록은 삭제를 요청한 목록이지만 작성자, 답글 등의 이유로 실제 삭제되지 않을 수 있음. 두번째 인자로 실제로 삭제 처리된 목록을 넘겨주도록 개선 함. --- bbs/qadelete.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bbs/qadelete.php b/bbs/qadelete.php index 503284436..499745e9d 100644 --- a/bbs/qadelete.php +++ b/bbs/qadelete.php @@ -15,6 +15,7 @@ if (!($token && $delete_token === $token)) alert('토큰 에러로 삭제 불가합니다.'); $tmp_array = array(); +$deleted = array(); if ($qa_id) // 건별삭제 $tmp_array[0] = $qa_id; else // 일괄삭제 @@ -72,6 +73,7 @@ for($i=0; $i<$count; $i++) { // 답변글 삭제 sql_query(" DELETE from {$g5['qa_content_table']} where qa_type = 1 and qa_parent = {$qa_id} "); + $deleted[] = (int) $answer['qa_id']; } // 답변글 삭제시 질문글의 상태변경 @@ -81,8 +83,14 @@ for($i=0; $i<$count; $i++) { // 글삭제 sql_query(" delete from {$g5['qa_content_table']} where qa_id = '$qa_id' "); + $deleted[] = $qa_id; } -run_event('qa_delete', $tmp_array); +/** + * QA 글 삭제 후 Event Hook + * @var array $tmp_array 삭제 요청된 qa_id 목록. 소유자 확인, 답변글 존재 여부 등의 이유로 실제로 삭제처리가 안 된 ID가 포함될 수 있으며, 삭제처리 되었더라도 답변글은 이 목록에 포함되지 않음 + * @var array $deleted 답변글을 포함한 삭제가 완료된 qa_id 목록 + */ +run_event('qa_delete', $tmp_array, $deleted); goto_url(G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr)); \ No newline at end of file From ccdbdebdecc83fc4f50c2161a033fea6025654f8 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Fri, 11 Aug 2023 19:01:34 +0900 Subject: [PATCH 09/11] =?UTF-8?q?1:1=EB=AC=B8=EC=9D=98=20=EB=8B=B5?= =?UTF-8?q?=EB=B3=80=20=EC=8B=9C=20`qawrite=5Fupdate`=20Hook=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=8B=B5=EB=B3=80=20=EA=B8=80=EC=9D=98=20ID?= =?UTF-8?q?=EB=A5=BC=20=EC=A0=84=EB=8B=AC=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/qawrite_update.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php index d973e3c8e..6f6409172 100644 --- a/bbs/qawrite_update.php +++ b/bbs/qawrite_update.php @@ -86,6 +86,7 @@ $qa_related = 0; $qa_email_recv = (isset($_POST['qa_email_recv']) && $_POST['qa_email_recv']) ? 1 : 0; $qa_sms_recv = (isset($_POST['qa_sms_recv']) && $_POST['qa_sms_recv']) ? 1 : 0; $qa_status = 0; +$answer_id = null; for ($i=1; $i<=5; $i++) { $var = "qa_$i"; @@ -301,6 +302,7 @@ if($w == '' || $w == 'a' || $w == 'r') { } if($w == 'a') { + $answer_id = (int) sql_insert_id(); $sql = " update {$g5['qa_content_table']} set qa_status = '1' where qa_id = '{$write['qa_parent']}' "; @@ -339,7 +341,15 @@ if($w == '' || $w == 'a' || $w == 'r') { sql_query($sql); } -run_event('qawrite_update', $qa_id, $write, $w, $qaconfig); +/** + * 1:1 문의/답변의 변경 시 Event Hook + * @var int $qa_id 삽입/수정 또는 답글/추가질문 대상 글의 ID + * @var array $write 삽입/수정 또는 답글/추가질문 대상 글의 데이터 + * @var string $w 동작 모드 ('': 질문글 작성, 'a': 답변글 작성, 'u': 질문/답변 수정, 'r': 추가(관련) 질문) + * @var array $qaconfig 1:1 문의 설정 + * @var ?int $answer_id 답변글 작성($w = 'a') 시 답변글의 ID +*/ +run_event('qawrite_update', $qa_id, $write, $w, $qaconfig, ($w === 'a') ? $answer_id : null); // SMS 알림 if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) { From 2ae4046d2935c872623c424875e7072ddfec0159 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Sat, 12 Aug 2023 19:08:39 +0900 Subject: [PATCH 10/11] =?UTF-8?q?=EC=98=81=EC=B9=B4=ED=8A=B8=20=EC=83=81?= =?UTF-8?q?=ED=92=88=20=EB=B3=B5=EC=82=AC=20=ED=9B=84=20`shop=5Fadmin=5Fit?= =?UTF-8?q?emcopy`=20Event=20Hook=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemcopyupdate.php | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/adm/shop_admin/itemcopyupdate.php b/adm/shop_admin/itemcopyupdate.php index ac906ae20..8648f60c2 100644 --- a/adm/shop_admin/itemcopyupdate.php +++ b/adm/shop_admin/itemcopyupdate.php @@ -53,6 +53,7 @@ $opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_t sql_query($opt_sql); // html 에디터로 첨부된 이미지 파일 복사 +$copied_editor_images = []; if($cp['it_explan']) { $matchs = get_editor_image($cp['it_explan'], false); $count_matchs = (isset($matchs[1]) && is_array($matchs[1])) ? count($matchs[1]) : 0; @@ -73,7 +74,13 @@ if($cp['it_explan']) { $newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]); $cp['it_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_explan']); + + $copied_editor_images[] = array( + 'original' => $srcfile, + 'new' => $dstfile + ); } + } $sql = " update {$g5['g5_shop_item_table']} set it_explan = '".addslashes($cp['it_explan'])."' where it_id = '$new_it_id' "; @@ -100,6 +107,11 @@ if($cp['it_mobile_explan']) { $newfile = preg_replace("/\.([^\.]+)$/", "_".$new_it_id.".\\1", $matchs[1][$i]); $cp['it_mobile_explan'] = str_replace($matchs[1][$i], $newfile, $cp['it_mobile_explan']); + + $copied_editor_images[] = array( + 'original' => $srcfile, + 'new' => $dstfile + ); } } @@ -140,6 +152,7 @@ function copy_directory($src_dir, $dest_dir) } // 파일복사 +$copied_item_files = []; $dest_path = G5_DATA_PATH.'/item/'.$new_it_id; @mkdir($dest_path, G5_DIR_PERMISSION); @chmod($dest_path, G5_DIR_PERMISSION); @@ -155,6 +168,11 @@ for($i=1; $i<=10; $i++) { copy($file, $dstfile); @chmod($dstfile, G5_FILE_PERMISSION); $new_img = $new_it_id.'/'.basename($file); + + $copied_item_files[] = [ + 'original' => $file, + 'new' => $dstfile, + ]; } $sql_img .= $comma." it_img{$i} = '$new_img' "; @@ -166,6 +184,22 @@ $sql = " update {$g5['g5_shop_item_table']} where it_id = '$new_it_id' "; sql_query($sql); +/** + * 아이템 복사 처리 후 Event Hook + * @var string $it_id 원본 아이템 ID + * @var string $new_it_id 복사한 새로운 아이템 ID + * @var array $cp 복사한 아이템 정보 + * @var array $copied_item_files 복사한 파일 목록 + * @var array $copied_editor_images 복사한 에디터 이미지 목록 + */ +run_event('shop_admin_itemcopy', [ + 'it_id' => (string) $it_id, + 'new_it_id' => (string) $new_it_id, + 'cp' => $cp, + 'copied_item_files' => $copied_item_files, + 'copied_editor_images' => $copied_editor_images +]); + $qstr = "ca_id=$ca_id&sfl=$sfl&sca=$sca&page=$page&stx=".urlencode($stx); goto_url("itemlist.php?$qstr"); \ No newline at end of file From 5036254b695264d03e58d15f47a2e79c109033de Mon Sep 17 00:00:00 2001 From: kkigomi Date: Sun, 13 Aug 2023 21:43:29 +0900 Subject: [PATCH 11/11] =?UTF-8?q?php=205.2=20=ED=98=B8=ED=99=98=EC=84=B1?= =?UTF-8?q?=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemcopyupdate.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/adm/shop_admin/itemcopyupdate.php b/adm/shop_admin/itemcopyupdate.php index 8648f60c2..75200ee70 100644 --- a/adm/shop_admin/itemcopyupdate.php +++ b/adm/shop_admin/itemcopyupdate.php @@ -53,7 +53,7 @@ $opt_sql = " insert ignore into {$g5['g5_shop_item_option_table']} ( io_id, io_t sql_query($opt_sql); // html 에디터로 첨부된 이미지 파일 복사 -$copied_editor_images = []; +$copied_editor_images = array(); if($cp['it_explan']) { $matchs = get_editor_image($cp['it_explan'], false); $count_matchs = (isset($matchs[1]) && is_array($matchs[1])) ? count($matchs[1]) : 0; @@ -152,7 +152,7 @@ function copy_directory($src_dir, $dest_dir) } // 파일복사 -$copied_item_files = []; +$copied_item_files = array(); $dest_path = G5_DATA_PATH.'/item/'.$new_it_id; @mkdir($dest_path, G5_DIR_PERMISSION); @chmod($dest_path, G5_DIR_PERMISSION); @@ -169,10 +169,10 @@ for($i=1; $i<=10; $i++) { @chmod($dstfile, G5_FILE_PERMISSION); $new_img = $new_it_id.'/'.basename($file); - $copied_item_files[] = [ + $copied_item_files[] = array( 'original' => $file, 'new' => $dstfile, - ]; + ); } $sql_img .= $comma." it_img{$i} = '$new_img' "; @@ -192,13 +192,13 @@ sql_query($sql); * @var array $copied_item_files 복사한 파일 목록 * @var array $copied_editor_images 복사한 에디터 이미지 목록 */ -run_event('shop_admin_itemcopy', [ +run_event('shop_admin_itemcopy', array( 'it_id' => (string) $it_id, 'new_it_id' => (string) $new_it_id, 'cp' => $cp, 'copied_item_files' => $copied_item_files, 'copied_editor_images' => $copied_editor_images -]); +)); $qstr = "ca_id=$ca_id&sfl=$sfl&sca=$sca&page=$page&stx=".urlencode($stx);