Merge pull request #696 from ilosada/7639-hook_queries_skype

C#7639 - hook queries skype
1.10.x
Yannick Warnier 10 years ago
commit c9d974e9b7
  1. 12
      main/inc/lib/hook/HookManagement.php
  2. 2
      plugin/skype/src/Skype.php

@ -145,8 +145,8 @@ class HookManagement implements HookManagementInterface
public function listHookObservers($eventName)
{
$array = array();
$joinTable = $this->tables[TABLE_HOOK_CALL] . 'hc ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . 'he ' .
$joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
' ON hc.hook_event_id = he.id ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
' ON hc.hook_observer_id = ho.id ';
@ -202,8 +202,8 @@ class HookManagement implements HookManagementInterface
public function listAllHookCalls()
{
$array = array();
$joinTable = $this->tables[TABLE_HOOK_CALL] . 'hc ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . 'he ' .
$joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
' ON hc.hook_event_id = he.id ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
' ON hc.hook_observer_id = ho.id ';
@ -338,8 +338,8 @@ class HookManagement implements HookManagementInterface
$eventName = Database::escape_string($eventName);
$observerClassName($observerClassName);
$type = Database::escape_string($type);
$joinTable = $this->tables[TABLE_HOOK_CALL] . 'hc ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . 'he ' .
$joinTable = $this->tables[TABLE_HOOK_CALL] . ' hc' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_EVENT] . ' he' .
' ON hc.hook_event_id = he.id ' .
' INNER JOIN ' . $this->tables[TABLE_HOOK_OBSERVER] . ' ho ' .
' ON hc.hook_observer_id = ho.id ';

@ -48,8 +48,10 @@ class Skype extends Plugin implements HookPluginInterface
)
);
if (empty($result)) {
require_once api_get_path(LIBRARY_PATH).'extra_field.lib.php';
$extraField = new Extrafield('user');
$extraField->save(array(
'field_type' => UserManager::USER_FIELD_TYPE_TEXT,
'field_variable' => 'skype',
'field_display_text' => 'Skype',
'field_visible' => 1,

Loading…
Cancel
Save