Browse Source

- Fix rewrite URL on chat popup (404)

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
0651cdc01f
  1. 1
      .htaccess
  2. 8
      app/widgets/ChatExt/ChatExt.php
  3. 4
      app/widgets/Roster/Roster.php
  4. 2
      themes/movim/page.tpl

1
.htaccess

@ -1,7 +1,6 @@
Options -Indexes
<IfModule mod_rewrite.c>
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE 1

8
app/widgets/ChatExt/ChatExt.php

@ -25,17 +25,19 @@ class ChatExt extends WidgetBase
function WidgetLoad()
{
$this->addjs('chatext.js');
if($this->user->getConfig('chatbox') == 1) {
//if($this->user->getConfig('chatbox') == 1) {
$this->registerEvent('message', 'onMessage');
$this->registerEvent('openchat', 'onEvent');
$this->registerEvent('closechat', 'onEvent');
}
//}
}
function prepareChat($contact)
{
$md = new \modl\MessageDAO();
$messages = $md->getContact($contact->jid, 0, 10);
$messageshtml ='';
if(!empty($messages)) {
$day = '';
@ -80,7 +82,7 @@ class ChatExt extends WidgetBase
{
if($first)
$checked = ' checked ';
$html .= '
$html = '
<li>
<input type="radio" name="contact" id="contact'.$contact->jid.'" '.$checked.'/>
<label class="tab" for="contact'.$contact->jid.'" onclick="setTimeout(function() {scrollAllTalks()}, 100);">

4
app/widgets/Roster/Roster.php

@ -315,13 +315,13 @@ class Roster extends WidgetBase
if($chatpop) {
$arrow = 'expand';
$ptoggle = 'openPopup();';
$call = $this->genCallAjax('ajaxToggleChat');
} else {
$arrow = 'contract';
$ptoggle = 'closePopup();';
$call = '';
}
$call = $this->genCallAjax('ajaxToggleChat');
$html = '
<li
onclick="'.$call.' '.$ptoggle.'"

2
themes/movim/page.tpl

@ -15,7 +15,7 @@
var BASE_URI = '<?php echo BASE_URI; ?>';
var ERROR_URI = '<?php echo substr_replace(Route::urlize('disconnect', 'err'), '', -3); ?>';
var PAGE_KEY_URI = '<?php
if(isset($_SERVER['HTTP_MOD_REWRITE']) && !$_SERVER['HTTP_MOD_REWRITE'])
if(!isset($_SERVER['HTTP_MOD_REWRITE']) || !$_SERVER['HTTP_MOD_REWRITE'])
echo '?q='; ?>'
</script>
<?php

Loading…
Cancel
Save