|
From: FlorinCB <ory...@us...> - 2008-06-11 22:17:23
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28576 Modified Files: admin_mx_smilies.php Log Message: one more fix to this Index: admin_mx_smilies.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_smilies.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_mx_smilies.php 11 Jun 2008 22:00:55 -0000 1.7 --- admin_mx_smilies.php 11 Jun 2008 22:17:17 -0000 1.8 *************** *** 95,108 **** $delimeter = '=+:'; // // Read a listing of uploaded smilies for use in the add or edit smliey code... // ! $dir = @opendir($phpbb_root_path . $board_config['smilies_path']); while($file = @readdir($dir)) { ! if( !@is_dir(phpBB2::phpbb_realpath($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) ) { ! $img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file); if( $img_size[0] && $img_size[1] ) --- 95,128 ---- $delimeter = '=+:'; + switch (PORTAL_BACKEND) + { + case 'internal': + $smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed + $smiley_root_path = $phpbb_root_path; //same here + $smiley_url = 'smile_url'; + break; + case 'phpbb2': + $smiley_path_url = PHPBB_URL; + $smiley_root_path = $phpbb_root_path; + $smiley_url = 'smile_url'; + break; + case 'phpbb3': + $smiley_path_url = PHPBB_URL; + $smiley_root_path = $phpbb_root_path; + $smiley_url = 'smiley_url'; + $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); + break; + } + // // Read a listing of uploaded smilies for use in the add or edit smliey code... // ! $dir = @opendir($smiley_root_path . $board_config['smilies_path']); while($file = @readdir($dir)) { ! if( !@is_dir(phpBB2::phpbb_realpath($smiley_root_path . $board_config['smilies_path'] . '/' . $file)) ) { ! $img_size = @getimagesize($smiley_root_path . $board_config['smilies_path'] . '/' . $file); if( $img_size[0] && $img_size[1] ) *************** *** 163,167 **** } ! $fcontents = @file($mx_root_path . $board_config['smilies_path'] . '/'. $smile_pak); if( empty($fcontents) ) --- 183,187 ---- } ! $fcontents = @file($smiley_root_path . $board_config['smilies_path'] . '/'. $smile_pak); if( empty($fcontents) ) *************** *** 322,332 **** "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], ! ! "SMILEY_IMG" => $mx_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0], "S_SMILEY_ACTION" => mx_append_sid("admin_mx_smilies.$phpEx"), "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list, ! "S_SMILEY_BASEDIR" => $mx_root_path . $board_config['smilies_path']) ); --- 342,352 ---- "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], ! ! "SMILEY_IMG" => $smiley_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0], "S_SMILEY_ACTION" => mx_append_sid("admin_mx_smilies.$phpEx"), "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list, ! "S_SMILEY_BASEDIR" => $smiley_root_path . $board_config['smilies_path']) ); *************** *** 388,408 **** $smiley_id = $mx_request_vars->request('id', MX_TYPE_INT); - switch (PORTAL_BACKEND) - { - case 'internal': - $smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed - $smiley_url = 'smile_url'; - break; - case 'phpbb2': - $smiley_path_url = PHPBB_URL; - $smiley_url = 'smile_url'; - break; - case 'phpbb3': - $smiley_path_url = PHPBB_URL; - $smiley_url = 'smiley_url'; - $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); - break; - } - $sql = "SELECT * FROM " . SMILIES_TABLE . " --- 408,411 ---- *************** *** 455,459 **** "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list, ! "S_SMILEY_BASEDIR" => $mx_root_path . $board_config['smilies_path']) ); --- 458,462 ---- "S_HIDDEN_FIELDS" => $s_hidden_fields, "S_FILENAME_OPTIONS" => $filename_list, ! "S_SMILEY_BASEDIR" => $smiley_path_url . $board_config['smilies_path']) ); *************** *** 607,611 **** "ROW_CLASS" => $row_class, ! "SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'], "CODE" => $smilies[$i]['code'], "EMOT" => $smilies[$i]['emoticon'], --- 610,614 ---- "ROW_CLASS" => $row_class, ! "SMILEY_IMG" => $smiley_path_url . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'], "CODE" => $smilies[$i]['code'], "EMOT" => $smilies[$i]['emoticon'], |