Cleaning code

skala
Julio Montoya 14 years ago
parent 895c55e982
commit 991c3cc257
  1. 1
      main/calendar/myagenda.php
  2. 24
      main/inc/lib/message.lib.php
  3. 10
      main/inc/lib/pear/HTML/Table.php
  4. 2
      main/inc/lib/social.lib.php
  5. 11
      main/messages/outbox.php
  6. 12
      main/social/home.php

@ -144,7 +144,6 @@ if (isset($_user['user_id'])) {
//$courses_dbs = get_all_courses_of_user();
$my_course_list = CourseManager::get_courses_list_by_user_id(api_get_user_id(), true);
print_r($course_list);
if (!is_array($my_course_list)) {
// this is for the special case if the user has no courses (otherwise you get an error)
$my_course_list = array();

@ -1207,18 +1207,9 @@ class MessageManager
function inbox_display() {
global $charset;
// $charset = api_get_system_encoding();
$table_message = Database::get_main_table(TABLE_MESSAGE);
//$request=api_is_xml_http_request();
if ($_SESSION['social_exist']===true) {
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success= get_lang('SelectedMessagesDeleted');
} else {
$success= get_lang('SelectedMessagesDeleted');
}
} else {
$success= get_lang('SelectedMessagesDeleted');
}
$success = get_lang('SelectedMessagesDeleted');
if (isset ($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'delete' :
@ -1275,15 +1266,8 @@ function outbox_display() {
if ($_REQUEST['f']=='social') {
$social_link ='f=social';
}
if ($_SESSION['social_exist']===true) {
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success= get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$social_link\">".get_lang('BackToOutbox')."</a>";
}else {
$success=get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$social_link\">".get_lang('BackToOutbox')."</a>";
}
} else {
$success= get_lang('SelectedMessagesDeleted').'&nbsp</b><br /><a href="outbox.php?'.$social_link.'">'.get_lang('BackToOutbox').'</a>';
}
$success= get_lang('SelectedMessagesDeleted').'&nbsp</b><br /><a href="outbox.php?'.$social_link.'">'.get_lang('BackToOutbox').'</a>';
if (isset ($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'delete' :

@ -177,8 +177,8 @@ class HTML_Table extends HTML_Common {
$this->_useTGroups = (boolean)$useTGroups;
$this->addBody();
if ($this->_useTGroups) {
$this->_thead =& new HTML_Table_Storage($tabOffset, $this->_useTGroups);
$this->_tfoot =& new HTML_Table_Storage($tabOffset, $this->_useTGroups);
$this->_thead = new HTML_Table_Storage($tabOffset, $this->_useTGroups);
$this->_tfoot = new HTML_Table_Storage($tabOffset, $this->_useTGroups);
}
}
@ -202,7 +202,7 @@ class HTML_Table extends HTML_Common {
{
if (is_null($this->_thead)) {
$this->_useTGroups = true;
$this->_thead =& new HTML_Table_Storage($this->_tabOffset,
$this->_thead = new HTML_Table_Storage($this->_tabOffset,
$this->_useTGroups);
for ($i = 0; $i < $this->_tbodyCount; $i++) {
$this->_tbodies[$i]->setUseTGroups(true);
@ -220,7 +220,7 @@ class HTML_Table extends HTML_Common {
{
if (is_null($this->_tfoot)) {
$this->_useTGroups = true;
$this->_tfoot =& new HTML_Table_Storage($this->_tabOffset,
$this->_tfoot = new HTML_Table_Storage($this->_tabOffset,
$this->_useTGroups);
for ($i = 0; $i < $this->_tbodyCount; $i++) {
$this->_tbodies[$i]->setUseTGroups(true);
@ -264,7 +264,7 @@ class HTML_Table extends HTML_Common {
}
$body = $this->_tbodyCount++;
$this->_tbodies[$body] =& new HTML_Table_Storage($this->_tabOffset,
$this->_tbodies[$body] = new HTML_Table_Storage($this->_tabOffset,
$this->_useTGroups);
$this->_tbodies[$body]->setAutoFill($this->_autoFill);
$this->_tbodies[$body]->setAttributes($attributes);

@ -602,7 +602,7 @@ class SocialManager extends UserManager {
} else {
$img_array = UserManager::get_user_picture_path_by_id($user_id,'web',true,true);
$big_image = UserManager::get_picture_user($user_id, $img_array['file'],'', USER_IMAGE_SIZE_BIG);
$big_image = $big_image['file'].$big_image['dir'];
$big_image = $big_image['file'];
//--- User image
echo '<div class="social-content-image">';

@ -116,7 +116,12 @@ if( trim($info_delete_outbox[0])=='delete' ) {
$table_message = Database::get_main_table(TABLE_MESSAGE);
$user_sender_id=api_get_user_id();
$user_sender_id = api_get_user_id();
$action = null;
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
}
echo '<div id="social-content">';
$id_content_right = '';
@ -147,7 +152,7 @@ echo '<div id="social-content">';
echo '</div>';
}
//MAIN CONTENT
if ($_REQUEST['action']=='delete') {
if ($action == 'delete') {
$delete_list_id=array();
if (isset($_POST['out'])) {
$delete_list_id=$_POST['out'];
@ -161,7 +166,7 @@ echo '<div id="social-content">';
$delete_list_id=array();
outbox_display();
} elseif ($_REQUEST['action']=='deleteone') {
} elseif($action =='deleteone') {
$delete_list_id=array();
$id=Security::remove_XSS($_GET['id']);
MessageManager::delete_message_by_user_sender(api_get_user_id(),$id);

@ -81,11 +81,11 @@ echo '<div id="social-content">';
echo '<div id="social-content-right">';
echo '<div class="social-box-main1">';
echo '<div class="rounded_div" style="width:280px">';
// information current user
echo '<div>'.$image.'</div>';
// information current user
echo '<div><p><strong>'.get_lang('Name').'</strong><br /><span class="social-groups-text4">'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</span></p></div>
<div><p><strong>'.get_lang('Email').'</strong><br /><span class="social-groups-text4">'.($user_info['email']?$user_info['email']:'').'</span></p></div>
<div class="box_description_group_actions" ><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.Display::return_icon('profile_edit.png', get_lang('EditProfile'), array('hspace'=>'6')).get_lang('EditProfile').$url_close.'</a></div>';
<div class="box_description_group_actions" ><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.Display::return_icon('profile_edit.png', get_lang('EditProfile'), array('hspace'=>'6')).get_lang('EditProfile').'</a></div>';
echo '</div>';
/*
echo '<div class="rounded_div" style="width:280px">';
@ -100,7 +100,7 @@ echo '<div id="social-content">';
//Search box
echo '<div class="social-box-right">';
echo '<br />';
echo UserManager::get_search_form($query);
echo UserManager::get_search_form('');
echo '<br />';
@ -145,12 +145,12 @@ echo '<div id="social-content">';
if (count($groups_newest) > 0) {
echo '<div class="social-groups-home-title">'.get_lang('Newest').'</div>';
Display::display_sortable_grid('home_group', array(), $groups_newest, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));
Display::display_sortable_grid('home_group', array(), $groups_newest, array('hide_navigation'=>true, 'per_page' => 100), array(), false, array(true, true, true,false));
}
if (count($groups_pop) > 0) {
echo '<div class="social-groups-home-title">'.get_lang('Popular').'</div>';
Display::display_sortable_grid('home_group', array(), $groups_pop, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,true,true));
Display::display_sortable_grid('home_group', array(), $groups_pop, array('hide_navigation'=>true, 'per_page' => 100), array(), false, array(true, true, true,true,true));
}
echo '</div>';

Loading…
Cancel
Save