Skip to content

Commit

Permalink
⚡ 🔨 🎨 Code refactoring for XCL PHP7
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoluciano committed Feb 18, 2022
1 parent 151e8f3 commit 6c2672e
Show file tree
Hide file tree
Showing 58 changed files with 2,018 additions and 1,775 deletions.
Binary file removed html/modules/bulletin/images/friend.gif
Binary file not shown.
7 changes: 7 additions & 0 deletions html/modules/bulletin/images/module_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed html/modules/bulletin/images/print.gif
Binary file not shown.
Binary file removed html/modules/bulletin/images/topics/impresscms.gif
Binary file not shown.
Binary file removed html/modules/bulletin/images/topics/xoops.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion xoops_trust_path/modules/bulletin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ;
if( ! file_exists( $langmanpath ) ) die( 'install the latest altsys' ) ;
require_once( $langmanpath ) ;
$langman =& D3LanguageManager::getInstance() ;
$langman = D3LanguageManager::getInstance() ;


if( ! empty( $_GET['lib'] ) ) {
Expand Down
47 changes: 0 additions & 47 deletions xoops_trust_path/modules/bulletin/admin/admin_menu.php

This file was deleted.

42 changes: 21 additions & 21 deletions xoops_trust_path/modules/bulletin/admin/category_access.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require_once dirname(dirname(__FILE__)).'/include/common_functions.php' ;
require_once dirname(dirname(__FILE__)).'/include/gtickets.php' ;
require_once dirname(dirname(__FILE__)).'/class/bulletinTopic.php' ;
$db =& Database::getInstance() ;

//$db =& Database::getInstance() ;
$db = &XoopsDatabaseFactory::getDatabaseConnection();
/*
* topic_access table clean up 2012-2-1 by Yoshis
*/
Expand All @@ -28,7 +28,7 @@
$sql = "SELECT MIN(topic_id) FROM ".$db->prefix($mydirname."_topics");
list( $topic_id ) = $db->fetchRow( $db->query( $sql ) );
if( empty( $topic_id ) ) {
redirect_header( XOOPS_URL."/modules/$mydirname/index.php?page=makecategory" , 5 , _MD_A_bulletin_ERR_CREATECATEGORYFIRST ) ;
redirect_header( XOOPS_URL."/modules/$mydirname/index.php?page=makecategory" , 5 , _MD_A_BULLETIN_ERR_CREATECATEGORYFIRST ) ;
exit ;
} else {
header( "Location: ".XOOPS_URL."/modules/$mydirname/admin/index.php?page=category_access&topic_id=$topic_id" ) ;
Expand Down Expand Up @@ -144,11 +144,11 @@
$group_trs .= "
<tr>
<td class='even'>".$group->getVar('name')."</td>
<td class='even'><input type='checkbox' name='can_reads[$gid]' id='gcol_1_{$gid}' value='1' $can_read_checked /></td>
<td class='even'><input type='checkbox' name='can_posts[$gid]' id='gcol_2_{$gid}' value='1' $can_post_checked /></td>
<td class='even'><input type='checkbox' name='can_edits[$gid]' id='gcol_3_{$gid}' value='1' $can_edit_checked /></td>
<td class='even'><input type='checkbox' name='can_deletes[$gid]' id='gcol_4_{$gid}' value='1' $can_delete_checked /></td>
<td class='even'><input type='checkbox' name='post_auto_approveds[$gid]' id='gcol_5_{$gid}' value='1' $post_auto_approved_checked /></td>
<td class='even'><input type='checkbox' name='can_reads[$gid]' id='gcol_1_{$gid}' value='1' $can_read_checked></td>
<td class='even'><input type='checkbox' name='can_posts[$gid]' id='gcol_2_{$gid}' value='1' $can_post_checked></td>
<td class='even'><input type='checkbox' name='can_edits[$gid]' id='gcol_3_{$gid}' value='1' $can_edit_checked></td>
<td class='even'><input type='checkbox' name='can_deletes[$gid]' id='gcol_4_{$gid}' value='1' $can_delete_checked></td>
<td class='even'><input type='checkbox' name='post_auto_approveds[$gid]' id='gcol_5_{$gid}' value='1' $post_auto_approved_checked></td>
</tr>\n" ;
}

Expand All @@ -168,11 +168,11 @@
<tr>
<td class='even'>$uid</td>
<td class='even'>$uname4disp</td>
<td class='even'><input type='checkbox' name='can_reads[$uid]' id='ucol_1_{$uid}' value='1' checked='checked' /></td>
<td class='even'><input type='checkbox' name='can_posts[$uid]' id='ucol_2_{$uid}' value='1' $can_post_checked /></td>
<td class='even'><input type='checkbox' name='can_edits[$uid]' id='ucol_3_{$uid}' value='1' $can_edit_checked /></td>
<td class='even'><input type='checkbox' name='can_deletes[$uid]' id='ucol_4_{$uid}' value='1' $can_delete_checked /></td>
<td class='even'><input type='checkbox' name='post_auto_approveds[$uid]' id='ucol_5_{$uid}' value='1' $post_auto_approved_checked /></td>
<td class='even'><input type='checkbox' name='can_reads[$uid]' id='ucol_1_{$uid}' value='1' checked='checked'></td>
<td class='even'><input type='checkbox' name='can_posts[$uid]' id='ucol_2_{$uid}' value='1' $can_post_checked></td>
<td class='even'><input type='checkbox' name='can_edits[$uid]' id='ucol_3_{$uid}' value='1' $can_edit_checked></td>
<td class='even'><input type='checkbox' name='can_deletes[$uid]' id='ucol_4_{$uid}' value='1' $can_delete_checked></td>
<td class='even'><input type='checkbox' name='post_auto_approveds[$uid]' id='ucol_5_{$uid}' value='1' $post_auto_approved_checked></td>
</tr>\n" ;
}

Expand All @@ -182,13 +182,13 @@
for( $i = 0 ; $i < 5 ; $i ++ ) {
$newuser_trs .= "
<tr>
<td class='head'><input type='text' size='4' name='new_uids[$i]' value='' /></th>
<td class='head'><input type='text' size='12' name='new_unames[$i]' value='' /></th>
<td class='head'><input type='checkbox' name='new_can_reads[$i]' id='ncol_1_{$i}' checked='checked' disabled='disabled' /></th>
<td class='head'><input type='checkbox' name='new_can_posts[$i]' id='ncol_2_{$i}' value='1' /></th>
<td class='head'><input type='checkbox' name='new_can_edits[$i]' id='ncol_3_{$i}' value='1' /></td>
<td class='head'><input type='checkbox' name='new_can_deletes[$i]' id='ncol_4_{$i}' value='1' /></td>
<td class='head'><input type='checkbox' name='new_post_auto_approveds[$i]' id='ncol_5_{$i}' value='1' /></td>
<td class='head'><input type='text' size='4' name='new_uids[$i]' value=''></th>
<td class='head'><input type='text' size='12' name='new_unames[$i]' value=''></th>
<td class='head'><input type='checkbox' name='new_can_reads[$i]' id='ncol_1_{$i}' checked='checked' disabled='disabled'></th>
<td class='head'><input type='checkbox' name='new_can_posts[$i]' id='ncol_2_{$i}' value='1'></th>
<td class='head'><input type='checkbox' name='new_can_edits[$i]' id='ncol_3_{$i}' value='1'></td>
<td class='head'><input type='checkbox' name='new_can_deletes[$i]' id='ncol_4_{$i}' value='1'></td>
<td class='head'><input type='checkbox' name='new_post_auto_approveds[$i]' id='ncol_5_{$i}' value='1'></td>
</tr>
\n" ;
}
Expand Down Expand Up @@ -217,5 +217,5 @@
'topicselbox' => $topicselbox ,
) ) ;
$tpl->display( 'db:'.$mydirname.'_admin_category_access.html' ) ;

xoops_cp_footer();
?>
Loading

0 comments on commit 6c2672e

Please sign in to comment.