Skip to content

Commit

Permalink
Merge pull request #11 from KpuTuK/master
Browse files Browse the repository at this point in the history
Удалены все передачи по ссылке
  • Loading branch information
KpuTuK authored Aug 29, 2016
2 parents 0e26efc + 87a48d3 commit 4a86e42
Show file tree
Hide file tree
Showing 24 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion modules/ads_manager/helpers/ads_manager_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ads_manager_events {
/**
* Перед выполнением контроллера
*/
public static function pre_controller(&$db) {
public static function pre_controller($db) {
a_import('modules/ads_manager/helpers/ads_manager');
$ads_manager_links = ads_manager::get_links($db);

Expand Down
4 changes: 2 additions & 2 deletions modules/ads_manager/helpers/ads_manager_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ads_manager_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__ads_manager_areas (
`area_id` int(11) NOT NULL auto_increment,
`title` varchar(50) NOT NULL,
Expand Down Expand Up @@ -49,7 +49,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__ads_manager_areas, #__ads_manager_links ;");
main::delete_event('ads_manager');
}
Expand Down
4 changes: 2 additions & 2 deletions modules/blog/helpers/blog_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class blog_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
// Добавление таблицы в базу данных
$db->query("CREATE TABLE IF NOT EXISTS `a_blog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
Expand All @@ -42,7 +42,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
// Удаление таблицы из базы данных
$db->query("DROP TABLE #__blog");
}
Expand Down
4 changes: 2 additions & 2 deletions modules/chat/helpers/chat_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class chat_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__chat_messages (
`message_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
Expand Down Expand Up @@ -58,7 +58,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__chat_messages, #__chat_rooms;");

$db->query("ALTER TABLE #__users
Expand Down
4 changes: 2 additions & 2 deletions modules/comments/helpers/comments_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class comments_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__comments_posts (
`comment_id` int(11) NOT NULL auto_increment,
`module` varchar(30) NOT NULL,
Expand All @@ -40,7 +40,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__comments_posts;");
$db->query("DELETE FROM #__config WHERE `key` = 'comments_posting';");
}
Expand Down
4 changes: 2 additions & 2 deletions modules/downloads/helpers/downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class downloads {
* @desc получение реального пути к папке
* @param $int
*/
public static function get_path($directory_id, &$db, $directory_path = array(), $i = 0) {
public static function get_path($directory_id, $db, $directory_path = array(), $i = 0) {
$parent = $db->get_row("SELECT * FROM #__downloads_directories WHERE
directory_id = (SELECT parent_id FROM #__downloads_directories WHERE directory_id = '". intval($directory_id)."')
");
Expand Down Expand Up @@ -266,7 +266,7 @@ public static function filetype_actions($file) {
/**
* Изменение данных файла в базе
*/
public static function update_file(&$db, $file_id, $file, $new_file = true) {
public static function update_file($db, $file_id, $file, $new_file = true) {
$db->query("UPDATE #__downloads_files SET
directory_id = '". intval($file['directory_id'])."',
user_id = '". (!empty($file['user_id']) ? $file['user_id'] : USER_ID)."',
Expand Down
2 changes: 1 addition & 1 deletion modules/downloads/helpers/downloads_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class downloads_events {
/**
* Перед выполнением контроллера
*/
public static function pre_controller(&$db) {
public static function pre_controller($db) {
echo 'Событие модуля загрузок вызванное перед контроллером';
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/downloads/helpers/downloads_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class downloads_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__downloads_directories (
`directory_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default '0',
Expand Down Expand Up @@ -98,7 +98,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
#$db->query("DROP TABLE #__downloads_directories, #__downloads_files");
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/forum/helpers/forum_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class forum_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__forum_forums (
`forum_id` int(11) NOT NULL auto_increment,
`section_id` int(11) NOT NULL,
Expand Down Expand Up @@ -91,7 +91,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__forum_forums, #__forum_messages, #__forum_sections, #__forum_topics;");
$db->query("DELETE FROM #__config WHERE module = 'forum'");
}
Expand Down
4 changes: 2 additions & 2 deletions modules/guestbook/helpers/guestbook_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class guestbook_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE #__guestbook (
`message_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`user_id` INT NOT NULL ,
Expand All @@ -33,7 +33,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__guestbook ;");
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/index_page/helpers/_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class _installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
}

/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
}
}
?>
2 changes: 1 addition & 1 deletion modules/lib/helpers/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class lib {
/**
* Получение реального пути к папке
*/
public static function get_path($directory_id, &$db, $directory_path = array(), $i = 0) {
public static function get_path($directory_id, $db, $directory_path = array(), $i = 0) {
$parent = $db->get_row("SELECT * FROM #__lib_directories WHERE
directory_id = (SELECT parent_id FROM #__lib_directories WHERE directory_id = '". intval($directory_id)."')
");
Expand Down
4 changes: 2 additions & 2 deletions modules/lib/helpers/lib_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class lib_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS `a_lib_books` (
`book_id` int(11) NOT NULL auto_increment,
`directory_id` int(11) NOT NULL,
Expand Down Expand Up @@ -52,7 +52,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
}
}
?>
2 changes: 1 addition & 1 deletion modules/main/helpers/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static function r_copy($source, $dest) {
* Выполнение событий
* @param string $type
*/
public static function events_exec(&$db, $type) {
public static function events_exec($db, $type) {
$dir = opendir(ROOT.'data_files/events');
while ($f = readdir($dir)) {
if (strstr($f, $type.'.event')) {
Expand Down
4 changes: 2 additions & 2 deletions modules/news/helpers/news_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class news_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE #__news (
`news_id` int(11) NOT NULL auto_increment,
`subject` varchar(100) NOT NULL,
Expand All @@ -33,7 +33,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__news;");
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/pages/helpers/pages_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class pages_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__pages (
`page_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
Expand All @@ -35,7 +35,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__pages;");
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/photo/helpers/photo_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class photo_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__photo_albums (
`album_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__photo_albums, #__photo");

main::delete_dir(ROOT.'files/photo');
Expand Down
2 changes: 1 addition & 1 deletion modules/private/helpers/private_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class private_events {
/**
* Перед выполнением контроллера
*/
public static function pre_controller(&$db) {
public static function pre_controller($db) {
if (USER_ID != -1) {
$new_messages = $db->get_one("SELECT COUNT(*) FROM #__private_messages WHERE user_to_id = '".USER_ID."' AND user_id = '".USER_ID."' AND folder = 'new'");
if ($new_messages > 0) define('PRIVATE_NEW_MESSAGES', $new_messages);
Expand Down
4 changes: 2 additions & 2 deletions modules/private/helpers/private_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class private_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE IF NOT EXISTS #__private_messages (
`message_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
Expand All @@ -41,7 +41,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__private_messages ;");
main::delete_event('private');
}
Expand Down
2 changes: 1 addition & 1 deletion modules/smiles/helpers/smiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function smiles_replace($string) {
/**
* Обновление смайлов
*/
public static function smiles_update(&$db) {
public static function smiles_update($db) {
$result = $db->query("SELECT * FROM #__smiles WHERE status = 'enable'");
while ($smile = $db->fetch_array($result)) {
$smiles_array[$smile['code']] = '<img src="{%URL%}modules/smiles/smiles/'.$smile['image'].'" alt="'.$smile['code'].'" />';
Expand Down
6 changes: 3 additions & 3 deletions modules/smiles/helpers/smiles_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class smiles_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("CREATE TABLE #__smiles (
smile_id int(11) NOT NULL auto_increment,
code varchar(50) NOT NULL,
Expand Down Expand Up @@ -254,13 +254,13 @@ public static function install(&$db) {
");

if (!class_exists('smiles')) a_import('modules/smiles/helpers/smiles');
smiles::smiles_update(&$db);
smiles::smiles_update($db);
}

/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DROP TABLE #__smiles;");
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/user/helpers/user_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class user_events {
/**
* Перед выполнением контроллера
*/
public static function pre_controller(&$db) {
public static function pre_controller($db) {
$tpl = Registry::get('tpl');
$config = Registry::get('config');

Expand Down
2 changes: 1 addition & 1 deletion modules/web_version/helpers/web_version_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class web_version_events {
/**
* Перед выполнением контроллера
*/
public static function pre_controller(&$db) {
public static function pre_controller($db) {

$user_agent = $_SERVER['HTTP_USER_AGENT'];
$type = 'wap';
Expand Down
4 changes: 2 additions & 2 deletions modules/web_version/helpers/web_version_installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class web_version_installer {
/**
* Установка модуля
*/
public static function install(&$db) {
public static function install($db) {
$db->query("INSERT INTO #__config SET
`module` = 'system',
`key` = 'web_theme',
Expand All @@ -30,7 +30,7 @@ public static function install(&$db) {
/**
* Деинсталляция модуля
*/
public static function uninstall(&$db) {
public static function uninstall($db) {
$db->query("DELETE FROM #__config WHERE
`key` = 'web_theme';");
main::delete_event('web_version');
Expand Down

0 comments on commit 4a86e42

Please sign in to comment.