Skip to content

Commit

Permalink
php 7.2 버전에서 오류 나는 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Dec 4, 2017
1 parent 9f89455 commit 6c4353f
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 17 deletions.
2 changes: 1 addition & 1 deletion adm/admin.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function get_theme_config_value($dir, $key='*')
$tconfig = array();

$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
if(is_file) {
if(is_file($theme_config_file)) {
include($theme_config_file);

if($key == '*') {
Expand Down
4 changes: 2 additions & 2 deletions bbs/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<?php
// 최신글
$sql = " select bo_table, bo_subject
from {$g5[board_table]}
from {$g5['board_table']}
where gr_id = '{$gr_id}'
and bo_list_level <= '{$member[mb_level]}'
and bo_list_level <= '{$member['mb_level']}'
and bo_device <> 'mobile' ";
if(!$is_admin)
$sql .= " and bo_use_cert = '' ";
Expand Down
4 changes: 2 additions & 2 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function sql_escape_string($str)

sql_set_charset('utf8', $connect_db);
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''");
if (defined(G5_TIMEZONE)) sql_query(" set time_zone = '".G5_TIMEZONE."'");
if (defined('G5_TIMEZONE')) sql_query(" set time_zone = '".G5_TIMEZONE."'");
} else {
?>

Expand Down Expand Up @@ -485,7 +485,7 @@ function sql_escape_string($str)


// 테마 설정 로드
if(is_file(G5_THEME_PATH.'/theme.config.php'))
if(defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.'/theme.config.php'))
include_once(G5_THEME_PATH.'/theme.config.php');

//=====================================================================================
Expand Down
10 changes: 8 additions & 2 deletions mobile/skin/popular/basic/popular.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
<div>
<h2>인기검색어</h2>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<?php
if( isset($list) && is_array($list) ){
for ($i=0; $i<count($list); $i++) {
?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php } ?>
<?php
} //end for
} //end if
?>
</ul>
</div>
</aside>
12 changes: 9 additions & 3 deletions skin/popular/basic/popular.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
<div>
<h2>인기검색어</h2>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php } ?>
<?php
if( isset($list) && is_array($list) ){
for ($i=0; $i<count($list); $i++) {
?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php
} //end for
} //end if
?>
</ul>
</div>
</section>
Expand Down
4 changes: 2 additions & 2 deletions theme/basic/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<?php
// 최신글
$sql = " select bo_table, bo_subject
from {$g5[board_table]}
from {$g5['board_table']}
where gr_id = '{$gr_id}'
and bo_list_level <= '{$member[mb_level]}'
and bo_list_level <= '{$member['mb_level']}'
and bo_device <> 'mobile' ";
if(!$is_admin)
$sql .= " and bo_use_cert = '' ";
Expand Down
10 changes: 8 additions & 2 deletions theme/basic/mobile/skin/popular/basic/popular.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
<div>
<h2>인기검색어</h2>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<?php
if( isset($list) && is_array($list) ){
for ($i=0; $i<count($list); $i++) {
?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php } ?>
<?php
} //end for
} //end if
?>
</ul>
</div>
</aside>
12 changes: 9 additions & 3 deletions theme/basic/skin/popular/basic/popular.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
<div>
<h2>인기검색어</h2>
<ul>
<?php for ($i=0; $i<count($list); $i++) { ?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php } ?>
<?php
if( isset($list) && is_array($list) ){
for ($i=0; $i<count($list); $i++) {
?>
<li><a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a></li>
<?php
} //end for
} //end if
?>
</ul>
</div>
</section>
Expand Down

0 comments on commit 6c4353f

Please sign in to comment.