Merge branch 'master' of github.com:Mibew/mibew

This commit is contained in:
Fedor A. Fetisov 2017-11-12 04:11:07 +03:00
commit 2e3b718fe2
31 changed files with 62 additions and 59 deletions

View File

@ -46,9 +46,10 @@ Options +FollowSymLinks
</IfModule> </IfModule>
<IfModule !mod_rewrite.c> <IfModule !mod_rewrite.c>
# There is no mod_rewrite in the system. For the root Mibew directory # There is no mod_rewrite in the system. For the root Mibew Messenger
# index_fallback.php should be loaded first to activate old-fashioned URLs. # directory index_fallback.php should be loaded first to activate
# For all other directories index.php is just a directory index file. # old-fashioned URLs. For all other directories index.php is just a
# directory index file.
DirectoryIndex index_fallback.php index.php DirectoryIndex index_fallback.php index.php
</IfModule> </IfModule>

View File

@ -72,7 +72,7 @@ thread:
useragent: "varchar(255)" useragent: "varchar(255)"
# Total count of user's messages related with the thread. # Total count of user's messages related with the thread.
messagecount: "varchar(16)" messagecount: "varchar(16)"
# ID of the group at Mibew side related with the thread. # ID of the group at Mibew Messenger side related with the thread.
groupid: "int references {opgroup}(groupid)" groupid: "int references {opgroup}(groupid)"
# Contains "by thread" statistics # Contains "by thread" statistics

View File

@ -1,5 +1,5 @@
# IMPORTANT: Before install mibew copy this file to config.yml and fill it with # IMPORTANT: Before install Mibew Messenger copy this file to config.yml and
# your own settings! # fill it with your own settings!
# MySQL Database parameters # MySQL Database parameters
@ -13,7 +13,7 @@ database:
use_persistent_connection: false use_persistent_connection: false
# Mail # Mail
## This value will be used as sender address in all e-mails Mibew send. ## This value will be used as sender address in all e-mails Mibew Messenger send.
mailbox: mibew@yourdomain.com mailbox: mibew@yourdomain.com
## Mailer parameters ## Mailer parameters
@ -77,8 +77,8 @@ default_locale: en
# http://php.net/manual/en/timezones.php # http://php.net/manual/en/timezones.php
timezone: "" timezone: ""
# List of proxy's IP Mibew should trust. You should set this option if you use # List of proxy's IP Mibew Messenger should trust. You should set this option
# Mibew with a load balancer or behind a proxy. # if you use Mibew Messenger with a load balancer or behind a proxy.
trusted_proxies: [] trusted_proxies: []
# Here is an example of what values this option can take: # Here is an example of what values this option can take:
# trusted_proxies: # trusted_proxies:
@ -89,7 +89,7 @@ trusted_proxies: []
# Plugins # Plugins
plugins: [] plugins: []
## Exapmle of plugins configuration ## Example of plugins configuration
# plugins: # plugins:
# "VendorName:PluginName": # "VendorName:PluginName":
# weight: 100 # weight: 100

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* @namespace Holds all Mibew functionality * @namespace Holds all Mibew Messenger functionality
*/ */
var Mibew = Mibew || {}; var Mibew = Mibew || {};

View File

@ -26,7 +26,7 @@
function MibewAPI(interaction) { function MibewAPI(interaction) {
/** /**
* Version of the MIBEW API protocol implemented by the object * Version of the Mibew API protocol implemented by the object
*/ */
this.protocolVersion = "1.0"; this.protocolVersion = "1.0";

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* @namespace Holds all Mibew functionality * @namespace Holds all Mibew Messenger functionality
*/ */
var Mibew = Mibew || {}; var Mibew = Mibew || {};

View File

@ -20,7 +20,7 @@
namespace Mibew\API\Interaction; namespace Mibew\API\Interaction;
/** /**
* Implements Mibew Core - Mibew Chat Window interaction * Implements Mibew Messenger Core - Mibew Messenger Chat Window interaction
*/ */
class ChatInteraction extends AbstractInteraction class ChatInteraction extends AbstractInteraction
{ {

View File

@ -20,7 +20,7 @@
namespace Mibew\API\Interaction; namespace Mibew\API\Interaction;
/** /**
* Implements Mibew Core - Mibew Users list interaction * Implements Mibew Messenger Core - Mibew Messenger Users list interaction
*/ */
class UsersInteraction extends AbstractInteraction class UsersInteraction extends AbstractInteraction
{ {

View File

@ -66,7 +66,7 @@ class ImageGenerator extends TextGenerator
} }
/** /**
* Generates HTML markup for Mibew widget. * Generates HTML markup for Mibew Messenger Widget.
* *
* @return \Canteen\HTML5\Fragment * @return \Canteen\HTML5\Fragment
*/ */

View File

@ -332,7 +332,7 @@ abstract class AbstractController implements
if ($style instanceof HandlebarsAwareInterface) { if ($style instanceof HandlebarsAwareInterface) {
$hbs = $style->getHandlebars(); $hbs = $style->getHandlebars();
// Use mibew cache to store Handlebars AST // Use Mibew Messenger cache to store Handlebars AST
$hbs->setCache(new HandlebarsCacheAdapter($this->getCache())); $hbs->setCache(new HandlebarsCacheAdapter($this->getCache()));
// Add more helpers to template engine // Add more helpers to template engine

View File

@ -35,7 +35,7 @@ use Symfony\Component\HttpFoundation\Response;
class ButtonCodeController extends AbstractController class ButtonCodeController extends AbstractController
{ {
/** /**
* Generates a page with Mibew button code form. * Generates a page with Mibew Messenger button code form.
* *
* @param Request $request Incoming request * @param Request $request Incoming request
* @return Response Rendered content of the page. * @return Response Rendered content of the page.

View File

@ -77,8 +77,8 @@ abstract class AbstractController extends BaseAbstractController
* method accepts the following options: * method accepts the following options:
* - "company": array, a set of company info. See {@link setup_logo()} * - "company": array, a set of company info. See {@link setup_logo()}
* for details. * for details.
* - "mibewHost": string, a URL which is used as a Mibew host. See * - "mibewHost": string, a URL which is used as a Mibew Messenger host.
* {@link setup_logo()} for details. * See {@link setup_logo()} for details.
* - "page.title": string, a value which will be used as a page title. * - "page.title": string, a value which will be used as a page title.
* - "startFrom": string, indicates what module should be invoked first. * - "startFrom": string, indicates what module should be invoked first.
* - "chatOptions": array, (optional) list of chat module options. * - "chatOptions": array, (optional) list of chat module options.

View File

@ -51,7 +51,7 @@ class InstallController extends AbstractController
*/ */
public function indexAction(Request $request) public function indexAction(Request $request)
{ {
// Check if Mibew is already installed. // Check if Mibew Messenger is already installed.
$in_progress = !empty($_SESSION[SESSION_PREFIX . 'installation_in_progress']); $in_progress = !empty($_SESSION[SESSION_PREFIX . 'installation_in_progress']);
if (!$in_progress) { if (!$in_progress) {
if ($this->getInstaller()->isInstalled()) { if ($this->getInstaller()->isInstalled()) {

View File

@ -25,7 +25,7 @@ use Stash\Interfaces\PoolInterface;
use Stash\Invalidation; use Stash\Invalidation;
/** /**
* An adapter to use Mibew cache with Handlebars template engine. * An adapter to use Mibew Messenger cache with Handlebars template engine.
*/ */
class CacheAdapter implements HandlebarsCacheInterface, CacheAwareInterface class CacheAdapter implements HandlebarsCacheInterface, CacheAwareInterface
{ {

View File

@ -27,7 +27,7 @@ use Mibew\Database;
class AvailableUpdate class AvailableUpdate
{ {
/** /**
* Unique (for the current Mibew instance) update ID. * Unique (for the current Mibew Messenger instance) update ID.
* *
* @type int * @type int
*/ */

View File

@ -28,7 +28,7 @@ use Symfony\Component\Yaml\Parser as YamlParser;
class Installer class Installer
{ {
/** /**
* Minimal PHP version Mibew works with. * Minimal PHP version Mibew Messenger works with.
*/ */
const MIN_PHP_VERSION = 50303; const MIN_PHP_VERSION = 50303;
@ -92,7 +92,7 @@ class Installer
} }
/** /**
* Checks if Mibew is already installed or not. * Checks if Mibew Messenger is already installed or not.
* *
* @return boolean * @return boolean
*/ */
@ -440,7 +440,7 @@ class Installer
return false; return false;
} }
// Generate Unique ID for Mibew Instance // Generate Unique ID for Mibew Messenger Instance
try { try {
list($count) = $db->query( list($count) = $db->query(
'SELECT COUNT(*) FROM {config} WHERE vckey = :key', 'SELECT COUNT(*) FROM {config} WHERE vckey = :key',
@ -508,7 +508,7 @@ class Installer
if ($current_version < self::MIN_PHP_VERSION) { if ($current_version < self::MIN_PHP_VERSION) {
$this->errors[] = getlocal( $this->errors[] = getlocal(
"PHP version is {0}, but Mibew works with {1} and later versions.", "PHP version is {0}, but Mibew Messenger works with {1} and later versions.",
array( array(
Utils::formatVersionId($current_version), Utils::formatVersionId($current_version),
Utils::formatVersionId(self::MIN_PHP_VERSION) Utils::formatVersionId(self::MIN_PHP_VERSION)
@ -627,7 +627,7 @@ class Installer
/** /**
* Gets version of existing database structure. * Gets version of existing database structure.
* *
* If Mibew is not installed yet boolean false will be returned. * If Mibew Messenger is not installed yet boolean false will be returned.
* *
* @return string|boolean Database structure version or boolean false if the * @return string|boolean Database structure version or boolean false if the
* version cannot be determined. * version cannot be determined.

View File

@ -35,7 +35,7 @@ class UpdateChecker
private $url = null; private $url = null;
/** /**
* Unique 64 character length ID of the Mibew instance. * Unique 64 character length ID of the Mibew Messenger instance.
* *
* @var string * @var string
*/ */
@ -80,7 +80,7 @@ class UpdateChecker
} }
/** /**
* Sets Unique ID of the Mibew instance. * Sets Unique ID of the Mibew Messenger instance.
* *
* @param string $id Unique ID that is 64 characters length at most. * @param string $id Unique ID that is 64 characters length at most.
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
@ -98,7 +98,7 @@ class UpdateChecker
} }
/** /**
* Retrieve Unique ID of the Mibew instance. * Retrieve Unique ID of the Mibew Messenger instance.
* *
* @return string * @return string
*/ */

View File

@ -28,7 +28,7 @@ use Stash\Interfaces\PoolInterface;
class Updater class Updater
{ {
/** /**
* A minimum version Mibew can be updated from. * A minimum version Mibew Messenger can be updated from.
*/ */
const MIN_VERSION = '2.0.0-beta.1'; const MIN_VERSION = '2.0.0-beta.1';
@ -201,7 +201,7 @@ class Updater
/** /**
* Gets version of existing database structure. * Gets version of existing database structure.
* *
* If Mibew is not installed yet boolean false will be returned. * If Mibew Messenger is not installed yet boolean false will be returned.
* *
* @return int|boolean Database structure version or boolean false if the * @return int|boolean Database structure version or boolean false if the
* version cannot be determined. * version cannot be determined.
@ -281,8 +281,9 @@ class Updater
array('return_rows' => Database::RETURN_ALL_ROWS) array('return_rows' => Database::RETURN_ALL_ROWS)
); );
// Mibew base path should not be included in operators' avatars // Mibew Messenger base path should not be included in operators'
// which stored in the database. Remove the prefixes one by one. // avatars which stored in the database. Remove the prefixes one
// by one.
foreach ($operators as $operator) { foreach ($operators as $operator) {
if (empty($operator['avatar'])) { if (empty($operator['avatar'])) {
// The operator has no avatar. // The operator has no avatar.
@ -351,7 +352,7 @@ class Updater
. 'UNIQUE KEY target (target) ' . 'UNIQUE KEY target (target) '
. ') charset utf8 ENGINE=InnoDb'); . ') charset utf8 ENGINE=InnoDb');
// Generate Unique ID of Mibew instance. // Generate Unique ID of Mibew Messenger instance.
$db->query( $db->query(
'INSERT INTO {config} (vckey, vcvalue) VALUES (:key, :value)', 'INSERT INTO {config} (vckey, vcvalue) VALUES (:key, :value)',
array( array(

View File

@ -102,7 +102,8 @@ class Utils
} }
/** /**
* Generates random unique 64 characters length ID for Mibew instance. * Generates random unique 64 characters length ID for Mibew Messenger
* instance.
* *
* WARNING: This ID should not be used for any security/cryptographic. If * WARNING: This ID should not be used for any security/cryptographic. If
* you need an ID for such purpose you have to use PHP's * you need an ID for such purpose you have to use PHP's

View File

@ -32,8 +32,8 @@ interface PluginInterface
public function getWeight(); public function getWeight();
/** /**
* Builds base path for plugin files. This path is relative to Mibew root * Builds base path for plugin files. This path is relative to Mibew
* and does not contain neither leading nor trailing slash. * Messenger root and does not contain neither leading nor trailing slash.
* *
* @return string Base path for plugin files * @return string Base path for plugin files
*/ */
@ -89,7 +89,7 @@ interface PluginInterface
* plugin version constrain. * plugin version constrain.
* *
* A requirement name can be on of the following: * A requirement name can be on of the following:
* - "mibew": Mibew core; * - "mibew": Mibew Messenger Core;
* - "php": PHP used in the system; * - "php": PHP used in the system;
* - "ext-*": name of a PHP extension. * - "ext-*": name of a PHP extension.
* *

View File

@ -125,7 +125,7 @@ class Utils
* *
* @return array List of environment items. Each key is a string with one of * @return array List of environment items. Each key is a string with one of
* the following value: * the following value:
* - "mibew": represents Mibew core; * - "mibew": represents Mibew Messenger Core;
* - "php": represents PHP installed in the system; * - "php": represents PHP installed in the system;
* - "ext-*": represents one of PHP extensions. * - "ext-*": represents one of PHP extensions.
* Each value of the array is version of the item. * Each value of the array is version of the item.

View File

@ -28,8 +28,8 @@ use Mibew\Settings;
class ChatStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface class ChatStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
{ {
/** /**
* Builds base path for style files. This path is relative Mibew root and * Builds base path for style files. This path is relative Mibew Messenger
* does not contain neither leading nor trailing slash. * root and does not contain neither leading nor trailing slash.
* *
* @return string Base path for style files * @return string Base path for style files
*/ */

View File

@ -28,8 +28,8 @@ use Mibew\Settings;
class InvitationStyle extends AbstractStyle implements StyleInterface class InvitationStyle extends AbstractStyle implements StyleInterface
{ {
/** /**
* Builds base path for style files. This path is relative Mibew root and * Builds base path for style files. This path is relative Mibew Messenger
* does not contain neither leading nor trailing slash. * root and does not contain neither leading nor trailing slash.
* *
* @return string Base path for style files * @return string Base path for style files
*/ */

View File

@ -28,8 +28,8 @@ use Mibew\Settings;
class PageStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface class PageStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
{ {
/** /**
* Builds base path for style files. This path is relative Mibew root and * Builds base path for style files. This path is relative Mibew Messenger
* does not contain neither leading nor trailing slash. * root and does not contain neither leading nor trailing slash.
* *
* @return string Base path for style files * @return string Base path for style files
*/ */

View File

@ -57,8 +57,8 @@ interface StyleInterface
public static function getAvailableStyles(); public static function getAvailableStyles();
/** /**
* Builds base path for style files. This path is relative to Mibew root and * Builds base path for style files. This path is relative to Mibew
* does not contain neither leading nor trailing slash. * Messenger root and does not contain neither leading nor trailing slash.
* *
* @return string Base path for style files * @return string Base path for style files
*/ */

View File

@ -24,7 +24,7 @@ define('MIBEW_VERSION', '2.2.3');
/** /**
* Prefix for session variables. * Prefix for session variables.
* Provide an ability to instal several mibew instances on one server. * Provide an ability to instal several Mibew Messenger instances on one server.
*/ */
define('SESSION_PREFIX', md5( define('SESSION_PREFIX', md5(
$configs['database']['host'] . '##' $configs['database']['host'] . '##'

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* File system root directory of the Mibew installations * File system root directory of the Mibew Messenger installations
*/ */
define('MIBEW_FS_ROOT', dirname(dirname(__FILE__))); define('MIBEW_FS_ROOT', dirname(dirname(__FILE__)));

View File

@ -32,7 +32,7 @@ define('REMEMBER_OPERATOR_COOKIE_NAME', 'mibew_operator');
/** Permissions constants */ /** Permissions constants */
/** /**
* Operator can administer Mibew instalation * Operator can administer Mibew Messenger installation
*/ */
define('CAN_ADMINISTRATE', 0); define('CAN_ADMINISTRATE', 0);

View File

@ -1,9 +1,9 @@
user_history: user_history:
subject: 'Mibew: dialog history' subject: 'Mibew Messenger: dialog history'
body: "Hello {0}!\n\nYour chat history: \n\n{1}\n--- \nRegards,\n{2} and Mibew\n{3}" body: "Hello {0}!\n\nYour chat history: \n\n{1}\n--- \nRegards,\n{2} and Mibew Messenger\n{3}"
password_recovery: password_recovery:
subject: 'Reset your Mibew password' subject: 'Reset your Mibew Messenger password'
body: "Hi, {0}\n\nPlease click on the link below or copy and paste the URL into your browser:\n{1}\n\nThis will let you choose another password.\n\nRegards,\nMibew" body: "Hi, {0}\n\nPlease click on the link below or copy and paste the URL into your browser:\n{1}\n\nThis will let you choose another password.\n\nRegards,\nMibew Messenger"
leave_message: leave_message:
subject: 'Question from {0}' subject: 'Question from {0}'
body: "Your have a message from {0}:\n\n{2}\n\nHis email: {1}\n{3}\n--- \nRegards,\nMibew" body: "Your have a message from {0}:\n\n{2}\n\nHis email: {1}\n{3}\n--- \nRegards,\nMibew Messenger"

View File

@ -1 +1 @@
# This file is empty because english strings are a part of Mibew core # This file is empty because english strings are a part of Mibew Messenger core

View File

@ -26,4 +26,4 @@
<div id="message-form-region"></div> <div id="message-form-region"></div>
{{! Footer links}} {{! Footer links}}
<div id="footer">{{l10n "Powered by:"}} <a id="poweredby-link" href="http://mibew.org" title="Mibew Community" target="_blank">mibew.org</a></div> <div id="footer">{{l10n "Powered by:"}} <a id="poweredby-link" href="http://mibew.org" title="Mibew Messenger project" target="_blank">mibew.org</a></div>