mirror of
				https://github.com/Mibew/mibew.git
				synced 2025-11-04 12:25:11 +03:00 
			
		
		
		
	Replace "getlocal2_" function with "getlocal"
This commit is contained in:
		
							parent
							
								
									9ddaba0b4c
								
							
						
					
					
						commit
						8105bfaa1e
					
				@ -40,7 +40,7 @@ class ButtonController extends AbstractController
 | 
			
		||||
        if ($referer && isset($_SESSION['threadid'])) {
 | 
			
		||||
            $thread = Thread::load($_SESSION['threadid']);
 | 
			
		||||
            if ($thread && $thread->state != Thread::STATE_CLOSED) {
 | 
			
		||||
                $msg = getlocal2_(
 | 
			
		||||
                $msg = getlocal(
 | 
			
		||||
                    "chat.client.visited.page",
 | 
			
		||||
                    array($referer),
 | 
			
		||||
                    $thread->locale,
 | 
			
		||||
 | 
			
		||||
@ -167,7 +167,7 @@ class RedirectController extends AbstractController
 | 
			
		||||
        // Send notification message
 | 
			
		||||
        $thread->postMessage(
 | 
			
		||||
            Thread::KIND_EVENTS,
 | 
			
		||||
            getlocal2_(
 | 
			
		||||
            getlocal(
 | 
			
		||||
                'chat.status.operator.redirect',
 | 
			
		||||
                array(get_operator_name($this->getOperator())),
 | 
			
		||||
                $thread->locale,
 | 
			
		||||
@ -221,7 +221,7 @@ class RedirectController extends AbstractController
 | 
			
		||||
        // Send notification message
 | 
			
		||||
        $thread->postMessage(
 | 
			
		||||
            Thread::KIND_EVENTS,
 | 
			
		||||
            getlocal2_(
 | 
			
		||||
            getlocal(
 | 
			
		||||
                'chat.status.operator.redirect',
 | 
			
		||||
                array(get_operator_name($this->getOperator())),
 | 
			
		||||
                $thread->locale,
 | 
			
		||||
 | 
			
		||||
@ -644,12 +644,12 @@ class ThreadProcessor extends ClientSideProcessor
 | 
			
		||||
        // Send email
 | 
			
		||||
        if ($inbox_mail) {
 | 
			
		||||
            // Prepare message to send by email
 | 
			
		||||
            $subject = getlocal2_(
 | 
			
		||||
            $subject = getlocal(
 | 
			
		||||
                "leavemail.subject",
 | 
			
		||||
                array($args['name']),
 | 
			
		||||
                $message_locale
 | 
			
		||||
            );
 | 
			
		||||
            $body = getlocal2_(
 | 
			
		||||
            $body = getlocal(
 | 
			
		||||
                "leavemail.body",
 | 
			
		||||
                array(
 | 
			
		||||
                    $args['name'],
 | 
			
		||||
 | 
			
		||||
@ -709,14 +709,14 @@ class Thread
 | 
			
		||||
 | 
			
		||||
            // Prepare message
 | 
			
		||||
            if ($this->nextAgent == $operator['operatorid']) {
 | 
			
		||||
                $message_to_post = getlocal2_(
 | 
			
		||||
                $message_to_post = getlocal(
 | 
			
		||||
                    "chat.status.operator.changed",
 | 
			
		||||
                    array($operator_name, $this->agentName),
 | 
			
		||||
                    $this->locale,
 | 
			
		||||
                    true
 | 
			
		||||
                );
 | 
			
		||||
            } else {
 | 
			
		||||
                $message_to_post = getlocal2_(
 | 
			
		||||
                $message_to_post = getlocal(
 | 
			
		||||
                    "chat.status.operator.returned",
 | 
			
		||||
                    array($operator_name),
 | 
			
		||||
                    $this->locale,
 | 
			
		||||
@ -856,7 +856,7 @@ class Thread
 | 
			
		||||
        if ($is_user) {
 | 
			
		||||
            $this->postMessage(
 | 
			
		||||
                self::KIND_EVENTS,
 | 
			
		||||
                getlocal2_(
 | 
			
		||||
                getlocal(
 | 
			
		||||
                    "chat.status.user.left",
 | 
			
		||||
                    array($this->userName),
 | 
			
		||||
                    $this->locale,
 | 
			
		||||
@ -877,7 +877,7 @@ class Thread
 | 
			
		||||
            } else {
 | 
			
		||||
                $this->postMessage(
 | 
			
		||||
                    self::KIND_EVENTS,
 | 
			
		||||
                    getlocal2_(
 | 
			
		||||
                    getlocal(
 | 
			
		||||
                        "chat.status.operator.left",
 | 
			
		||||
                        array($this->agentName),
 | 
			
		||||
                        $this->locale,
 | 
			
		||||
@ -935,14 +935,14 @@ class Thread
 | 
			
		||||
            $take_thread = true;
 | 
			
		||||
            if ($this->state == self::STATE_WAITING) {
 | 
			
		||||
                if ($operator['operatorid'] != $this->agentId) {
 | 
			
		||||
                    $message = getlocal2_(
 | 
			
		||||
                    $message = getlocal(
 | 
			
		||||
                        "chat.status.operator.changed",
 | 
			
		||||
                        array($operator_name, $this->agentName),
 | 
			
		||||
                        $this->locale,
 | 
			
		||||
                        true
 | 
			
		||||
                    );
 | 
			
		||||
                } else {
 | 
			
		||||
                    $message = getlocal2_(
 | 
			
		||||
                    $message = getlocal(
 | 
			
		||||
                        "chat.status.operator.returned",
 | 
			
		||||
                        array($operator_name),
 | 
			
		||||
                        $this->locale,
 | 
			
		||||
@ -950,7 +950,7 @@ class Thread
 | 
			
		||||
                    );
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                $message = getlocal2_(
 | 
			
		||||
                $message = getlocal(
 | 
			
		||||
                    "chat.status.operator.joined",
 | 
			
		||||
                    array($operator_name),
 | 
			
		||||
                    $this->locale,
 | 
			
		||||
@ -961,7 +961,7 @@ class Thread
 | 
			
		||||
            // User chatting
 | 
			
		||||
            if ($operator['operatorid'] != $this->agentId) {
 | 
			
		||||
                $take_thread = true;
 | 
			
		||||
                $message = getlocal2_(
 | 
			
		||||
                $message = getlocal(
 | 
			
		||||
                    "chat.status.operator.changed",
 | 
			
		||||
                    array($operator_name, $this->agentName),
 | 
			
		||||
                    $this->locale,
 | 
			
		||||
@ -1012,7 +1012,7 @@ class Thread
 | 
			
		||||
            $this->save();
 | 
			
		||||
 | 
			
		||||
            // Send message about renaming
 | 
			
		||||
            $message = getlocal2_(
 | 
			
		||||
            $message = getlocal(
 | 
			
		||||
                "chat.status.user.changedname",
 | 
			
		||||
                array($old_name, $new_name),
 | 
			
		||||
                $this->locale,
 | 
			
		||||
 | 
			
		||||
@ -278,11 +278,6 @@ function get_localized_string($string, $locale)
 | 
			
		||||
    return "!" . $string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getlocal2_($text, $params, $locale, $raw = false)
 | 
			
		||||
{
 | 
			
		||||
    return getlocal($text, $params, $locale, $raw);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getlocal2($text, $params, $raw = false)
 | 
			
		||||
{
 | 
			
		||||
    return getlocal($text, $params, CURRENT_LOCALE, $raw);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user