parent
f9ffa0fccf
commit
f64e6b89f7
@ -0,0 +1,36 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
namespace Application\Migrations\Schema\V111; |
||||
|
||||
use Application\Migrations\AbstractMigrationChamilo; |
||||
use Doctrine\DBAL\Schema\Schema; |
||||
use Doctrine\DBAL\Types\Type; |
||||
|
||||
/** |
||||
* Class Version20160623143200 |
||||
* Remove chatcall_date, chatcall_text, chatcall_user_id from User table |
||||
* @package Application\Migrations\Schema\V111 |
||||
*/ |
||||
class Version20160623143200 extends AbstractMigrationChamilo |
||||
{ |
||||
/** |
||||
* @param Schema $schema |
||||
* @throws \Doctrine\DBAL\Schema\SchemaException |
||||
*/ |
||||
public function up(Schema $schema) |
||||
{ |
||||
$schema |
||||
->getTable('user') |
||||
->dropColumn('chatcall_user_id') |
||||
->dropColumn('chatcall_date') |
||||
->dropColumn('chatcall_text'); |
||||
} |
||||
|
||||
/** |
||||
* @param Schema $schema |
||||
*/ |
||||
public function down(Schema $schema) |
||||
{ |
||||
} |
||||
} |
@ -1,30 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
/** |
||||
* @todo can't this be moved to a different file so that we can delete this file? |
||||
* Is this still in use? If not, then it should be removed or maybe offered as an extension |
||||
*/ |
||||
/** |
||||
* Deletes the web-chat request form the user table |
||||
*/ |
||||
|
||||
// including necessary files |
||||
include_once './main/inc/global.inc.php'; |
||||
|
||||
// table definitions |
||||
$track_user_table = Database::get_main_table(TABLE_MAIN_USER); |
||||
if (isset($_user['user_id']) && $_user['user_id'] != '') { |
||||
$_user['user_id'] = intval($_user['user_id']); |
||||
$sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")"; |
||||
$result = Database::query($sql); |
||||
} |
||||
|
||||
Display::display_header(); |
||||
|
||||
$message = get_lang('RequestDenied').'<br /><br /><a href="javascript: history.back();">'.get_lang('Back').'</a>'; |
||||
Display::display_normal_message($message); |
||||
|
||||
/* FOOTER */ |
||||
|
||||
Display::display_footer(); |
Loading…
Reference in new issue