|
From: Jon O. <jon...@us...> - 2005-12-11 16:22:16
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18918/modules/mx_smartor/album_mod Modified Files: album_common.php album_hierarchy_functions.php album_hierarchy_sql.php Log Message: adding php5 support Index: album_hierarchy_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** album_hierarchy_functions.php 1 Oct 2005 14:17:36 -0000 1.2 --- album_hierarchy_functions.php 11 Dec 2005 16:22:07 -0000 1.3 *************** *** 66,72 **** $album_data = array(); ! require_once( $album_root_path . 'album_hierarchy_debug.' . $phpEx ); ! require_once( $album_root_path . 'album_hierarchy_auth.' . $phpEx ); ! require_once( $album_root_path . 'album_hierarchy_sql.' . $phpEx ); // ----------------------------------------------- // build the album category administration panel --- 66,72 ---- $album_data = array(); ! include_once( $album_root_path . 'album_hierarchy_debug.' . $phpEx ); ! include_once( $album_root_path . 'album_hierarchy_auth.' . $phpEx ); ! include_once( $album_root_path . 'album_hierarchy_sql.' . $phpEx ); // ----------------------------------------------- // build the album category administration panel *************** *** 78,82 **** static $username = ''; // display 'the' level ! $this = isset( $album_data['keys'][$cur] ) ? $album_data['keys'][$cur] : ALBUM_ROOT_CATEGORY; //-1; if ( defined( 'IN_ADMIN' ) ) --- 78,82 ---- static $username = ''; // display 'the' level ! $thisdata = isset( $album_data['keys'][$cur] ) ? $album_data['keys'][$cur] : ALBUM_ROOT_CATEGORY; //-1; if ( defined( 'IN_ADMIN' ) ) *************** *** 88,95 **** { $admin_url = this_smartor_mxurl( "smartor_mode=album_personal_cat_admin" . "&" ); ! $is_root = ( ( $this == ALBUM_ROOT_CATEGORY || $this == 0 ) ) ? true : false; } // root level ! if ( $this == ALBUM_ROOT_CATEGORY ) { $level = ALBUM_ROOT_CATEGORY; --- 88,95 ---- { $admin_url = this_smartor_mxurl( "smartor_mode=album_personal_cat_admin" . "&" ); ! $is_root = ( ( $thisdata == ALBUM_ROOT_CATEGORY || $thisdata == 0 ) ) ? true : false; } // root level ! if ( $thisdata == ALBUM_ROOT_CATEGORY ) { $level = ALBUM_ROOT_CATEGORY; *************** *** 115,123 **** } // if we are above the 'root' level, thenadd it to the template (root level is -1) ! if ( $this > ALBUM_ROOT_CATEGORY ) { // display a cat row ! $cat = $album_data['data'][$this]; ! $cat_id = $album_data['id'][$this]; // get the class colors $class_catLeft = "cat"; --- 115,123 ---- } // if we are above the 'root' level, thenadd it to the template (root level is -1) ! if ( $thisdata > ALBUM_ROOT_CATEGORY ) { // display a cat row ! $cat = $album_data['data'][$thisdata]; ! $cat_id = $album_data['id'][$thisdata]; // get the class colors $class_catLeft = "cat"; *************** *** 176,180 **** } // if we are 'above' the root level then add the add category 'footer' ! if ( $this > ALBUM_ROOT_CATEGORY ) { // cat footer, add the footer --- 176,180 ---- } // if we are 'above' the root level then add the add category 'footer' ! if ( $thisdata > ALBUM_ROOT_CATEGORY ) { // cat footer, add the footer *************** *** 212,216 **** $album_show_pic_url = ( ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) ? "smartor_mode=album_showpage" : "smartor_mode=album_page" ); // display the level ! $this = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; // root level head if ( $real_level == ALBUM_ROOT_CATEGORY || !is_array( $keys ) ) --- 212,216 ---- $album_show_pic_url = ( ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) ? "smartor_mode=album_showpage" : "smartor_mode=album_page" ); // display the level ! $thisdata = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; // root level head if ( $real_level == ALBUM_ROOT_CATEGORY || !is_array( $keys ) ) *************** *** 235,239 **** $total_comments = 0; // display a cat row ! $cat = $album_data['data'][$this]; $cat_id = $cat['cat_id']; // sub categories for current category --- 235,239 ---- $total_comments = 0; // display a cat row ! $cat = $album_data['data'][$thisdata]; $cat_id = $cat['cat_id']; // sub categories for current category *************** *** 518,525 **** for ( $i = 0; $i < count( $album_data_level['data'] ); $i++ ) { ! $this = count( $album_data['data'] ); $key = $album_data_level['id'][$i]; $album_data['sub'][$parent][] = $key; ! $album_data['keys'][$key] = $this; $album_data['parent'][] = $parent; $album_data['id'][] = $album_data_level['id'][$i]; --- 518,525 ---- for ( $i = 0; $i < count( $album_data_level['data'] ); $i++ ) { ! $thisdata = count( $album_data['data'] ); $key = $album_data_level['id'][$i]; $album_data['sub'][$parent][] = $key; ! $album_data['keys'][$key] = $thisdata; $album_data['parent'][] = $parent; $album_data['id'][] = $album_data_level['id'][$i]; *************** *** 641,645 **** for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i++ ) { ! album_get_sub_cat_ids( $album_data['sub'][$cur_cat_id][$i], &$cats ); } } --- 641,648 ---- for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i++ ) { ! // ! // Call by reference removed - php5 fix ! // ! album_get_sub_cat_ids( $album_data['sub'][$cur_cat_id][$i], $cats ); } } *************** *** 652,656 **** $res = ''; ! $this = $album_data['keys'][$cur_cat_id]; switch ( $field ) --- 655,659 ---- $res = ''; ! $thisdata = $album_data['keys'][$cur_cat_id]; switch ( $field ) *************** *** 660,664 **** if ( album_is_personal_gallery( $cur_cat_id ) == true && album_get_personal_root_id( $album_user_id ) == $cur_cat_id ) { ! return sprintf( $lang['Personal_Gallery_Of_User'], $album_data['data'][$this]['username'] ); } --- 663,667 ---- if ( album_is_personal_gallery( $cur_cat_id ) == true && album_get_personal_root_id( $album_user_id ) == $cur_cat_id ) { ! return sprintf( $lang['Personal_Gallery_Of_User'], $album_data['data'][$thisdata]['username'] ); } *************** *** 675,679 **** } ! $res = $album_data['data'][$this][$field]; if ( isset( $lang[$res] ) ) $res = $lang[$res]; return $res; --- 678,682 ---- } ! $res = $album_data['data'][$thisdata][$field]; if ( isset( $lang[$res] ) ) $res = $lang[$res]; return $res; *************** *** 695,706 **** } // find the object ! $this = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; $res = ''; ! while ( ( $this >= 0 ) || ( $fcur != '' ) ) { $field_name = album_get_object_lang( $cur_cat_id, 'name' ); $param_type = 'cat_id'; ! $param_value = $album_data['id'][$this]; if ( $pgm != '' ) --- 698,709 ---- } // find the object ! $thisdata = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; $res = ''; ! while ( ( $thisdata >= 0 ) || ( $fcur != '' ) ) { $field_name = album_get_object_lang( $cur_cat_id, 'name' ); $param_type = 'cat_id'; ! $param_value = $album_data['id'][$thisdata]; if ( $pgm != '' ) *************** *** 720,733 **** else { ! $cur_cat_id = $album_data['parent'][$this]; } if ( isset( $album_data['keys'][$cur_cat_id] ) ) { ! $this = $album_data['keys'][$cur_cat_id]; } else { ! $this = ALBUM_ROOT_CATEGORY; } } // while --- 723,736 ---- else { ! $cur_cat_id = $album_data['parent'][$thisdata]; } if ( isset( $album_data['keys'][$cur_cat_id] ) ) { ! $thisdata = $album_data['keys'][$cur_cat_id]; } else { ! $thisdata = ALBUM_ROOT_CATEGORY; } } // while Index: album_hierarchy_sql.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_sql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** album_hierarchy_sql.php 1 Oct 2005 14:17:36 -0000 1.2 --- album_hierarchy_sql.php 11 Dec 2005 16:22:07 -0000 1.3 *************** *** 433,439 **** } // 'search' the object ! $this = ( isset( $album_data['keys'][$cat_id] ) ) ? $album_data['keys'][$cat_id] : ALBUM_ROOT_CATEGORY; // get the root or parent cat id ! $parent = ( $this < 0 ) ? ALBUM_ROOT_CATEGORY : $album_data['parent'][$this]; // renum objects of the same level and regenerate all $order = 0; --- 433,439 ---- } // 'search' the object ! $thisdata = ( isset( $album_data['keys'][$cat_id] ) ) ? $album_data['keys'][$cat_id] : ALBUM_ROOT_CATEGORY; // get the root or parent cat id ! $parent = ( $thisdata < 0 ) ? ALBUM_ROOT_CATEGORY : $album_data['parent'][$thisdata]; // renum objects of the same level and regenerate all $order = 0; *************** *** 453,457 **** { $order = $order + 10; ! $neworder = ( $i == $this ) ? $order + $move : $order; $album_data['data'][$i]['cat_order'] = $neworder; } --- 453,457 ---- { $order = $order + 10; ! $neworder = ( $i == $thisdata ) ? $order + $move : $order; $album_data['data'][$i]['cat_order'] = $neworder; } *************** *** 657,662 **** $categories = implode( ",", $cats ); ! $this = isset( $album_data['keys'][$cats[0]] ) ? $album_data['keys'][$cats[0]] : ALBUM_ROOT_CATEGORY; ! $cat = $album_data['data'][$this]; // Check Pic Approval // the cat array should be the 'current' category (data)... --- 657,662 ---- $categories = implode( ",", $cats ); ! $thisdata = isset( $album_data['keys'][$cats[0]] ) ? $album_data['keys'][$cats[0]] : ALBUM_ROOT_CATEGORY; ! $cat = $album_data['data'][$thisdata]; // Check Pic Approval // the cat array should be the 'current' category (data)... Index: album_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_common.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** album_common.php 1 Oct 2005 14:17:36 -0000 1.10 --- album_common.php 11 Dec 2005 16:22:07 -0000 1.11 *************** *** 130,133 **** --- 130,134 ---- // $album_config['fullpic_popup'] = '0'; // get SP config info + $sql = "SELECT * FROM " . ALBUM_SP_CONFIG_TABLE; *************** *** 143,146 **** --- 144,148 ---- $album_sp_config[$album_sp_config_name] = $album_sp_config_value; } + // end get SP config info include_once( $album_root_path . 'album_functions.' . $phpEx ); |