From: Eloi G. <ada...@us...> - 2004-09-14 04:10:52
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv489/class Modified Files: Manager.php Log Message: Cleaned up some string fragments Index: Manager.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Manager.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** Manager.php 13 Sep 2004 21:41:55 -0000 1.42 --- Manager.php 14 Sep 2004 04:10:42 -0000 1.43 *************** *** 268,275 **** if($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_forums')) ! $tags['ADD_FORUM'] = '<a href="index.php?module=phpwsbb&PHPWSBB_MAN_OP=editforum">${addForum}</a>'; if($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_settings')) ! $tags['SETTINGS'] = '<a href="index.php?module=phpwsbb&PHPWSBB_MAN_OP=getsettings">${settings}</a>'; $tags['LIST'] = PHPWS_Text::moduleLink($_SESSION['translate']->it('Forums'), 'phpwsbb', array('PHPWSBB_MAN_OP'=>'list')); --- 268,275 ---- if($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_forums')) ! $tags['ADD_FORUM'] = '<a href="index.php?module=phpwsbb&PHPWSBB_MAN_OP=editforum">'.$addForum.'</a>'; if($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_settings')) ! $tags['SETTINGS'] = '<a href="index.php?module=phpwsbb&PHPWSBB_MAN_OP=getsettings">'.$settings.'</a>'; $tags['LIST'] = PHPWS_Text::moduleLink($_SESSION['translate']->it('Forums'), 'phpwsbb', array('PHPWSBB_MAN_OP'=>'list')); *************** *** 332,338 **** $this->setOrder('sticky DESC, lastpost DESC'); if(!$_SESSION['OBJ_user']->allow_access('phpwsbb', 'hide_threads')) ! $this->setSort('fid=${fid} AND hidden=0'); else ! $this->setSort('fid=${fid}'); return $this->getList('threads', NULL, FALSE); --- 332,338 ---- $this->setOrder('sticky DESC, lastpost DESC'); if(!$_SESSION['OBJ_user']->allow_access('phpwsbb', 'hide_threads')) ! $this->setSort('fid='.$fid.' AND hidden=0'); else ! $this->setSort('fid='.$fid); return $this->getList('threads', NULL, FALSE); *************** *** 1316,1320 **** // If user data was passed in, use it $result = $id; ! } elseif (!$result = $GLOBALS['core']->getRow('SELECT * FROM ' . $GLOBALS['core']->tbl_prefix . 'mod_phpwsbb_user_info AS i LEFT JOIN ' . $GLOBALS['core']->tbl_prefix . 'mod_users AS u ON ( u.user_id = i.user_id ) WHERE i.user_id = ${id}')) { /* * Using 1 sql statement instead of loading user classes which --- 1316,1320 ---- // If user data was passed in, use it $result = $id; ! } elseif (!$result = $GLOBALS['core']->getRow('SELECT * FROM ' . $GLOBALS['core']->tbl_prefix . 'mod_phpwsbb_user_info AS i LEFT JOIN ' . $GLOBALS['core']->tbl_prefix . 'mod_users AS u ON ( u.user_id = i.user_id ) WHERE i.user_id = '.$id)) { /* * Using 1 sql statement instead of loading user classes which *************** *** 1326,1330 **** // Develop correct user post counts ! $posts = $GLOBALS['core']->getRow('SELECT COUNT(owner_id) FROM mod_phpwsbb_messages WHERE owner_id=${id}', 1); $result['posts'] = $posts['COUNT(owner_id)']; --- 1326,1330 ---- // Develop correct user post counts ! $posts = $GLOBALS['core']->getRow('SELECT COUNT(owner_id) FROM mod_phpwsbb_messages WHERE owner_id='.$id, 1); $result['posts'] = $posts['COUNT(owner_id)']; *************** *** 1344,1348 **** if($result['posts']==0) { // Develop correct user post counts ! $result['posts'] = $data['posts'] = $GLOBALS['core']->getOne('SELECT COUNT(owner_id) FROM mod_phpwsbb_messages WHERE owner_id=${id}', 1); $GLOBALS['core']->sqlUpdate($data, 'mod_phpwsbb_user_info', 'user_id', $id); } --- 1344,1348 ---- if($result['posts']==0) { // Develop correct user post counts ! $result['posts'] = $data['posts'] = $GLOBALS['core']->getOne('SELECT COUNT(owner_id) FROM mod_phpwsbb_messages WHERE owner_id='.$id, 1); $GLOBALS['core']->sqlUpdate($data, 'mod_phpwsbb_user_info', 'user_id', $id); } |