Merge branch v1.6.x into master

This commit is contained in:
Evgeny Gryaznov 2012-03-12 01:05:44 +01:00
commit 035479f7a2
9 changed files with 15 additions and 15 deletions

View File

@ -188,7 +188,7 @@ function create_table($id, $link)
mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link)); mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link));
if ($id == "${mysqlprefix}chatoperator") { if ($id == "${mysqlprefix}chatoperator") {
create_operator_("admin", "", "", "", "Administrator", "Administrator", 0, $link); create_operator_("admin", "", "", "", "Administrator", "Administrator", 0, "", $link);
} else if ($id == "${mysqlprefix}chatrevision") { } else if ($id == "${mysqlprefix}chatrevision") {
perform_query("INSERT INTO ${mysqlprefix}chatrevision VALUES (1)", $link); perform_query("INSERT INTO ${mysqlprefix}chatrevision VALUES (1)", $link);
} }
@ -230,4 +230,4 @@ function get_columns($tablename, $link)
} }
} }
?> ?>

View File

@ -1,7 +1,7 @@
/** /**
* @preserve This file is part of Mibew Messenger project. * @preserve This file is part of Mibew Messenger project.
* http://mibew.org * http://mibew.org
* *
* Copyright (c) 2005-2011 Mibew Messenger Community * Copyright (c) 2005-2011 Mibew Messenger Community
* License: http://mibew.org/license.php * License: http://mibew.org/license.php
*/ */

View File

@ -765,4 +765,4 @@ function get_remote_host()
return isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $extAddr; return isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $extAddr;
} }
?> ?>

View File

@ -1,12 +1,12 @@
<?php <?php
/* /*
* This file is part of Mibew Messenger project. * This file is part of Mibew Messenger project.
* *
* Copyright (c) 2005-2011 Mibew Messenger Community * Copyright (c) 2005-2011 Mibew Messenger Community
* All rights reserved. The contents of this file are subject to the terms of * All rights reserved. The contents of this file are subject to the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and * the Eclipse Public License v1.0 which accompanies this distribution, and
* is available at http://www.eclipse.org/legal/epl-v10.html * is available at http://www.eclipse.org/legal/epl-v10.html
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License Version 2 or later (the "GPL"), in which case * the GNU General Public License Version 2 or later (the "GPL"), in which case
* the provisions of the GPL are applicable instead of those above. If you wish * the provisions of the GPL are applicable instead of those above. If you wish
@ -14,7 +14,7 @@
* not to allow others to use your version of this file under the terms of the * not to allow others to use your version of this file under the terms of the
* EPL, indicate your decision by deleting the provisions above and replace them * EPL, indicate your decision by deleting the provisions above and replace them
* with the notice and other provisions required by the GPL. * with the notice and other provisions required by the GPL.
* *
* Contributors: * Contributors:
* Evgeny Gryaznov - initial API and implementation * Evgeny Gryaznov - initial API and implementation
*/ */

View File

@ -67,4 +67,4 @@ function get_operator_groupslist($operatorid, $link)
} }
} }
?> ?>

View File

@ -58,4 +58,4 @@ function webim_xmpp($toaddr, $subject, $text, $link)
log_notification($current_locale, "xmpp", $toaddr, $subject, $text, null, $link); log_notification($current_locale, "xmpp", $toaddr, $subject, $text, null, $link);
} }
?> ?>

View File

@ -131,7 +131,7 @@ function update_operator_avatar($operatorid, $avatar)
mysql_close($link); mysql_close($link);
} }
function create_operator_($login, $email, $jabber, $password, $localename, $commonname, $notify, $link) function create_operator_($login, $email, $jabber, $password, $localename, $commonname, $notify, $avatar, $link)
{ {
global $mysqlprefix; global $mysqlprefix;
$query = sprintf( $query = sprintf(
@ -140,7 +140,7 @@ function create_operator_($login, $email, $jabber, $password, $localename, $comm
md5($password), md5($password),
mysql_real_escape_string($localename), mysql_real_escape_string($localename),
mysql_real_escape_string($commonname), mysql_real_escape_string($commonname),
'' /* no avatar */, mysql_real_escape_string($avatar),
mysql_real_escape_string($email), mysql_real_escape_string($email),
mysql_real_escape_string($jabber), mysql_real_escape_string($jabber),
$notify); $notify);
@ -151,10 +151,10 @@ function create_operator_($login, $email, $jabber, $password, $localename, $comm
return select_one_row("select * from ${mysqlprefix}chatoperator where operatorid = $id", $link); return select_one_row("select * from ${mysqlprefix}chatoperator where operatorid = $id", $link);
} }
function create_operator($login, $email, $jabber, $password, $localename, $commonname, $notify) function create_operator($login, $email, $jabber, $password, $localename, $commonname, $notify, $avatar)
{ {
$link = connect(); $link = connect();
$newop = create_operator_($login, $email, $jabber, $password, $localename, $commonname, $notify, $link); $newop = create_operator_($login, $email, $jabber, $password, $localename, $commonname, $notify, $avatar, $link);
mysql_close($link); mysql_close($link);
return $newop; return $newop;
} }

0
src/messenger/webim/locales/ar/properties Executable file → Normal file
View File

View File

@ -86,7 +86,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) {
if (count($errors) == 0) { if (count($errors) == 0) {
if (!$opId) { if (!$opId) {
$newop = create_operator($login, $email, $jabber, $password, $localname, $commonname, $jabbernotify ? 1 : 0); $newop = create_operator($login, $email, $jabber, $password, $localname, $commonname, $jabbernotify ? 1 : 0, "");
header("Location: $webimroot/operator/avatar.php?op=" . $newop['operatorid']); header("Location: $webimroot/operator/avatar.php?op=" . $newop['operatorid']);
exit; exit;
} else { } else {
@ -147,4 +147,4 @@ prepare_menu($operator);
setup_operator_settings_tabs($opId, 0); setup_operator_settings_tabs($opId, 0);
start_html_output(); start_html_output();
require('../view/agent.php'); require('../view/agent.php');
?> ?>