From 799d511e9666d40fd629f492e49586837b631aa1 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Sun, 29 Mar 2020 11:56:39 -0400 Subject: [PATCH 01/43] fixing table names --- class/AudioControler.php | 172 +++++++++++++++++++-------------------- sql/mysql.sql | 4 +- 2 files changed, 88 insertions(+), 88 deletions(-) diff --git a/class/AudioControler.php b/class/AudioControler.php index 4dd5b277..294f7372 100644 --- a/class/AudioControler.php +++ b/class/AudioControler.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -48,92 +48,92 @@ class AudioControler extends YogurtControler { - /** - * Fecth audios - * @param object $criteria - * @return array of video objects - */ - public function getAudio($criteria) - { - $audios = $this->audioFactory->getObjects($criteria); - return $audios; - } + /** + * Fecth audios + * @param object $criteria + * @return array of video objects + */ + public function getAudio($criteria) + { + $audios = $this->audioFactory->getObjects($criteria); + return $audios; + } - /** - * Assign Audio Content to Template - * @param $nbAudios - * @param $audios - * @return bool - */ - public function assignAudioContent($nbAudios, $audios) - { - if (0 == $nbAudios) { - return false; - } else { - //audio info - /** - * Lets populate an array with the dati from the audio - */ - $i = 0; - foreach ($audios as $audio) { - $audios_array[$i]['url'] = $audio->getVar('url', 's'); - $audios_array[$i]['title'] = $audio->getVar('title', 's'); - $audios_array[$i]['id'] = $audio->getVar('audio_id', 's'); - $audios_array[$i]['author'] = $audio->getVar('author', 's'); + /** + * Assign Audio Content to Template + * @param $nbAudios + * @param $audios + * @return bool + */ + public function assignAudioContent($nbAudios, $audios) + { + if (0 == $nbAudios) { + return false; + } else { + //audio info + /** + * Lets populate an array with the data from the audio + */ + $i = 0; + foreach ($audios as $audio) { + $audios_array[$i]['url'] = $audio->getVar('url', 's'); + $audios_array[$i]['title'] = $audio->getVar('title', 's'); + $audios_array[$i]['id'] = $audio->getVar('audio_id', 's'); + $audios_array[$i]['author'] = $audio->getVar('author', 's'); - if (str_replace('.', '', PHP_VERSION) > 499) { - $audio_path = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/' . $audio->getVar('url', 's'); - // echo $audio_path; - $mp3filemetainfo = new Id3v1($audio_path, true); - $mp3filemetainfoarray = []; - $mp3filemetainfoarray['Title'] = $mp3filemetainfo->getTitle(); - $mp3filemetainfoarray['Artist'] = $mp3filemetainfo->getArtist(); - $mp3filemetainfoarray['Album'] = $mp3filemetainfo->getAlbum(); - $mp3filemetainfoarray['Year'] = $mp3filemetainfo->getYear(); - $audios_array[$i]['meta'] = $mp3filemetainfoarray; - } else { - $audios_array[$i]['nometa'] = 1; - } - $i++; - } - return $audios_array; - } - } + if (str_replace('.', '', PHP_VERSION) > 499) { + $audio_path = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/' . $audio->getVar('url', 's'); + // echo $audio_path; + $mp3filemetainfo = new Id3v1($audio_path, true); + $mp3filemetainfoarray = []; + $mp3filemetainfoarray['Title'] = $mp3filemetainfo->getTitle(); + $mp3filemetainfoarray['Artist'] = $mp3filemetainfo->getArtist(); + $mp3filemetainfoarray['Album'] = $mp3filemetainfo->getAlbum(); + $mp3filemetainfoarray['Year'] = $mp3filemetainfo->getYear(); + $audios_array[$i]['meta'] = $mp3filemetainfoarray; + } else { + $audios_array[$i]['nometa'] = 1; + } + $i++; + } + return $audios_array; + } + } - /** - * Create a page navbar for videos - * @param $nbAudios - * @param int $audiosPerPage the number of videos in a page - * @param int $start at which position of the array we start - * @param int $interval how many pages between the first link and the next one - * @return void - */ - public function AudiosNavBar($nbAudios, $audiosPerPage, $start, $interval) - { - $pageNav = new \XoopsPageNav($nbAudios, $audiosPerPage, $start, 'start', 'uid=' . $this->uidOwner); - $navBar = $pageNav->renderImageNav($interval); - return $navBar; - } + /** + * Create a page navbar for videos + * @param $nbAudios + * @param int $audiosPerPage the number of videos in a page + * @param int $start at which position of the array we start + * @param int $interval how many pages between the first link and the next one + * @return void + */ + public function AudiosNavBar($nbAudios, $audiosPerPage, $start, $interval) + { + $pageNav = new \XoopsPageNav($nbAudios, $audiosPerPage, $start, 'start', 'uid=' . $this->uidOwner); + $navBar = $pageNav->renderImageNav($interval); + return $navBar; + } - /** - * @return bool|void - */ - public function checkPrivilege() - { - global $xoopsModuleConfig; - if (0 == $xoopsModuleConfig['enable_audio']) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_AUDIONOTENABLED); - } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + /** + * @return bool|void + */ + public function checkPrivilege() + { + global $xoopsModuleConfig; + if (0 == $xoopsModuleConfig['enable_audio']) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_AUDIONOTENABLED); + } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('audio'); + $config = $configs[0]->getVar('audio'); - if (!$this->checkPrivilegeLevel($config)) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); - } - } - return true; - } + if (!$this->checkPrivilegeLevel($config)) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); + } + } + return true; + } } diff --git a/sql/mysql.sql b/sql/mysql.sql index 265e7472..82412182 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -63,7 +63,7 @@ CREATE TABLE `yogurt_reltribeuser` ( ENGINE = MyISAM; -CREATE TABLE `Tribes` ( +CREATE TABLE `yogurt_tribes` ( `tribe_id` INT(11) NOT NULL AUTO_INCREMENT, `owner_uid` INT(11) NOT NULL, `tribe_title` VARCHAR(255) NOT NULL, @@ -85,7 +85,7 @@ CREATE TABLE `yogurt_notes` ( ) ENGINE = MyISAM; -CREATE TABLE `Configs` ( +CREATE TABLE `yogurt_configs` ( `config_id` INT(11) NOT NULL AUTO_INCREMENT, `config_uid` INT(11) NOT NULL, `pictures` TINYINT(1) NOT NULL, From 2dc0fa477b04543f789c8af115793eaf16518672 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Mon, 30 Mar 2020 09:51:40 -0400 Subject: [PATCH 02/43] line changes --- abandontribe.php | 44 +- admin/about.php | 6 +- admin/admin_footer.php | 2 +- admin/admin_header.php | 10 +- admin/index.php | 8 +- admin/main.php | 160 ++--- admin/menu.php | 30 +- album.php | 64 +- audio.php | 24 +- avatar.php | 28 +- becomemembertribe.php | 22 +- blocks/blocks.php | 86 +-- class/Audio.php | 156 ++--- class/AudioHandler.php | 470 +++++++-------- class/Configs.php | 170 +++--- class/ConfigsHandler.php | 440 +++++++------- class/ControlerConfigs.php | 22 +- class/ControlerFriends.php | 46 +- class/ControlerIndex.php | 80 +-- class/ControlerNotes.php | 130 ++-- class/ControlerPhotos.php | 46 +- class/ControlerTribes.php | 46 +- class/Friendpetition.php | 146 ++--- class/FriendpetitionHandler.php | 366 ++++++------ class/Friendship.php | 164 ++--- class/FriendshipHandler.php | 790 ++++++++++++------------- class/Helper.php | 102 ++-- class/Image.php | 160 ++--- class/ImageHandler.php | 954 +++++++++++++++--------------- class/Ishot.php | 152 ++--- class/IshotHandler.php | 494 ++++++++-------- class/Notes.php | 152 ++--- class/NotesHandler.php | 452 +++++++------- class/Reltribeuser.php | 146 ++--- class/ReltribeuserHandler.php | 500 ++++++++-------- class/Seutubo.php | 158 ++--- class/SeutuboHandler.php | 498 ++++++++-------- class/Suspensions.php | 150 ++--- class/SuspensionsHandler.php | 366 ++++++------ class/Tribes.php | 160 ++--- class/TribesHandler.php | 870 +++++++++++++-------------- class/Utility.php | 34 +- class/VideoControler.php | 174 +++--- class/Visitors.php | 148 ++--- class/VisitorsHandler.php | 424 ++++++------- class/YogurtControler.php | 466 +++++++-------- class/class.Id3v1.php | 18 +- class/common/Configurator.php | 72 +-- class/common/DirectoryChecker.php | 238 ++++---- class/common/FileChecker.php | 238 ++++---- class/common/FilesManagement.php | 490 +++++++-------- class/common/Migrate.php | 164 ++--- class/common/ModuleFeedback.php | 164 ++--- class/common/ModuleStats.php | 28 +- class/common/Resizer.php | 486 +++++++-------- class/common/ServerStats.php | 100 ++-- class/common/SysUtility.php | 336 +++++------ class/common/VersionChecks.php | 234 ++++---- class/common/breadcrumb.php | 70 +-- comment_delete.php | 4 +- comment_edit.php | 4 +- comment_new.php | 6 +- comment_post.php | 4 +- comment_reply.php | 4 +- config/assigns.php | 138 ++--- config/config.php | 118 ++-- config/icons.php | 24 +- config/imageconfig.php | 60 +- config/paths.php | 30 +- configs.php | 52 +- delaudio.php | 52 +- delete_scrap.php | 46 +- delete_tribe.php | 50 +- delfriendship.php | 8 +- delpicture.php | 72 +-- delvideo.php | 44 +- editdesc.php | 44 +- editdescvideo.php | 44 +- editfriendship.php | 44 +- edittribe.php | 168 +++--- edituser.php | 754 +++++++++++------------ fans.php | 10 +- friends.php | 12 +- header.php | 46 +- include/common.php | 62 +- include/notification.inc.php | 96 +-- include/search.inc.php | 124 ++-- include/yogurt.css | 2 +- index.php | 222 +++---- ishot.php | 36 +- kickfromtribe.php | 60 +- language/english/admin.php | 4 +- language/english/common.php | 31 +- language/english/main.php | 46 +- language/english/modinfo.php | 8 +- language/german/admin.php | 4 +- language/german/main.php | 46 +- language/german/modinfo.php | 6 +- language/persian/admin.php | 4 +- language/persian/main.php | 46 +- language/persian/modinfo.php | 6 +- language/portuguesebr/admin.php | 4 +- language/portuguesebr/main.php | 48 +- language/portuguesebr/modinfo.php | 4 +- mainvideo.php | 22 +- makefriends.php | 56 +- notebook.php | 8 +- notification_update.php | 5 +- preloads/autoloader.php | 42 +- preloads/core.php | 16 +- private.php | 30 +- search.php | 772 ++++++++++++------------ search_tribe.php | 30 +- searchmembers.php | 794 ++++++++++++------------- seutubo.php | 12 +- submit.php | 6 +- submit_configs.php | 32 +- submit_friendpetition.php | 28 +- submit_scrap.php | 8 +- submit_tribe.php | 64 +- submitaudio.php | 42 +- suspend.php | 46 +- tribe.php | 22 +- tribes.php | 20 +- unsuspenduser.php | 34 +- video_submited.php | 22 +- xoops_version.php | 624 +++++++++---------- 127 files changed, 9093 insertions(+), 9093 deletions(-) diff --git a/abandontribe.php b/abandontribe.php index 01182dea..78122086 100644 --- a/abandontribe.php +++ b/abandontribe.php @@ -19,7 +19,7 @@ use XoopsModules\Yogurt; -require __DIR__.'/header.php'; +require __DIR__ . '/header.php'; /** * Verify Token @@ -31,28 +31,28 @@ /** * Receiving info from get parameters */ -$reltribeuser_id = (int) $_POST['reltribe_id']; +$reltribeuser_id = (int)$_POST['reltribe_id']; if (!isset($_POST['confirm']) || 1 != $_POST['confirm']) { - xoops_confirm(['reltribe_id' => $reltribeuser_id, 'confirm' => 1], 'abandontribe.php', _MD_YOGURT_ASKCONFIRMABANDONTRIBE, _MD_YOGURT_CONFIRMABANDON); + xoops_confirm(['reltribe_id' => $reltribeuser_id, 'confirm' => 1], 'abandontribe.php', _MD_YOGURT_ASKCONFIRMABANDONTRIBE, _MD_YOGURT_CONFIRMABANDON); } else { - /** - * Creating the factory and the criteria to delete the picture - * The user must be the owner - */ - $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); - $criteria_rel_id = new \Criteria('rel_id', $reltribeuser_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('rel_user_uid', $uid); - $criteria = new \CriteriaCompo($criteria_rel_id); - $criteria->add($criteria_uid); + /** + * Creating the factory and the criteria to delete the picture + * The user must be the owner + */ + $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); + $criteria_rel_id = new \Criteria('rel_id', $reltribeuser_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('rel_user_uid', $uid); + $criteria = new \CriteriaCompo($criteria_rel_id); + $criteria->add($criteria_uid); - /** - * Try to delete - */ - if ($reltribeuserFactory->deleteAll($criteria)) { - redirect_header('tribes.php', 1, _MD_YOGURT_TRIBEABANDONED); - } else { - redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); - } + /** + * Try to delete + */ + if ($reltribeuserFactory->deleteAll($criteria)) { + redirect_header('tribes.php', 1, _MD_YOGURT_TRIBEABANDONED); + } else { + redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); + } } -include __DIR__.'/../../footer.php'; +include __DIR__ . '/../../footer.php'; diff --git a/admin/about.php b/admin/about.php index e85242ee..c57f5ae4 100644 --- a/admin/about.php +++ b/admin/about.php @@ -14,14 +14,14 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @package * @since - * @author XOOPS Development Team + * @author XOOPS Development Team */ -require_once __DIR__.'/admin_header.php'; +require_once __DIR__ . '/admin_header.php'; xoops_cp_header(); $adminObject->displayNavigation(basename(__FILE__)); $adminObject->setPaypal('xoopsfoundation@gmail.com'); $adminObject->displayAbout(false); -require_once __DIR__.'/admin_footer.php'; +require_once __DIR__ . '/admin_footer.php'; diff --git a/admin/admin_footer.php b/admin/admin_footer.php index 28eae088..ee414b4c 100644 --- a/admin/admin_footer.php +++ b/admin/admin_footer.php @@ -19,6 +19,6 @@ $pathIcon32 = Xmf\Module\Admin::iconUrl('', 32); -echo "
\n"."
\n"." XOOPS\n"."
\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'
'; +echo "
\n" . "
\n" . " XOOPS\n" . "
\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '
'; xoops_cp_footer(); diff --git a/admin/admin_header.php b/admin/admin_header.php index dda0dd64..1419b2eb 100644 --- a/admin/admin_header.php +++ b/admin/admin_header.php @@ -19,11 +19,11 @@ use XoopsModules\Yogurt; -include dirname(__DIR__).'/preloads/autoloader.php'; +include dirname(__DIR__) . '/preloads/autoloader.php'; -require dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; +require dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; //require $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); -require dirname(__DIR__).'/include/common.php'; +require dirname(__DIR__) . '/include/common.php'; $moduleDirName = basename(dirname(__DIR__)); @@ -42,8 +42,8 @@ $myts = MyTextSanitizer::getInstance(); if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) { - require_once $GLOBALS['xoops']->path('class/template.php'); - $xoopsTpl = new \XoopsTpl(); + require_once $GLOBALS['xoops']->path('class/template.php'); + $xoopsTpl = new \XoopsTpl(); } $pathIcon16 = Xmf\Module\Admin::iconUrl('', 16); diff --git a/admin/index.php b/admin/index.php index 27916f5f..320b934f 100644 --- a/admin/index.php +++ b/admin/index.php @@ -14,10 +14,10 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @package * @since - * @author XOOPS Development Team + * @author XOOPS Development Team */ -require_once __DIR__.'/admin_header.php'; +require_once __DIR__ . '/admin_header.php'; // Display Admin header xoops_cp_header(); $adminObject = \Xmf\Module\Admin::getInstance(); @@ -87,8 +87,6 @@ $adminObject->displayIndex(); - //echo $utility::getServerStats(); -require_once __DIR__.'/admin_footer.php'; - +require_once __DIR__ . '/admin_footer.php'; diff --git a/admin/main.php b/admin/main.php index cc70d8b1..91c74d64 100644 --- a/admin/main.php +++ b/admin/main.php @@ -28,7 +28,7 @@ /** * Arquivo de cabe�alho da administra��o do Xoops */ -require_once __DIR__.'/admin_header.php'; +require_once __DIR__ . '/admin_header.php'; /** * Fun��o que desenha o cabe�alho da administra��o do Xoops @@ -66,9 +66,9 @@ global $xoopsModuleConfig, $xoopsModule; function about() { - $moduleHandler = xoops_getHandler('module'); - $modulo = $moduleHandler->getByDirname('yogurt'); - echo "
+ $moduleHandler = xoops_getHandler('module'); + $modulo = $moduleHandler->getByDirname('yogurt'); + echo "
getInfo('dirname') . '/' . $modulo->getInfo('image') . "' alt='Yogurt' style='float: left; margin-right: 10px;'/>
" . $modulo->getInfo('name') . ' ' . $modulo->getInfo('version') . "
@@ -115,12 +115,12 @@ function about()
"; - $vetorpessoas = $modulo->getInfo('people'); - $vetordevelopers = $vetorpessoas['developers']; - foreach ($vetordevelopers as $developer) { - echo $developer . ' '; - } - echo "
+ $vetorpessoas = $modulo->getInfo('people'); + $vetordevelopers = $vetorpessoas['developers']; + foreach ($vetordevelopers as $developer) { + echo $developer . ' '; + } + echo " @@ -130,12 +130,12 @@ function about()
"; - $vetortesters = $vetorpessoas['testers']; - foreach ($vetortesters as $tester) { - echo $tester . ' '; - } + $vetortesters = $vetorpessoas['testers']; + foreach ($vetortesters as $tester) { + echo $tester . ' '; + } - echo "
+ echo " @@ -147,12 +147,12 @@ function about() "; - $vetortranslators = $vetorpessoas['translators']; - foreach ($vetortranslators as $translator) { - echo $translator . ' '; - } + $vetortranslators = $vetorpessoas['translators']; + foreach ($vetortranslators as $translator) { + echo $translator . ' '; + } - echo " + echo " @@ -192,7 +192,7 @@ function about() - + @@ -239,58 +239,58 @@ function about() function homedefault() { - global $isframeworksrequirement; - echo _MA_YOG_CONFIGEVERYTHING; - //echo "Update"; + global $isframeworksrequirement; + echo _MA_YOG_CONFIGEVERYTHING; + //echo "Update"; - echo "
" . _MA_YOG_VERSIONHIST."" . _MA_YOG_VERSIONHIST . "
+ echo "
- + '; - $a = $GLOBALS['xoopsDB']->getServerVersion(); - //$b = substr($a, 0, strpos($a, "-")); - $b = explode('-', $a, 2); - $b = $b[0]; - $c = explode('.', $b); - echo "'; - } - if (extension_loaded('gd')) { - echo " + $a = $GLOBALS['xoopsDB']->getServerVersion(); + //$b = substr($a, 0, strpos($a, "-")); + $b = explode('-', $a, 2); + $b = $b[0]; + $c = explode('.', $b); + echo "'; + } + if (extension_loaded('gd')) { + echo " "; - } else { - echo " + } else { + echo " "; - } - if (str_replace('.', '', PHP_VERSION) > 499) { - echo " + } + if (str_replace('.', '', PHP_VERSION) > 499) { + echo " '; - } else { - echo " + } else { + echo " '; - } + } - /* + /* if ($isframeworksrequirement){ echo " @@ -306,46 +306,46 @@ function homedefault() "; } */ - if (!is_dir(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { - echo " + if (!is_dir(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { + echo ""; - } elseif (!is_writable(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { - echo " + } elseif (!is_writable(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { + echo ""; - } else { - echo " + } else { + echo ""; - } + } - echo "'; - if (function_exists('memory_get_usage')) { - echo "'; - } - echo '
" . _MA_YOG_ALLTESTSOK.'" . _MA_YOG_ALLTESTSOK . '
"; - if ($c[0] > 4 || (4 == $c[0] && $c[1] > 0)) { - echo " "; - echo 'Mysql Version:' . $b; - } else { - echo " "; - echo 'Mysql Version:' . $b . '. You must use a version higher than 4.1
"; + if ($c[0] > 4 || (4 == $c[0] && $c[1] > 0)) { + echo " "; + echo 'Mysql Version:' . $b; + } else { + echo " "; + echo 'Mysql Version:' . $b . '. You must use a version higher than 4.1
" . _MA_YOG_GDEXTENSIONOK . ' ' . _MA_YOG_MOREINFO . " Gd Library
" . _MA_YOG_GDEXTENSIONFALSE . ' ' . _MA_YOG_CONFIGPHPINI . ' ' . _MA_YOG_MOREINFO . " Gd Library
" . _MA_YOG_PHP5PRESENT . ' ' . PHP_VERSION . '
" . _MA_YOG_PHP5NOTPRESENT . ' ' . PHP_VERSION . '
/uploads/yogurt/mp3/ is not exists
/uploads/yogurt/mp3/ is not writable
/uploads/yogurt/mp3/ exists and writable
" . sprintf(_MA_YOG_MAXBYTESPHPINI, ini_get('post_max_size')) . '
" . _MA_YOG_MEMORYLIMIT . ' ' . memory_get_usage() . '
'; + echo " " . sprintf(_MA_YOG_MAXBYTESPHPINI, ini_get('post_max_size')) . ''; + if (function_exists('memory_get_usage')) { + echo " " . _MA_YOG_MEMORYLIMIT . ' ' . memory_get_usage() . ''; + } + echo ''; } switch ($op) { - case 'about': - if ($isframeworksrequirement) { - loadModuleAdminMenu(2, '-> About'); - } else { - // renderUglierMenu(2, '-> About'); - } - about(); - - break; - default: - if ($isframeworksrequirement) { - loadModuleAdminMenu(1, '-> home'); - } else { - // renderUglierMenu(1, '-> home'); - } - homedefault(); - - break; + case 'about': + if ($isframeworksrequirement) { + loadModuleAdminMenu(2, '-> About'); + } else { + // renderUglierMenu(2, '-> About'); + } + about(); + + break; + default: + if ($isframeworksrequirement) { + loadModuleAdminMenu(1, '-> home'); + } else { + // renderUglierMenu(1, '-> home'); + } + homedefault(); + + break; } //fechamento das tags de if l� de cim�o verifica��o se os arquivos do phppp existem diff --git a/admin/menu.php b/admin/menu.php index dfc0298e..6c39453d 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -17,7 +17,7 @@ * @since */ -include dirname(__DIR__).'/preloads/autoloader.php'; +include dirname(__DIR__) . '/preloads/autoloader.php'; $moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); @@ -32,32 +32,32 @@ $pathIcon32 = \Xmf\Module\Admin::menuIconPath(''); if (is_object($helper->getModule())) { - // $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); - $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); + // $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); + $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); } $adminmenu[] = [ - 'title' => _MI_YOG_ADMENU1, - 'link' => 'admin/index.php', - 'icon' => $pathIcon32 . '/home.png', + 'title' => _MI_YOG_ADMENU1, + 'link' => 'admin/index.php', + 'icon' => $pathIcon32 . '/home.png', ]; $adminmenu[] = [ - 'title' => _MI_YOG_MENU_02, - 'link' => 'admin/main.php', - 'icon' => $pathIcon32 . '/manage.png', + 'title' => _MI_YOG_MENU_02, + 'link' => 'admin/main.php', + 'icon' => $pathIcon32 . '/manage.png', ]; $adminmenu[] = [ - 'title' => _MI_YOG_ADMENU2, - 'link' => 'admin/main.php?op=about', - 'icon' => $pathIcon32 . '/about.png', + 'title' => _MI_YOG_ADMENU2, + 'link' => 'admin/main.php?op=about', + 'icon' => $pathIcon32 . '/about.png', ]; $adminmenu[] = [ - 'title' => _MI_YOG_ADMENU2, - 'link' => 'admin/about.php', - 'icon' => $pathIcon32 . '/about.png', + 'title' => _MI_YOG_ADMENU2, + 'link' => 'admin/about.php', + 'icon' => $pathIcon32 . '/about.png', ]; diff --git a/album.php b/album.php index 3ae0ed6d..8b447bee 100644 --- a/album.php +++ b/album.php @@ -20,7 +20,7 @@ use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_album.tpl'; -require __DIR__.'/header.php'; +require __DIR__ . '/header.php'; $controler = new Yogurt\ControlerPhotos($xoopsDB, $xoopsUser); @@ -33,24 +33,24 @@ * This variable define the beggining of the navigation must b * setted here so all calls to database will take this into account */ -$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; +$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; /** * Filter for search pictures in database */ if (1 == $controler->isOwner) { - $criteria_uid = new \Criteria('uid_owner', $controler->uidOwner); + $criteria_uid = new \Criteria('uid_owner', $controler->uidOwner); } else { - $criteria_private = new \Criteria('private', 0); - $criteria_uid2 = new \Criteria('uid_owner', (int)$controler->uidOwner); - $criteria_uid = new \CriteriaCompo($criteria_uid2); - $criteria_uid->add($criteria_private); + $criteria_private = new \Criteria('private', 0); + $criteria_uid2 = new \Criteria('uid_owner', (int)$controler->uidOwner); + $criteria_uid = new \CriteriaCompo($criteria_uid2); + $criteria_uid->add($criteria_private); } $criteria_uid->setLimit($xoopsModuleConfig['picturesperpage']); $criteria_uid->setStart($start); if (1 == $xoopsModuleConfig['images_order']) { - $criteria_uid->setOrder('DESC'); - $criteria_uid->setSort('cod_img'); + $criteria_uid->setOrder('DESC'); + $criteria_uid->setSort('cod_img'); } /** * Fetch pictures from factory @@ -63,32 +63,32 @@ * If there is no pictures in the album show in template lang_nopicyet */ if (0 == $nbSections['nbPhotos']) { - $nopicturesyet = _MD_YOGURT_NOTHINGYET; - $xoopsTpl->assign('lang_nopicyet', $nopicturesyet); + $nopicturesyet = _MD_YOGURT_NOTHINGYET; + $xoopsTpl->assign('lang_nopicyet', $nopicturesyet); } else { - /** - * Lets populate an array with the dati from the pictures - */ - $i = 0; - foreach ($pictures_object_array as $picture) { - $pictures_array[$i]['url'] = $picture->getVar('url', 's'); - $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); - $pictures_array[$i]['cod_img'] = $picture->getVar('cod_img', 's'); - $pictures_array[$i]['private'] = $picture->getVar('private', 's'); - $xoopsTpl->assign('pics_array', $pictures_array); - $i++; - } + /** + * Lets populate an array with the dati from the pictures + */ + $i = 0; + foreach ($pictures_object_array as $picture) { + $pictures_array[$i]['url'] = $picture->getVar('url', 's'); + $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); + $pictures_array[$i]['cod_img'] = $picture->getVar('cod_img', 's'); + $pictures_array[$i]['private'] = $picture->getVar('private', 's'); + $xoopsTpl->assign('pics_array', $pictures_array); + $i++; + } } /** * Show the form if it is the owner and he can still upload pictures */ if (!empty($xoopsUser)) { - if ((1 == $controler->isOwner) && $xoopsModuleConfig['nb_pict'] > $nbSections['nbPhotos']) { - $maxfilebytes = $xoopsModuleConfig['maxfilesize']; - $xoopsTpl->assign('maxfilebytes', $maxfilebytes); - $xoopsTpl->assign('showForm', '1'); - } + if ((1 == $controler->isOwner) && $xoopsModuleConfig['nb_pict'] > $nbSections['nbPhotos']) { + $maxfilebytes = $xoopsModuleConfig['maxfilesize']; + $xoopsTpl->assign('maxfilebytes', $maxfilebytes); + $xoopsTpl->assign('showForm', '1'); + } } /** @@ -105,7 +105,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); @@ -169,7 +169,7 @@ $xoopsTpl->assign('lang_selectphoto', _MD_YOGURT_SELECT_PHOTO); $xoopsTpl->assign('lang_caption', _MD_YOGURT_CAPTION); $xoopsTpl->assign('lang_uploadpicture', _MD_YOGURT_UPLOADPICTURE); -$xoopsTpl->assign('lang_youcanupload', sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxfilebytes/1024)); +$xoopsTpl->assign('lang_youcanupload', sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxfilebytes / 1024)); //$xoopsTpl->assign('path_yogurt_uploads',$xoopsModuleConfig['link_path_upload']); $xoopsTpl->assign('lang_max_nb_pict', sprintf(_MD_YOGURT_YOUCANHAVE, $xoopsModuleConfig['nb_pict'])); @@ -185,6 +185,6 @@ $xoopsTpl->assign('lang_setprivate', _MD_YOGURT_PRIVATIZE); $xoopsTpl->assign('lang_unsetprivate', _MD_YOGURT_UNPRIVATIZE); -include XOOPS_ROOT_PATH.'/include/comment_view.php'; +include XOOPS_ROOT_PATH . '/include/comment_view.php'; -include __DIR__.'/../../footer.php'; +include __DIR__ . '/../../footer.php'; diff --git a/audio.php b/audio.php index 508f5cae..9d46203b 100644 --- a/audio.php +++ b/audio.php @@ -21,7 +21,7 @@ $GLOBALS['xoopsOption']['template_main'] = 'yogurt_audio.tpl'; -require __DIR__.'/header.php'; +require __DIR__ . '/header.php'; $controler = new Yogurt\AudioControler($xoopsDB, $xoopsUser); @@ -30,7 +30,7 @@ */ $nbSections = $controler->getNumbersSections(); -$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; +$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; /** * Criteria for Audio @@ -46,15 +46,15 @@ $audios_array = $controler->assignAudioContent($nbSections['nbAudio'], $audios); if (is_array($audios_array)) { - $xoopsTpl->assign('audios', $audios_array); - $audio_list = ''; - foreach ($audios_array as $audio_item) { - $audio_list .= '../../uploads/yogurt/mp3/' . $audio_item['url'] . ' | '; - } - //$audio_list = substr($audio_list,-2); - $xoopsTpl->assign('audio_list', $audio_list); + $xoopsTpl->assign('audios', $audios_array); + $audio_list = ''; + foreach ($audios_array as $audio_item) { + $audio_list .= '../../uploads/yogurt/mp3/' . $audio_item['url'] . ' | '; + } + //$audio_list = substr($audio_list,-2); + $xoopsTpl->assign('audio_list', $audio_list); } else { - $xoopsTpl->assign('lang_noaudioyet', _MD_YOGURT_NOAUDIOYET); + $xoopsTpl->assign('lang_noaudioyet', _MD_YOGURT_NOAUDIOYET); } $pageNav = $controler->AudiosNavBar($nbSections['nbAudio'], $xoopsModuleConfig['audiosperpage'], $start, 2); @@ -67,7 +67,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); @@ -148,4 +148,4 @@ //Videos NAvBAr $xoopsTpl->assign('pageNav', $pageNav); -include __DIR__.'/../../footer.php'; +include __DIR__ . '/../../footer.php'; diff --git a/avatar.php b/avatar.php index dd4bace4..65c2feff 100644 --- a/avatar.php +++ b/avatar.php @@ -19,28 +19,28 @@ use XoopsModules\Yogurt; -require __DIR__.'/header.php'; +require __DIR__ . '/header.php'; if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('index.php', 3, _MD_YOGURT_TOKENEXPIRED); + redirect_header('index.php', 3, _MD_YOGURT_TOKENEXPIRED); } /** * Creating the factory loading the picture changing its caption */ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); -$picture = $pictureFactory->create(false); +$picture = $pictureFactory->create(false); $picture->load($_POST['cod_img']); -$uid = (int) $xoopsUser->getVar('uid'); +$uid = (int)$xoopsUser->getVar('uid'); -$image = XOOPS_ROOT_PATH.'/uploads/'.'thumb_'.$picture->getVar('url'); -$avatar = 'av'.$uid.'_'.time().'.jpg'; -$imageavatar = XOOPS_ROOT_PATH.'/uploads/'.$avatar; +$image = XOOPS_ROOT_PATH . '/uploads/' . 'thumb_' . $picture->getVar('url'); +$avatar = 'av' . $uid . '_' . time() . '.jpg'; +$imageavatar = XOOPS_ROOT_PATH . '/uploads/' . $avatar; if (!copy($image, $imageavatar)) { - echo 'failed to copy $file...\n'; + echo 'failed to copy $file...\n'; } $xoopsUser->setVar('user_avatar', $avatar); @@ -50,11 +50,11 @@ * Verifying who's the owner to allow changes */ if ($uid == $picture->getVar('uid_owner')) { - if ($userHandler->insert($xoopsUser)) { - redirect_header('album.php', 2, _MD_YOGURT_AVATAR_EDITED); - } else { - redirect_header('album.php', 2, _MD_YOGURT_NOCACHACA); - } + if ($userHandler->insert($xoopsUser)) { + redirect_header('album.php', 2, _MD_YOGURT_AVATAR_EDITED); + } else { + redirect_header('album.php', 2, _MD_YOGURT_NOCACHACA); + } } -include __DIR__.'/../../footer.php'; +include __DIR__ . '/../../footer.php'; diff --git a/becomemembertribe.php b/becomemembertribe.php index d47aae57..db43d134 100644 --- a/becomemembertribe.php +++ b/becomemembertribe.php @@ -19,7 +19,7 @@ use XoopsModules\Yogurt; -require __DIR__.'/header.php'; +require __DIR__ . '/header.php'; //include_once __DIR__ . '/class/Friendpetition.php'; //include_once __DIR__ . '/class/Reltribeuser.php'; @@ -41,16 +41,16 @@ $criteria = new \CriteriaCompo($criteria_uid); $criteria->add($criteria_tribe_id); if ($reltribeuserFactory->getCount($criteria) < 1) { - $reltribeuser = $reltribeuserFactory->create(); - $reltribeuser->setVar('rel_tribe_id', $tribe_id); - $reltribeuser->setVar('rel_user_uid', $uid); - if ($reltribeuserFactory->insert($reltribeuser)) { - redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERNOW); - } else { - redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); - } + $reltribeuser = $reltribeuserFactory->create(); + $reltribeuser->setVar('rel_tribe_id', $tribe_id); + $reltribeuser->setVar('rel_user_uid', $uid); + if ($reltribeuserFactory->insert($reltribeuser)) { + redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERNOW); + } else { + redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); + } } else { - redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERALREADY); + redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERALREADY); } -include __DIR__.'/../../footer.php'; +include __DIR__ . '/../../footer.php'; diff --git a/blocks/blocks.php b/blocks/blocks.php index bb635c3c..e5b51148 100644 --- a/blocks/blocks.php +++ b/blocks/blocks.php @@ -20,7 +20,7 @@ use XoopsModules\Yogurt; if (!defined('XOOPS_ROOT_PATH')) { - exit(); + exit(); } //include_once(XOOPS_ROOT_PATH."/class/criteria.php"); //include_once XOOPS_ROOT_PATH . '/modules/yogurt/class/Friendship.php'; @@ -32,27 +32,27 @@ */ function b_yogurt_friends_show($options) { - global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser; - $myts = MyTextSanitizer::getInstance(); - $block = []; - - if (!empty($xoopsUser)) { - /** - * Filter for fetch votes ishot and isnothot - */ - - $criteria_2 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); - - /** - * Creating factories of pictures and votes - */ - //$albumFactory = new ImagesHandler($xoopsDB); - $friendsFactory = new Yogurt\FriendshipHandler($xoopsDB); - - $block['friends'] = $friendsFactory->getFriends($options[0], $criteria_2, 0); - } - $block['lang_allfriends'] = _MB_YOG_ALLFRIENDS; - return $block; + global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser; + $myts = MyTextSanitizer::getInstance(); + $block = []; + + if (!empty($xoopsUser)) { + /** + * Filter for fetch votes ishot and isnothot + */ + + $criteria_2 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); + + /** + * Creating factories of pictures and votes + */ + //$albumFactory = new ImagesHandler($xoopsDB); + $friendsFactory = new Yogurt\FriendshipHandler($xoopsDB); + + $block['friends'] = $friendsFactory->getFriends($options[0], $criteria_2, 0); + } + $block['lang_allfriends'] = _MB_YOG_ALLFRIENDS; + return $block; } /** @@ -61,9 +61,9 @@ function b_yogurt_friends_show($options) */ function b_yogurt_friends_edit($options) { - $form = ""; + $form = ""; - return $form; + return $form; } /** @@ -72,28 +72,28 @@ function b_yogurt_friends_edit($options) */ function b_yogurt_lastpictures_show($options) { - global $xoopsDB, $xoopsModule, $xoopsModuleConfig; - $myts = MyTextSanitizer::getInstance(); - $block = []; + global $xoopsDB, $xoopsModule, $xoopsModuleConfig; + $myts = MyTextSanitizer::getInstance(); + $block = []; - /** - * Filter for fetch votes ishot and isnothot - */ + /** + * Filter for fetch votes ishot and isnothot + */ - $criteria = new \Criteria('cod_img', 0, '>'); - $criteria->setSort('cod_img'); - $criteria->setOrder('DESC'); - $criteria->setLimit($options[0]); + $criteria = new \Criteria('cod_img', 0, '>'); + $criteria->setSort('cod_img'); + $criteria->setOrder('DESC'); + $criteria->setLimit($options[0]); - /** - * Creating factories of pictures and votes - */ - //$albumFactory = new ImagesHandler($xoopsDB); - $picturesFactory = new Yogurt\ImageHandler($xoopsDB); + /** + * Creating factories of pictures and votes + */ + //$albumFactory = new ImagesHandler($xoopsDB); + $picturesFactory = new Yogurt\ImageHandler($xoopsDB); - $block = $picturesFactory->getLastPicturesForBlock($options[0]); + $block = $picturesFactory->getLastPicturesForBlock($options[0]); - return $block; + return $block; } /** @@ -102,7 +102,7 @@ function b_yogurt_lastpictures_show($options) */ function b_yogurt_lastpictures_edit($options) { - $form = ""; + $form = ""; - return $form; + return $form; } diff --git a/class/Audio.php b/class/Audio.php index b904c360..7d8922b1 100644 --- a/class/Audio.php +++ b/class/Audio.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; /** * Audio class. @@ -17,84 +17,84 @@ */ class Audio extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Audio constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('audio_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('author', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('uid_owner', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('data_creation', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('data_update', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Audio constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('audio_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('author', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('uid_owner', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('data_creation', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('data_update', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_audios($criteria = [], $asobject = false, $sort = 'audio_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT audio_id FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_audio_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Yogurt\Audio($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_audios($criteria = [], $asobject = false, $sort = 'audio_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT audio_id FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_audio_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Yogurt\Audio($myrow); + } + } + return $ret; + } } diff --git a/class/AudioHandler.php b/class/AudioHandler.php index 73d41480..9e236a51 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; // ------------------------------------------------------------------------- // ------------------yogurt_audio user handler class ------------------- @@ -21,247 +21,247 @@ class AudioHandler extends \XoopsObjectHandler { - /** - * create a new Audio - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject yogurt_audio - */ - public function create($isNew = true) - { - $yogurtAudio = new Yogurt\Audio(); - if ($isNew) { - $yogurtAudio->setNew(); - } else { - $yogurtAudio->unsetNew(); - } + /** + * create a new Audio + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject yogurt_audio + */ + public function create($isNew = true) + { + $yogurtAudio = new Yogurt\Audio(); + if ($isNew) { + $yogurtAudio->setNew(); + } else { + $yogurtAudio->unsetNew(); + } - return $yogurtAudio; - } + return $yogurtAudio; + } - /** - * retrieve a yogurt_audio - * - * @param int $id of the yogurt_audio - * @return mixed reference to the {@link yogurt_audio} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurtAudio = new Yogurt\Audio(); - $yogurtAudio->assignVars($this->db->fetchArray($result)); - return $yogurtAudio; - } - return false; - } + /** + * retrieve a yogurt_audio + * + * @param int $id of the yogurt_audio + * @return mixed reference to the {@link yogurt_audio} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurtAudio = new Yogurt\Audio(); + $yogurtAudio->assignVars($this->db->fetchArray($result)); + return $yogurtAudio; + } + return false; + } - /** - * insert a new Audio in the database - * - * @param \XoopsObject $yogurtAudio reference to the {@link yogurt_audio} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurtAudio, $force = false) - { - global $xoopsConfig; - if ('yogurt_audio' != get_class($yogurtAudio)) { - return false; - } - if (!$yogurtAudio->isDirty()) { - return true; - } - if (!$yogurtAudio->cleanVars()) { - return false; - } - foreach ($yogurtAudio->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurtAudio->isNew()) { - // ajout/modification d'un yogurt_audio - $yogurtAudio = new Yogurt\Audio(); - $format = 'INSERT INTO %s (audio_id, title, author, url, uid_owner, data_creation, data_update)'; - $format .= ' VALUES (%u, %s, %s, %s, %u, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'audio_id=%u, title=%s, author=%s, url=%s, uid_owner=%u, data_creation=%s, data_update=%s'; - $format .= ' WHERE audio_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now, $audio_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($audio_id)) { - $audio_id = $this->db->getInsertId(); - } - $yogurtAudio->assignVar('audio_id', $audio_id); - return true; - } + /** + * insert a new Audio in the database + * + * @param \XoopsObject $yogurtAudio reference to the {@link yogurt_audio} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurtAudio, $force = false) + { + global $xoopsConfig; + if ('yogurt_audio' != get_class($yogurtAudio)) { + return false; + } + if (!$yogurtAudio->isDirty()) { + return true; + } + if (!$yogurtAudio->cleanVars()) { + return false; + } + foreach ($yogurtAudio->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurtAudio->isNew()) { + // ajout/modification d'un yogurt_audio + $yogurtAudio = new Yogurt\Audio(); + $format = 'INSERT INTO %s (audio_id, title, author, url, uid_owner, data_creation, data_update)'; + $format .= ' VALUES (%u, %s, %s, %s, %u, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'audio_id=%u, title=%s, author=%s, url=%s, uid_owner=%u, data_creation=%s, data_update=%s'; + $format .= ' WHERE audio_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now, $audio_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($audio_id)) { + $audio_id = $this->db->getInsertId(); + } + $yogurtAudio->assignVar('audio_id', $audio_id); + return true; + } - /** - * delete a yogurt_audio from the database - * - * @param \XoopsObject $yogurtAudio reference to the yogurt_audio to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurtAudio, $force = false) - { - if ('yogurt_audio' != get_class($yogurtAudio)) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE audio_id = %u', $this->db->prefix('yogurt_audio'), $yogurtAudio->getVar('audio_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a yogurt_audio from the database + * + * @param \XoopsObject $yogurtAudio reference to the yogurt_audio to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurtAudio, $force = false) + { + if ('yogurt_audio' != get_class($yogurtAudio)) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE audio_id = %u', $this->db->prefix('yogurt_audio'), $yogurtAudio->getVar('audio_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_audios from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link yogurt_audio} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurtAudio = new Yogurt\Audio(); - $yogurtAudio->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurtAudio; - } else { - $ret[$myrow['audio_id']] =& $yogurtAudio; - } - unset($yogurtAudio); - } - return $ret; - } + /** + * retrieve yogurt_audios from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link yogurt_audio} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurtAudio = new Yogurt\Audio(); + $yogurtAudio->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurtAudio; + } else { + $ret[$myrow['audio_id']] =& $yogurtAudio; + } + unset($yogurtAudio); + } + return $ret; + } - /** - * count yogurt_audios matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_audios - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_audio'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_audios matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_audios + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_audio'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_audios matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_audio'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_audios matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_audio'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } - /** - * Upload the file and Save into database - * - * @param text $title A litle description of the file - * @param text $path_upload The path to where the file should be uploaded - * @param text $author the author of the music or audio file - * @param $maxfilebytes - * @return bool FALSE if upload fails or database fails - */ - public function receiveAudio($title, $path_upload, $author, $maxfilebytes) - { - global $xoopsUser, $xoopsDB, $_POST, $_FILES; - //busca id do user logado - $uid = $xoopsUser->getVar('uid'); - //create a hash so it does not erase another file - //$hash1 = date(); - //$hash = substr($hash1,0,4); + /** + * Upload the file and Save into database + * + * @param text $title A litle description of the file + * @param text $path_upload The path to where the file should be uploaded + * @param text $author the author of the music or audio file + * @param $maxfilebytes + * @return bool FALSE if upload fails or database fails + */ + public function receiveAudio($title, $path_upload, $author, $maxfilebytes) + { + global $xoopsUser, $xoopsDB, $_POST, $_FILES; + //busca id do user logado + $uid = $xoopsUser->getVar('uid'); + //create a hash so it does not erase another file + //$hash1 = date(); + //$hash = substr($hash1,0,4); - // mimetypes and settings put this in admin part later - $allowed_mimetypes = ['audio/mp3', 'audio/x-mp3', 'audio/mpeg']; - $maxfilesize = $maxfilebytes; + // mimetypes and settings put this in admin part later + $allowed_mimetypes = ['audio/mp3', 'audio/x-mp3', 'audio/mpeg']; + $maxfilesize = $maxfilebytes; - // create the object to upload - $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize); - // fetch the media - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - //lets create a name for it - $uploader->setPrefix('aud_' . $uid . '_'); - //now let s upload the file - if (!$uploader->upload()) { - // if there are errors lets return them - echo '

' . $uploader->getErrors() . '

'; - return false; - } else { - // now let s create a new object audio and set its variables - //echo "passei aqui"; - $audio = $this->create(); - $url = $uploader->getSavedFileName(); - $audio->setVar('url', $url); - $audio->setVar('title', $title); - $audio->setVar('author', $author); - $uid = $xoopsUser->getVar('uid'); - $audio->setVar('uid_owner', $uid); - $this->insert($audio); - $saved_destination = $uploader->getSavedDestination(); - //print_r($_FILES); - } - } else { - echo '

' . $uploader->getErrors() . '

'; - return false; - } - return true; - } + // create the object to upload + $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize); + // fetch the media + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + //lets create a name for it + $uploader->setPrefix('aud_' . $uid . '_'); + //now let s upload the file + if (!$uploader->upload()) { + // if there are errors lets return them + echo '

' . $uploader->getErrors() . '

'; + return false; + } else { + // now let s create a new object audio and set its variables + //echo "passei aqui"; + $audio = $this->create(); + $url = $uploader->getSavedFileName(); + $audio->setVar('url', $url); + $audio->setVar('title', $title); + $audio->setVar('author', $author); + $uid = $xoopsUser->getVar('uid'); + $audio->setVar('uid_owner', $uid); + $this->insert($audio); + $saved_destination = $uploader->getSavedDestination(); + //print_r($_FILES); + } + } else { + echo '

' . $uploader->getErrors() . '

'; + return false; + } + return true; + } } diff --git a/class/Configs.php b/class/Configs.php index 350f4208..fc44c3cb 100644 --- a/class/Configs.php +++ b/class/Configs.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Configs class. @@ -16,92 +16,92 @@ */ class Configs extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Configs constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('config_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('config_uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('pictures', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('audio', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('videos', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('tribes', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Notes', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('friends', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('profile_contact', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('profile_general', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('profile_stats', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('suspension', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('backup_password', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('backup_email', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('end_suspension', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Configs constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('config_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('config_uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('pictures', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('audio', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('videos', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('tribes', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('Notes', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('friends', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('profile_contact', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('profile_general', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('profile_stats', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('suspension', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('backup_password', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('backup_email', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('end_suspension', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_configss($criteria = [], $asobject = false, $sort = 'config_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT config_id FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_configs_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Configs($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_configss($criteria = [], $asobject = false, $sort = 'config_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT config_id FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_configs_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Configs($myrow); + } + } + return $ret; + } } diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index 10953a7a..2ec4a26c 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Configs user handler class ------------------- @@ -20,230 +20,230 @@ class ConfigsHandler extends \XoopsObjectHandler { - /** - * create a new Configs - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Configs - */ - public function create($isNew = true) - { - $yogurt_configs = new Configs(); - if ($isNew) { - $yogurt_configs->setNew(); - } else { - $yogurt_configs->unsetNew(); - } + /** + * create a new Configs + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Configs + */ + public function create($isNew = true) + { + $yogurt_configs = new Configs(); + if ($isNew) { + $yogurt_configs->setNew(); + } else { + $yogurt_configs->unsetNew(); + } - return $yogurt_configs; - } + return $yogurt_configs; + } - /** - * retrieve a Configs - * - * @param int $id of the Configs - * @return mixed reference to the {@link Configs} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_configs = new Configs(); - $yogurt_configs->assignVars($this->db->fetchArray($result)); - return $yogurt_configs; - } - return false; - } + /** + * retrieve a Configs + * + * @param int $id of the Configs + * @return mixed reference to the {@link Configs} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_configs = new Configs(); + $yogurt_configs->assignVars($this->db->fetchArray($result)); + return $yogurt_configs; + } + return false; + } - /** - * insert a new Configs in the database - * - * @param \XoopsObject $yogurt_configs reference to the {@link Configs} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_configs, $force = false) - { - global $xoopsConfig; - if (!$yogurt_configs instanceof \Configs) { - return false; - } - if (!$yogurt_configs->isDirty()) { - return true; - } - if (!$yogurt_configs->cleanVars()) { - return false; - } - foreach ($yogurt_configs->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_configs->isNew()) { - // ajout/modification d'un Configs - $yogurt_configs = new Configs(); - $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, Notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; - $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %s)'; - $sql = sprintf( - $format, - $this->db->prefix('yogurt_configs'), - $config_id, - $config_uid, - $pictures, - $audio, - $videos, - $tribes, - $Notes, - $friends, - $profile_contact, - $profile_general, - $profile_stats, - $suspension, - $this->db->quoteString($backup_password), - $this->db->quoteString($backup_email), - $this->db->quoteString($end_suspension) - ); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'config_id=%u, config_uid=%u, pictures=%u, audio=%u, videos=%u, tribes=%u, Notes=%u, friends=%u, profile_contact=%u, profile_general=%u, profile_stats=%u, suspension=%u, backup_password=%s, backup_email=%s, end_suspension=%s'; - $format .= ' WHERE config_id = %u'; - $sql = sprintf( - $format, - $this->db->prefix('yogurt_configs'), - $config_id, - $config_uid, - $pictures, - $audio, - $videos, - $tribes, - $Notes, - $friends, - $profile_contact, - $profile_general, - $profile_stats, - $suspension, - $this->db->quoteString($backup_password), - $this->db->quoteString($backup_email), - $this->db->quoteString($end_suspension), - $config_id - ); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($config_id)) { - $config_id = $this->db->getInsertId(); - } - $yogurt_configs->assignVar('config_id', $config_id); - return true; - } + /** + * insert a new Configs in the database + * + * @param \XoopsObject $yogurt_configs reference to the {@link Configs} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_configs, $force = false) + { + global $xoopsConfig; + if (!$yogurt_configs instanceof \Configs) { + return false; + } + if (!$yogurt_configs->isDirty()) { + return true; + } + if (!$yogurt_configs->cleanVars()) { + return false; + } + foreach ($yogurt_configs->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_configs->isNew()) { + // ajout/modification d'un Configs + $yogurt_configs = new Configs(); + $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, Notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; + $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %s)'; + $sql = sprintf( + $format, + $this->db->prefix('yogurt_configs'), + $config_id, + $config_uid, + $pictures, + $audio, + $videos, + $tribes, + $Notes, + $friends, + $profile_contact, + $profile_general, + $profile_stats, + $suspension, + $this->db->quoteString($backup_password), + $this->db->quoteString($backup_email), + $this->db->quoteString($end_suspension) + ); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'config_id=%u, config_uid=%u, pictures=%u, audio=%u, videos=%u, tribes=%u, Notes=%u, friends=%u, profile_contact=%u, profile_general=%u, profile_stats=%u, suspension=%u, backup_password=%s, backup_email=%s, end_suspension=%s'; + $format .= ' WHERE config_id = %u'; + $sql = sprintf( + $format, + $this->db->prefix('yogurt_configs'), + $config_id, + $config_uid, + $pictures, + $audio, + $videos, + $tribes, + $Notes, + $friends, + $profile_contact, + $profile_general, + $profile_stats, + $suspension, + $this->db->quoteString($backup_password), + $this->db->quoteString($backup_email), + $this->db->quoteString($end_suspension), + $config_id + ); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($config_id)) { + $config_id = $this->db->getInsertId(); + } + $yogurt_configs->assignVar('config_id', $config_id); + return true; + } - /** - * delete a Configs from the database - * - * @param \XoopsObject $yogurt_configs reference to the Configs to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_configs, $force = false) - { - if (!$yogurt_configs instanceof \Configs) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE config_id = %u', $this->db->prefix('yogurt_configs'), $yogurt_configs->getVar('config_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Configs from the database + * + * @param \XoopsObject $yogurt_configs reference to the Configs to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_configs, $force = false) + { + if (!$yogurt_configs instanceof \Configs) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE config_id = %u', $this->db->prefix('yogurt_configs'), $yogurt_configs->getVar('config_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_configss from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Configs} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_configs = new Configs(); - $yogurt_configs->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_configs; - } else { - $ret[$myrow['config_id']] =& $yogurt_configs; - } - unset($yogurt_configs); - } - return $ret; - } + /** + * retrieve yogurt_configss from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Configs} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_configs = new Configs(); + $yogurt_configs->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_configs; + } else { + $ret[$myrow['config_id']] =& $yogurt_configs; + } + unset($yogurt_configs); + } + return $ret; + } - /** - * count yogurt_configss matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_configss - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_configs'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_configss matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_configss + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_configs'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_configss matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_configs'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_configss matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_configs'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } } diff --git a/class/ControlerConfigs.php b/class/ControlerConfigs.php index f3747118..80976bf3 100644 --- a/class/ControlerConfigs.php +++ b/class/ControlerConfigs.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -47,11 +47,11 @@ */ class ControlerConfigs extends YogurtControler { - /** - * @return bool|void - */ - public function checkPrivilege() - { - return true; - } + /** + * @return bool|void + */ + public function checkPrivilege() + { + return true; + } } diff --git a/class/ControlerFriends.php b/class/ControlerFriends.php index d4e73ea8..af1d89d0 100644 --- a/class/ControlerFriends.php +++ b/class/ControlerFriends.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -47,25 +47,25 @@ */ class ControlerFriends extends YogurtControler { - /** - * @return bool|void - */ - public function checkPrivilege() - { - global $xoopsModuleConfig; - if (0 == $xoopsModuleConfig['enable_friends']) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_FRIENDSNOTENABLED); - } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + /** + * @return bool|void + */ + public function checkPrivilege() + { + global $xoopsModuleConfig; + if (0 == $xoopsModuleConfig['enable_friends']) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_FRIENDSNOTENABLED); + } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('friends'); + $config = $configs[0]->getVar('friends'); - if (!$this->checkPrivilegeLevel($config)) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); - } - } - return true; - } + if (!$this->checkPrivilegeLevel($config)) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); + } + } + return true; + } } diff --git a/class/ControlerIndex.php b/class/ControlerIndex.php index e5eee57b..0f0f9a31 100644 --- a/class/ControlerIndex.php +++ b/class/ControlerIndex.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -47,43 +47,43 @@ */ class ControlerIndex extends YogurtControler { - /** - * @param null|string $section - * @return int|void - */ - public function checkPrivilege($section = null) - { - global $xoopsModuleConfig; - if ('' == trim($section)) { - return -1; - } - $configsectionname = 'enable_' . $section; - if (array_key_exists($configsectionname, $xoopsModuleConfig)) { - if (0 == $xoopsModuleConfig[$configsectionname]) { - return -1; - } - } + /** + * @param null|string $section + * @return int|void + */ + public function checkPrivilege($section = null) + { + global $xoopsModuleConfig; + if ('' == trim($section)) { + return -1; + } + $configsectionname = 'enable_' . $section; + if (array_key_exists($configsectionname, $xoopsModuleConfig)) { + if (0 == $xoopsModuleConfig[$configsectionname]) { + return -1; + } + } - // if ($section=="Notes" && $xoopsModuleConfig['enable_notes']==0){ - // return false; - // } - // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ - // return false; - // } - // - // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ - // return false; - // } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + // if ($section=="Notes" && $xoopsModuleConfig['enable_notes']==0){ + // return false; + // } + // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ + // return false; + // } + // + // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ + // return false; + // } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar($section); + $config = $configs[0]->getVar($section); - if (!$this->checkPrivilegeLevel($config)) { - return 0; - } - } - return 1; - } + if (!$this->checkPrivilegeLevel($config)) { + return 0; + } + } + return 1; + } } diff --git a/class/ControlerNotes.php b/class/ControlerNotes.php index 72c0c07e..577185f1 100644 --- a/class/ControlerNotes.php +++ b/class/ControlerNotes.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -48,70 +48,70 @@ class ControlerNotes extends YogurtControler { - // function renderFormNewPost($tpl){ - // - // - // - // $form = new XoopsThemeForm("",'formNoteNew','submit_Note.php','post',true); - // $fieldNote = new XoopsFormTextArea('','text',_MD_YOGURT_ENTERTEXTNOTE); - // $fieldNote->setExtra(' onclick="cleanNoteForm(text,\''._MD_YOGURT_ENTERTEXTNOTE.'\')"'); - // - // - // $fieldScrabookUid = new XoopsFormHidden ("uid", $this->uidOwner); - // - // $submitButton = new XoopsFormButton("","post_Note",_MD_YOGURT_SENDNOTE,"submit"); - // - // $form->addElement($fieldScrabookUid); - // $form->addElement($fieldNote,true); - // $form->addElement($submitButton); - // - // //$form->display(); - // $form->assign($tpl); - // } + // function renderFormNewPost($tpl){ + // + // + // + // $form = new XoopsThemeForm("",'formNoteNew','submit_Note.php','post',true); + // $fieldNote = new XoopsFormTextArea('','text',_MD_YOGURT_ENTERTEXTNOTE); + // $fieldNote->setExtra(' onclick="cleanNoteForm(text,\''._MD_YOGURT_ENTERTEXTNOTE.'\')"'); + // + // + // $fieldScrabookUid = new XoopsFormHidden ("uid", $this->uidOwner); + // + // $submitButton = new XoopsFormButton("","post_Note",_MD_YOGURT_SENDNOTE,"submit"); + // + // $form->addElement($fieldScrabookUid); + // $form->addElement($fieldNote,true); + // $form->addElement($submitButton); + // + // //$form->display(); + // $form->assign($tpl); + // } - /** - * @param $nb_Notes - * @param $criteria - * @return bool - */ - public function fecthNotes($nb_Notes, $criteria) - { - $Notes = $this->NotesFactory->getNotes($nb_Notes, $criteria); - if ($Notes) { - return $Notes; - } else { - return false; - } - } + /** + * @param $nb_Notes + * @param $criteria + * @return bool + */ + public function fecthNotes($nb_Notes, $criteria) + { + $Notes = $this->NotesFactory->getNotes($nb_Notes, $criteria); + if ($Notes) { + return $Notes; + } else { + return false; + } + } - /** - * @param string $privilegeType - * @return bool|void - */ - public function checkPrivilege($privilegeType = '') - { - global $xoopsModuleConfig; - if (0 == $xoopsModuleConfig['enable_notes']) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_NOTESNOTENABLED); - } - if ('sendNotes' == $privilegeType) { - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + /** + * @param string $privilegeType + * @return bool|void + */ + public function checkPrivilege($privilegeType = '') + { + global $xoopsModuleConfig; + if (0 == $xoopsModuleConfig['enable_notes']) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_NOTESNOTENABLED); + } + if ('sendNotes' == $privilegeType) { + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('sendNotes'); - } - } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + $config = $configs[0]->getVar('sendNotes'); + } + } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('Notes'); + $config = $configs[0]->getVar('Notes'); - if (!$this->checkPrivilegeLevel($config)) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); - } - } - return true; - } + if (!$this->checkPrivilegeLevel($config)) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); + } + } + return true; + } } diff --git a/class/ControlerPhotos.php b/class/ControlerPhotos.php index 1c47643d..57cba9ad 100644 --- a/class/ControlerPhotos.php +++ b/class/ControlerPhotos.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -47,25 +47,25 @@ */ class ControlerPhotos extends YogurtControler { - /** - * @return bool|void - */ - public function checkPrivilege() - { - global $xoopsModuleConfig; - if (0 == $xoopsModuleConfig['enable_pictures']) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_PICTURESNOTENABLED); - } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + /** + * @return bool|void + */ + public function checkPrivilege() + { + global $xoopsModuleConfig; + if (0 == $xoopsModuleConfig['enable_pictures']) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_PICTURESNOTENABLED); + } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('pictures'); + $config = $configs[0]->getVar('pictures'); - if (!$this->checkPrivilegeLevel($config)) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); - } - } - return true; - } + if (!$this->checkPrivilegeLevel($config)) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); + } + } + return true; + } } diff --git a/class/ControlerTribes.php b/class/ControlerTribes.php index 3700c58b..35fa7daf 100644 --- a/class/ControlerTribes.php +++ b/class/ControlerTribes.php @@ -20,9 +20,9 @@ * @since */ -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/class/criteria.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/criteria.php'; include_once '../../class/pagenav.php'; /** * Module classes @@ -39,7 +39,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once 'class/class.Id3v1.php'; } /** @@ -47,25 +47,25 @@ */ class ControlerTribes extends YogurtControler { - /** - * @return bool|void - */ - public function checkPrivilege() - { - global $xoopsModuleConfig; - if (0 == $xoopsModuleConfig['enable_tribes']) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_TRIBESNOTENABLED); - } - $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); - if (1 == $this->configsFactory->getCount($criteria)) { - $configs = $this->configsFactory->getObjects($criteria); + /** + * @return bool|void + */ + public function checkPrivilege() + { + global $xoopsModuleConfig; + if (0 == $xoopsModuleConfig['enable_tribes']) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 3, _MD_YOGURT_TRIBESNOTENABLED); + } + $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); + if (1 == $this->configsFactory->getCount($criteria)) { + $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('tribes'); + $config = $configs[0]->getVar('tribes'); - if (!$this->checkPrivilegeLevel($config)) { - redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); - } - } - return true; - } + if (!$this->checkPrivilegeLevel($config)) { + redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); + } + } + return true; + } } diff --git a/class/Friendpetition.php b/class/Friendpetition.php index 1bb4cb21..51cf723d 100644 --- a/class/Friendpetition.php +++ b/class/Friendpetition.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Friendpetition class. @@ -16,80 +16,80 @@ */ class Friendpetition extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Friendpetition constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('friendpet_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('petitioner_uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('petioned_uid', XOBJ_DTYPE_INT, null, false, 10); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Friendpetition constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('friendpet_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('petitioner_uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('petioned_uid', XOBJ_DTYPE_INT, null, false, 10); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_friendpetitions($criteria = [], $asobject = false, $sort = 'friendpet_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT friendpet_id FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_friendpetition_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Friendpetition($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_friendpetitions($criteria = [], $asobject = false, $sort = 'friendpet_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT friendpet_id FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_friendpetition_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Friendpetition($myrow); + } + } + return $ret; + } } diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index daef6839..0ff011a9 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Friendpetition user handler class ------------------- @@ -20,193 +20,193 @@ class FriendpetitionHandler extends \XoopsObjectHandler { - /** - * create a new Friendpetition - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Friendpetition - */ - public function create($isNew = true) - { - $yogurt_friendpetition = new Friendpetition(); - if ($isNew) { - $yogurt_friendpetition->setNew(); - } else { - $yogurt_friendpetition->unsetNew(); - } + /** + * create a new Friendpetition + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Friendpetition + */ + public function create($isNew = true) + { + $yogurt_friendpetition = new Friendpetition(); + if ($isNew) { + $yogurt_friendpetition->setNew(); + } else { + $yogurt_friendpetition->unsetNew(); + } - return $yogurt_friendpetition; - } + return $yogurt_friendpetition; + } - /** - * retrieve a Friendpetition - * - * @param int $id of the Friendpetition - * @return mixed reference to the {@link Friendpetition} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_friendpetition = new Friendpetition(); - $yogurt_friendpetition->assignVars($this->db->fetchArray($result)); - return $yogurt_friendpetition; - } - return false; - } + /** + * retrieve a Friendpetition + * + * @param int $id of the Friendpetition + * @return mixed reference to the {@link Friendpetition} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_friendpetition = new Friendpetition(); + $yogurt_friendpetition->assignVars($this->db->fetchArray($result)); + return $yogurt_friendpetition; + } + return false; + } - /** - * insert a new Friendpetition in the database - * - * @param \XoopsObject $yogurt_friendpetition reference to the {@link Friendpetition} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_friendpetition, $force = false) - { - global $xoopsConfig; - if (!$yogurt_friendpetition instanceof \Friendpetition) { - return false; - } - if (!$yogurt_friendpetition->isDirty()) { - return true; - } - if (!$yogurt_friendpetition->cleanVars()) { - return false; - } - foreach ($yogurt_friendpetition->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_friendpetition->isNew()) { - // ajout/modification d'un Friendpetition - $yogurt_friendpetition = new Friendpetition(); - $format = 'INSERT INTO %s (friendpet_id, petitioner_uid, petioned_uid)'; - $format .= 'VALUES (%u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'friendpet_id=%u, petitioner_uid=%u, petioned_uid=%u'; - $format .= ' WHERE friendpet_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid, $friendpet_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($friendpet_id)) { - $friendpet_id = $this->db->getInsertId(); - } - $yogurt_friendpetition->assignVar('friendpet_id', $friendpet_id); - return true; - } + /** + * insert a new Friendpetition in the database + * + * @param \XoopsObject $yogurt_friendpetition reference to the {@link Friendpetition} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_friendpetition, $force = false) + { + global $xoopsConfig; + if (!$yogurt_friendpetition instanceof \Friendpetition) { + return false; + } + if (!$yogurt_friendpetition->isDirty()) { + return true; + } + if (!$yogurt_friendpetition->cleanVars()) { + return false; + } + foreach ($yogurt_friendpetition->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_friendpetition->isNew()) { + // ajout/modification d'un Friendpetition + $yogurt_friendpetition = new Friendpetition(); + $format = 'INSERT INTO %s (friendpet_id, petitioner_uid, petioned_uid)'; + $format .= 'VALUES (%u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'friendpet_id=%u, petitioner_uid=%u, petioned_uid=%u'; + $format .= ' WHERE friendpet_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid, $friendpet_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($friendpet_id)) { + $friendpet_id = $this->db->getInsertId(); + } + $yogurt_friendpetition->assignVar('friendpet_id', $friendpet_id); + return true; + } - /** - * delete a Friendpetition from the database - * - * @param \XoopsObject $yogurt_friendpetition reference to the Friendpetition to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_friendpetition, $force = false) - { - if (!$yogurt_friendpetition instanceof \Friendpetition) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE friendpet_id = %u', $this->db->prefix('yogurt_friendpetition'), $yogurt_friendpetition->getVar('friendpet_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Friendpetition from the database + * + * @param \XoopsObject $yogurt_friendpetition reference to the Friendpetition to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_friendpetition, $force = false) + { + if (!$yogurt_friendpetition instanceof \Friendpetition) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE friendpet_id = %u', $this->db->prefix('yogurt_friendpetition'), $yogurt_friendpetition->getVar('friendpet_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_friendpetitions from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Friendpetition} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_friendpetition = new Friendpetition(); - $yogurt_friendpetition->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_friendpetition; - } else { - $ret[$myrow['friendpet_id']] =& $yogurt_friendpetition; - } - unset($yogurt_friendpetition); - } - return $ret; - } + /** + * retrieve yogurt_friendpetitions from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Friendpetition} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_friendpetition = new Friendpetition(); + $yogurt_friendpetition->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_friendpetition; + } else { + $ret[$myrow['friendpet_id']] =& $yogurt_friendpetition; + } + unset($yogurt_friendpetition); + } + return $ret; + } - /** - * count yogurt_friendpetitions matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_friendpetitions - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_friendpetition'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_friendpetitions matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_friendpetitions + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_friendpetition'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_friendpetitions matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_friendpetition'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_friendpetitions matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_friendpetition'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } } diff --git a/class/Friendship.php b/class/Friendship.php index 931f639f..b2e59198 100644 --- a/class/Friendship.php +++ b/class/Friendship.php @@ -7,14 +7,14 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Friendship class. @@ -23,85 +23,85 @@ */ class Friendship extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Friendship constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('friendship_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('friend1_uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('friend2_uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('level', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('hot', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('trust', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('cool', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('fan', XOBJ_DTYPE_INT, null, false, 10); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Friendship constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('friendship_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('friend1_uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('friend2_uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('level', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('hot', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('trust', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('cool', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('fan', XOBJ_DTYPE_INT, null, false, 10); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_friendships($criteria = [], $asobject = false, $sort = 'friendship_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT friendship_id FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_friendship_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Friendship($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_friendships($criteria = [], $asobject = false, $sort = 'friendship_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT friendship_id FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_friendship_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Friendship($myrow); + } + } + return $ret; + } } diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index 77e17aa6..731c46ff 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -7,14 +7,14 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Friendship user handler class ------------------- @@ -27,394 +27,394 @@ class FriendshipHandler extends \XoopsObjectHandler { - /** - * create a new Friendship - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Friendship - */ - public function create($isNew = true) - { - $yogurt_friendship = new Friendship(); - if ($isNew) { - $yogurt_friendship->setNew(); - } else { - $yogurt_friendship->unsetNew(); - } - - return $yogurt_friendship; - } - - /** - * retrieve a Friendship - * - * @param int $id of the Friendship - * @return mixed reference to the {@link Friendship} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_friendship = new Friendship(); - $yogurt_friendship->assignVars($this->db->fetchArray($result)); - return $yogurt_friendship; - } - return false; - } - - /** - * insert a new Friendship in the database - * - * @param \XoopsObject $yogurt_friendship reference to the {@link Friendship} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_friendship, $force = false) - { - global $xoopsConfig; - if (!$yogurt_friendship instanceof \Friendship) { - return false; - } - if (!$yogurt_friendship->isDirty()) { - return true; - } - if (!$yogurt_friendship->cleanVars()) { - return false; - } - foreach ($yogurt_friendship->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_friendship->isNew()) { - // ajout/modification d'un Friendship - $yogurt_friendship = new Friendship(); - $format = 'INSERT INTO %s (friendship_id, friend1_uid, friend2_uid, LEVEL, hot, trust, cool, fan)'; - $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'friendship_id=%u, friend1_uid=%u, friend2_uid=%u, level=%u, hot=%u, trust=%u, cool=%u, fan=%u'; - $format .= ' WHERE friendship_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan, $friendship_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($friendship_id)) { - $friendship_id = $this->db->getInsertId(); - } - $yogurt_friendship->assignVar('friendship_id', $friendship_id); - return true; - } - - /** - * delete a Friendship from the database - * - * @param \XoopsObject $yogurt_friendship reference to the Friendship to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_friendship, $force = false) - { - if (!$yogurt_friendship instanceof \Friendship) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE friendship_id = %u', $this->db->prefix('yogurt_friendship'), $yogurt_friendship->getVar('friendship_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } - - /** - * retrieve yogurt_friendships from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Friendship} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_friendship = new Friendship(); - $yogurt_friendship->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_friendship; - } else { - $ret[$myrow['friendship_id']] =& $yogurt_friendship; - } - unset($yogurt_friendship); - } - return $ret; - } - - /** - * count yogurt_friendships matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_friendships - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_friendship'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } - - /** - * delete yogurt_friendships matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_friendship'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } - - /** - * @param $nbfriends - * @param null $criteria - * @param int $shuffle - * @return array - */ - public function getFriends($nbfriends, $criteria = null, $shuffle = 1) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, friend2_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - //attention here this is kind of a hack - $sql .= ' AND uid = friend2_uid '; - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; - - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid'] = $myrow['friend2_uid']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $i++; - } - if (1 == $shuffle) { - shuffle($vetor); - $vetor = array_slice($vetor, 0, $nbfriends); - } - return $vetor; - } - } - - /** - * @param $nbfriends - * @param null $criteria - * @param int $shuffle - * @return array - */ - public function getFans($nbfriends, $criteria = null, $shuffle = 1) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, friend1_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - //attention here this is kind of a hack - $sql .= ' AND uid = friend1_uid '; - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; - - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid'] = $myrow['friend1_uid']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $i++; - } - if (1 == $shuffle) { - shuffle($vetor); - $vetor = array_slice($vetor, 0, $nbfriends); - } - return $vetor; - } - } - - /** - * @param $friend - */ - public function renderFormSubmit($friend) - { - global $xoopsUser; - /** - * criteria fetch friendship to be edited - */ - $criteria_friend1 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); - $criteria_friend2 = new \Criteria('friend2_uid', $friend->getVar('uid')); - $criteria_friendship = new \CriteriaCompo($criteria_friend1); - $criteria_friendship->add($criteria_friend2); - $friendships = $this->getObjects($criteria_friendship); - $friendship = $friendships[0]; - - $form = new \XoopsThemeForm(_MD_YOGURT_EDITFRIENDSHIP, 'form_editfriendship', 'editfriendship.php', 'post', true); - //$field_friend_avatar = new XoopsFormLabel(_MD_YOGURT_PHOTO, "getVar('user_avatar')." />"); - if ('blank.gif' == $friend->getVar('user_avatar')) { - $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, ''); - } else { - $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, 'getVar('user_avatar') . ' />'); - } - $field_friend_name = new \XoopsFormLabel(_MD_YOGURT_FRIENDNAME, $friend->getVar('uname')); - - $field_friend_fan = new \XoopsFormRadioYN(_MD_YOGURT_FAN, 'fan', $friendship->getVar('fan'), '' . _YES . '', '' . _NO . ''); - - $field_friend_level = new \XoopsFormRadio(_MD_YOGURT_LEVEL, 'level', $friendship->getVar('level'), '
'); - - $field_friend_level->addOption('1', _MD_YOGURT_UNKNOWNACCEPTED); - $field_friend_level->addOption('3', _MD_YOGURT_AQUAITANCE); - $field_friend_level->addOption('5', _MD_YOGURT_FRIEND); - $field_friend_level->addOption('7', _MD_YOGURT_BESTFRIEND); - - $field_friend_sexy = new \XoopsFormRadio(_MD_YOGURT_SEXY, 'hot', $friendship->getVar('hot')); - $field_friend_sexy->addOption('1', '' . _MD_YOGURT_SEXYNO . ''); - $field_friend_sexy->addOption('2', '' . _MD_YOGURT_SEXYYES . ''); - $field_friend_sexy->addOption('3', '' . _MD_YOGURT_SEXYALOT . ''); - - $field_friend_trusty = new \XoopsFormRadio(_MD_YOGURT_TRUSTY, 'trust', $friendship->getVar('trust')); - $field_friend_trusty->addOption('1', '' . _MD_YOGURT_TRUSTYNO . ''); - $field_friend_trusty->addOption('2', '' . _MD_YOGURT_TRUSTYYES . ''); - $field_friend_trusty->addOption('3', '' . _MD_YOGURT_TRUSTYALOT . ''); - - $field_friend_cool = new \XoopsFormRadio(_MD_YOGURT_COOL, 'cool', $friendship->getVar('cool')); - $field_friend_cool->addOption('1', '' . _MD_YOGURT_COOLNO . ''); - $field_friend_cool->addOption('2', '' . _MD_YOGURT_COOLYES . ''); - $field_friend_cool->addOption('3', '' . _MD_YOGURT_COOLALOT . ''); - - $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPDATEFRIEND, 'submit'); - $field_friend_friendid = new \XoopsFormHidden('friend_uid', $friend->getVar('uid')); - $field_friend_marker = new \XoopsFormHidden('marker', '1'); - $field_friend_friendshio_id = new \XoopsFormHidden('friendship_id', $friendship->getVar('friendship_id')); - $form->addElement($field_friend_friendid); - $form->addElement($field_friend_friendshio_id); - $form->addElement($field_friend_marker); - $form->addElement($field_friend_avatar); - $form->addElement($field_friend_name); - $form->addElement($field_friend_level); - $form->addElement($field_friend_fan); - $form->addElement($field_friend_sexy); - $form->addElement($field_friend_trusty); - $form->addElement($field_friend_cool); - - $form->addElement($button_send); - - $form->display(); //If your server is php 4.4 - } - - /** - * Get the averages of each evaluation hot trusty etc... - * - * @param int $user_uid - * @return array $vetor with averages - */ - - public function getMoyennes($user_uid) - { - global $xoopsUser; - - $vetor = []; - $vetor['mediahot'] = 0; - $vetor['mediatrust'] = 0; - $vetor['mediacool'] = 0; - $vetor['sumfan'] = 0; - - //Calculating avg(hot) - $sql = 'SELECT friend2_uid, Avg(hot) AS mediahot FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (hot>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; - $result = $this->db->query($sql); - while ($myrow = $this->db->fetchArray($result)) { - $vetor['mediahot'] = $myrow['mediahot'] * 16; - } - - //Calculating avg(trust) - $sql = 'SELECT friend2_uid, Avg(trust) AS mediatrust FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (trust>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; - $result = $this->db->query($sql); - while ($myrow = $this->db->fetchArray($result)) { - $vetor['mediatrust'] = $myrow['mediatrust'] * 16; - } - //Calculating avg(cool) - $sql = 'SELECT friend2_uid, Avg(cool) AS mediacool FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (cool>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; - $result = $this->db->query($sql); - while ($myrow = $this->db->fetchArray($result)) { - $vetor['mediacool'] = $myrow['mediacool'] * 16; - } - - //Calculating sum(fans) - $sql = 'SELECT friend2_uid, Sum(fan) AS sumfan FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; - $result = $this->db->query($sql); - while ($myrow = $this->db->fetchArray($result)) { - $vetor['sumfan'] = $myrow['sumfan']; - } - - return $vetor; - } + /** + * create a new Friendship + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Friendship + */ + public function create($isNew = true) + { + $yogurt_friendship = new Friendship(); + if ($isNew) { + $yogurt_friendship->setNew(); + } else { + $yogurt_friendship->unsetNew(); + } + + return $yogurt_friendship; + } + + /** + * retrieve a Friendship + * + * @param int $id of the Friendship + * @return mixed reference to the {@link Friendship} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_friendship = new Friendship(); + $yogurt_friendship->assignVars($this->db->fetchArray($result)); + return $yogurt_friendship; + } + return false; + } + + /** + * insert a new Friendship in the database + * + * @param \XoopsObject $yogurt_friendship reference to the {@link Friendship} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_friendship, $force = false) + { + global $xoopsConfig; + if (!$yogurt_friendship instanceof \Friendship) { + return false; + } + if (!$yogurt_friendship->isDirty()) { + return true; + } + if (!$yogurt_friendship->cleanVars()) { + return false; + } + foreach ($yogurt_friendship->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_friendship->isNew()) { + // ajout/modification d'un Friendship + $yogurt_friendship = new Friendship(); + $format = 'INSERT INTO %s (friendship_id, friend1_uid, friend2_uid, LEVEL, hot, trust, cool, fan)'; + $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'friendship_id=%u, friend1_uid=%u, friend2_uid=%u, level=%u, hot=%u, trust=%u, cool=%u, fan=%u'; + $format .= ' WHERE friendship_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan, $friendship_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($friendship_id)) { + $friendship_id = $this->db->getInsertId(); + } + $yogurt_friendship->assignVar('friendship_id', $friendship_id); + return true; + } + + /** + * delete a Friendship from the database + * + * @param \XoopsObject $yogurt_friendship reference to the Friendship to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_friendship, $force = false) + { + if (!$yogurt_friendship instanceof \Friendship) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE friendship_id = %u', $this->db->prefix('yogurt_friendship'), $yogurt_friendship->getVar('friendship_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * retrieve yogurt_friendships from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Friendship} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_friendship = new Friendship(); + $yogurt_friendship->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_friendship; + } else { + $ret[$myrow['friendship_id']] =& $yogurt_friendship; + } + unset($yogurt_friendship); + } + return $ret; + } + + /** + * count yogurt_friendships matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_friendships + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_friendship'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } + + /** + * delete yogurt_friendships matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_friendship'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + /** + * @param $nbfriends + * @param null $criteria + * @param int $shuffle + * @return array + */ + public function getFriends($nbfriends, $criteria = null, $shuffle = 1) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT uname, user_avatar, friend2_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + //attention here this is kind of a hack + $sql .= ' AND uid = friend2_uid '; + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; + + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid'] = $myrow['friend2_uid']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['user_avatar']; + $i++; + } + if (1 == $shuffle) { + shuffle($vetor); + $vetor = array_slice($vetor, 0, $nbfriends); + } + return $vetor; + } + } + + /** + * @param $nbfriends + * @param null $criteria + * @param int $shuffle + * @return array + */ + public function getFans($nbfriends, $criteria = null, $shuffle = 1) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT uname, user_avatar, friend1_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + //attention here this is kind of a hack + $sql .= ' AND uid = friend1_uid '; + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; + + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid'] = $myrow['friend1_uid']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['user_avatar']; + $i++; + } + if (1 == $shuffle) { + shuffle($vetor); + $vetor = array_slice($vetor, 0, $nbfriends); + } + return $vetor; + } + } + + /** + * @param $friend + */ + public function renderFormSubmit($friend) + { + global $xoopsUser; + /** + * criteria fetch friendship to be edited + */ + $criteria_friend1 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); + $criteria_friend2 = new \Criteria('friend2_uid', $friend->getVar('uid')); + $criteria_friendship = new \CriteriaCompo($criteria_friend1); + $criteria_friendship->add($criteria_friend2); + $friendships = $this->getObjects($criteria_friendship); + $friendship = $friendships[0]; + + $form = new \XoopsThemeForm(_MD_YOGURT_EDITFRIENDSHIP, 'form_editfriendship', 'editfriendship.php', 'post', true); + //$field_friend_avatar = new XoopsFormLabel(_MD_YOGURT_PHOTO, "getVar('user_avatar')." />"); + if ('blank.gif' == $friend->getVar('user_avatar')) { + $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, ''); + } else { + $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, 'getVar('user_avatar') . ' />'); + } + $field_friend_name = new \XoopsFormLabel(_MD_YOGURT_FRIENDNAME, $friend->getVar('uname')); + + $field_friend_fan = new \XoopsFormRadioYN(_MD_YOGURT_FAN, 'fan', $friendship->getVar('fan'), '' . _YES . '', '' . _NO . ''); + + $field_friend_level = new \XoopsFormRadio(_MD_YOGURT_LEVEL, 'level', $friendship->getVar('level'), '
'); + + $field_friend_level->addOption('1', _MD_YOGURT_UNKNOWNACCEPTED); + $field_friend_level->addOption('3', _MD_YOGURT_AQUAITANCE); + $field_friend_level->addOption('5', _MD_YOGURT_FRIEND); + $field_friend_level->addOption('7', _MD_YOGURT_BESTFRIEND); + + $field_friend_sexy = new \XoopsFormRadio(_MD_YOGURT_SEXY, 'hot', $friendship->getVar('hot')); + $field_friend_sexy->addOption('1', '' . _MD_YOGURT_SEXYNO . ''); + $field_friend_sexy->addOption('2', '' . _MD_YOGURT_SEXYYES . ''); + $field_friend_sexy->addOption('3', '' . _MD_YOGURT_SEXYALOT . ''); + + $field_friend_trusty = new \XoopsFormRadio(_MD_YOGURT_TRUSTY, 'trust', $friendship->getVar('trust')); + $field_friend_trusty->addOption('1', '' . _MD_YOGURT_TRUSTYNO . ''); + $field_friend_trusty->addOption('2', '' . _MD_YOGURT_TRUSTYYES . ''); + $field_friend_trusty->addOption('3', '' . _MD_YOGURT_TRUSTYALOT . ''); + + $field_friend_cool = new \XoopsFormRadio(_MD_YOGURT_COOL, 'cool', $friendship->getVar('cool')); + $field_friend_cool->addOption('1', '' . _MD_YOGURT_COOLNO . ''); + $field_friend_cool->addOption('2', '' . _MD_YOGURT_COOLYES . ''); + $field_friend_cool->addOption('3', '' . _MD_YOGURT_COOLALOT . ''); + + $form->setExtra('enctype="multipart/form-data"'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPDATEFRIEND, 'submit'); + $field_friend_friendid = new \XoopsFormHidden('friend_uid', $friend->getVar('uid')); + $field_friend_marker = new \XoopsFormHidden('marker', '1'); + $field_friend_friendshio_id = new \XoopsFormHidden('friendship_id', $friendship->getVar('friendship_id')); + $form->addElement($field_friend_friendid); + $form->addElement($field_friend_friendshio_id); + $form->addElement($field_friend_marker); + $form->addElement($field_friend_avatar); + $form->addElement($field_friend_name); + $form->addElement($field_friend_level); + $form->addElement($field_friend_fan); + $form->addElement($field_friend_sexy); + $form->addElement($field_friend_trusty); + $form->addElement($field_friend_cool); + + $form->addElement($button_send); + + $form->display(); //If your server is php 4.4 + } + + /** + * Get the averages of each evaluation hot trusty etc... + * + * @param int $user_uid + * @return array $vetor with averages + */ + + public function getMoyennes($user_uid) + { + global $xoopsUser; + + $vetor = []; + $vetor['mediahot'] = 0; + $vetor['mediatrust'] = 0; + $vetor['mediacool'] = 0; + $vetor['sumfan'] = 0; + + //Calculating avg(hot) + $sql = 'SELECT friend2_uid, Avg(hot) AS mediahot FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (hot>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $result = $this->db->query($sql); + while ($myrow = $this->db->fetchArray($result)) { + $vetor['mediahot'] = $myrow['mediahot'] * 16; + } + + //Calculating avg(trust) + $sql = 'SELECT friend2_uid, Avg(trust) AS mediatrust FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (trust>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $result = $this->db->query($sql); + while ($myrow = $this->db->fetchArray($result)) { + $vetor['mediatrust'] = $myrow['mediatrust'] * 16; + } + //Calculating avg(cool) + $sql = 'SELECT friend2_uid, Avg(cool) AS mediacool FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (cool>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $result = $this->db->query($sql); + while ($myrow = $this->db->fetchArray($result)) { + $vetor['mediacool'] = $myrow['mediacool'] * 16; + } + + //Calculating sum(fans) + $sql = 'SELECT friend2_uid, Sum(fan) AS sumfan FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $result = $this->db->query($sql); + while ($myrow = $this->db->fetchArray($result)) { + $vetor['sumfan'] = $myrow['sumfan']; + } + + return $vetor; + } } diff --git a/class/Helper.php b/class/Helper.php index b795e8d5..7d6a122a 100644 --- a/class/Helper.php +++ b/class/Helper.php @@ -26,62 +26,62 @@ */ class Helper extends \Xmf\Module\Helper { - public $debug; + public $debug; - /** - * @param bool $debug - */ - public function __construct($debug = false) - { - $this->debug = $debug; - $moduleDirName = basename(dirname(__DIR__)); - parent::__construct($moduleDirName); - } + /** + * @param bool $debug + */ + public function __construct($debug = false) + { + $this->debug = $debug; + $moduleDirName = basename(dirname(__DIR__)); + parent::__construct($moduleDirName); + } - /** - * @param bool $debug - * - * @return \XoopsModules\Yogurt\Helper - */ - public static function getInstance($debug = false) - { - static $instance; - if (null === $instance) { - $instance = new static($debug); - } + /** + * @param bool $debug + * + * @return \XoopsModules\Yogurt\Helper + */ + public static function getInstance($debug = false) + { + static $instance; + if (null === $instance) { + $instance = new static($debug); + } - return $instance; - } + return $instance; + } - /** - * @return string - */ - public function getDirname() - { - return $this->dirname; - } + /** + * @return string + */ + public function getDirname() + { + return $this->dirname; + } - /** - * Get an Object Handler - * - * @param string $name name of handler to load - * - * @return bool|\XoopsObjectHandler|\XoopsPersistableObjectHandler - */ - public function getHandler($name) - { - $ret = false; + /** + * Get an Object Handler + * + * @param string $name name of handler to load + * + * @return bool|\XoopsObjectHandler|\XoopsPersistableObjectHandler + */ + public function getHandler($name) + { + $ret = false; - $class = __NAMESPACE__ . '\\' . $name . 'Handler'; - if (!class_exists($class)) { - throw new \RuntimeException("Class '$class' not found"); - } - /** @var \XoopsMySQLDatabase $db */ - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $helper = self::getInstance(); - $ret = new $class($db, $helper); - $this->addLog("Getting handler '{$name}'"); - return $ret; - } + $class = __NAMESPACE__ . '\\' . $name . 'Handler'; + if (!class_exists($class)) { + throw new \RuntimeException("Class '$class' not found"); + } + /** @var \XoopsMySQLDatabase $db */ + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $helper = self::getInstance(); + $ret = new $class($db, $helper); + $this->addLog("Getting handler '{$name}'"); + return $ret; + } } //require dirname(dirname(__DIR__)) . '/mainfile.php'; diff --git a/class/Image.php b/class/Image.php index 707ebf33..fa8b31d4 100644 --- a/class/Image.php +++ b/class/Image.php @@ -24,15 +24,15 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; /** * Image class. @@ -41,84 +41,84 @@ */ class Image extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Image constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('cod_img', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('data_creation', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('data_update', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('uid_owner', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('private', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Image constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('cod_img', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('data_creation', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('data_update', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('uid_owner', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('private', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_imagess($criteria = [], $asobject = false, $sort = 'cod_img', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT cod_img FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_images_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Image($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_imagess($criteria = [], $asobject = false, $sort = 'cod_img', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT cod_img FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_images_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Image($myrow); + } + } + return $ret; + } } diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 5f916f29..28c39743 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -24,15 +24,15 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; // ------------------------------------------------------------------------- // ------------------Image user handler class ------------------- @@ -45,477 +45,477 @@ class ImageHandler extends \XoopsObjectHandler { - /** - * create a new Image - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Image - */ - public function create($isNew = true) - { - $yogurt_images = new Image(); - if ($isNew) { - $yogurt_images->setNew(); - } else { - $yogurt_images->unsetNew(); - } - - return $yogurt_images; - } - - /** - * retrieve a Image - * - * @param int $id of the Image - * @return mixed reference to the {@link Image} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_images = new Image(); - $yogurt_images->assignVars($this->db->fetchArray($result)); - return $yogurt_images; - } - return false; - } - - /** - * insert a new Image in the database - * - * @param \XoopsObject $yogurt_images reference to the {@link Image} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_images, $force = false) - { - global $xoopsConfig; - if (!$yogurt_images instanceof \Image) { - return false; - } - if (!$yogurt_images->isDirty()) { - return true; - } - if (!$yogurt_images->cleanVars()) { - return false; - } - foreach ($yogurt_images->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_images->isNew()) { - // ajout/modification d'un Image - $yogurt_images = new Image(); - $format = 'INSERT INTO %s (cod_img, title, data_creation, data_update, uid_owner, url, private)'; - $format .= 'VALUES (%u, %s, %s, %s, %s, %s, 0)'; - $sql = sprintf( - $format, - $this->db->prefix('yogurt_images'), - $cod_img, - $this->db->quoteString($title), - $now, - $now, - $this->db->quoteString($uid_owner), - $this->db->quoteString($url) - - ); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'cod_img=%u, title=%s, data_creation=%s, data_update=%s, uid_owner=%s, url=%s, private=%s'; - $format .= ' WHERE cod_img = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_images'), $cod_img, $this->db->quoteString($title), $now, $now, $this->db->quoteString($uid_owner), $this->db->quoteString($url), $this->db->quoteString($private), $cod_img); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($cod_img)) { - $cod_img = $this->db->getInsertId(); - } - $yogurt_images->assignVar('cod_img', $cod_img); - return true; - } - - /** - * delete a Image from the database - * - * @param \XoopsObject $yogurt_images reference to the Image to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_images, $force = false) - { - if (!$yogurt_images instanceof \Image) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE cod_img = %u', $this->db->prefix('yogurt_images'), $yogurt_images->getVar('cod_img')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } - - /** - * retrieve yogurt_imagess from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Image} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_images = new Image(); - $yogurt_images->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_images; - } else { - $ret[$myrow['cod_img']] =& $yogurt_images; - } - unset($yogurt_images); - } - return $ret; - } - - /** - * count yogurt_imagess matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_imagess - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_images'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } - - /** - * delete yogurt_imagess matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_images'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } - - /** - * Render a form to send pictures - * - * @param int $maxbytes the maximum size of a picture - * @param object $xoopsTpl the one in which the form will be rendered - * @return bool TRUE - * - * obs: Some functions wont work on php 4 so edit lines down under acording to your version - */ - public function renderFormSubmit($maxbytes, $xoopsTpl) - { - $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_PIC_TITLE, 'form_picture', 'submit.php', 'post', true); - $field_url = new \XoopsFormFile(_MD_YOGURT_SELECT_PHOTO, 'sel_photo', 2000000); - $field_desc = new \XoopsFormText(_MD_YOGURT_CAPTION, 'caption', 35, 55); - $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADPICTURE, 'submit'); - $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); - $form->addElement($field_warning); - $form->addElement($field_url, true); - $form->addElement($field_desc); - - $form->addElement($button_send); - if (str_replace('.', '', PHP_VERSION) > 499) { - $form->assign($xoopsTpl);//If your server is php 5 - } else { - $form->display(); //If your server is php 4.4 - } - - return true; - } - - /** - * Render a form to edit the description of the pictures - * - * @param string $caption The description of the picture - * @param int $cod_img the id of the image in database - * @param text $filename the url to the thumb of the image so it can be displayed - * @return bool TRUE - */ - public function renderFormEdit($caption, $cod_img, $filename) - { - $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdesc.php', 'post', true); - $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); - $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); - $field_warning = new \XoopsFormLabel("sssss"); - $field_cod_img = new \XoopsFormHidden('cod_img', $cod_img); - $field_marker = new \XoopsFormHidden('marker', 1); - $form->addElement($field_warning); - $form->addElement($field_desc); - $form->addElement($field_cod_img); - $form->addElement($field_marker); - $form->addElement($button_send); - $form->display(); - - return true; - } - - /** - * Upload the file and Save into database - * - * @param text $title A litle description of the file - * @param text $path_upload The path to where the file should be uploaded - * @param int $thumbwidth the width in pixels that the thumbnail will have - * @param int $thumbheight the height in pixels that the thumbnail will have - * @param int $pictwidth the width in pixels that the pic will have - * @param int $pictheight the height in pixels that the pic will have - * @param int $maxfilebytes the maximum size a file can have to be uploaded in bytes - * @param int $maxfilewidth the maximum width in pixels that a pic can have - * @param int $maxfileheight the maximum height in pixels that a pic can have - * @return bool FALSE if upload fails or database fails - */ - public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $maxfilebytes, $maxfilewidth, $maxfileheight) - { - global $xoopsUser, $xoopsDB, $_POST, $_FILES; - //busca id do user logado - $uid = $xoopsUser->getVar('uid'); - //create a hash so it does not erase another file - //$hash1 = date(); - //$hash = substr($hash1,0,4); - - // mimetypes and settings put this in admin part later - $allowed_mimetypes = ['image/jpeg', 'image/pjpeg']; - $maxfilesize = $maxfilebytes; - - // create the object to upload - $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); - // fetch the media - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - //lets create a name for it - $uploader->setPrefix('pic_' . $uid . '_'); - //now let s upload the file - if (!$uploader->upload()) { - // if there are errors lets return them - - echo '

' . $uploader->getErrors() . '

'; - return false; - } else { - // now let s create a new object picture and set its variables - $picture = $this->create(); - $url = $uploader->getSavedFileName(); - $picture->setVar('url', $url); - $picture->setVar('title', $title); - $picture->setVar('private', 0); - $uid = $xoopsUser->getVar('uid'); - $picture->setVar('uid_owner', $uid); - $this->insert($picture); - $saved_destination = $uploader->getSavedDestination(); - //print_r($_FILES); - //$this->resizeImage($saved_destination,false, $thumbwidth, $thumbheight, $pictwidth, $pictheight,$path_upload); - //$this->resizeImage($saved_destination,true, $thumbwidth, $thumbheight, $pictwidth, $pictheight,$path_upload); - $this->resizeImage($saved_destination, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $path_upload); - } - } else { - echo '

' . $uploader->getErrors() . '

'; - return false; - } - return true; - } - - /** - * Resize a picture and save it to $path_upload - * - * @param text $img the path to the file - * @param int $thumbwidth the width in pixels that the thumbnail will have - * @param int $thumbheight the height in pixels that the thumbnail will have - * @param int $pictwidth the width in pixels that the pic will have - * @param int $pictheight the height in pixels that the pic will have - * @param text $path_upload The path to where the files should be saved after resizing - * @return void - */ - public function resizeImage($img, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $path_upload) - { - $img2 = $img; - $path = pathinfo($img); - $img = imagecreatefromjpeg($img); - $xratio = $thumbwidth / imagesx($img); - $yratio = $thumbheight / imagesy($img); - - if ($xratio < 1 || $yratio < 1) { - if ($xratio < $yratio) { - $resized = imagecreatetruecolor($thumbwidth, floor(imagesy($img) * $xratio)); - } else { - $resized = imagecreatetruecolor(floor(imagesx($img) * $yratio), $thumbheight); - } - imagecopyresampled($resized, $img, 0, 0, 0, 0, imagesx($resized) + 1, imagesy($resized) + 1, imagesx($img), imagesy($img)); - imagejpeg($resized, $path_upload . '/thumb_' . $path['basename']); - imagedestroy($resized); - } else { - imagejpeg($img, $path_upload . '/thumb_' . $path['basename']); - } - - imagedestroy($img); - $path2 = pathinfo($img2); - $img2 = imagecreatefromjpeg($img2); - $xratio2 = $pictwidth / imagesx($img2); - $yratio2 = $pictheight / imagesy($img2); - if ($xratio2 < 1 || $yratio2 < 1) { - if ($xratio2 < $yratio2) { - $resized2 = imagecreatetruecolor($pictwidth, floor(imagesy($img2) * $xratio2)); - } else { - $resized2 = imagecreatetruecolor(floor(imagesx($img2) * $yratio2), $pictheight); - } - - imagecopyresampled($resized2, $img2, 0, 0, 0, 0, imagesx($resized2) + 1, imagesy($resized2) + 1, imagesx($img2), imagesy($img2)); - imagejpeg($resized2, $path_upload . '/resized_' . $path2['basename']); - imagedestroy($resized2); - } else { - imagejpeg($img2, $path_upload . '/resized_' . $path2['basename']); - } - imagedestroy($img2);/* */ - } - - /** - * @param $limit - * @return array - */ - public function getLastPictures($limit) - { - $ret = []; - - $sql = 'SELECT uname, t.uid_owner, t.url FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); - - $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; - $result = $this->db->query($sql, $limit, 0); - $vetor = []; - $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid_voted'] = $myrow['uid_owner']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['url']; - $i++; - } - - return $vetor; - } - - /** - * @param $limit - * @return array - */ - public function getLastPicturesForBlock($limit) - { - $ret = []; - - $sql = 'SELECT uname, t.uid_owner, t.url, t.title FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); - - $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; - $result = $this->db->query($sql, $limit, 0); - $vetor = []; - $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid_voted'] = $myrow['uid_owner']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['img_filename'] = $myrow['url']; - $vetor[$i]['caption'] = $myrow['title']; - - $i++; - } - - return $vetor; - } - - /** - * Resize a picture and save it to $path_upload - * - * @param text $img the path to the file - * @param $width - * @param $height - * @param text $path_upload The path to where the files should be saved after resizing - * @return void - */ - public function makeAvatar($img, $width, $height, $path_upload) - { - $img2 = $img; - $path = pathinfo($img); - $img = imagecreatefromjpeg($img); - $xratio = $thumbwidth / imagesx($img); - $yratio = $thumbheight / imagesy($img); - - if ($xratio < 1 || $yratio < 1) { - if ($xratio < $yratio) { - $resized = imagecreatetruecolor($thumbwidth, floor(imagesy($img) * $xratio)); - } else { - $resized = imagecreatetruecolor(floor(imagesx($img) * $yratio), $thumbheight); - } - imagecopyresampled($resized, $img, 0, 0, 0, 0, imagesx($resized) + 1, imagesy($resized) + 1, imagesx($img), imagesy($img)); - imagejpeg($resized, $path_upload . '/thumb_' . $path['basename']); - imagedestroy($resized); - } else { - imagejpeg($img, $path_upload . '/thumb_' . $path['basename']); - } - - imagedestroy($img); - $path2 = pathinfo($img2); - $img2 = imagecreatefromjpeg($img2); - $xratio2 = $pictwidth / imagesx($img2); - $yratio2 = $pictheight / imagesy($img2); - if ($xratio2 < 1 || $yratio2 < 1) { - if ($xratio2 < $yratio2) { - $resized2 = imagecreatetruecolor($pictwidth, floor(imagesy($img2) * $xratio2)); - } else { - $resized2 = imagecreatetruecolor(floor(imagesx($img2) * $yratio2), $pictheight); - } - - imagecopyresampled($resized2, $img2, 0, 0, 0, 0, imagesx($resized2) + 1, imagesy($resized2) + 1, imagesx($img2), imagesy($img2)); - imagejpeg($resized2, $path_upload . '/resized_' . $path2['basename']); - imagedestroy($resized2); - } else { - imagejpeg($img2, $path_upload . '/resized_' . $path2['basename']); - } - imagedestroy($img2);/* */ - } + /** + * create a new Image + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Image + */ + public function create($isNew = true) + { + $yogurt_images = new Image(); + if ($isNew) { + $yogurt_images->setNew(); + } else { + $yogurt_images->unsetNew(); + } + + return $yogurt_images; + } + + /** + * retrieve a Image + * + * @param int $id of the Image + * @return mixed reference to the {@link Image} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_images = new Image(); + $yogurt_images->assignVars($this->db->fetchArray($result)); + return $yogurt_images; + } + return false; + } + + /** + * insert a new Image in the database + * + * @param \XoopsObject $yogurt_images reference to the {@link Image} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_images, $force = false) + { + global $xoopsConfig; + if (!$yogurt_images instanceof \Image) { + return false; + } + if (!$yogurt_images->isDirty()) { + return true; + } + if (!$yogurt_images->cleanVars()) { + return false; + } + foreach ($yogurt_images->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_images->isNew()) { + // ajout/modification d'un Image + $yogurt_images = new Image(); + $format = 'INSERT INTO %s (cod_img, title, data_creation, data_update, uid_owner, url, private)'; + $format .= 'VALUES (%u, %s, %s, %s, %s, %s, 0)'; + $sql = sprintf( + $format, + $this->db->prefix('yogurt_images'), + $cod_img, + $this->db->quoteString($title), + $now, + $now, + $this->db->quoteString($uid_owner), + $this->db->quoteString($url) + + ); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'cod_img=%u, title=%s, data_creation=%s, data_update=%s, uid_owner=%s, url=%s, private=%s'; + $format .= ' WHERE cod_img = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_images'), $cod_img, $this->db->quoteString($title), $now, $now, $this->db->quoteString($uid_owner), $this->db->quoteString($url), $this->db->quoteString($private), $cod_img); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($cod_img)) { + $cod_img = $this->db->getInsertId(); + } + $yogurt_images->assignVar('cod_img', $cod_img); + return true; + } + + /** + * delete a Image from the database + * + * @param \XoopsObject $yogurt_images reference to the Image to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_images, $force = false) + { + if (!$yogurt_images instanceof \Image) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE cod_img = %u', $this->db->prefix('yogurt_images'), $yogurt_images->getVar('cod_img')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * retrieve yogurt_imagess from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Image} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_images = new Image(); + $yogurt_images->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_images; + } else { + $ret[$myrow['cod_img']] =& $yogurt_images; + } + unset($yogurt_images); + } + return $ret; + } + + /** + * count yogurt_imagess matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_imagess + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_images'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } + + /** + * delete yogurt_imagess matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_images'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + /** + * Render a form to send pictures + * + * @param int $maxbytes the maximum size of a picture + * @param object $xoopsTpl the one in which the form will be rendered + * @return bool TRUE + * + * obs: Some functions wont work on php 4 so edit lines down under acording to your version + */ + public function renderFormSubmit($maxbytes, $xoopsTpl) + { + $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_PIC_TITLE, 'form_picture', 'submit.php', 'post', true); + $field_url = new \XoopsFormFile(_MD_YOGURT_SELECT_PHOTO, 'sel_photo', 2000000); + $field_desc = new \XoopsFormText(_MD_YOGURT_CAPTION, 'caption', 35, 55); + $form->setExtra('enctype="multipart/form-data"'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADPICTURE, 'submit'); + $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); + $form->addElement($field_warning); + $form->addElement($field_url, true); + $form->addElement($field_desc); + + $form->addElement($button_send); + if (str_replace('.', '', PHP_VERSION) > 499) { + $form->assign($xoopsTpl);//If your server is php 5 + } else { + $form->display(); //If your server is php 4.4 + } + + return true; + } + + /** + * Render a form to edit the description of the pictures + * + * @param string $caption The description of the picture + * @param int $cod_img the id of the image in database + * @param text $filename the url to the thumb of the image so it can be displayed + * @return bool TRUE + */ + public function renderFormEdit($caption, $cod_img, $filename) + { + $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdesc.php', 'post', true); + $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); + $form->setExtra('enctype="multipart/form-data"'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); + $field_warning = new \XoopsFormLabel("sssss"); + $field_cod_img = new \XoopsFormHidden('cod_img', $cod_img); + $field_marker = new \XoopsFormHidden('marker', 1); + $form->addElement($field_warning); + $form->addElement($field_desc); + $form->addElement($field_cod_img); + $form->addElement($field_marker); + $form->addElement($button_send); + $form->display(); + + return true; + } + + /** + * Upload the file and Save into database + * + * @param text $title A litle description of the file + * @param text $path_upload The path to where the file should be uploaded + * @param int $thumbwidth the width in pixels that the thumbnail will have + * @param int $thumbheight the height in pixels that the thumbnail will have + * @param int $pictwidth the width in pixels that the pic will have + * @param int $pictheight the height in pixels that the pic will have + * @param int $maxfilebytes the maximum size a file can have to be uploaded in bytes + * @param int $maxfilewidth the maximum width in pixels that a pic can have + * @param int $maxfileheight the maximum height in pixels that a pic can have + * @return bool FALSE if upload fails or database fails + */ + public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $maxfilebytes, $maxfilewidth, $maxfileheight) + { + global $xoopsUser, $xoopsDB, $_POST, $_FILES; + //busca id do user logado + $uid = $xoopsUser->getVar('uid'); + //create a hash so it does not erase another file + //$hash1 = date(); + //$hash = substr($hash1,0,4); + + // mimetypes and settings put this in admin part later + $allowed_mimetypes = ['image/jpeg', 'image/pjpeg']; + $maxfilesize = $maxfilebytes; + + // create the object to upload + $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); + // fetch the media + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + //lets create a name for it + $uploader->setPrefix('pic_' . $uid . '_'); + //now let s upload the file + if (!$uploader->upload()) { + // if there are errors lets return them + + echo '

' . $uploader->getErrors() . '

'; + return false; + } else { + // now let s create a new object picture and set its variables + $picture = $this->create(); + $url = $uploader->getSavedFileName(); + $picture->setVar('url', $url); + $picture->setVar('title', $title); + $picture->setVar('private', 0); + $uid = $xoopsUser->getVar('uid'); + $picture->setVar('uid_owner', $uid); + $this->insert($picture); + $saved_destination = $uploader->getSavedDestination(); + //print_r($_FILES); + //$this->resizeImage($saved_destination,false, $thumbwidth, $thumbheight, $pictwidth, $pictheight,$path_upload); + //$this->resizeImage($saved_destination,true, $thumbwidth, $thumbheight, $pictwidth, $pictheight,$path_upload); + $this->resizeImage($saved_destination, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $path_upload); + } + } else { + echo '

' . $uploader->getErrors() . '

'; + return false; + } + return true; + } + + /** + * Resize a picture and save it to $path_upload + * + * @param text $img the path to the file + * @param int $thumbwidth the width in pixels that the thumbnail will have + * @param int $thumbheight the height in pixels that the thumbnail will have + * @param int $pictwidth the width in pixels that the pic will have + * @param int $pictheight the height in pixels that the pic will have + * @param text $path_upload The path to where the files should be saved after resizing + * @return void + */ + public function resizeImage($img, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $path_upload) + { + $img2 = $img; + $path = pathinfo($img); + $img = imagecreatefromjpeg($img); + $xratio = $thumbwidth / imagesx($img); + $yratio = $thumbheight / imagesy($img); + + if ($xratio < 1 || $yratio < 1) { + if ($xratio < $yratio) { + $resized = imagecreatetruecolor($thumbwidth, floor(imagesy($img) * $xratio)); + } else { + $resized = imagecreatetruecolor(floor(imagesx($img) * $yratio), $thumbheight); + } + imagecopyresampled($resized, $img, 0, 0, 0, 0, imagesx($resized) + 1, imagesy($resized) + 1, imagesx($img), imagesy($img)); + imagejpeg($resized, $path_upload . '/thumb_' . $path['basename']); + imagedestroy($resized); + } else { + imagejpeg($img, $path_upload . '/thumb_' . $path['basename']); + } + + imagedestroy($img); + $path2 = pathinfo($img2); + $img2 = imagecreatefromjpeg($img2); + $xratio2 = $pictwidth / imagesx($img2); + $yratio2 = $pictheight / imagesy($img2); + if ($xratio2 < 1 || $yratio2 < 1) { + if ($xratio2 < $yratio2) { + $resized2 = imagecreatetruecolor($pictwidth, floor(imagesy($img2) * $xratio2)); + } else { + $resized2 = imagecreatetruecolor(floor(imagesx($img2) * $yratio2), $pictheight); + } + + imagecopyresampled($resized2, $img2, 0, 0, 0, 0, imagesx($resized2) + 1, imagesy($resized2) + 1, imagesx($img2), imagesy($img2)); + imagejpeg($resized2, $path_upload . '/resized_' . $path2['basename']); + imagedestroy($resized2); + } else { + imagejpeg($img2, $path_upload . '/resized_' . $path2['basename']); + } + imagedestroy($img2);/* */ + } + + /** + * @param $limit + * @return array + */ + public function getLastPictures($limit) + { + $ret = []; + + $sql = 'SELECT uname, t.uid_owner, t.url FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); + + $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; + $result = $this->db->query($sql, $limit, 0); + $vetor = []; + $i = 0; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid_voted'] = $myrow['uid_owner']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['url']; + $i++; + } + + return $vetor; + } + + /** + * @param $limit + * @return array + */ + public function getLastPicturesForBlock($limit) + { + $ret = []; + + $sql = 'SELECT uname, t.uid_owner, t.url, t.title FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); + + $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; + $result = $this->db->query($sql, $limit, 0); + $vetor = []; + $i = 0; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid_voted'] = $myrow['uid_owner']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['img_filename'] = $myrow['url']; + $vetor[$i]['caption'] = $myrow['title']; + + $i++; + } + + return $vetor; + } + + /** + * Resize a picture and save it to $path_upload + * + * @param text $img the path to the file + * @param $width + * @param $height + * @param text $path_upload The path to where the files should be saved after resizing + * @return void + */ + public function makeAvatar($img, $width, $height, $path_upload) + { + $img2 = $img; + $path = pathinfo($img); + $img = imagecreatefromjpeg($img); + $xratio = $thumbwidth / imagesx($img); + $yratio = $thumbheight / imagesy($img); + + if ($xratio < 1 || $yratio < 1) { + if ($xratio < $yratio) { + $resized = imagecreatetruecolor($thumbwidth, floor(imagesy($img) * $xratio)); + } else { + $resized = imagecreatetruecolor(floor(imagesx($img) * $yratio), $thumbheight); + } + imagecopyresampled($resized, $img, 0, 0, 0, 0, imagesx($resized) + 1, imagesy($resized) + 1, imagesx($img), imagesy($img)); + imagejpeg($resized, $path_upload . '/thumb_' . $path['basename']); + imagedestroy($resized); + } else { + imagejpeg($img, $path_upload . '/thumb_' . $path['basename']); + } + + imagedestroy($img); + $path2 = pathinfo($img2); + $img2 = imagecreatefromjpeg($img2); + $xratio2 = $pictwidth / imagesx($img2); + $yratio2 = $pictheight / imagesy($img2); + if ($xratio2 < 1 || $yratio2 < 1) { + if ($xratio2 < $yratio2) { + $resized2 = imagecreatetruecolor($pictwidth, floor(imagesy($img2) * $xratio2)); + } else { + $resized2 = imagecreatetruecolor(floor(imagesx($img2) * $yratio2), $pictheight); + } + + imagecopyresampled($resized2, $img2, 0, 0, 0, 0, imagesx($resized2) + 1, imagesy($resized2) + 1, imagesx($img2), imagesy($img2)); + imagejpeg($resized2, $path_upload . '/resized_' . $path2['basename']); + imagedestroy($resized2); + } else { + imagejpeg($img2, $path_upload . '/resized_' . $path2['basename']); + } + imagedestroy($img2);/* */ + } } diff --git a/class/Ishot.php b/class/Ishot.php index 3d37d733..6ed07ec7 100644 --- a/class/Ishot.php +++ b/class/Ishot.php @@ -21,9 +21,9 @@ */ if (!defined('XOOPS_ROOT_PATH')) { - exit(); + exit(); } -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Ishot class. @@ -32,83 +32,83 @@ */ class Ishot extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Ishot constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('cod_ishot', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('uid_voter', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('uid_voted', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('ishot', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('date', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Ishot constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('cod_ishot', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('uid_voter', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('uid_voted', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('ishot', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('date', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_ishots($criteria = [], $asobject = false, $sort = 'cod_ishot', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT cod_ishot FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_ishot_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Ishot($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_ishots($criteria = [], $asobject = false, $sort = 'cod_ishot', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT cod_ishot FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_ishot_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Ishot($myrow); + } + } + return $ret; + } } diff --git a/class/IshotHandler.php b/class/IshotHandler.php index ad792c3d..0b15f1c6 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -21,9 +21,9 @@ */ if (!defined('XOOPS_ROOT_PATH')) { - exit(); + exit(); } -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Ishot user handler class ------------------- @@ -36,263 +36,263 @@ class IshotHandler extends \XoopsObjectHandler { - /** - * create a new Ishot - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Ishot - */ - public function create($isNew = true) - { - $yogurt_ishot = new Ishot(); - if ($isNew) { - $yogurt_ishot->setNew(); - } else { - $yogurt_ishot->unsetNew(); - } + /** + * create a new Ishot + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Ishot + */ + public function create($isNew = true) + { + $yogurt_ishot = new Ishot(); + if ($isNew) { + $yogurt_ishot->setNew(); + } else { + $yogurt_ishot->unsetNew(); + } - return $yogurt_ishot; - } + return $yogurt_ishot; + } - /** - * retrieve a Ishot - * - * @param int $id of the Ishot - * @return mixed reference to the {@link Ishot} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_ishot = new Ishot(); - $yogurt_ishot->assignVars($this->db->fetchArray($result)); - return $yogurt_ishot; - } - return false; - } + /** + * retrieve a Ishot + * + * @param int $id of the Ishot + * @return mixed reference to the {@link Ishot} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_ishot = new Ishot(); + $yogurt_ishot->assignVars($this->db->fetchArray($result)); + return $yogurt_ishot; + } + return false; + } - /** - * insert a new Ishot in the database - * - * @param \XoopsObject $yogurt_ishot reference to the {@link Ishot} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_ishot, $force = false) - { - global $xoopsConfig; - if (!$yogurt_ishot instanceof \Ishot) { - return false; - } - if (!$yogurt_ishot->isDirty()) { - return true; - } - if (!$yogurt_ishot->cleanVars()) { - return false; - } - foreach ($yogurt_ishot->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_ishot->isNew()) { - // ajout/modification d'un Ishot - $yogurt_ishot = new Ishot(); - $format = 'INSERT INTO %s (cod_ishot, uid_voter, uid_voted, ishot, DATE)'; - $format .= 'VALUES (%u, %u, %u, %u, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date)); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'cod_ishot=%u, uid_voter=%u, uid_voted=%u, ishot=%u, date=%s'; - $format .= ' WHERE cod_ishot = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date), $cod_ishot); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($cod_ishot)) { - $cod_ishot = $this->db->getInsertId(); - } - $yogurt_ishot->assignVar('cod_ishot', $cod_ishot); - return true; - } + /** + * insert a new Ishot in the database + * + * @param \XoopsObject $yogurt_ishot reference to the {@link Ishot} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_ishot, $force = false) + { + global $xoopsConfig; + if (!$yogurt_ishot instanceof \Ishot) { + return false; + } + if (!$yogurt_ishot->isDirty()) { + return true; + } + if (!$yogurt_ishot->cleanVars()) { + return false; + } + foreach ($yogurt_ishot->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_ishot->isNew()) { + // ajout/modification d'un Ishot + $yogurt_ishot = new Ishot(); + $format = 'INSERT INTO %s (cod_ishot, uid_voter, uid_voted, ishot, DATE)'; + $format .= 'VALUES (%u, %u, %u, %u, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date)); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'cod_ishot=%u, uid_voter=%u, uid_voted=%u, ishot=%u, date=%s'; + $format .= ' WHERE cod_ishot = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date), $cod_ishot); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($cod_ishot)) { + $cod_ishot = $this->db->getInsertId(); + } + $yogurt_ishot->assignVar('cod_ishot', $cod_ishot); + return true; + } - /** - * delete a Ishot from the database - * - * @param \XoopsObject $yogurt_ishot reference to the Ishot to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_ishot, $force = false) - { - if (!$yogurt_ishot instanceof \Ishot) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE cod_ishot = %u', $this->db->prefix('yogurt_ishot'), $yogurt_ishot->getVar('cod_ishot')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Ishot from the database + * + * @param \XoopsObject $yogurt_ishot reference to the Ishot to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_ishot, $force = false) + { + if (!$yogurt_ishot instanceof \Ishot) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE cod_ishot = %u', $this->db->prefix('yogurt_ishot'), $yogurt_ishot->getVar('cod_ishot')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_ishots from the database - * - * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Ishot} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_ishot = new Ishot(); - $yogurt_ishot->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_ishot; - } else { - $ret[$myrow['cod_ishot']] =& $yogurt_ishot; - } - unset($yogurt_ishot); - } - return $ret; - } + /** + * retrieve yogurt_ishots from the database + * + * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Ishot} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_ishot = new Ishot(); + $yogurt_ishot->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_ishot; + } else { + $ret[$myrow['cod_ishot']] =& $yogurt_ishot; + } + unset($yogurt_ishot); + } + return $ret; + } - /** - * count yogurt_ishots matching a condition - * - * @param \XoopsObject $criteria {@link CriteriaElement} to match - * @return int count of yogurt_ishots - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_ishot'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); + /** + * count yogurt_ishots matching a condition + * + * @param \XoopsObject $criteria {@link CriteriaElement} to match + * @return int count of yogurt_ishots + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_ishot'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); - return $count; - } + return $count; + } - /** - * delete yogurt_ishots matching a set of conditions - * - * @param \XoopsObject $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_ishot'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_ishots matching a set of conditions + * + * @param \XoopsObject $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_ishot'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } - /** - * @param null $criteria - * @return array - */ - public function getHottest($criteria = null) - { - $sql = 'SELECT DISTINCTROW uname, user_avatar, uid_voted, COUNT(cod_ishot) AS qtd FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - //attention here this is kind of a hack - $sql .= ' AND uid = uid_voted'; - if ('' != $criteria->getGroupby()) { - $sql .= $criteria->getGroupby(); - } - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); + /** + * @param null $criteria + * @return array + */ + public function getHottest($criteria = null) + { + $sql = 'SELECT DISTINCTROW uname, user_avatar, uid_voted, COUNT(cod_ishot) AS qtd FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + //attention here this is kind of a hack + $sql .= ' AND uid = uid_voted'; + if ('' != $criteria->getGroupby()) { + $sql .= $criteria->getGroupby(); + } + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['qtd'] = $myrow['qtd']; - $vetor[$i]['uid_voted'] = $myrow['uid_voted']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $i++; - } + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['qtd'] = $myrow['qtd']; + $vetor[$i]['uid_voted'] = $myrow['uid_voted']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['user_avatar']; + $i++; + } - return $vetor; - } + return $vetor; + } - /** - * @param null $criteria - * @param bool $id_as_key - * @return array - */ - public function getHotFriends($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, uid_voted FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - //attention here this is kind of a hack - $sql .= ' AND uid = uid_voted AND ishot=1'; - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); + /** + * @param null $criteria + * @param bool $id_as_key + * @return array + */ + public function getHotFriends($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT uname, user_avatar, uid_voted FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + //attention here this is kind of a hack + $sql .= ' AND uid = uid_voted AND ishot=1'; + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid_voted'] = $myrow['uid_voted']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $i++; - } + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid_voted'] = $myrow['uid_voted']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['user_avatar']; + $i++; + } - return $vetor; - } - } + return $vetor; + } + } } diff --git a/class/Notes.php b/class/Notes.php index 775851c6..36e2a4c4 100644 --- a/class/Notes.php +++ b/class/Notes.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; /** *Notes class. @@ -17,83 +17,83 @@ */ class Notes extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - *Notes constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('Note_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Note_text', XOBJ_DTYPE_TXTAREA, null, false); - $this->initVar('Note_from', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Note_to', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('private', XOBJ_DTYPE_INT, null, false, 10); + /** + *Notes constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('Note_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('Note_text', XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar('Note_from', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('Note_to', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('private', XOBJ_DTYPE_INT, null, false, 10); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'Note_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT Note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_Notes_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Notes($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'Note_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT Note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_Notes_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Notes($myrow); + } + } + return $ret; + } } diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 597a09cb..381a5926 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/module.textsanitizer.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; // ------------------------------------------------------------------------- // ------------------Notes user handler class ------------------- @@ -21,241 +21,241 @@ class NotesHandler extends \XoopsObjectHandler { - /** - * create a new Notes - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObjectNotes - */ - public function create($isNew = true) - { - $yogurt_Notes = new Notes(); - if ($isNew) { - $yogurt_Notes->setNew(); - } else { - $yogurt_Notes->unsetNew(); - } + /** + * create a new Notes + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObjectNotes + */ + public function create($isNew = true) + { + $yogurt_Notes = new Notes(); + if ($isNew) { + $yogurt_Notes->setNew(); + } else { + $yogurt_Notes->unsetNew(); + } - return $yogurt_Notes; - } + return $yogurt_Notes; + } - /** - * retrieve aNotes - * - * @param int $id of theNotes - * @return mixed reference to the {@linkNotes} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_Notes = new Notes(); - $yogurt_Notes->assignVars($this->db->fetchArray($result)); - return $yogurt_Notes; - } - return false; - } + /** + * retrieve aNotes + * + * @param int $id of theNotes + * @return mixed reference to the {@linkNotes} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_Notes = new Notes(); + $yogurt_Notes->assignVars($this->db->fetchArray($result)); + return $yogurt_Notes; + } + return false; + } - /** - * insert a new Notes in the database - * - * @param \XoopsObject $yogurt_Notes reference to the {@linkNotes} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_Notes, $force = false) - { - global $xoopsConfig; - if (!$yogurt_Notes instanceof \Notes) { - return false; - } - if (!$yogurt_Notes->isDirty()) { - return true; - } - if (!$yogurt_Notes->cleanVars()) { - return false; - } - foreach ($yogurt_Notes->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_Notes->isNew()) { - // ajout/modification d'unNotes - $yogurt_Notes = new Notes(); - $format = 'INSERT INTO %s (Note_id, Note_text, Note_from, Note_to, private)'; - $format .= 'VALUES (%u, %s, %u, %u, %u)'; - $sql = sprintf( - $format, - $this->db->prefix('yogurt_Notes'), - $Note_id, - $this->db->quoteString($Note_text), - $Note_from, - $Note_to, - $private + /** + * insert a new Notes in the database + * + * @param \XoopsObject $yogurt_Notes reference to the {@linkNotes} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_Notes, $force = false) + { + global $xoopsConfig; + if (!$yogurt_Notes instanceof \Notes) { + return false; + } + if (!$yogurt_Notes->isDirty()) { + return true; + } + if (!$yogurt_Notes->cleanVars()) { + return false; + } + foreach ($yogurt_Notes->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_Notes->isNew()) { + // ajout/modification d'unNotes + $yogurt_Notes = new Notes(); + $format = 'INSERT INTO %s (Note_id, Note_text, Note_from, Note_to, private)'; + $format .= 'VALUES (%u, %s, %u, %u, %u)'; + $sql = sprintf( + $format, + $this->db->prefix('yogurt_Notes'), + $Note_id, + $this->db->quoteString($Note_text), + $Note_from, + $Note_to, + $private - ); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'Note_id=%u, Note_text=%s, Note_from=%u, Note_to=%u, private=%u'; - $format .= ' WHERE Note_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $Note_id, $this->db->quoteString($Note_text), $Note_from, $Note_to, $private, $Note_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($Note_id)) { - $Note_id = $this->db->getInsertId(); - } - $yogurt_Notes->assignVar('Note_id', $Note_id); - return true; - } + ); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'Note_id=%u, Note_text=%s, Note_from=%u, Note_to=%u, private=%u'; + $format .= ' WHERE Note_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $Note_id, $this->db->quoteString($Note_text), $Note_from, $Note_to, $private, $Note_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($Note_id)) { + $Note_id = $this->db->getInsertId(); + } + $yogurt_Notes->assignVar('Note_id', $Note_id); + return true; + } - /** - * delete aNotes from the database - * - * @param \XoopsObject $yogurt_Notes reference to theNotes to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_Notes, $force = false) - { - if (!$yogurt_Notes instanceof \Notes) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE Note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('Note_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete aNotes from the database + * + * @param \XoopsObject $yogurt_Notes reference to theNotes to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_Notes, $force = false) + { + if (!$yogurt_Notes instanceof \Notes) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE Note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('Note_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_Notess from the database - * - * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@linkNotes} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_Notes = new Notes(); - $yogurt_Notes->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_Notes; - } else { - $ret[$myrow['Note_id']] =& $yogurt_Notes; - } - unset($yogurt_Notes); - } - return $ret; - } + /** + * retrieve yogurt_Notess from the database + * + * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@linkNotes} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_Notes = new Notes(); + $yogurt_Notes->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_Notes; + } else { + $ret[$myrow['Note_id']] =& $yogurt_Notes; + } + unset($yogurt_Notes); + } + return $ret; + } - /** - * count yogurt_Notess matching a condition - * - * @param \XoopsObject $criteria {@link CriteriaElement} to match - * @return int count of yogurt_Notess - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_Notes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_Notess matching a condition + * + * @param \XoopsObject $criteria {@link CriteriaElement} to match + * @return int count of yogurt_Notess + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_Notes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_Notess matching a set of conditions - * - * @param \XoopsObject $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_Notes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_Notess matching a set of conditions + * + * @param \XoopsObject $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_Notes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } - /** - * @param $nbNotes - * @param $criteria - * @return array - */ - public function getNotes($nbNotes, $criteria) - { - $myts = new MyTextSanitizer(); - $ret = []; - $sql = 'SELECT Note_id, uid, uname, user_avatar, Note_from, Note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - //attention here this is kind of a hack - $sql .= ' AND uid = Note_from'; - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); + /** + * @param $nbNotes + * @param $criteria + * @return array + */ + public function getNotes($nbNotes, $criteria) + { + $myts = new MyTextSanitizer(); + $ret = []; + $sql = 'SELECT Note_id, uid, uname, user_avatar, Note_from, Note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' ' . $criteria->renderWhere(); + //attention here this is kind of a hack + $sql .= ' AND uid = Note_from'; + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['uid'] = $myrow['uid']; - $vetor[$i]['uname'] = $myrow['uname']; - $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $temptext = $myts->xoopsCodeDecode($myrow['Note_text'], 1); - $vetor[$i]['text'] = $myts->nl2Br($temptext); - $vetor[$i]['id'] = $myrow['Note_id']; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['uid'] = $myrow['uid']; + $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['user_avatar'] = $myrow['user_avatar']; + $temptext = $myts->xoopsCodeDecode($myrow['Note_text'], 1); + $vetor[$i]['text'] = $myts->nl2Br($temptext); + $vetor[$i]['id'] = $myrow['Note_id']; - $i++; - } + $i++; + } - return $vetor; - } - } + return $vetor; + } + } } diff --git a/class/Reltribeuser.php b/class/Reltribeuser.php index 992f1434..349ebc02 100644 --- a/class/Reltribeuser.php +++ b/class/Reltribeuser.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Reltribeuser class. @@ -16,80 +16,80 @@ */ class Reltribeuser extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Reltribeuser constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('rel_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('rel_tribe_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('rel_user_uid', XOBJ_DTYPE_INT, null, false, 10); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Reltribeuser constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('rel_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('rel_tribe_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('rel_user_uid', XOBJ_DTYPE_INT, null, false, 10); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_reltribeusers($criteria = [], $asobject = false, $sort = 'rel_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT rel_id FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_reltribeuser_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Reltribeuser($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_reltribeusers($criteria = [], $asobject = false, $sort = 'rel_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT rel_id FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_reltribeuser_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Reltribeuser($myrow); + } + } + return $ret; + } } diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index bebb8a4c..da80146e 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Reltribeuser user handler class ------------------- @@ -20,272 +20,272 @@ class ReltribeuserHandler extends \XoopsObjectHandler { - /** - * create a new Reltribeuser - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Reltribeuser - */ - public function create($isNew = true) - { - $yogurt_reltribeuser = new Reltribeuser(); - if ($isNew) { - $yogurt_reltribeuser->setNew(); - } else { - $yogurt_reltribeuser->unsetNew(); - } + /** + * create a new Reltribeuser + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Reltribeuser + */ + public function create($isNew = true) + { + $yogurt_reltribeuser = new Reltribeuser(); + if ($isNew) { + $yogurt_reltribeuser->setNew(); + } else { + $yogurt_reltribeuser->unsetNew(); + } - return $yogurt_reltribeuser; - } + return $yogurt_reltribeuser; + } - /** - * retrieve a Reltribeuser - * - * @param int $id of the Reltribeuser - * @return mixed reference to the {@link Reltribeuser} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_reltribeuser = new Reltribeuser(); - $yogurt_reltribeuser->assignVars($this->db->fetchArray($result)); - return $yogurt_reltribeuser; - } - return false; - } + /** + * retrieve a Reltribeuser + * + * @param int $id of the Reltribeuser + * @return mixed reference to the {@link Reltribeuser} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_reltribeuser = new Reltribeuser(); + $yogurt_reltribeuser->assignVars($this->db->fetchArray($result)); + return $yogurt_reltribeuser; + } + return false; + } - /** - * insert a new Reltribeuser in the database - * - * @param \XoopsObject $yogurt_reltribeuser reference to the {@link Reltribeuser} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_reltribeuser, $force = false) - { - global $xoopsConfig; - if (!$yogurt_reltribeuser instanceof \Reltribeuser) { - return false; - } - if (!$yogurt_reltribeuser->isDirty()) { - return true; - } - if (!$yogurt_reltribeuser->cleanVars()) { - return false; - } - foreach ($yogurt_reltribeuser->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_reltribeuser->isNew()) { - // ajout/modification d'un Reltribeuser - $yogurt_reltribeuser = new Reltribeuser(); - $format = 'INSERT INTO %s (rel_id, rel_tribe_id, rel_user_uid)'; - $format .= 'VALUES (%u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'rel_id=%u, rel_tribe_id=%u, rel_user_uid=%u'; - $format .= ' WHERE rel_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid, $rel_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($rel_id)) { - $rel_id = $this->db->getInsertId(); - } - $yogurt_reltribeuser->assignVar('rel_id', $rel_id); - return true; - } + /** + * insert a new Reltribeuser in the database + * + * @param \XoopsObject $yogurt_reltribeuser reference to the {@link Reltribeuser} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_reltribeuser, $force = false) + { + global $xoopsConfig; + if (!$yogurt_reltribeuser instanceof \Reltribeuser) { + return false; + } + if (!$yogurt_reltribeuser->isDirty()) { + return true; + } + if (!$yogurt_reltribeuser->cleanVars()) { + return false; + } + foreach ($yogurt_reltribeuser->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_reltribeuser->isNew()) { + // ajout/modification d'un Reltribeuser + $yogurt_reltribeuser = new Reltribeuser(); + $format = 'INSERT INTO %s (rel_id, rel_tribe_id, rel_user_uid)'; + $format .= 'VALUES (%u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'rel_id=%u, rel_tribe_id=%u, rel_user_uid=%u'; + $format .= ' WHERE rel_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid, $rel_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($rel_id)) { + $rel_id = $this->db->getInsertId(); + } + $yogurt_reltribeuser->assignVar('rel_id', $rel_id); + return true; + } - /** - * delete a Reltribeuser from the database - * - * @param \XoopsObject $yogurt_reltribeuser reference to the Reltribeuser to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_reltribeuser, $force = false) - { - if (!$yogurt_reltribeuser instanceof \Reltribeuser) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE rel_id = %u', $this->db->prefix('yogurt_reltribeuser'), $yogurt_reltribeuser->getVar('rel_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Reltribeuser from the database + * + * @param \XoopsObject $yogurt_reltribeuser reference to the Reltribeuser to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_reltribeuser, $force = false) + { + if (!$yogurt_reltribeuser instanceof \Reltribeuser) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE rel_id = %u', $this->db->prefix('yogurt_reltribeuser'), $yogurt_reltribeuser->getVar('rel_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_reltribeusers from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Reltribeuser} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_reltribeuser = new Reltribeuser(); - $yogurt_reltribeuser->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_reltribeuser; - } else { - $ret[$myrow['rel_id']] =& $yogurt_reltribeuser; - } - unset($yogurt_reltribeuser); - } - return $ret; - } + /** + * retrieve yogurt_reltribeusers from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Reltribeuser} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_reltribeuser = new Reltribeuser(); + $yogurt_reltribeuser->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_reltribeuser; + } else { + $ret[$myrow['rel_id']] =& $yogurt_reltribeuser; + } + unset($yogurt_reltribeuser); + } + return $ret; + } - /** - * count yogurt_reltribeusers matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_reltribeusers - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_reltribeuser'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_reltribeusers matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_reltribeusers + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_reltribeuser'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_reltribeusers matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_reltribeuser'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_reltribeusers matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_reltribeuser'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } - /** - * @param $nbtribes - * @param null $criteria - * @param int $shuffle - * @return array - */ - public function getTribes($nbtribes, $criteria = null, $shuffle = 1) - { - $ret = []; + /** + * @param $nbtribes + * @param null $criteria + * @param int $shuffle + * @return array + */ + public function getTribes($nbtribes, $criteria = null, $shuffle = 1) + { + $ret = []; - $sql = 'SELECT rel_id, rel_tribe_id, rel_user_uid, tribe_title, tribe_desc, tribe_img, owner_uid FROM ' . $this->db->prefix('yogurt_tribes') . ', ' . $this->db->prefix('yogurt_reltribeuser'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - //attention here this is kind of a hack - $sql .= ' AND tribe_id = rel_tribe_id '; - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); + $sql = 'SELECT rel_id, rel_tribe_id, rel_user_uid, tribe_title, tribe_desc, tribe_img, owner_uid FROM ' . $this->db->prefix('yogurt_tribes') . ', ' . $this->db->prefix('yogurt_reltribeuser'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + //attention here this is kind of a hack + $sql .= ' AND tribe_id = rel_tribe_id '; + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); - $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $result = $this->db->query($sql, $limit, $start); + $vetor = []; + $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $vetor[$i]['title'] = $myrow['tribe_title']; - $vetor[$i]['desc'] = $myrow['tribe_desc']; - $vetor[$i]['img'] = $myrow['tribe_img']; - $vetor[$i]['id'] = $myrow['rel_id']; - $vetor[$i]['uid'] = $myrow['owner_uid']; - $vetor[$i]['tribe_id'] = $myrow['rel_tribe_id']; + while ($myrow = $this->db->fetchArray($result)) { + $vetor[$i]['title'] = $myrow['tribe_title']; + $vetor[$i]['desc'] = $myrow['tribe_desc']; + $vetor[$i]['img'] = $myrow['tribe_img']; + $vetor[$i]['id'] = $myrow['rel_id']; + $vetor[$i]['uid'] = $myrow['owner_uid']; + $vetor[$i]['tribe_id'] = $myrow['rel_tribe_id']; - $i++; - } + $i++; + } - if (1 == $shuffle) { - shuffle($vetor); - $vetor = array_slice($vetor, 0, $nbtribes); - } - return $vetor; - } - } + if (1 == $shuffle) { + shuffle($vetor); + $vetor = array_slice($vetor, 0, $nbtribes); + } + return $vetor; + } + } - /** - * @param $tribeId - * @param $start - * @param $nbUsers - * @param int $isShuffle - * @return array - */ - public function getUsersFromTribe($tribeId, $start, $nbUsers, $isShuffle = 0) - { - $ret = []; + /** + * @param $tribeId + * @param $start + * @param $nbUsers + * @param int $isShuffle + * @return array + */ + public function getUsersFromTribe($tribeId, $start, $nbUsers, $isShuffle = 0) + { + $ret = []; - $sql = 'SELECT rel_tribe_id, rel_user_uid, owner_uid, uname, user_avatar, uid FROM ' . $this->db->prefix('users') . ', ' . $this->db->prefix('yogurt_tribes') . ', ' . $this->db->prefix('yogurt_reltribeuser'); - $sql .= ' WHERE rel_user_uid = uid AND rel_tribe_id = tribe_id AND tribe_id =' . $tribeId . ' GROUP BY rel_user_uid '; + $sql = 'SELECT rel_tribe_id, rel_user_uid, owner_uid, uname, user_avatar, uid FROM ' . $this->db->prefix('users') . ', ' . $this->db->prefix('yogurt_tribes') . ', ' . $this->db->prefix('yogurt_reltribeuser'); + $sql .= ' WHERE rel_user_uid = uid AND rel_tribe_id = tribe_id AND tribe_id =' . $tribeId . ' GROUP BY rel_user_uid '; - $result = $this->db->query($sql, $nbUsers, $start); - $ret = []; - $i = 0; + $result = $this->db->query($sql, $nbUsers, $start); + $ret = []; + $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $ret[$i]['uid'] = $myrow['uid']; - $ret[$i]['uname'] = $myrow['uname']; - $ret[$i]['avatar'] = $myrow['user_avatar']; - $isOwner = ($myrow['rel_user_uid'] == $myrow['owner_uid']) ? 1 : 0; - $ret[$i]['isOwner'] = $isOwner; - $i++; - } + while ($myrow = $this->db->fetchArray($result)) { + $ret[$i]['uid'] = $myrow['uid']; + $ret[$i]['uname'] = $myrow['uname']; + $ret[$i]['avatar'] = $myrow['user_avatar']; + $isOwner = ($myrow['rel_user_uid'] == $myrow['owner_uid']) ? 1 : 0; + $ret[$i]['isOwner'] = $isOwner; + $i++; + } - if (1 == $isShuffle) { - shuffle($ret); - $ret = array_slice($ret, 0, $nbUsers); - } + if (1 == $isShuffle) { + shuffle($ret); + $ret = array_slice($ret, 0, $nbUsers); + } - return $ret; - } + return $ret; + } } diff --git a/class/Seutubo.php b/class/Seutubo.php index 8c9ac3c4..3167b858 100644 --- a/class/Seutubo.php +++ b/class/Seutubo.php @@ -6,16 +6,16 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Seutubo class. @@ -24,82 +24,82 @@ */ class Seutubo extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Seutubo constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('video_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('uid_owner', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('video_desc', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('youtube_code', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('main_video', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Seutubo constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('video_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('uid_owner', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('video_desc', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('youtube_code', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('main_video', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = 'video_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_seutubo_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Seutubo($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = 'video_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_seutubo_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Seutubo($myrow); + } + } + return $ret; + } } diff --git a/class/SeutuboHandler.php b/class/SeutuboHandler.php index 2b9102a6..7d81ee94 100644 --- a/class/SeutuboHandler.php +++ b/class/SeutuboHandler.php @@ -6,7 +6,7 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } // ------------------------------------------------------------------------- @@ -20,271 +20,271 @@ class SeutuboHandler extends \XoopsObjectHandler { - /** - * create a new Seutubo - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Seutubo - */ - public function create($isNew = true) - { - $yogurt_seutubo = new Seutubo(); - if ($isNew) { - $yogurt_seutubo->setNew(); - } else { - $yogurt_seutubo->unsetNew(); - } + /** + * create a new Seutubo + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Seutubo + */ + public function create($isNew = true) + { + $yogurt_seutubo = new Seutubo(); + if ($isNew) { + $yogurt_seutubo->setNew(); + } else { + $yogurt_seutubo->unsetNew(); + } - return $yogurt_seutubo; - } + return $yogurt_seutubo; + } - /** - * retrieve a Seutubo - * - * @param int $id of the Seutubo - * @return mixed reference to the {@link Seutubo} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_seutubo = new Seutubo(); - $yogurt_seutubo->assignVars($this->db->fetchArray($result)); - return $yogurt_seutubo; - } - return false; - } + /** + * retrieve a Seutubo + * + * @param int $id of the Seutubo + * @return mixed reference to the {@link Seutubo} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_seutubo = new Seutubo(); + $yogurt_seutubo->assignVars($this->db->fetchArray($result)); + return $yogurt_seutubo; + } + return false; + } - /** - * insert a new Seutubo in the database - * - * @param \XoopsObject $yogurt_seutubo reference to the {@link Seutubo} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_seutubo, $force = false) - { - global $xoopsConfig; - if (!$yogurt_seutubo instanceof \Seutubo) { - return false; - } - if (!$yogurt_seutubo->isDirty()) { - return true; - } - if (!$yogurt_seutubo->cleanVars()) { - return false; - } - foreach ($yogurt_seutubo->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_seutubo->isNew()) { - // ajout/modification d'un Seutubo - $yogurt_seutubo = new Seutubo(); - $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; - $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'video_id=%u, uid_owner=%u, video_desc=%s, youtube_code=%s, main_video=%s'; - $format .= ' WHERE video_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($video_id)) { - $video_id = $this->db->getInsertId(); - } - $yogurt_seutubo->assignVar('video_id', $video_id); - return true; - } + /** + * insert a new Seutubo in the database + * + * @param \XoopsObject $yogurt_seutubo reference to the {@link Seutubo} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_seutubo, $force = false) + { + global $xoopsConfig; + if (!$yogurt_seutubo instanceof \Seutubo) { + return false; + } + if (!$yogurt_seutubo->isDirty()) { + return true; + } + if (!$yogurt_seutubo->cleanVars()) { + return false; + } + foreach ($yogurt_seutubo->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_seutubo->isNew()) { + // ajout/modification d'un Seutubo + $yogurt_seutubo = new Seutubo(); + $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; + $format .= 'VALUES (%u, %u, %s, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'video_id=%u, uid_owner=%u, video_desc=%s, youtube_code=%s, main_video=%s'; + $format .= ' WHERE video_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($video_id)) { + $video_id = $this->db->getInsertId(); + } + $yogurt_seutubo->assignVar('video_id', $video_id); + return true; + } - /** - * delete a Seutubo from the database - * - * @param \XoopsObject $yogurt_seutubo reference to the Seutubo to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_seutubo, $force = false) - { - if (!$yogurt_seutubo instanceof \Seutubo) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE video_id = %u', $this->db->prefix('yogurt_seutubo'), $yogurt_seutubo->getVar('video_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Seutubo from the database + * + * @param \XoopsObject $yogurt_seutubo reference to the Seutubo to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_seutubo, $force = false) + { + if (!$yogurt_seutubo instanceof \Seutubo) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE video_id = %u', $this->db->prefix('yogurt_seutubo'), $yogurt_seutubo->getVar('video_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_seutubos from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Seutubo} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_seutubo = new Seutubo(); - $yogurt_seutubo->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_seutubo; - } else { - $ret[$myrow['video_id']] =& $yogurt_seutubo; - } - unset($yogurt_seutubo); - } - return $ret; - } + /** + * retrieve yogurt_seutubos from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Seutubo} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_seutubo = new Seutubo(); + $yogurt_seutubo->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_seutubo; + } else { + $ret[$myrow['video_id']] =& $yogurt_seutubo; + } + unset($yogurt_seutubo); + } + return $ret; + } - /** - * count yogurt_seutubos matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_seutubos - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_seutubo'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_seutubos matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_seutubos + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_seutubo'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_seutubos matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_seutubo'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_seutubos matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_seutubo'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } - /** - * Render a form to send videos - * - * @param object $xoopsTpl the one in which the form will be rendered - * @return bool TRUE - * - * obs: Some functions wont work on php 4 so edit lines down under acording to your version - */ - public function renderFormSubmit($xoopsTpl) - { - $form = new \XoopsThemeForm(_MD_YOGURT_ADDFAVORITEVIDEOS, 'form_videos', 'video_submited.php', 'post', true); - $field_code = new \XoopsFormText(_MD_YOGURT_YOUTUBECODE, 'codigo', 50, 250); - $field_desc = new \XoopsFormTextArea(_MD_YOGURT_CAPTION, 'caption'); - $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_ADDVIDEO, 'submit'); + /** + * Render a form to send videos + * + * @param object $xoopsTpl the one in which the form will be rendered + * @return bool TRUE + * + * obs: Some functions wont work on php 4 so edit lines down under acording to your version + */ + public function renderFormSubmit($xoopsTpl) + { + $form = new \XoopsThemeForm(_MD_YOGURT_ADDFAVORITEVIDEOS, 'form_videos', 'video_submited.php', 'post', true); + $field_code = new \XoopsFormText(_MD_YOGURT_YOUTUBECODE, 'codigo', 50, 250); + $field_desc = new \XoopsFormTextArea(_MD_YOGURT_CAPTION, 'caption'); + $form->setExtra('enctype="multipart/form-data"'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_ADDVIDEO, 'submit'); - $form->addElement($field_warning); - $form->addElement($field_code, true); - $form->addElement($field_desc); + $form->addElement($field_warning); + $form->addElement($field_code, true); + $form->addElement($field_desc); - $form->addElement($button_send); - if (str_replace('.', '', PHP_VERSION) > 499) { - $form->assign($xoopsTpl);//If your server is php 5 - //$form->display(); - } else { - $form->display(); //If your server is php 4.4 - } + $form->addElement($button_send); + if (str_replace('.', '', PHP_VERSION) > 499) { + $form->assign($xoopsTpl);//If your server is php 5 + //$form->display(); + } else { + $form->display(); //If your server is php 4.4 + } - return true; - } + return true; + } - /** - * Render a form to edit the description of the pictures - * - * @param string $caption The description of the picture - * @param int $cod_img the id of the image in database - * @param text $filename the url to the thumb of the image so it can be displayed - * @return bool TRUE - */ - public function renderFormEdit($caption, $cod_img, $filename) - { - $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdescvideo.php', 'post', true); - $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); - $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); - $field_warning = new \XoopsFormLabel( - ' + /** + * Render a form to edit the description of the pictures + * + * @param string $caption The description of the picture + * @param int $cod_img the id of the image in database + * @param text $filename the url to the thumb of the image so it can be displayed + * @return bool TRUE + */ + public function renderFormEdit($caption, $cod_img, $filename) + { + $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdescvideo.php', 'post', true); + $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); + $form->setExtra('enctype="multipart/form-data"'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); + $field_warning = new \XoopsFormLabel( + ' ' - ); - $field_video_id = new \XoopsFormHidden('video_id', $cod_img); - $field_marker = new \XoopsFormHidden('marker', 1); - $form->addElement($field_warning); - $form->addElement($field_desc); - $form->addElement($field_video_id, true); - $form->addElement($field_marker); - $form->addElement($button_send); - $form->display(); + ); + $field_video_id = new \XoopsFormHidden('video_id', $cod_img); + $field_marker = new \XoopsFormHidden('marker', 1); + $form->addElement($field_warning); + $form->addElement($field_desc); + $form->addElement($field_video_id, true); + $form->addElement($field_marker); + $form->addElement($button_send); + $form->display(); - return true; - } + return true; + } - /** - * @param null $uid_owner - * @return bool - */ - public function unsetAllMainsbyID($uid_owner = null) - { - $sql = 'UPDATE ' . $this->db->prefix('yogurt_seutubo') . ' SET main_video=0 WHERE uid_owner=' . $uid_owner; + /** + * @param null $uid_owner + * @return bool + */ + public function unsetAllMainsbyID($uid_owner = null) + { + $sql = 'UPDATE ' . $this->db->prefix('yogurt_seutubo') . ' SET main_video=0 WHERE uid_owner=' . $uid_owner; - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } } diff --git a/class/Suspensions.php b/class/Suspensions.php index 3d9597a2..f76d8564 100644 --- a/class/Suspensions.php +++ b/class/Suspensions.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Suspensions class. @@ -16,82 +16,82 @@ */ class Suspensions extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Suspensions constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('old_pass', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('old_email', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('old_signature', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('suspension_time', XOBJ_DTYPE_INT, null, false, 10); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Suspensions constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('old_pass', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('old_email', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('old_signature', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('suspension_time', XOBJ_DTYPE_INT, null, false, 10); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_suspensionss($criteria = [], $asobject = false, $sort = 'uid', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT uid FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_suspensions_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Suspensions($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_suspensionss($criteria = [], $asobject = false, $sort = 'uid', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT uid FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_suspensions_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Suspensions($myrow); + } + } + return $ret; + } } diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index 1643a5c5..cba2eef2 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Suspensions user handler class ------------------- @@ -20,193 +20,193 @@ class SuspensionsHandler extends \XoopsObjectHandler { - /** - * create a new Suspensions - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Suspensions - */ - public function create($isNew = true) - { - $suspensions = new Suspensions(); - if ($isNew) { - $suspensions->setNew(); - } else { - $suspensions->unsetNew(); - } + /** + * create a new Suspensions + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Suspensions + */ + public function create($isNew = true) + { + $suspensions = new Suspensions(); + if ($isNew) { + $suspensions->setNew(); + } else { + $suspensions->unsetNew(); + } - return $suspensions; - } + return $suspensions; + } - /** - * retrieve a Suspensions - * - * @param int $id of the Suspensions - * @return mixed reference to the {@link Suspensions} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $suspensions = new Suspensions(); - $suspensions->assignVars($this->db->fetchArray($result)); - return $suspensions; - } - return false; - } + /** + * retrieve a Suspensions + * + * @param int $id of the Suspensions + * @return mixed reference to the {@link Suspensions} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $suspensions = new Suspensions(); + $suspensions->assignVars($this->db->fetchArray($result)); + return $suspensions; + } + return false; + } - /** - * insert a new Suspensions in the database - * - * @param \XoopsObject $suspensions reference to the {@link Suspensions} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $suspensions, $force = false) - { - global $xoopsConfig; - if (!$suspensions instanceof \Suspensions) { - return false; - } - if (!$suspensions->isDirty()) { - return true; - } - if (!$suspensions->cleanVars()) { - return false; - } - foreach ($suspensions->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($suspensions->isNew()) { - // ajout/modification d'un Suspensions - $suspensions = new Suspensions(); - $format = 'INSERT INTO %s (uid, old_pass, old_email, old_signature, suspension_time)'; - $format .= 'VALUES (%u, %s, %s, %s, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'uid=%u, old_pass=%s, old_email=%s, old_signature=%s, suspension_time=%u'; - $format .= ' WHERE uid = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time, $uid); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($uid)) { - $uid = $this->db->getInsertId(); - } - $suspensions->assignVar('uid', $uid); - return true; - } + /** + * insert a new Suspensions in the database + * + * @param \XoopsObject $suspensions reference to the {@link Suspensions} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $suspensions, $force = false) + { + global $xoopsConfig; + if (!$suspensions instanceof \Suspensions) { + return false; + } + if (!$suspensions->isDirty()) { + return true; + } + if (!$suspensions->cleanVars()) { + return false; + } + foreach ($suspensions->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($suspensions->isNew()) { + // ajout/modification d'un Suspensions + $suspensions = new Suspensions(); + $format = 'INSERT INTO %s (uid, old_pass, old_email, old_signature, suspension_time)'; + $format .= 'VALUES (%u, %s, %s, %s, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'uid=%u, old_pass=%s, old_email=%s, old_signature=%s, suspension_time=%u'; + $format .= ' WHERE uid = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time, $uid); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($uid)) { + $uid = $this->db->getInsertId(); + } + $suspensions->assignVar('uid', $uid); + return true; + } - /** - * delete a Suspensions from the database - * - * @param \XoopsObject $suspensions reference to the Suspensions to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $suspensions, $force = false) - { - if (!$suspensions instanceof \Suspensions) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE uid = %u', $this->db->prefix('yogurt_suspensions'), $suspensions->getVar('uid')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } + /** + * delete a Suspensions from the database + * + * @param \XoopsObject $suspensions reference to the Suspensions to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $suspensions, $force = false) + { + if (!$suspensions instanceof \Suspensions) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE uid = %u', $this->db->prefix('yogurt_suspensions'), $suspensions->getVar('uid')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } - /** - * retrieve yogurt_suspensionss from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Suspensions} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $suspensions = new Suspensions(); - $suspensions->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $suspensions; - } else { - $ret[$myrow['uid']] =& $suspensions; - } - unset($suspensions); - } - return $ret; - } + /** + * retrieve yogurt_suspensionss from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Suspensions} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $suspensions = new Suspensions(); + $suspensions->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $suspensions; + } else { + $ret[$myrow['uid']] =& $suspensions; + } + unset($suspensions); + } + return $ret; + } - /** - * count yogurt_suspensionss matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_suspensionss - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_suspensions'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + /** + * count yogurt_suspensionss matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_suspensionss + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_suspensions'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } - /** - * delete yogurt_suspensionss matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_suspensions'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->queryF($sql)) { - return false; - } - return true; - } + /** + * delete yogurt_suspensionss matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_suspensions'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->queryF($sql)) { + return false; + } + return true; + } } diff --git a/class/Tribes.php b/class/Tribes.php index 32100019..3c384e65 100644 --- a/class/Tribes.php +++ b/class/Tribes.php @@ -6,17 +6,17 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH.'/class/uploader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; -include_once XOOPS_ROOT_PATH.'/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Tribes class. @@ -25,82 +25,82 @@ */ class Tribes extends \XoopsObject { - public $db; + public $db; - // constructor + // constructor - /** - * Tribes constructor. - * @param null $id - */ - public function __construct($id = null) - { - $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('tribe_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('owner_uid', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('tribe_title', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('tribe_desc', XOBJ_DTYPE_TXTBOX, null, false); - $this->initVar('tribe_img', XOBJ_DTYPE_TXTBOX, null, false); - if (!empty($id)) { - if (is_array($id)) { - $this->assignVars($id); - } else { - $this->load((int)$id); - } - } else { - $this->setNew(); - } - } + /** + * Tribes constructor. + * @param null $id + */ + public function __construct($id = null) + { + $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); + $this->initVar('tribe_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('owner_uid', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('tribe_title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('tribe_desc', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('tribe_img', XOBJ_DTYPE_TXTBOX, null, false); + if (!empty($id)) { + if (is_array($id)) { + $this->assignVars($id); + } else { + $this->load((int)$id); + } + } else { + $this->setNew(); + } + } - /** - * @param $id - */ - public function load($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; - $myrow = $this->db->fetchArray($this->db->query($sql)); - $this->assignVars($myrow); - if (!$myrow) { - $this->setNew(); - } - } + /** + * @param $id + */ + public function load($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; + $myrow = $this->db->fetchArray($this->db->query($sql)); + $this->assignVars($myrow); + if (!$myrow) { + $this->setNew(); + } + } - /** - * @param array $criteria - * @param bool $asobject - * @param string $sort - * @param string $order - * @param int $limit - * @param int $start - * @return array - */ - public function getAllyogurt_tribess($criteria = [], $asobject = false, $sort = 'tribe_id', $order = 'ASC', $limit = 0, $start = 0) - { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; - $where_query = ''; - if (is_array($criteria) && count($criteria) > 0) { - $where_query = ' WHERE'; - foreach ($criteria as $c) { - $where_query .= " $c AND"; - } - $where_query = substr($where_query, 0, -4); - } elseif (!is_array($criteria) && $criteria) { - $where_query = ' WHERE ' . $criteria; - } - if (!$asobject) { - $sql = 'SELECT tribe_id FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = $myrow['yogurt_tribes_id']; - } - } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; - $result = $db->query($sql, $limit, $start); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new Tribes($myrow); - } - } - return $ret; - } + /** + * @param array $criteria + * @param bool $asobject + * @param string $sort + * @param string $order + * @param int $limit + * @param int $start + * @return array + */ + public function getAllyogurt_tribess($criteria = [], $asobject = false, $sort = 'tribe_id', $order = 'ASC', $limit = 0, $start = 0) + { + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; + $where_query = ''; + if (is_array($criteria) && count($criteria) > 0) { + $where_query = ' WHERE'; + foreach ($criteria as $c) { + $where_query .= " $c AND"; + } + $where_query = substr($where_query, 0, -4); + } elseif (!is_array($criteria) && $criteria) { + $where_query = ' WHERE ' . $criteria; + } + if (!$asobject) { + $sql = 'SELECT tribe_id FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = $myrow['yogurt_tribes_id']; + } + } else { + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; + $result = $db->query($sql, $limit, $start); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new Tribes($myrow); + } + } + return $ret; + } } diff --git a/class/TribesHandler.php b/class/TribesHandler.php index 10ffa193..069cac45 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -6,7 +6,7 @@ * Protection against inclusion outside the site */ if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); + die('XOOPS root path not defined'); } // ------------------------------------------------------------------------- @@ -20,295 +20,295 @@ class TribesHandler extends \XoopsObjectHandler { - /** - * create a new Tribes - * - * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Tribes - */ - public function create($isNew = true) - { - $yogurt_tribes = new Tribes(); - if ($isNew) { - $yogurt_tribes->setNew(); - } else { - $yogurt_tribes->unsetNew(); - } - - return $yogurt_tribes; - } - - /** - * retrieve a Tribes - * - * @param int $id of the Tribes - * @return mixed reference to the {@link Tribes} object, FALSE if failed - */ - public function get($id) - { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if (1 == $numrows) { - $yogurt_tribes = new Tribes(); - $yogurt_tribes->assignVars($this->db->fetchArray($result)); - return $yogurt_tribes; - } - return false; - } - - /** - * insert a new Tribes in the database - * - * @param \XoopsObject $yogurt_tribes reference to the {@link Tribes} - * object - * @param bool $force - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - public function insert(\XoopsObject $yogurt_tribes, $force = false) - { - global $xoopsConfig; - if (!$yogurt_tribes instanceof \Tribes) { - return false; - } - if (!$yogurt_tribes->isDirty()) { - return true; - } - if (!$yogurt_tribes->cleanVars()) { - return false; - } - foreach ($yogurt_tribes->cleanVars as $k => $v) { - ${$k} = $v; - } - $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_tribes->isNew()) { - // ajout/modification d'un Tribes - $yogurt_tribes = new Tribes(); - $format = 'INSERT INTO %s (tribe_id, owner_uid, tribe_title, tribe_desc, tribe_img)'; - $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img)); - $force = true; - } else { - $format = 'UPDATE %s SET '; - $format .= 'tribe_id=%u, owner_uid=%u, tribe_title=%s, tribe_desc=%s, tribe_img=%s'; - $format .= ' WHERE tribe_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img), $tribe_id); - } - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if (empty($tribe_id)) { - $tribe_id = $this->db->getInsertId(); - } - $yogurt_tribes->assignVar('tribe_id', $tribe_id); - return true; - } - - /** - * delete a Tribes from the database - * - * @param \XoopsObject $yogurt_tribes reference to the Tribes to delete - * @param bool $force - * @return bool FALSE if failed. - */ - public function delete(\XoopsObject $yogurt_tribes, $force = false) - { - if (!$yogurt_tribes instanceof \Tribes) { - return false; - } - $sql = sprintf('DELETE FROM %s WHERE tribe_id = %u', $this->db->prefix('yogurt_tribes'), $yogurt_tribes->getVar('tribe_id')); - if (false !== $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } - - /** - * retrieve yogurt_tribess from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Tribes} objects - */ - public function &getObjects($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $yogurt_tribes = new Tribes(); - $yogurt_tribes->assignVars($myrow); - if (!$id_as_key) { - $ret[] =& $yogurt_tribes; - } else { - $ret[$myrow['tribe_id']] =& $yogurt_tribes; - } - unset($yogurt_tribes); - } - return $ret; - } - - /** - * retrieve yogurt_tribess from the database - * - * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Tribes} objects - */ - public function getTribes($criteria = null, $id_as_key = false) - { - $ret = []; - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - if ('' != $criteria->getSort()) { - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - - $i = 0; - while ($myrow = $this->db->fetchArray($result)) { - $ret[$i]['id'] = $myrow['tribe_id']; - $ret[$i]['title'] = $myrow['tribe_title']; - $ret[$i]['img'] = $myrow['tribe_img']; - $ret[$i]['desc'] = $myrow['tribe_desc']; - $ret[$i]['uid'] = $myrow['owner_uid']; - $i++; - } - return $ret; - } - - /** - * count yogurt_tribess matching a condition - * - * @param CriteriaElement $criteria {@link CriteriaElement} to match - * @return int count of yogurt_tribess - */ - public function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_tribes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } - - /** - * delete yogurt_tribess matching a set of conditions - * - * @param CriteriaElement $criteria {@link CriteriaElement} - * @return bool FALSE if deletion failed - */ - public function deleteAll($criteria = null) - { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_tribes'); - if (isset($criteria) && $criteria instanceof \criteriaelement) { - $sql .= ' ' . $criteria->renderWhere(); - } - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } - - /** - * @param $maxbytes - * @param $xoopsTpl - * @return bool - */ - public function renderFormSubmit($maxbytes, $xoopsTpl) - { - $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_TRIBE, 'form_tribe', 'submit_tribe.php', 'post', true); - $form->setExtra('enctype="multipart/form-data"'); - - $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'tribe_img', $maxbytes); - $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'tribe_title', 35, 55); - $field_desc = new \XoopsFormText(_MD_YOGURT_TRIBE_DESC, 'tribe_desc', 35, 55); - $field_marker = new \XoopsFormHidden('marker', '1'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); - $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); - - $form->addElement($field_warning); - $form->addElement($field_url, true); - - $form->addElement($field_title); - $form->addElement($field_desc); - $form->addElement($field_marker); - $form->addElement($button_send); - $form->display(); - - return true; - } - - /** - * @param $tribe - * @param $maxbytes - * @return bool - */ - public function renderFormEdit($tribe, $maxbytes) - { - $form = new \XoopsThemeForm(_MD_YOGURT_EDIT_TRIBE, 'form_edittribe', 'edittribe.php', 'post', true); - $form->setExtra('enctype="multipart/form-data"'); - $field_tribeid = new \XoopsFormHidden('tribe_id', $tribe->getVar('tribe_id')); - $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'img', $maxbytes); - $field_url->setExtra('style="visibility:hidden;"'); - $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'title', 35, 55, $tribe->getVar('tribe_title')); - $field_desc = new \XoopsFormTextArea(_MD_YOGURT_TRIBE_DESC, 'desc', $tribe->getVar('tribe_desc')); - $field_marker = new \XoopsFormHidden('marker', '1'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); - $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); - - $field_oldpicture = new \XoopsFormLabel(_MD_YOGURT_TRIBE_IMAGE, ''); - - $field_maintainimage = new \XoopsFormLabel(_MD_YOGURT_MAINTAINOLDIMAGE, ""); - - $form->addElement($field_oldpicture); - $form->addElement($field_maintainimage); - $form->addElement($field_warning); - $form->addElement($field_url); - $form->addElement($field_tribeid); - $form->addElement($field_title); - $form->addElement($field_desc); - $form->addElement($field_marker); - $form->addElement($button_send); - $form->display(); - echo " + /** + * create a new Tribes + * + * @param bool $isNew flag the new objects as "new"? + * @return \XoopsObject Tribes + */ + public function create($isNew = true) + { + $yogurt_tribes = new Tribes(); + if ($isNew) { + $yogurt_tribes->setNew(); + } else { + $yogurt_tribes->unsetNew(); + } + + return $yogurt_tribes; + } + + /** + * retrieve a Tribes + * + * @param int $id of the Tribes + * @return mixed reference to the {@link Tribes} object, FALSE if failed + */ + public function get($id) + { + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if (1 == $numrows) { + $yogurt_tribes = new Tribes(); + $yogurt_tribes->assignVars($this->db->fetchArray($result)); + return $yogurt_tribes; + } + return false; + } + + /** + * insert a new Tribes in the database + * + * @param \XoopsObject $yogurt_tribes reference to the {@link Tribes} + * object + * @param bool $force + * @return bool FALSE if failed, TRUE if already present and unchanged or successful + */ + public function insert(\XoopsObject $yogurt_tribes, $force = false) + { + global $xoopsConfig; + if (!$yogurt_tribes instanceof \Tribes) { + return false; + } + if (!$yogurt_tribes->isDirty()) { + return true; + } + if (!$yogurt_tribes->cleanVars()) { + return false; + } + foreach ($yogurt_tribes->cleanVars as $k => $v) { + ${$k} = $v; + } + $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; + if ($yogurt_tribes->isNew()) { + // ajout/modification d'un Tribes + $yogurt_tribes = new Tribes(); + $format = 'INSERT INTO %s (tribe_id, owner_uid, tribe_title, tribe_desc, tribe_img)'; + $format .= 'VALUES (%u, %u, %s, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img)); + $force = true; + } else { + $format = 'UPDATE %s SET '; + $format .= 'tribe_id=%u, owner_uid=%u, tribe_title=%s, tribe_desc=%s, tribe_img=%s'; + $format .= ' WHERE tribe_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img), $tribe_id); + } + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + if (empty($tribe_id)) { + $tribe_id = $this->db->getInsertId(); + } + $yogurt_tribes->assignVar('tribe_id', $tribe_id); + return true; + } + + /** + * delete a Tribes from the database + * + * @param \XoopsObject $yogurt_tribes reference to the Tribes to delete + * @param bool $force + * @return bool FALSE if failed. + */ + public function delete(\XoopsObject $yogurt_tribes, $force = false) + { + if (!$yogurt_tribes instanceof \Tribes) { + return false; + } + $sql = sprintf('DELETE FROM %s WHERE tribe_id = %u', $this->db->prefix('yogurt_tribes'), $yogurt_tribes->getVar('tribe_id')); + if (false !== $force) { + $result = $this->db->queryF($sql); + } else { + $result = $this->db->query($sql); + } + if (!$result) { + return false; + } + return true; + } + + /** + * retrieve yogurt_tribess from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Tribes} objects + */ + public function &getObjects($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $yogurt_tribes = new Tribes(); + $yogurt_tribes->assignVars($myrow); + if (!$id_as_key) { + $ret[] =& $yogurt_tribes; + } else { + $ret[$myrow['tribe_id']] =& $yogurt_tribes; + } + unset($yogurt_tribes); + } + return $ret; + } + + /** + * retrieve yogurt_tribess from the database + * + * @param CriteriaElement $criteria {@link CriteriaElement} conditions to be met + * @param bool $id_as_key use the UID as key for the array? + * @return array array of {@link Tribes} objects + */ + public function getTribes($criteria = null, $id_as_key = false) + { + $ret = []; + $limit = $start = 0; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + if ('' != $criteria->getSort()) { + $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); + } + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + + $i = 0; + while ($myrow = $this->db->fetchArray($result)) { + $ret[$i]['id'] = $myrow['tribe_id']; + $ret[$i]['title'] = $myrow['tribe_title']; + $ret[$i]['img'] = $myrow['tribe_img']; + $ret[$i]['desc'] = $myrow['tribe_desc']; + $ret[$i]['uid'] = $myrow['owner_uid']; + $i++; + } + return $ret; + } + + /** + * count yogurt_tribess matching a condition + * + * @param CriteriaElement $criteria {@link CriteriaElement} to match + * @return int count of yogurt_tribess + */ + public function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_tribes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + $result = $this->db->query($sql); + if (!$result) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } + + /** + * delete yogurt_tribess matching a set of conditions + * + * @param CriteriaElement $criteria {@link CriteriaElement} + * @return bool FALSE if deletion failed + */ + public function deleteAll($criteria = null) + { + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_tribes'); + if (isset($criteria) && $criteria instanceof \criteriaelement) { + $sql .= ' ' . $criteria->renderWhere(); + } + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + /** + * @param $maxbytes + * @param $xoopsTpl + * @return bool + */ + public function renderFormSubmit($maxbytes, $xoopsTpl) + { + $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_TRIBE, 'form_tribe', 'submit_tribe.php', 'post', true); + $form->setExtra('enctype="multipart/form-data"'); + + $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'tribe_img', $maxbytes); + $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'tribe_title', 35, 55); + $field_desc = new \XoopsFormText(_MD_YOGURT_TRIBE_DESC, 'tribe_desc', 35, 55); + $field_marker = new \XoopsFormHidden('marker', '1'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); + $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); + + $form->addElement($field_warning); + $form->addElement($field_url, true); + + $form->addElement($field_title); + $form->addElement($field_desc); + $form->addElement($field_marker); + $form->addElement($button_send); + $form->display(); + + return true; + } + + /** + * @param $tribe + * @param $maxbytes + * @return bool + */ + public function renderFormEdit($tribe, $maxbytes) + { + $form = new \XoopsThemeForm(_MD_YOGURT_EDIT_TRIBE, 'form_edittribe', 'edittribe.php', 'post', true); + $form->setExtra('enctype="multipart/form-data"'); + $field_tribeid = new \XoopsFormHidden('tribe_id', $tribe->getVar('tribe_id')); + $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'img', $maxbytes); + $field_url->setExtra('style="visibility:hidden;"'); + $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'title', 35, 55, $tribe->getVar('tribe_title')); + $field_desc = new \XoopsFormTextArea(_MD_YOGURT_TRIBE_DESC, 'desc', $tribe->getVar('tribe_desc')); + $field_marker = new \XoopsFormHidden('marker', '1'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); + $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); + + $field_oldpicture = new \XoopsFormLabel(_MD_YOGURT_TRIBE_IMAGE, ''); + + $field_maintainimage = new \XoopsFormLabel(_MD_YOGURT_MAINTAINOLDIMAGE, ""); + + $form->addElement($field_oldpicture); + $form->addElement($field_maintainimage); + $form->addElement($field_warning); + $form->addElement($field_url); + $form->addElement($field_tribeid); + $form->addElement($field_title); + $form->addElement($field_desc); + $form->addElement($field_marker); + $form->addElement($button_send); + $form->display(); + echo " - - - - - - "; + + + + + + "; return true; } @@ -361,7 +368,7 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload if (1 == $change_img) { // mimetypes and settings put this in admin part later $allowed_mimetypes = ['image/jpeg', 'image/pjpeg']; - $maxfilesize = $maxfilebytes; + $maxfilesize = $maxfilebytes; // create the object to upload $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); @@ -375,17 +382,18 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload // if there are errors lets return them echo '

' . $uploader->getErrors() . '

'; - return false; - } else { - // now let s create a new object picture and set its variables - $url = $uploader->getSavedFileName(); - $saved_destination = $uploader->getSavedDestination(); - $image_name = $this->resizeImage2($saved_destination, 125, 80, $path_upload); - $tribe->setVar('tribe_img', $image_name); + return false; } + // now let s create a new object picture and set its variables + + $url = $uploader->getSavedFileName(); + $saved_destination = $uploader->getSavedDestination(); + $image_name = $this->resizeImage2($saved_destination, 125, 80, $path_upload); + $tribe->setVar('tribe_img', $image_name); } else { echo '

' . $uploader->getErrors() . '

'; + return false; } } @@ -406,12 +414,11 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload * @param int $thumbwidth the width in pixels that the thumbnail will have * @param int $thumbheight the height in pixels that the thumbnail will have * @param string $path_upload The path to where the files should be saved after resizing - * @return void */ public function resizeImage($img_path, $thumbwidth, $thumbheight, $path_upload) { - $path = pathinfo($img_path); - $img = imagecreatefromjpeg($img_path); + $path = pathinfo($img_path); + $img = imagecreatefromjpeg($img_path); $xratio = $thumbwidth / imagesx($img); $yratio = $thumbheight / imagesy($img); @@ -445,25 +452,25 @@ public function resizeImage2($img_path, $thumbwidth, $thumbheight, $path_upload) global $xoopsUser, $xoopsModule; $path = pathinfo($img_path); - $img = imagecreatefromjpeg($img_path); + $img = imagecreatefromjpeg($img_path); if (imagesx($img) < 128) { $x1 = (128 - imagesx($img)) / 2; $x2 = 0; - $w = imagesx($img); + $w = imagesx($img); } else { $x1 = 0; $x2 = (imagesx($img) - 128) / 2; - $w = 125; + $w = 125; } if (imagesy($img) < 80) { $y1 = (80 - imagesy($img)) / 2; $y2 = 0; - $h = imagesy($img); + $h = imagesy($img); } else { $y1 = 0; $y2 = (imagesy($img) - 80) / 2; - $h = 80; + $h = 80; } $xratio = $thumbwidth / imagesx($img); @@ -471,11 +478,12 @@ public function resizeImage2($img_path, $thumbwidth, $thumbheight, $path_upload) $resized = imagecreatefromgif('images/tribetemplate.gif'); - $imagem = imagecopymerge($resized, $img, $x1, $y1, $x2, $y2, $w, $h, 90); + $imagem = imagecopymerge($resized, $img, $x1, $y1, $x2, $y2, $w, $h, 90); $gif_name = 'tribe_' . $xoopsUser->getVar('uid') . mt_rand(1000000, 9999999) . '.gif'; imagegif($resized, $path_upload . '/' . $gif_name); imagedestroy($resized); imagedestroy($img); + return $gif_name; } } diff --git a/class/Utility.php b/class/Utility.php index 49a08dcd..717cc305 100644 --- a/class/Utility.php +++ b/class/Utility.php @@ -16,16 +16,12 @@ */ /** - * * @package \module\xsitemap\class * @license https://www.fsf.org/copyleft/gpl.html GNU public license * @copyright https://xoops.org 2000-2020 © XOOPS Project * @author Mamba */ -use XoopsModules\Yogurt; -use XoopsModules\Yogurt\Common; - /** * Class Utility */ @@ -37,7 +33,6 @@ class Utility extends Common\SysUtility * Access the only instance of this class * * @return object - * */ public static function getInstance() { @@ -48,5 +43,4 @@ public static function getInstance() return $instance; } - } diff --git a/class/VideoController.php b/class/VideoController.php index f70c44b7..1a6feb7e 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -19,7 +19,6 @@ * @author XOOPS Development Team * @since */ - include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; @@ -47,7 +46,6 @@ */ class VideoController extends YogurtController { - /** * Fecth videos * @param object $criteria @@ -56,6 +54,7 @@ class VideoController extends YogurtController public function getVideos($criteria) { $videos = $this->videosFactory->getObjects($criteria); + return $videos; } @@ -63,7 +62,6 @@ public function getVideos($criteria) * Assign Videos Submit Form to theme * @param int $maxNbVideos the maximum number of videos a user can have * @param $presentNb - * @return void */ public function showFormSubmitVideos($maxNbVideos, $presentNb) { @@ -87,20 +85,20 @@ public function assignVideoContent($nbVideos, $videos) { if (0 == $nbVideos) { return false; - } else { - /** - * Lets populate an array with the dati from the videos - */ - $i = 0; - foreach ($videos as $video) { - $videos_array[$i]['url'] = $video->getVar('youtube_code', 's'); - $videos_array[$i]['desc'] = $video->getVar('video_desc', 's'); - $videos_array[$i]['id'] = $video->getVar('video_id', 's'); - - $i++; - } - return $videos_array; } + /** + * Lets populate an array with the dati from the videos + */ + $i = 0; + foreach ($videos as $video) { + $videos_array[$i]['url'] = $video->getVar('youtube_code', 's'); + $videos_array[$i]['desc'] = $video->getVar('video_desc', 's'); + $videos_array[$i]['id'] = $video->getVar('video_id', 's'); + + $i++; + } + + return $videos_array; } /** @@ -109,12 +107,12 @@ public function assignVideoContent($nbVideos, $videos) * @param int $videosPerPage the number of videos in a page * @param int $start at which position of the array we start * @param int $interval how many pages between the first link and the next one - * @return void */ public function VideosNavBar($nbVideos, $videosPerPage, $start, $interval) { $pageNav = new \XoopsPageNav($nbVideos, $videosPerPage, $start, 'start', 'uid=' . $this->uidOwner); - $navBar = $pageNav->renderImageNav($interval); + $navBar = $pageNav->renderImageNav($interval); + return $navBar; } @@ -137,6 +135,7 @@ public function checkPrivilege() redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); } } + return true; } } diff --git a/class/Visitors.php b/class/Visitors.php index 0c3cd463..8aa8be44 100644 --- a/class/Visitors.php +++ b/class/Visitors.php @@ -4,7 +4,7 @@ // Visitors.php,v 1 // ---------------------------------------------------------------- // -// Author: Bruno Barthez // +// Author: Bruno Barthez // // ----------------------------------------------------------------- // include_once XOOPS_ROOT_PATH . '/kernel/object.php'; @@ -47,7 +47,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors') . ' WHERE cod_visit=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors') . ' WHERE cod_visit=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -66,31 +66,32 @@ public function load($id) */ public function getAllyogurt_visitorss($criteria = [], $asobject = false, $sort = 'cod_visit', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; foreach ($criteria as $c) { $where_query .= " $c AND"; } - $where_query = substr($where_query, 0, -4); + $where_query = mb_substr($where_query, 0, -4); } elseif (!is_array($criteria) && $criteria) { $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT cod_visit FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT cod_visit FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); - while (false !== ($myrow = $db->fetchArray($result))) { + while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_visitors_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); - while (false !== ($myrow = $db->fetchArray($result))) { + while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new static($myrow); } } + return $ret; } } diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index d67a53e2..c239adf3 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -4,7 +4,7 @@ // Visitors.php,v 1 // ---------------------------------------------------------------- // -// Author: Bruno Barthez // +// Author: Bruno Barthez // // ----------------------------------------------------------------- // include_once XOOPS_ROOT_PATH . '/kernel/object.php'; @@ -19,7 +19,6 @@ */ class VisitorsHandler extends \XoopsObjectHandler { - /** * create a new Visitors * @@ -54,8 +53,10 @@ public function get($id) if (1 == $numrows) { $yogurt_visitors = new Visitors(); $yogurt_visitors->assignVars($this->db->fetchArray($result)); + return $yogurt_visitors; } + return false; } @@ -86,15 +87,15 @@ public function insert(\XoopsObject $yogurt_visitors, $force = false) if ($yogurt_visitors->isNew()) { // ajout/modification d'un Yogurt\Visitors $yogurt_visitors = new Visitors(); - $format = 'INSERT INTO %s (cod_visit, uid_owner, uid_visitor,uname_visitor)'; - $format .= 'VALUES (%u, %u, %u, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor)); - $force = true; + $format = 'INSERT INTO %s (cod_visit, uid_owner, uid_visitor,uname_visitor)'; + $format .= 'VALUES (%u, %u, %u, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'cod_visit=%u, uid_owner=%u, uid_visitor=%u, uname_visitor=%s '; $format .= ' WHERE cod_visit = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor), $cod_visit); + $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor), $cod_visit); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -108,6 +109,7 @@ public function insert(\XoopsObject $yogurt_visitors, $force = false) $cod_visit = $this->db->getInsertId(); } $yogurt_visitors->assignVar('cod_visit', $cod_visit); + return true; } @@ -132,6 +134,7 @@ public function delete(\XoopsObject $yogurt_visitors, $force = false) if (!$result) { return false; } + return true; } @@ -144,9 +147,9 @@ public function delete(\XoopsObject $yogurt_visitors, $force = false) */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -159,16 +162,17 @@ public function &getObjects($criteria = null, $id_as_key = false) if (!$result) { return $ret; } - while (false !== ($myrow = $this->db->fetchArray($result))) { + while (false !== ($myrow = $this->db->fetchArray($result))) { $yogurt_visitors = new Visitors(); $yogurt_visitors->assignVars($myrow); if (!$id_as_key) { - $ret[] =& $yogurt_visitors; + $ret[] = &$yogurt_visitors; } else { - $ret[$myrow['cod_visit']] =& $yogurt_visitors; + $ret[$myrow['cod_visit']] = &$yogurt_visitors; } unset($yogurt_visitors); } + return $ret; } @@ -189,6 +193,7 @@ public function getCount($criteria = null) return 0; } list($count) = $this->db->fetchRow($result); + return $count; } diff --git a/class/YogurtControler.php b/class/YogurtControler.php index ad319c71..4e22e130 100644 --- a/class/YogurtControler.php +++ b/class/YogurtControler.php @@ -19,7 +19,6 @@ * @author XOOPS Development Team * @since */ - include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; @@ -79,12 +78,12 @@ class YogurtController extends \XoopsObject */ public function __construct($db, $user) { - $this->db = $db; - $this->user = $user; - $this->isOwner = 0; + $this->db = $db; + $this->user = $user; + $this->isOwner = 0; $this->isAnonym = 1; $this->isFriend = 0; - $this->isUser = 0; + $this->isUser = 0; $this->createFactories(); $this->getPermissions(); $this->checkPrivilege(''); @@ -96,7 +95,7 @@ public function checkSuspension() $criteria_suspended = new \Criteria('uid', $this->uidOwner); if (1 == $this->isSuspended) { $suspensions = $this->suspensionsFactory->getObjects($criteria_suspended); - $suspension = $suspensions[0]; + $suspension = $suspensions[0]; if (time() > $suspension->getVar('suspension_time')) { $suspension = $this->suspensionsFactory->create(false); $suspension->load($this->uidOwner); @@ -125,15 +124,13 @@ public function checkPrivilegeLevel($privilegeNeeded = 0) { if ($privilegeNeeded <= $this->privilegeLevel) { return true; - } else { - return false; } + + return false; } /** * Set permissions acording to user is logged or not , is owner or not etc.. - * - * @return void */ public function getPermissions() { @@ -143,7 +140,7 @@ public function getPermissions() */ if (!empty($_GET['uid'])) { $memberHandler = xoops_getHandler('member'); - $user = $memberHandler->getUser((int)$_GET['uid']); + $user = $memberHandler->getUser((int)$_GET['uid']); if (!is_object($user)) { redirect_header('index.php', 3, _MD_YOGURT_USERDOESNTEXIST); } @@ -155,28 +152,28 @@ public function getPermissions() */ if (empty($this->user)) { $this->isAnonym = 1; - $this->isUser = 0; + $this->isUser = 0; if (!empty($_GET['uid'])) { $this->uidOwner = (int)$_GET['uid']; } else { $this->uidOwner = 1; - $this->isOwner = 0; + $this->isOwner = 0; } } else { $this->isAnonym = 0; - $this->isUser = 1; + $this->isUser = 1; if (!empty($_GET['uid'])) { $this->uidOwner = (int)$_GET['uid']; - $this->isOwner = ($this->user->getVar('uid') == (int)$_GET['uid']) ? 1 : 0; + $this->isOwner = ($this->user->getVar('uid') == (int)$_GET['uid']) ? 1 : 0; } else { $this->uidOwner = $this->user->getVar('uid'); - $this->isOwner = 1; + $this->isOwner = 1; } } - $this->owner = new \XoopsUser($this->uidOwner); + $this->owner = new \XoopsUser($this->uidOwner); $criteria_suspended = new \Criteria('uid', $this->uidOwner); $this->isSuspended = ($this->suspensionsFactory->getCount($criteria_suspended) > 0) ? 1 : 0; @@ -220,45 +217,43 @@ public function getPermissions() */ public function getNumbersSections() { - $criteriaTribes = new \Criteria('rel_user_uid', $this->uidOwner); + $criteriaTribes = new \Criteria('rel_user_uid', $this->uidOwner); $nbSections['nbTribes'] = $this->reltribeusersFactory->getCount($criteriaTribes); - $criteriaUid = new \Criteria('uid_owner', $this->uidOwner); - $criteriaAlbum = new \CriteriaCompo($criteriaUid); + $criteriaUid = new \Criteria('uid_owner', $this->uidOwner); + $criteriaAlbum = new \CriteriaCompo($criteriaUid); if (0 == $this->isOwner) { $criteriaPrivate = new \Criteria('private', 0); $criteriaAlbum->add($criteriaPrivate); } - $nbSections['nbPhotos'] = $this->albumFactory->getCount($criteriaAlbum); - $criteriaFriends = new \Criteria('friend1_uid', $this->uidOwner); + $nbSections['nbPhotos'] = $this->albumFactory->getCount($criteriaAlbum); + $criteriaFriends = new \Criteria('friend1_uid', $this->uidOwner); $nbSections['nbFriends'] = $this->friendshipsFactory->getCount($criteriaFriends); - $criteriaUidAudio = new \Criteria('uid_owner', $this->uidOwner); - $nbSections['nbAudio'] = $this->audioFactory->getCount($criteriaUidAudio); - $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); - $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); - $criteriaUidNotes = new \Criteria('Note_to', $this->uidOwner); - $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); + $criteriaUidAudio = new \Criteria('uid_owner', $this->uidOwner); + $nbSections['nbAudio'] = $this->audioFactory->getCount($criteriaUidAudio); + $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); + $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); + $criteriaUidNotes = new \Criteria('Note_to', $this->uidOwner); + $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); return $nbSections; } /** * This creates the module factories - * - * @return void */ public function createFactories() { - $this->albumFactory = new ImageHandler($this->db); - $this->visitorsFactory = new VisitorsHandler($this->db); - $this->audioFactory = new AudioHandler($this->db); - $this->videosFactory = new SeutuboHandler($this->db); - $this->petitionsFactory = new FriendpetitionHandler($this->db); - $this->friendshipsFactory = new FriendshipHandler($this->db); + $this->albumFactory = new ImageHandler($this->db); + $this->visitorsFactory = new VisitorsHandler($this->db); + $this->audioFactory = new AudioHandler($this->db); + $this->videosFactory = new SeutuboHandler($this->db); + $this->petitionsFactory = new FriendpetitionHandler($this->db); + $this->friendshipsFactory = new FriendshipHandler($this->db); $this->reltribeusersFactory = new ReltribeuserHandler($this->db); - $this->NotesFactory = new NotesHandler($this->db); - $this->tribesFactory = new TribesHandler($this->db); - $this->configsFactory = new ConfigsHandler($this->db); - $this->suspensionsFactory = new SuspensionsHandler($this->db); + $this->NotesFactory = new NotesHandler($this->db); + $this->tribesFactory = new TribesHandler($this->db); + $this->configsFactory = new ConfigsHandler($this->db); + $this->suspensionsFactory = new SuspensionsHandler($this->db); } /** @@ -275,16 +270,16 @@ public function checkPrivilegeBySection($section) } } - // if ($section=="Notes" && $xoopsModuleConfig['enable_notes']==0){ - // return false; - // } - // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ - // return false; - // } + // if ($section=="Notes" && $xoopsModuleConfig['enable_notes']==0){ + // return false; + // } + // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ + // return false; + // } // - // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ - // return false; - // } + // if ($section=="pictures" && $xoopsModuleConfig['enable_pictures']==0){ + // return false; + // } $criteria = new \Criteria('config_uid', $this->owner->getVar('uid')); if (1 == $this->configsFactory->getCount($criteria)) { $configs = $this->configsFactory->getObjects($criteria); @@ -295,6 +290,7 @@ public function checkPrivilegeBySection($section) return 0; } } + return 1; } } diff --git a/class/class.Id3v1.php b/class/class.Id3v1.php index 6f46e25a..2627be75 100644 --- a/class/class.Id3v1.php +++ b/class/class.Id3v1.php @@ -49,7 +49,6 @@ */ class Id3v1 { - /** * Represents Id3v1.0 */ @@ -257,6 +256,7 @@ class Id3v1 * * @param resource stream * @param bool $readOnly + * @param mixed $filename * @throws \Exception * @see $_tags */ @@ -315,8 +315,6 @@ public function getTitle() { if (!empty($this->_tags['title'])) { return $this->_tags['title']; - } else { - return; } } @@ -329,8 +327,6 @@ public function getArtist() { if (!empty($this->_tags['artists'])) { return $this->_tags['artist']; - } else { - return; } } @@ -343,8 +339,6 @@ public function getAlbum() { if (!empty($this->_tags['album'])) { return $this->_tags['album']; - } else { - return; } } @@ -355,8 +349,8 @@ public function getAlbum() */ public function getComment() { - if ($this->_version == self::ID3V1_1) { - return substr($this->_tags['comment'], 0, 28); + if (self::ID3V1_1 == $this->_version) { + return mb_substr($this->_tags['comment'], 0, 28); } return $this->_tags['comment']; @@ -392,8 +386,6 @@ public function getYear() { if (!empty($this->_tags['year'])) { return (int)$this->_tags['year']; - } else { - return; } } @@ -404,7 +396,7 @@ public function getYear() */ public function getTrack() { - if ($this->_version == self::ID3V1_0 || !isset($this->_tags['track'])) { + if (self::ID3V1_0 == $this->_version || !isset($this->_tags['track'])) { return false; } @@ -427,8 +419,8 @@ public function getId3v1Version() * Sets the Id3v1 version, which will be used * * @param string $version The version you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see self::ID3V1_1 * @see self::ID3V1_0 */ @@ -442,7 +434,6 @@ public function setId3v1Version($version) case self::ID3V1_0: case self::ID3V1_1: break; - default: throw new \RuntimeException('Invalid version'); } @@ -459,8 +450,8 @@ public function setId3v1Version($version) * the method itself also accepts longer terms. * * @param string $title The title you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setTitle($title) @@ -485,8 +476,8 @@ public function setTitle($title) * the method itself also accepts longer terms. * * @param string $artist The artist you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setArtist($artist) @@ -511,8 +502,8 @@ public function setArtist($artist) * the method itself also accepts longer terms. * * @param string $album The album you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setAlbum($album) @@ -539,8 +530,8 @@ public function setAlbum($album) * The method itselfs takes also longer terms. * * @param string $comment The comment you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setComment($comment) @@ -564,8 +555,8 @@ public function setComment($comment) * You can either use the genre id, or the genre name. * * @param string|int $genre The genre you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setGenre($genre) @@ -589,8 +580,8 @@ public function setGenre($genre) * Sets the year * * @param int $year The year you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags */ public function setYear($year) @@ -616,8 +607,8 @@ public function setYear($year) * ID3V1_0 you have to set it manually after calling this method. * * @param int $track The tracl you want to set - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags * @see setId3v1Version() * @see getId3v1Version() @@ -630,7 +621,7 @@ public function setTrack($track) if (is_int($track) && 0 != $track) { $this->_tags['track'] = $track; - $this->_version = self::ID3V1_1; + $this->_version = self::ID3V1_1; } else { throw new \RuntimeException('Track type invalid or zero'); } @@ -653,13 +644,13 @@ public function clearAllTags() } $this->_tags['marking'] = 'TAG'; - $this->_tags['title'] = ''; - $this->_tags['artist'] = ''; - $this->_tags['album'] = ''; - $this->_tags['year'] = null; + $this->_tags['title'] = ''; + $this->_tags['artist'] = ''; + $this->_tags['album'] = ''; + $this->_tags['year'] = null; $this->_tags['comment'] = ''; - $this->_tags['track'] = null; - $this->_tags['genre'] = 255; + $this->_tags['track'] = null; + $this->_tags['genre'] = 255; return $this; } @@ -715,8 +706,8 @@ public static function getGenreList() * This method saves the set tags to the file. Therefore it seeks to * the end of the file and writes the Id3v1 bytestream to it. * - * @return Id3v1 Implements fluent interface * @throws \Exception + * @return Id3v1 Implements fluent interface * @see $_tags * @see setTitle() * @see setArtist() @@ -740,7 +731,7 @@ public function save() $newTag = ''; - if ($this->_version == self::ID3V1_0) { + if (self::ID3V1_0 == $this->_version) { $newTag = pack('a3a30a30a30a4a30C1', 'TAG', $this->_tags['title'], $this->_tags['artist'], $this->_tags['album'], $this->_tags['year'], $this->_tags['comment'], $this->_tags['genre']); } else { $newTag = pack('a3a30a30a30a4a28x1C1C1', 'TAG', $this->_tags['title'], $this->_tags['artist'], $this->_tags['album'], $this->_tags['year'], $this->_tags['comment'], $this->_tags['track'], $this->_tags['genre']); @@ -770,8 +761,8 @@ public function save() * * * @param string $name - * @return mixed Depends on tag, which will be returned * @throws \Exception + * @return mixed Depends on tag, which will be returned */ public function __get($name) { @@ -810,8 +801,8 @@ public function __get($name) * * @param string $name * @param string $value - * @return mixed Depends on tag * @throws \Exception + * @return mixed Depends on tag */ public function __set($name, $value) { @@ -873,7 +864,5 @@ public function __toString() if (count($returnedTags) > 0) { return implode(', ', $returnedTags); } - - return; } } diff --git a/class/common/Configurator.php b/class/common/Configurator.php index e1baec20..480ce4af 100644 --- a/class/common/Configurator.php +++ b/class/common/Configurator.php @@ -29,15 +29,15 @@ class Configurator { public $name; - public $paths = []; - public $uploadFolders = []; - public $copyBlankFiles = []; + public $paths = []; + public $uploadFolders = []; + public $copyBlankFiles = []; public $copyTestFolders = []; public $templateFolders = []; - public $oldFiles = []; - public $oldFolders = []; - public $renameTables = []; - public $moduleStats = []; + public $oldFiles = []; + public $oldFolders = []; + public $renameTables = []; + public $moduleStats = []; public $modCopyright; public $icons; @@ -54,17 +54,17 @@ public function __construct() $config = include dirname(dirname(__DIR__)) . '/config/config.php'; - $this->name = $config->name; - $this->paths = $config->paths; - $this->uploadFolders = $config->uploadFolders; - $this->copyBlankFiles = $config->copyBlankFiles; + $this->name = $config->name; + $this->paths = $config->paths; + $this->uploadFolders = $config->uploadFolders; + $this->copyBlankFiles = $config->copyBlankFiles; $this->copyTestFolders = $config->copyTestFolders; $this->templateFolders = $config->templateFolders; - $this->oldFiles = $config->oldFiles; - $this->oldFolders = $config->oldFolders; - $this->renameTables = $config->renameTables; - $this->moduleStats = $config->moduleStats; - $this->modCopyright = $config->modCopyright; + $this->oldFiles = $config->oldFiles; + $this->oldFolders = $config->oldFolders; + $this->renameTables = $config->renameTables; + $this->moduleStats = $config->moduleStats; + $this->modCopyright = $config->modCopyright; $this->icons = include dirname(dirname(__DIR__)) . '/config/icons.php'; $this->paths = include dirname(dirname(__DIR__)) . '/config/paths.php'; diff --git a/class/common/DirectoryChecker.php b/class/common/DirectoryChecker.php index 531b2eaf..363c3d35 100644 --- a/class/common/DirectoryChecker.php +++ b/class/common/DirectoryChecker.php @@ -19,14 +19,13 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @author Xoops Development Team */ - use Xmf\Request; use XoopsModules\Yogurt; //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; -$moduleDirName = basename(dirname(dirname(__DIR__))); +$moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('directorychecker', $moduleDirName); @@ -53,10 +52,10 @@ public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = n if (null === $redirectFile) { $redirectFile = $_SERVER['SCRIPT_NAME']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (!@is_dir($path)) { - $path_status = ""; + $path_status = ""; $path_status .= "$path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTAVAILABLE') . ') '; $path_status .= "
"; $path_status .= ""; @@ -65,11 +64,11 @@ public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = n $path_status .= "'; $path_status .= '
'; } elseif (@is_writable($path)) { - $path_status = ""; + $path_status = ""; $path_status .= "$path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'DC_AVAILABLE') . ') '; $currentMode = mb_substr(decoct(fileperms($path)), 2); if ($currentMode != decoct($mode)) { - $path_status = ""; + $path_status = ""; $path_status .= $path . sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTWRITABLE'), decoct($mode), $currentMode); $path_status .= "
"; $path_status .= ""; @@ -81,7 +80,7 @@ public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = n } } else { $currentMode = mb_substr(decoct(fileperms($path)), 2); - $path_status = ""; + $path_status = ""; $path_status .= $path . sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'DC_NOTWRITABLE'), decoct($mode), $currentMode); $path_status .= ""; $path_status .= ""; diff --git a/class/common/FileChecker.php b/class/common/FileChecker.php index 69f07cd5..bcd811ed 100644 --- a/class/common/FileChecker.php +++ b/class/common/FileChecker.php @@ -19,14 +19,13 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @author Xoops Development Team */ - use Xmf\Request; use XoopsModules\Yogurt; //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; -$moduleDirName = basename(dirname(dirname(__DIR__))); +$moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('filechecker', $moduleDirName); @@ -42,7 +41,7 @@ class FileChecker * @param string $redirectFile * @return bool|string */ - public static function getFileStatus($file_path, $original_file_path = null, $redirectFile) + public static function getFileStatus($file_path, $original_file_path, $redirectFile) { global $pathIcon16; @@ -52,22 +51,22 @@ public static function getFileStatus($file_path, $original_file_path = null, $re if (null === $redirectFile) { $redirectFile = $_SERVER['SCRIPT_NAME']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $original_file_path) { if (self::fileExists($file_path)) { - $path_status = ""; + $path_status = ""; $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; } else { - $path_status = ""; + $path_status = ""; $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; } } else { if (self::compareFiles($file_path, $original_file_path)) { - $path_status = ""; + $path_status = ""; $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_AVAILABLE') . ') '; } else { - $path_status = ""; + $path_status = ""; $path_status .= "$file_path (" . constant('CO_' . $moduleDirNameUpper . '_' . 'FC_NOTAVAILABLE') . ') '; $path_status .= ""; $path_status .= ""; @@ -90,7 +89,7 @@ public static function getFileStatus($file_path, $original_file_path = null, $re */ public static function copyFile($source_path, $destination_path) { - $source_path = str_replace('..', '', $source_path); + $source_path = str_replace('..', '', $source_path); $destination_path = str_replace('..', '', $destination_path); return @copy($source_path, $destination_path); diff --git a/class/common/FilesManagement.php b/class/common/FilesManagement.php index ece50186..3b2f19d0 100644 --- a/class/common/FilesManagement.php +++ b/class/common/FilesManagement.php @@ -24,8 +24,8 @@ trait FilesManagement * * @param string $folder The full path of the directory to check * - * @return void * @throws \RuntimeException + * @return void */ public static function createFolder($folder) { @@ -195,7 +195,7 @@ public static function rrmdir($src) foreach ($iterator as $fObj) { if ($fObj->isFile()) { $filename = $fObj->getPathname(); - $fObj = null; // clear this iterator object to close the file + $fObj = null; // clear this iterator object to close the file if (!unlink($filename)) { return false; // couldn't delete the file } diff --git a/class/common/Migrate.php b/class/common/Migrate.php index fdd56c20..4ac248bd 100644 --- a/class/common/Migrate.php +++ b/class/common/Migrate.php @@ -12,7 +12,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ -use \XoopsModules\Yogurt\Common; +use XoopsModules\Yogurt\Common; /** * Class Migrate synchronize existing tables with target schema @@ -81,7 +81,7 @@ private function convertIPAddresses($tableName, $columnName) */ private function moveDoColumns() { - $tableName = 'newbb_posts_text'; + $tableName = 'newbb_posts_text'; $srcTableName = 'newbb_posts'; if ($this->tableHandler->useTable($tableName) && $this->tableHandler->useTable($srcTableName)) { @@ -89,8 +89,8 @@ private function moveDoColumns() if (false === $attributes) { $this->synchronizeTable($tableName); $updateTable = $GLOBALS['xoopsDB']->prefix($tableName); - $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); - $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; + $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); + $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; $this->tableHandler->addToQueue($sql); } } diff --git a/class/common/ModuleFeedback.php b/class/common/ModuleFeedback.php index eb6bc593..269fb9b8 100644 --- a/class/common/ModuleFeedback.php +++ b/class/common/ModuleFeedback.php @@ -21,7 +21,6 @@ * @author Wedega - Email: * @author Fernando Santos (topet05) */ - defined('XOOPS_ROOT_PATH') || die('Restricted access'); /** @@ -29,10 +28,10 @@ */ class ModuleFeedback extends \XoopsObject { - public $name = ''; - public $email = ''; - public $site = ''; - public $type = ''; + public $name = ''; + public $email = ''; + public $site = ''; + public $type = ''; public $content = ''; /** @@ -68,7 +67,7 @@ public function getFormFeedback($action = false) if (false === $action) { $action = $_SERVER['REQUEST_URI']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); // Get Theme Form xoops_load('XoopsFormLoader'); @@ -97,21 +96,21 @@ public function getFormFeedback($action = false) $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS')); $form->addElement($fbtypeSelect, true); - $editorConfigs = []; - $editorConfigs['name'] = 'fb_content'; - $editorConfigs['value'] = $this->content; - $editorConfigs['rows'] = 5; - $editorConfigs['cols'] = 40; - $editorConfigs['width'] = '100%'; + $editorConfigs = []; + $editorConfigs['name'] = 'fb_content'; + $editorConfigs['value'] = $this->content; + $editorConfigs['rows'] = 5; + $editorConfigs['cols'] = 40; + $editorConfigs['width'] = '100%'; $editorConfigs['height'] = '400px'; /** @var \XoopsModuleHandler $moduleHandler */ $moduleHandler = xoops_getHandler('module'); - $module = $moduleHandler->getByDirname('system'); + $module = $moduleHandler->getByDirname('system'); /** @var \XoopsConfigHandler $configHandler */ - $configHandler = xoops_getHandler('config'); - $config = $configHandler->getConfigsByCat(0, $module->getVar('mid')); + $configHandler = xoops_getHandler('config'); + $config = $configHandler->getConfigsByCat(0, $module->getVar('mid')); $editorConfigs['editor'] = $config['general_editor']; - $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); + $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); $form->addElement($editor, true); $form->addElement(new \XoopsFormHidden('op', 'send')); diff --git a/class/common/Resizer.php b/class/common/Resizer.php index a4426438..7d75cf7d 100644 --- a/class/common/Resizer.php +++ b/class/common/Resizer.php @@ -24,16 +24,16 @@ */ class Resizer { - public $sourceFile = ''; - public $endFile = ''; - public $maxWidth = 0; - public $maxHeight = 0; + public $sourceFile = ''; + public $endFile = ''; + public $maxWidth = 0; + public $maxHeight = 0; public $imageMimetype = ''; - public $jpgQuality = 90; - public $mergeType = 0; - public $mergePos = 0; - public $degrees = 0; - public $error = ''; + public $jpgQuality = 90; + public $mergeType = 0; + public $mergePos = 0; + public $degrees = 0; + public $error = ''; /** * resize image if size exceed given width/height @@ -43,23 +43,23 @@ public function resizeImage() { // check file extension switch ($this->imageMimetype) { - case'image/png': + case 'image/png': $img = imagecreatefrompng($this->sourceFile); break; - case'image/jpeg': + case 'image/jpeg': $img = imagecreatefromjpeg($this->sourceFile); if (!$img) { $img = imagecreatefromstring(file_get_contents($this->sourceFile)); } break; - case'image/gif': + case 'image/gif': $img = imagecreatefromgif($this->sourceFile); break; default: return 'Unsupported format'; } - $width = imagesx($img); + $width = imagesx($img); $height = imagesy($img); if ($width > $this->maxWidth || $height > $this->maxHeight) { @@ -68,16 +68,16 @@ public function resizeImage() if ($width < $this->maxWidth) { $new_width = $width; } else { - $new_width = $this->maxWidth; - $divisor = $width / $new_width; + $new_width = $this->maxWidth; + $divisor = $width / $new_width; $new_height = floor($height / $divisor); } } elseif ($height < $this->maxHeight) { $new_height = $height; } else { $new_height = $this->maxHeight; - $divisor = $height / $new_height; - $new_width = floor($width / $divisor); + $divisor = $height / $new_height; + $new_width = floor($width / $divisor); } // Create a new temporary image. @@ -91,13 +91,13 @@ public function resizeImage() unlink($this->endFile); //compressing the file switch ($this->imageMimetype) { - case'image/png': + case 'image/png': imagepng($tmpimg, $this->endFile, 0); break; - case'image/jpeg': + case 'image/jpeg': imagejpeg($tmpimg, $this->endFile, 100); break; - case'image/gif': + case 'image/gif': imagegif($tmpimg, $this->endFile); break; } @@ -139,19 +139,19 @@ public function resizeAndCrop() list($original_w, $original_h) = getimagesize($this->sourceFile); // RESIZE IMAGE AND PRESERVE PROPORTIONS - $max_width_resize = $this->maxWidth; + $max_width_resize = $this->maxWidth; $max_height_resize = $this->maxHeight; if ($original_w > $original_h) { $max_height_ratio = $this->maxHeight / $original_h; $max_width_resize = (int)round($original_w * $max_height_ratio); } else { - $max_width_ratio = $this->maxWidth / $original_w; + $max_width_ratio = $this->maxWidth / $original_w; $max_height_resize = (int)round($original_h * $max_width_ratio); } if ($max_width_resize < $this->maxWidth) { - $max_height_ratio = $this->maxWidth / $max_width_resize; + $max_height_ratio = $this->maxWidth / $max_width_resize; $max_height_resize = (int)round($this->maxHeight * $max_height_ratio); - $max_width_resize = $this->maxWidth; + $max_width_resize = $this->maxWidth; } // CREATE THE PROPORTIONAL IMAGE RESOURCE @@ -162,7 +162,7 @@ public function resizeAndCrop() // CREATE THE CENTERED CROPPED IMAGE TO THE SPECIFIED DIMENSIONS $final = imagecreatetruecolor($this->maxWidth, $this->maxHeight); - $max_width_offset = 0; + $max_width_offset = 0; $max_height_offset = 0; if ($this->maxWidth < $max_width_resize) { $max_width_offset = (int)round(($max_width_resize - $this->maxWidth) / 2); @@ -184,12 +184,12 @@ public function resizeAndCrop() public function mergeImage() { $dest = imagecreatefromjpeg($this->endFile); - $src = imagecreatefromjpeg($this->sourceFile); + $src = imagecreatefromjpeg($this->sourceFile); if (4 == $this->mergeType) { - $imgWidth = (int)round($this->maxWidth / 2 - 1); + $imgWidth = (int)round($this->maxWidth / 2 - 1); $imgHeight = (int)round($this->maxHeight / 2 - 1); - $posCol2 = (int)round($this->maxWidth / 2 + 1); - $posRow2 = (int)round($this->maxHeight / 2 + 1); + $posCol2 = (int)round($this->maxWidth / 2 + 1); + $posRow2 = (int)round($this->maxHeight / 2 + 1); switch ($this->mergePos) { case 1: imagecopy($dest, $src, 0, 0, 0, 0, $imgWidth, $imgHeight); //top left @@ -206,11 +206,11 @@ public function mergeImage() } } if (6 == $this->mergeType) { - $imgWidth = (int)round($this->maxWidth / 3 - 1); + $imgWidth = (int)round($this->maxWidth / 3 - 1); $imgHeight = (int)round($this->maxHeight / 2 - 1); - $posCol2 = (int)round($this->maxWidth / 3 + 1); - $posCol3 = $posCol2 + (int)round($this->maxWidth / 3 + 1); - $posRow2 = (int)round($this->maxHeight / 2 + 1); + $posCol2 = (int)round($this->maxWidth / 3 + 1); + $posCol3 = $posCol2 + (int)round($this->maxWidth / 3 + 1); + $posRow2 = (int)round($this->maxHeight / 2 + 1); switch ($this->mergePos) { case 1: diff --git a/class/common/ServerStats.php b/class/common/ServerStats.php index 4936c0c1..ac8d90fd 100644 --- a/class/common/ServerStats.php +++ b/class/common/ServerStats.php @@ -26,7 +26,7 @@ trait ServerStats */ public static function getServerStats() { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('common', $moduleDirName); $html = ''; @@ -45,7 +45,7 @@ public static function getServerStats() $html .= '
    '; $gdlib = function_exists('gd_info') ? '' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '' : '' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . ''; - $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; + $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; if (function_exists('gd_info')) { if (true === ($gdlib = gd_info())) { $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '' . $gdlib['GD Version'] . ''; @@ -59,7 +59,7 @@ public static function getServerStats() // $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; $downloads = ini_get('file_uploads') ? '' . constant('CO_' . $moduleDirNameUpper . '_ON') . '' : '' . constant('CO_' . $moduleDirNameUpper . '_OFF') . ''; - $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; + $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' ' . ini_get('upload_max_filesize') . ''; $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' ' . ini_get('post_max_size') . ''; diff --git a/class/common/SysUtility.php b/class/common/SysUtility.php index 5d356053..952c2e8a 100644 --- a/class/common/SysUtility.php +++ b/class/common/SysUtility.php @@ -16,17 +16,11 @@ */ /** - * * @license https://www.fsf.org/copyleft/gpl.html GNU public license * @copyright https://xoops.org 2000-2020 © XOOPS Project * @author ZySpec * @author Mamba */ - -use MyTextSanitizer; -use XoopsFormDhtmlTextArea; -use XoopsFormTextArea; -use XoopsModules\Yogurt; use XoopsModules\Yogurt\Helper; /** @@ -35,11 +29,9 @@ class SysUtility { use VersionChecks; - //checkVerXoops, checkVerPhp Traits use ServerStats; - // getServerStats Trait use FilesManagement; @@ -69,8 +61,8 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac // splits all html-tags to scanable lines preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); $total_length = mb_strlen($ending); - $open_tags = []; - $truncate = ''; + $open_tags = []; + $truncate = ''; foreach ($lines as $line_matchings) { // if there is any html-tag in this line, handle it and add it (uncounted) to the output if (!empty($line_matchings[1])) { @@ -96,7 +88,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac $content_length = mb_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); if ($total_length + $content_length > $length) { // the number of characters which are left - $left = $length - $total_length; + $left = $length - $total_length; $entities_length = 0; // search for html entities if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { @@ -115,7 +107,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac // maximum lenght is reached, so get off the loop break; } - $truncate .= $line_matchings[2]; + $truncate .= $line_matchings[2]; $total_length += $content_length; // if the maximum length is reached, get off the loop @@ -159,12 +151,12 @@ public static function getEditor($helper = null, $options = null) { /** @var Helper $helper */ if (null === $options) { - $options = []; - $options['name'] = 'Editor'; - $options['value'] = 'Editor'; - $options['rows'] = 10; - $options['cols'] = '100%'; - $options['width'] = '100%'; + $options = []; + $options['name'] = 'Editor'; + $options['value'] = 'Editor'; + $options['rows'] = 10; + $options['cols'] = '100%'; + $options['width'] = '100%'; $options['height'] = '400px'; } diff --git a/class/common/VersionChecks.php b/class/common/VersionChecks.php index f3e42f8d..b6ade710 100644 --- a/class/common/VersionChecks.php +++ b/class/common/VersionChecks.php @@ -22,14 +22,13 @@ trait VersionChecks /** * Verifies XOOPS version meets minimum requirements for this module * @static - * @param \XoopsModule|null $module * * @param null|string $requiredVer * @return bool true if meets requirements, false if not */ public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = null) { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $module) { $module = \XoopsModule::getByDirname($moduleDirName); @@ -55,13 +54,12 @@ public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = /** * Verifies PHP version meets minimum requirements for this module * @static - * @param \XoopsModule|null $module * * @return bool true if meets requirements, false if not */ public static function checkVerPhp(\XoopsModule $module = null) { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $module) { $module = \XoopsModule::getByDirname($moduleDirName); @@ -86,7 +84,6 @@ public static function checkVerPhp(\XoopsModule $module = null) } /** - * * compares current module version with latest GitHub release * @static * @param \Xmf\Module\Helper $helper @@ -95,15 +92,14 @@ public static function checkVerPhp(\XoopsModule $module = null) * * @return string|array info about the latest module version, if newer */ - public static function checkVerModule($helper, $source = 'github', $default = 'master') { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); - $update = ''; - $repository = 'XoopsModules25x/' . $moduleDirName; + $update = ''; + $repository = 'XoopsModules25x/' . $moduleDirName; // $repository = 'XoopsModules25x/publisher'; //for testing only - $ret = ''; + $ret = ''; $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; if ('github' === $source) { if (function_exists('curl_init') && false !== ($curlHandle = curl_init())) { @@ -114,13 +110,13 @@ public static function checkVerModule($helper, $source = 'github', $default = 'm $curlReturn = curl_exec($curlHandle); if (false === $curlReturn) { trigger_error(curl_error($curlHandle)); - } elseif (false !== strpos($curlReturn, 'Not Found')) { + } elseif (false !== mb_strpos($curlReturn, 'Not Found')) { trigger_error('Repository Not Found: ' . $infoReleasesUrl); } else { - $file = json_decode($curlReturn, false); + $file = json_decode($curlReturn, false); $latestVersionLink = sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default); - $latestVersion = $file[0]->tag_name; - $prerelease = $file[0]->prerelease; + $latestVersion = $file[0]->tag_name; + $prerelease = $file[0]->prerelease; if ('master' !== $latestVersionLink) { $update = constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion; } @@ -136,7 +132,7 @@ public static function checkVerModule($helper, $source = 'github', $default = 'm // $moduleVersion = '1.0'; //for testing only // $moduleDirName = 'publisher'; //for testing only if (!$prerelease && version_compare($moduleVersion, $latestVersion, '<')) { - $ret = []; + $ret = []; $ret[] = $update; $ret[] = $latestVersionLink; } @@ -144,6 +140,7 @@ public static function checkVerModule($helper, $source = 'github', $default = 'm curl_close($curlHandle); } } + return $ret; } } diff --git a/class/common/breadcrumb.php b/class/common/breadcrumb.php index 720b20c6..fd337fc5 100644 --- a/class/common/breadcrumb.php +++ b/class/common/breadcrumb.php @@ -27,7 +27,6 @@ * $breadcrumb->addLink( 'bread 3', 'index3.php' ); * echo $breadcrumb->render(); */ - use XoopsModules\Yogurt; use XoopsModules\Yogurt\Common; @@ -38,7 +37,7 @@ */ class Breadcrumb { - public $dirname; + public $dirname; private $bread = []; public function __construct() @@ -55,7 +54,7 @@ public function __construct() public function addLink($title = '', $link = '') { $this->bread[] = [ - 'link' => $link, + 'link' => $link, 'title' => $title, ]; } diff --git a/comment_new.php b/comment_new.php index 34c892ca..ff30ef1d 100644 --- a/comment_new.php +++ b/comment_new.php @@ -20,7 +20,6 @@ /** * Xoops header */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -32,8 +31,8 @@ */ $tribe_id = $_GET['com_itemid']; $criteria = new \Criteria('tribe_id', $tribe_id); -$tribes = $controller->tribesFactory->getObjects($criteria); -$tribe = $tribes[0]; +$tribes = $controller->tribesFactory->getObjects($criteria); +$tribe = $tribes[0]; $com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0; if ($com_itemid > 0) { diff --git a/config/assigns.php b/config/assigns.php index b6fdf3d9..330a636a 100644 --- a/config/assigns.php +++ b/config/assigns.php @@ -3,77 +3,77 @@ // defined('XOOPS_ROOT_PATH') || die('Restricted access'); $GLOBALS['myalbum_assign_globals'] = [ - 'lang_total' => _ALBM_CAPTION_TOTAL, - 'mod_url' => $mod_url, - 'mod_copyright' => $mod_copyright, - 'lang_latest_list' => _ALBM_LATESTLIST, - 'lang_descriptionc' => _ALBM_DESCRIPTIONC, - 'lang_lastupdatec' => _ALBM_LASTUPDATEC, - 'lang_submitter' => _ALBM_SUBMITTER, - 'lang_hitsc' => _ALBM_HITSC, - 'lang_commentsc' => _ALBM_COMMENTSC, - 'lang_new' => _ALBM_NEW, - 'lang_updated' => _ALBM_UPDATED, - 'lang_popular' => _ALBM_POPULAR, - 'lang_ratethisphoto' => _ALBM_RATETHISPHOTO, - 'lang_editthisphoto' => _ALBM_EDITTHISPHOTO, + 'lang_total' => _ALBM_CAPTION_TOTAL, + 'mod_url' => $mod_url, + 'mod_copyright' => $mod_copyright, + 'lang_latest_list' => _ALBM_LATESTLIST, + 'lang_descriptionc' => _ALBM_DESCRIPTIONC, + 'lang_lastupdatec' => _ALBM_LASTUPDATEC, + 'lang_submitter' => _ALBM_SUBMITTER, + 'lang_hitsc' => _ALBM_HITSC, + 'lang_commentsc' => _ALBM_COMMENTSC, + 'lang_new' => _ALBM_NEW, + 'lang_updated' => _ALBM_UPDATED, + 'lang_popular' => _ALBM_POPULAR, + 'lang_ratethisphoto' => _ALBM_RATETHISPHOTO, + 'lang_editthisphoto' => _ALBM_EDITTHISPHOTO, 'lang_deletethisphoto' => _ALBM_DELETE_THIS_PHOTO, - 'lang_guestname' => _ALBM_CAPTION_GUESTNAME, - 'lang_category' => _ALBM_CAPTION_CATEGORY, - 'lang_nomatch' => _ALBM_NOMATCH, - 'lang_directcatsel' => _ALBM_DIRECTCATSEL, - 'photos_url' => $photos_url, - 'thumbs_url' => $thumbs_url, - 'thumbsize' => $myalbum_thumbsize, - 'colsoftableview' => $myalbum_colsoftableview, - 'canrateview' => $GLOBALS['global_perms'] && GPERM_RATEVIEW, - 'canratevote' => $GLOBALS['global_perms'] && GPERM_RATEVOTE, + 'lang_guestname' => _ALBM_CAPTION_GUESTNAME, + 'lang_category' => _ALBM_CAPTION_CATEGORY, + 'lang_nomatch' => _ALBM_NOMATCH, + 'lang_directcatsel' => _ALBM_DIRECTCATSEL, + 'photos_url' => $photos_url, + 'thumbs_url' => $thumbs_url, + 'thumbsize' => $myalbum_thumbsize, + 'colsoftableview' => $myalbum_colsoftableview, + 'canrateview' => $GLOBALS['global_perms'] && GPERM_RATEVIEW, + 'canratevote' => $GLOBALS['global_perms'] && GPERM_RATEVOTE, ]; //Gnavi $gnavi_assign_globals = [ - 'mod_url' => $mod_url, - 'mod_copyright' => $mod_copyright, - 'lang_submitter' => _MD_GNAV_C_SUBMITTER, - 'lang_hitsc' => _MD_GNAV_C_RAT_HITSC, - 'lang_commentsc' => _MD_GNAV_CMT_COMMENTSC, - 'lang_new' => _MD_GNAV_C_NEW, - 'lang_updated' => _MD_GNAV_C_UPDATED, - 'lang_popular' => _MD_GNAV_C_POPULAR, + 'mod_url' => $mod_url, + 'mod_copyright' => $mod_copyright, + 'lang_submitter' => _MD_GNAV_C_SUBMITTER, + 'lang_hitsc' => _MD_GNAV_C_RAT_HITSC, + 'lang_commentsc' => _MD_GNAV_CMT_COMMENTSC, + 'lang_new' => _MD_GNAV_C_NEW, + 'lang_updated' => _MD_GNAV_C_UPDATED, + 'lang_popular' => _MD_GNAV_C_POPULAR, 'lang_ratethisphoto' => _MD_GNAV_RAT_RATETHISPHOTO, 'lang_editthisphoto' => _MD_GNAV_SMT_EDITITEM, - 'lang_guestname' => _GNAV_CAPTION_GUESTNAME, - 'lang_category' => _GNAV_CAPTION_CATEGORY, - 'lang_nomatch' => _MD_GNAV_MSG_NOMATCH, - 'lang_directcatsel' => _MD_GNAV_CAT_DIRECTCATSEL, - 'lang_markerlist' => _MD_GNAV_MAP_MARKERLIST, - 'lang_loading' => _MD_GNAV_MAP_LOADING, - 'lang_lat' => _MD_GNAV_MAP_LAT, - 'lang_lng' => _MD_GNAV_MAP_LNG, - 'lang_zoom' => _MD_GNAV_MAP_ZOOM, - 'lang_movepid' => _MD_GNAV_CAT_MOVE_PARENT, - 'photos_url' => $photos_url, - 'thumbs_url' => $thumbs_url, - 'thumbsize' => $gnavi_thumbsize, - 'colsoftableview' => $gnavi_colsoftableview, - 'colstbl_width' => $gnavi_colsoftableview ? 'width:' . (int)(100 / $gnavi_colsoftableview) . '%;' : '', - 'canrateview' => $global_perms & GNAV_GPERM_RATEVIEW, - 'canratevote' => $global_perms & GNAV_GPERM_RATEVOTE, - 'home' => _MD_GNAV_WEBTOP, - 'canvote' => $gnavi_usevote, - 'comment_dirname' => $gnavi_comment_dirname, - 'comment_forum_id' => $gnavi_comment_forum_id, - 'comment_view' => $gnavi_comment_view, - 'mydirname' => $mydirname, - 'am_cat_edit' => $isadmin ? _MD_GNAV_CAT_EDIT : '', - 'lang_itemlist' => _MD_GNAV_CAT_ITEMLIST, - 'lang_url' => _MD_GNAV_ITM_URL, - 'lang_tel' => _MD_GNAV_ITM_TEL, - 'lang_fax' => _MD_GNAV_ITM_FAX, - 'lang_zip' => _MD_GNAV_ITM_ZIP, - 'lang_address' => _MD_GNAV_ITM_ADDRESS, - 'lang_map' => _MD_GNAV_MAP, - 'lang_readmore' => _MD_GNAV_NAV_READMORE, - 'lang_print' => _MD_GNAV_ITM_PRINT, - 'lang_top_link' => sprintf(_MD_GNAV_MOBILE_TOP, $xoopsModule->getVar('name')), + 'lang_guestname' => _GNAV_CAPTION_GUESTNAME, + 'lang_category' => _GNAV_CAPTION_CATEGORY, + 'lang_nomatch' => _MD_GNAV_MSG_NOMATCH, + 'lang_directcatsel' => _MD_GNAV_CAT_DIRECTCATSEL, + 'lang_markerlist' => _MD_GNAV_MAP_MARKERLIST, + 'lang_loading' => _MD_GNAV_MAP_LOADING, + 'lang_lat' => _MD_GNAV_MAP_LAT, + 'lang_lng' => _MD_GNAV_MAP_LNG, + 'lang_zoom' => _MD_GNAV_MAP_ZOOM, + 'lang_movepid' => _MD_GNAV_CAT_MOVE_PARENT, + 'photos_url' => $photos_url, + 'thumbs_url' => $thumbs_url, + 'thumbsize' => $gnavi_thumbsize, + 'colsoftableview' => $gnavi_colsoftableview, + 'colstbl_width' => $gnavi_colsoftableview ? 'width:' . (int)(100 / $gnavi_colsoftableview) . '%;' : '', + 'canrateview' => $global_perms & GNAV_GPERM_RATEVIEW, + 'canratevote' => $global_perms & GNAV_GPERM_RATEVOTE, + 'home' => _MD_GNAV_WEBTOP, + 'canvote' => $gnavi_usevote, + 'comment_dirname' => $gnavi_comment_dirname, + 'comment_forum_id' => $gnavi_comment_forum_id, + 'comment_view' => $gnavi_comment_view, + 'mydirname' => $mydirname, + 'am_cat_edit' => $isadmin ? _MD_GNAV_CAT_EDIT : '', + 'lang_itemlist' => _MD_GNAV_CAT_ITEMLIST, + 'lang_url' => _MD_GNAV_ITM_URL, + 'lang_tel' => _MD_GNAV_ITM_TEL, + 'lang_fax' => _MD_GNAV_ITM_FAX, + 'lang_zip' => _MD_GNAV_ITM_ZIP, + 'lang_address' => _MD_GNAV_ITM_ADDRESS, + 'lang_map' => _MD_GNAV_MAP, + 'lang_readmore' => _MD_GNAV_NAV_READMORE, + 'lang_print' => _MD_GNAV_ITM_PRINT, + 'lang_top_link' => sprintf(_MD_GNAV_MOBILE_TOP, $xoopsModule->getVar('name')), ]; diff --git a/config/config.php b/config/config.php index 7fe50589..3a120531 100644 --- a/config/config.php +++ b/config/config.php @@ -16,21 +16,20 @@ * @since * @author XOOPS Development Team */ - -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); return (object)[ - 'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator', - 'paths' => [ - 'dirname' => $moduleDirName, - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, + 'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator', + 'paths' => [ + 'dirname' => $moduleDirName, + 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', + 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, + 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, + 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, ], - 'uploadFolders' => [ + 'uploadFolders' => [ XOOPS_UPLOAD_PATH . '/' . $moduleDirName, XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category', XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots', @@ -59,7 +58,7 @@ // '/templates/blocks/', // '/templates/admin/' ], - 'oldFiles' => [ + 'oldFiles' => [ '/class/request.php', '/class/registry.php', '/class/utilities.php', @@ -68,7 +67,7 @@ // '/include/functions.php', '/ajaxrating.txt', ], - 'oldFolders' => [ + 'oldFolders' => [ '/images', '/css', '/js', @@ -77,7 +76,7 @@ 'renameTables' => [// 'XX_archive' => 'ZZZZ_archive', ], - 'moduleStats' => [ + 'moduleStats' => [ // 'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1), // 'totalitems' => $helper->getHandler('Item')->getItemsCount(), // 'totalsubmitted' => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]), @@ -85,4 +84,3 @@ 'modCopyright' => " XOOPS Project", ]; - diff --git a/config/icons.php b/config/icons.php index d3cc9267..777c5249 100644 --- a/config/icons.php +++ b/config/icons.php @@ -1,20 +1,19 @@ mb_strtoupper($moduleDirName) . ' IconConfigurator', + 'name' => mb_strtoupper($moduleDirName) . ' IconConfigurator', 'icons' => [ - 'edit' => " . _EDIT . ", - 'delete' => "" . _DELETE . "", - 'clone' => "" . _CLONE . "", + 'edit' => " . _EDIT . ", + 'delete' => "" . _DELETE . "", + 'clone' => "" . _CLONE . "", 'preview' => "" . _PREVIEW . "", - 'print' => "" . _CLONE . "", - 'pdf' => "" . _CLONE . "", - 'add' => "" . _ADD . "", - '0' => "" . 0 . "", - '1' => "" . 1 . "", + 'print' => "" . _CLONE . "", + 'pdf' => "" . _CLONE . "", + 'add' => "" . _ADD . "", + '0' => "" . 0 . "", + '1' => "" . 1 . "", ], ]; - diff --git a/config/imageconfig.php b/config/imageconfig.php index a01057a5..c7781fd2 100644 --- a/config/imageconfig.php +++ b/config/imageconfig.php @@ -1,51 +1,50 @@ 'imageConfigs', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', + 'name' => 'imageConfigs', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', - 'formtype' => 'line_break', - 'valuetype' => 'textbox', - 'default' => 'head', + 'formtype' => 'line_break', + 'valuetype' => 'textbox', + 'default' => 'head', ]; $modversion['config'][] = [ - 'name' => 'imageWidth', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', + 'name' => 'imageWidth', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 1200, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 1200, ]; // =1024/16 $modversion['config'][] = [ - 'name' => 'imageHeight', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', + 'name' => 'imageHeight', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 800, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 800, ]; // =768/16 $modversion['config'][] = [ - 'name' => 'imageFilesize', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', + 'name' => 'imageFilesize', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 2000000, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 2000000, ]; // =768/16 $modversion['config'][] = [ - 'name' => 'imageUploadPath', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', + 'name' => 'imageUploadPath', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'default' => 'uploads/' . $modversion['dirname'] . '/images', + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'default' => 'uploads/' . $modversion['dirname'] . '/images', ]; - diff --git a/config/paths.php b/config/paths.php index 650e069e..8d4252ae 100644 --- a/config/paths.php +++ b/config/paths.php @@ -1,17 +1,17 @@ mb_strtoupper($moduleDirName) . ' PathConfigurator', - 'paths' => [ - 'dirname' => $moduleDirName, - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, + 'name' => mb_strtoupper($moduleDirName) . ' PathConfigurator', + 'paths' => [ + 'dirname' => $moduleDirName, + 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', + 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, + 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, + 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, ], 'uploadFolders' => [ XOOPS_UPLOAD_PATH . '/' . $moduleDirName, @@ -20,4 +20,3 @@ //XOOPS_UPLOAD_PATH . '/flags' ], ]; - diff --git a/configs.php b/configs.php index 6c7821c1..64d00ae1 100644 --- a/configs.php +++ b/configs.php @@ -16,13 +16,12 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_configs.tpl'; require __DIR__ . '/header.php'; -$controller = new Yogurt\ControllerConfigs($xoopsDB, $xoopsUser); +$controller = new Yogurt\ControllerConfigs($xoopsDB, $xoopsUser); $nbSections = $controller->getNumbersSections(); if (!$xoopsUser) { @@ -39,14 +38,14 @@ $criteria = new \Criteria('config_uid', $uid); if ($configsFactory->getCount($criteria) > 0) { $configs = $configsFactory->getObjects($criteria); - $config = $configs[0]; - - $pic = $config->getVar('pictures'); - $aud = $config->getVar('audio'); - $vid = $config->getVar('videos'); - $tri = $config->getVar('tribes'); - $scr = $config->getVar('Notes'); - $fri = $config->getVar('friends'); + $config = $configs[0]; + + $pic = $config->getVar('pictures'); + $aud = $config->getVar('audio'); + $vid = $config->getVar('videos'); + $tri = $config->getVar('tribes'); + $scr = $config->getVar('Notes'); + $fri = $config->getVar('friends'); $pcon = $config->getVar('profile_contact'); $pgen = $config->getVar('profile_general'); $psta = $config->getVar('profile_stats'); @@ -69,7 +68,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/css/jquery.tabs-ie.css b/css/jquery.tabs-ie.css index b0dd7f4e..9d254383 100644 --- a/css/jquery.tabs-ie.css +++ b/css/jquery.tabs-ie.css @@ -3,7 +3,7 @@ Tabs - additional IE specific bug fixes Recommended usage (Conditional Comments): */ diff --git a/css/jquery.tabs.css b/css/jquery.tabs.css index 3fb9c2dc..efaed2a2 100644 --- a/css/jquery.tabs.css +++ b/css/jquery.tabs.css @@ -27,7 +27,7 @@ float: left; margin: 0 0 0 1px; min-width: 64px; /* be nice to Opera */ - list-style:none; + list-style:none; } .tabs-nav a, .tabs-nav a span { display: block; @@ -45,7 +45,7 @@ line-height: 1.2; text-align: center; text-decoration: none; - white-space: nowrap; /* required in IE 6 */ + white-space: nowrap; /* required in IE 6 */ } .tabs-nav .tabs-selected a { color: #000; @@ -90,7 +90,7 @@ .tabs-container { border-top: 1px solid #97a5b0; padding: 1em 8px; - + } .tabs-loading em { padding: 0 0 0 20px; diff --git a/delaudio.php b/delaudio.php index 34d20e62..61046a99 100644 --- a/delaudio.php +++ b/delaudio.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -37,14 +36,14 @@ * The user must be the owner */ $audioFactory = new Yogurt\AudioHandler($xoopsDB); - $criteria_aud = new \Criteria('audio_id', $cod_audio); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_aud); + $criteria_aud = new \Criteria('audio_id', $cod_audio); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('uid_owner', $uid); + $criteria = new \CriteriaCompo($criteria_aud); $criteria->add($criteria_uid); $objects_array = $audioFactory->getObjects($criteria); - $audio_name = $objects_array[0]->getVar('url'); + $audio_name = $objects_array[0]->getVar('url'); /** * Try to delete diff --git a/delete_scrap.php b/delete_scrap.php index ec7f580c..eab2c772 100644 --- a/delete_scrap.php +++ b/delete_scrap.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -36,9 +35,9 @@ * The user must be the owner */ $criteria_Note_id = new \Criteria('Note_id', $Note_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('Note_to', $uid); - $criteria = new \CriteriaCompo($criteria_Note_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('Note_to', $uid); + $criteria = new \CriteriaCompo($criteria_Note_id); $criteria->add($criteria_uid); /** diff --git a/delete_tribe.php b/delete_tribe.php index fb1be31a..c21e43fb 100644 --- a/delete_tribe.php +++ b/delete_tribe.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -25,7 +24,7 @@ * Factories of tribes */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); -$tribesFactory = new Yogurt\TribesHandler($xoopsDB); +$tribesFactory = new Yogurt\TribesHandler($xoopsDB); $tribe_id = (int)$_POST['tribe_id']; @@ -37,9 +36,9 @@ * The user must be the owner */ $criteria_tribe_id = new \Criteria('tribe_id', $tribe_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('owner_uid', $uid); - $criteria = new \CriteriaCompo($criteria_tribe_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('owner_uid', $uid); + $criteria = new \CriteriaCompo($criteria_tribe_id); $criteria->add($criteria_uid); /** diff --git a/delfriendship.php b/delfriendship.php index 976c30c2..8600db00 100644 --- a/delfriendship.php +++ b/delfriendship.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -24,7 +23,7 @@ * Factory of petitions created */ $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); +$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); /** * Getting the uid of the user which user want to ask to be friend diff --git a/delpicture.php b/delpicture.php index 5a9a1926..91620413 100644 --- a/delpicture.php +++ b/delpicture.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -35,15 +34,15 @@ * The user must be the owner */ $albumFactory = new Yogurt\ImageHandler($xoopsDB); - $criteria_img = new \Criteria('cod_img', $cod_img); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_img); + $criteria_img = new \Criteria('cod_img', $cod_img); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('uid_owner', $uid); + $criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); $objects_array = $albumFactory->getObjects($criteria); - $image_name = $objects_array[0]->getVar('url'); - $avatar_image = $xoopsUser->getVar('user_avatar'); + $image_name = $objects_array[0]->getVar('url'); + $avatar_image = $xoopsUser->getVar('user_avatar'); /** * Try to delete diff --git a/delvideo.php b/delvideo.php index a13b6306..b1a6556d 100644 --- a/delvideo.php +++ b/delvideo.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -35,10 +34,10 @@ * The user must be the owner */ $albumFactory = new Yogurt\SeutuboHandler($xoopsDB); - $criteria_img = new \Criteria('video_id', $cod_video); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_img); + $criteria_img = new \Criteria('video_id', $cod_video); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('uid_owner', $uid); + $criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); /** diff --git a/docs/changelog.txt b/docs/changelog.txt index 101e7e01..9a9c3acb 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -10,7 +10,7 @@ - PSR-2 code cosmetics (mamba) - addNavigation(basename(__FILE__)) (mamba) - dirname(__FILE__) to __DIR__ (mamba) -- replaced < br /> with < br > (mamba) +- replaced < br> with < br> (mamba) - Unnecessary double quotes (mamba) - reference mismatch (mamba) - Hardening to type safe (mamba) @@ -41,13 +41,13 @@ fixed #2074263 check for /uploads/yogurt/mp3 in the backend (dhcst) fixed #2074362 MP3 player read now ID3v1 and v2 (dhcst) fixed #1993627 deleting Photos with errors (dhcst) fixed #1939798 Smarty error: mailto: missing (dhcst) -fixed height Notebook > bbcode tips (sato-san) +fixed height Notebook> bbcode tips (sato-san) fixed bug triebes in navbar (dhcst) fixed Permission audio.php (dhcst) fixed Permission mainfile.php (dhcst) fixed sanitize $_GET['uid'] (dhcst) fixed some sanitizing (m0nty_) -fixed configuration > cosmetic (sato-san) +fixed configuration> cosmetic (sato-san) added tables for impresscms (m0nty_) added folder uploads/yogurt/mp3 (sato-san) added yogurt works now without Frameworks (dhcst) @@ -87,65 +87,65 @@ Translations removed from the release as it was too hard to maintain all of them up to date :D Bugs report treated. Most of them corrected, some I could not reproduce -1844542 tribes insert [saba] -1844582 Some definitions not in lang files [irmtfan] -1849511 If I use yogurt as profile page I can't upload avatar -1844586 place holder for main video and avatar [irtmfan] -1844541 true videos problem [saba] -1844538 blank video area after insert [pewy] -1844530 Main video doesn t disapear [maxxy] -1840158 upload path in templates [feightl] -1880026 Adding embed code for video URL -1877872 send notification in PM not working -1877874 reject friend language -1854035 Main Menu -1849485 Show All in user info error -1788733 Private configs -1854153 Private images disappear -1858658 Two Notices in php debug -1854039 Notification Bug -1854042 friend list - AVATAR -1862190 avatar bugs -1854038 redirect confusion -1854036 no avatar in friendship config setting -1852981 New Feature-User Album -1851942 missing semicolon in french file -1844587 repeated definitions [irtmfan] -1844552 no search on yogurt [takeaweb] -1844590 album page missing requirements [patrick80] -1854041 Typo -1875338 notification.inc Note $item['url'] -1844585 Ugly license [irtmfan] -1854617 misredirect -1849019 installation error -1848654 Private Messenger No Longer Works -1845594 Xoops new members block linking -1844583 module name not in modinfo.php [irtmfan] -1844591 protect email address [patrick80] -1844559 User contributions remains exploded [takeaweb] -1876676 Private Message bug in My Friends Block -1845327 delete Note -1844589 lang definitions missing [eparcyl] -1844560 error on search.php [takeaweb] -1844570 misredirection to user un myfriends box[ctoa] -1844558 star smile, heart problem with ie [takeaweb] -1844556 view all not defined [takeaweb] -1844555 you can upload only... not defined [takeaweb] -1844554 _MI_YOGURT_FRIENDS_DESC not defined [takeaweb] -1844553 Note error on ie on delete [takeaweb] -1844549 xoops.js $ click smilies doesn t work [maxxy] -1844546 album: newest first [maxxy] -1844545 last pictures point to profile not album [maxxy] -1844543 fatal error in xoops cube legacy [pewy] -1844537 blank page after del in Notes[pewy] -1844536 last picture block qtty [maxxy] -1844533 can t set avatar [maxxy] -1844535 user listed in visitors of the profile [maxxy] -1851078 French translation -1844520 ENGINE=MyISAM I can't install it. [sinoer] -1844518 in yogurt_visitors the column datetime no present [takeaweb] -1802818 Imagem modelo de tribo dando pau -1783746 link to album won t show for anonyms +1844542 tribes insert [saba] +1844582 Some definitions not in lang files [irmtfan] +1849511 If I use yogurt as profile page I can't upload avatar +1844586 place holder for main video and avatar [irtmfan] +1844541 true videos problem [saba] +1844538 blank video area after insert [pewy] +1844530 Main video doesn t disapear [maxxy] +1840158 upload path in templates [feightl] +1880026 Adding embed code for video URL +1877872 send notification in PM not working +1877874 reject friend language +1854035 Main Menu +1849485 Show All in user info error +1788733 Private configs +1854153 Private images disappear +1858658 Two Notices in php debug +1854039 Notification Bug +1854042 friend list - AVATAR +1862190 avatar bugs +1854038 redirect confusion +1854036 no avatar in friendship config setting +1852981 New Feature-User Album +1851942 missing semicolon in french file +1844587 repeated definitions [irtmfan] +1844552 no search on yogurt [takeaweb] +1844590 album page missing requirements [patrick80] +1854041 Typo +1875338 notification.inc Note $item['url'] +1844585 Ugly license [irtmfan] +1854617 misredirect +1849019 installation error +1848654 Private Messenger No Longer Works +1845594 Xoops new members block linking +1844583 module name not in modinfo.php [irtmfan] +1844591 protect email address [patrick80] +1844559 User contributions remains exploded [takeaweb] +1876676 Private Message bug in My Friends Block +1845327 delete Note +1844589 lang definitions missing [eparcyl] +1844560 error on search.php [takeaweb] +1844570 misredirection to user un myfriends box[ctoa] +1844558 star smile, heart problem with ie [takeaweb] +1844556 view all not defined [takeaweb] +1844555 you can upload only... not defined [takeaweb] +1844554 _MI_YOGURT_FRIENDS_DESC not defined [takeaweb] +1844553 Note error on ie on delete [takeaweb] +1844549 xoops.js $ click smilies doesn t work [maxxy] +1844546 album: newest first [maxxy] +1844545 last pictures point to profile not album [maxxy] +1844543 fatal error in xoops cube legacy [pewy] +1844537 blank page after del in Notes[pewy] +1844536 last picture block qtty [maxxy] +1844533 can t set avatar [maxxy] +1844535 user listed in visitors of the profile [maxxy] +1851078 French translation +1844520 ENGINE=MyISAM I can't install it. [sinoer] +1844518 in yogurt_visitors the column datetime no present [takeaweb] +1802818 Imagem modelo de tribo dando pau +1783746 link to album won t show for anonyms Visit https://sourceforge.net/tracker/?func=browse&group_id=204109&atid=988288 and help this project reporting your bugs too diff --git a/docs/install_impresscms102.txt b/docs/install_impresscms102.txt index 2b364a33..464af259 100644 --- a/docs/install_impresscms102.txt +++ b/docs/install_impresscms102.txt @@ -11,7 +11,7 @@ Install: compability important note --------------------------- impresscms and jquery have a javascript function with the same name. -I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , +I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , I am not sure that the compability problem is over with this but maybe it is. Anyone please do report or help me on this. @@ -19,7 +19,7 @@ optional procedure ------------------- Hack to make the yogurt userpage as the main userpage of your site: -Open userinfo.php in the root of your site, search at the very beggining of the file for +Open userinfo.php in the root of your site, search at the very beggining of the file for $uid = intval($_GET['uid']); if ($uid <= 0) { diff --git a/docs/install_impresscms11.txt b/docs/install_impresscms11.txt index 2b364a33..464af259 100644 --- a/docs/install_impresscms11.txt +++ b/docs/install_impresscms11.txt @@ -11,7 +11,7 @@ Install: compability important note --------------------------- impresscms and jquery have a javascript function with the same name. -I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , +I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , I am not sure that the compability problem is over with this but maybe it is. Anyone please do report or help me on this. @@ -19,7 +19,7 @@ optional procedure ------------------- Hack to make the yogurt userpage as the main userpage of your site: -Open userinfo.php in the root of your site, search at the very beggining of the file for +Open userinfo.php in the root of your site, search at the very beggining of the file for $uid = intval($_GET['uid']); if ($uid <= 0) { diff --git a/docs/install_simple-xoops084.txt b/docs/install_simple-xoops084.txt index 7314dc2a..b214dcbb 100644 --- a/docs/install_simple-xoops084.txt +++ b/docs/install_simple-xoops084.txt @@ -2,6 +2,6 @@ Install: ============================ 1. Login in your Simple-Xoops as Admin 2. Go to the Administration -3. Open the Installer +3. Open the Installer 4. Use Yogurt module for install diff --git a/docs/install_xoops2018x.txt b/docs/install_xoops2018x.txt index d2931626..6acbd246 100644 --- a/docs/install_xoops2018x.txt +++ b/docs/install_xoops2018x.txt @@ -11,7 +11,7 @@ Install: compability important note --------------------------- xoops and jquery have a javascript function with the same name. -I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , +I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , I am not sure that the compability problem is over with this but maybe it is. Anyone please do report or help me on this. @@ -19,7 +19,7 @@ optional procedure ------------------- Hack to make the yogurt userpage as the main userpage of your site: -Open userinfo.php in the root of your site, search at the very beggining of the file for +Open userinfo.php in the root of your site, search at the very beggining of the file for $uid = intval($_GET['uid']); if ($uid <= 0) { diff --git a/docs/install_xoops23.txt b/docs/install_xoops23.txt index d2931626..6acbd246 100644 --- a/docs/install_xoops23.txt +++ b/docs/install_xoops23.txt @@ -11,7 +11,7 @@ Install: compability important note --------------------------- xoops and jquery have a javascript function with the same name. -I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , +I have changed the calls using $ instead of jquery to jquery in my yogurt.js file , I am not sure that the compability problem is over with this but maybe it is. Anyone please do report or help me on this. @@ -19,7 +19,7 @@ optional procedure ------------------- Hack to make the yogurt userpage as the main userpage of your site: -Open userinfo.php in the root of your site, search at the very beggining of the file for +Open userinfo.php in the root of your site, search at the very beggining of the file for $uid = intval($_GET['uid']); if ($uid <= 0) { diff --git a/docs/license0.txt b/docs/license0.txt index f08d17c4..0bbe04cb 100644 --- a/docs/license0.txt +++ b/docs/license0.txt @@ -1,7 +1,7 @@ Attribution-NoDerivs 3.0 Unported - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License diff --git a/editdesc.php b/editdesc.php index 479fec64..d9489613 100644 --- a/editdesc.php +++ b/editdesc.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -26,15 +25,15 @@ } $cod_img = $_POST['cod_img']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; -$uid = (int)$xoopsUser->getVar('uid'); +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$uid = (int)$xoopsUser->getVar('uid'); if (1 == $marker) { /** * Creating the factory loading the picture changing its caption */ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); - $picture = $pictureFactory->create(false); + $picture = $pictureFactory->create(false); $picture->load($cod_img); $picture->setVar('title', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); @@ -54,9 +53,9 @@ * The user must be the owner */ $albumFactory = new Yogurt\ImageHandler($xoopsDB); -$criteria_img = new \Criteria('cod_img', $cod_img); -$criteria_uid = new \Criteria('uid_owner', $uid); -$criteria = new \CriteriaCompo($criteria_img); +$criteria_img = new \Criteria('cod_img', $cod_img); +$criteria_uid = new \Criteria('uid_owner', $uid); +$criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); /** @@ -66,7 +65,7 @@ $array_pict = $albumFactory->getObjects($criteria); if ($array_pict) { $caption = $array_pict[0]->getVar('title'); - $url = $array_pict[0]->getVar('url'); + $url = $array_pict[0]->getVar('url'); } //$url = $xoopsModuleConfig['link_path_upload']."/thumb_".$url; $url = XOOPS_URL . '/uploads/thumb_' . $url; diff --git a/editdescvideo.php b/editdescvideo.php index dbf05fcf..6e8d586e 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -26,7 +25,7 @@ } $cod_img = (int)$_POST['video_id']; -$marker = (int)$_POST['marker']; +$marker = (int)$_POST['marker']; $uid = (int)$xoopsUser->getVar('uid'); @@ -35,7 +34,7 @@ * Creating the factory loading the picture changing its caption */ $videoFactory = new Yogurt\SeutuboHandler($xoopsDB); - $video = $videoFactory->create(false); + $video = $videoFactory->create(false); $video->load($cod_img); $video->setVar('video_desc', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); @@ -54,10 +53,10 @@ * Creating the factory and the criteria to edit the desc of the picture * The user must be the owner */ -$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); $criteria_video = new \Criteria('video_id', $cod_img); -$criteria_uid = new \Criteria('uid_owner', $uid); -$criteria = new \CriteriaCompo($criteria_video); +$criteria_uid = new \Criteria('uid_owner', $uid); +$criteria = new \CriteriaCompo($criteria_video); $criteria->add($criteria_uid); /** @@ -67,7 +66,7 @@ $array_pict = $albumFactory->getObjects($criteria); if ($array_pict) { $caption = $array_pict[0]->getVar('video_desc'); - $url = $array_pict[0]->getVar('youtube_code'); + $url = $array_pict[0]->getVar('youtube_code'); } $albumFactory->renderFormEdit($caption, $cod_img, $url); diff --git a/editfriendship.php b/editfriendship.php index d1f6f3d6..77fbb93f 100644 --- a/editfriendship.php +++ b/editfriendship.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -26,22 +25,22 @@ } $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$friend2_uid = (int)$_POST['friend_uid']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$friend2_uid = (int)$_POST['friend_uid']; +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; $friend = new \XoopsUser($friend2_uid); if (1 == $marker) { - $level = $_POST['level']; - $cool = $_POST['cool']; - $sexy = $_POST['hot']; - $trusty = $_POST['trust']; - $fan = $_POST['fan']; + $level = $_POST['level']; + $cool = $_POST['cool']; + $sexy = $_POST['hot']; + $trusty = $_POST['trust']; + $fan = $_POST['fan']; $friendship_id = (int)$_POST['friendship_id']; - $criteria = new \Criteria('friendship_id', $friendship_id); + $criteria = new \Criteria('friendship_id', $friendship_id); $friendships = $friendshipFactory->getObjects($criteria); - $friendship = $friendships[0]; + $friendship = $friendships[0]; $friendship->setVar('level', $level); $friendship->setVar('cool', $cool); $friendship->setVar('hot', $sexy); diff --git a/edittribe.php b/edittribe.php index 6e20a1c0..a98ed415 100644 --- a/edittribe.php +++ b/edittribe.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_edittribe.tpl'; @@ -30,23 +29,23 @@ $nbSections = $controller->getNumbersSections(); $tribe_id = (int)$_POST['tribe_id']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; $criteria = new \Criteria('tribe_id', $tribe_id); -$tribes = $controller->tribesFactory->getObjects($criteria); -$tribe = $tribes[0]; +$tribes = $controller->tribesFactory->getObjects($criteria); +$tribe = $tribes[0]; $uid = $xoopsUser->getVar('uid'); if (1 == $marker && $tribe->getVar('owner_uid') == $uid) { - $title = trim(htmlspecialchars($_POST['title'], ENT_QUOTES | ENT_HTML5)); - $desc = $_POST['desc']; - $img = $_POST['img']; + $title = trim(htmlspecialchars($_POST['title'], ENT_QUOTES | ENT_HTML5)); + $desc = $_POST['desc']; + $img = $_POST['img']; $updateImg = (1 == $_POST['flag_oldimg']) ? 0 : 1; - $path_upload = XOOPS_ROOT_PATH . '/uploads'; - $maxfilebytes = $xoopsModuleConfig['maxfilesize']; + $path_upload = XOOPS_ROOT_PATH . '/uploads'; + $maxfilebytes = $xoopsModuleConfig['maxfilesize']; $maxfileheight = $xoopsModuleConfig['max_original_height']; - $maxfilewidth = $xoopsModuleConfig['max_original_width']; + $maxfilewidth = $xoopsModuleConfig['max_original_width']; $controller->tribesFactory->receiveTribe($title, $desc, $img, $path_upload, $maxfilebytes, $maxfilewidth, $maxfileheight, $updateImg, $tribe); redirect_header('tribes.php?uid=' . $uid, 3, _MD_YOGURT_TRIBEEDITED); @@ -100,7 +99,7 @@ //navbar $xoopsTpl->assign('module_name', $xoopsModule->getVar('name')); $xoopsTpl->assign('lang_mysection', _MD_YOGURT_TRIBES . ' :: ' . _MD_YOGURT_EDIT_TRIBE); - $xoopsTpl->assign('section_name', _MD_YOGURT_TRIBES . ' > ' . _MD_YOGURT_EDIT_TRIBE); + $xoopsTpl->assign('section_name', _MD_YOGURT_TRIBES . '> ' . _MD_YOGURT_EDIT_TRIBE); $xoopsTpl->assign('lang_home', _MD_YOGURT_HOME); $xoopsTpl->assign('lang_photos', _MD_YOGURT_PHOTOS); $xoopsTpl->assign('lang_friends', _MD_YOGURT_FRIENDS); @@ -125,7 +124,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } diff --git a/edituser.php b/edituser.php index 16c91422..374608e9 100644 --- a/edituser.php +++ b/edituser.php @@ -16,9 +16,6 @@ * @author XOOPS Development Team * @since */ - -use XoopsModules\Yogurt; - require __DIR__ . '/header.php'; //include_once __DIR__ . '/../../mainfile.php'; @@ -41,7 +38,7 @@ //Fix for XOOPS 2.2 and SX if (!defined('XOOPS_CONF_USER')) { $moduleHandler = xoops_getHandler('module'); - $mod_yogurt = $moduleHandler->getByDirname('profile'); + $mod_yogurt = $moduleHandler->getByDirname('profile'); if (1 == $mod_yogurt->getVar('isactive')) { define('XOOPS_CONF_USER', 0); $xoopsConfigUser = $configHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid')); @@ -65,7 +62,7 @@ if ('saveuser' == $op) { if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); + redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); } $uid = 0; if (!empty($_POST['uid'])) { @@ -89,7 +86,7 @@ $password = $myts->stripSlashesGPC(trim($_POST['password'])); } if ('' != $password) { - if (strlen($password) < $xoopsConfigUser['minpass']) { + if (mb_strlen($password) < $xoopsConfigUser['minpass']) { $errors[] = sprintf(_US_PWDTOOSHORT, $xoopsConfigUser['minpass']); } $vpass = ''; @@ -104,13 +101,13 @@ include XOOPS_ROOT_PATH . '/header.php'; echo '
    '; foreach ($errors as $er) { - echo '' . $er . '
    '; + echo '' . $er . '
    '; } - echo '

    '; + echo '
    '; $op = 'editprofile'; } else { $memberHandler = xoops_getHandler('member'); - $edituser = $memberHandler->getUser($uid); + $edituser = $memberHandler->getUser($uid); $edituser->setVar('name', $_POST['name']); if (1 == $xoopsConfigUser['allow_chgmail']) { $edituser->setVar('email', $email, true); @@ -173,13 +170,13 @@ include_once XOOPS_ROOT_PATH . '/header.php'; include_once XOOPS_ROOT_PATH . '/include/comment_constants.php'; $uid = (int)$xoopsUser->getVar('uid'); - echo '' . _US_PROFILE . ' »» ' . _US_EDITPROFILE . '

    '; - $form = new \XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); + echo '' . _US_PROFILE . ' »» ' . _US_EDITPROFILE . '

    '; + $form = new \XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); $uname_label = new \XoopsFormLabel(_US_NICKNAME, $xoopsUser->getVar('uname')); $form->addElement($uname_label); $name_text = new \XoopsFormText(_US_REALNAME, 'name', 30, 60, $xoopsUser->getVar('name', 'E')); $form->addElement($name_text); - $email_tray = new \XoopsFormElementTray(_US_EMAIL, '
    '); + $email_tray = new \XoopsFormElementTray(_US_EMAIL, '
    '); if (1 == $xoopsConfigUser['allow_chgmail']) { $email_text = new \XoopsFormText('', 'email', 30, 60, $xoopsUser->getVar('email')); } else { @@ -187,19 +184,19 @@ } $email_tray->addElement($email_text); $email_cbox_value = $xoopsUser->user_viewemail() ? 1 : 0; - $email_cbox = new \XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value); + $email_cbox = new \XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value); $email_cbox->addOption(1, _US_ALLOWVIEWEMAIL); $email_tray->addElement($email_cbox); if (defined('ICMS_VERSION_NAME')) { - $configHandler = xoops_getHandler('config'); + $configHandler = xoops_getHandler('config'); $icmsauthConfig = $configHandler->getConfigsByCat(XOOPS_CONF_AUTH); if (1 == $icmsauthConfig['auth_openid']) { - $openid_tray = new \XoopsFormElementTray(_US_OPENID_FORM_CAPTION, '
    '); + $openid_tray = new \XoopsFormElementTray(_US_OPENID_FORM_CAPTION, '
    '); $openid_text = new \XoopsFormText('', 'openid', 30, 255, $xoopsUser->getVar('openid')); $openid_tray->setDescription(_US_OPENID_FORM_DSC); $openid_tray->addElement($openid_text); $openid_cbox_value = $xoopsUser->user_viewoid() ? 1 : 0; - $openid_cbox = new \XoopsFormCheckBox('', 'user_viewoid', $openid_cbox_value); + $openid_cbox = new \XoopsFormCheckBox('', 'user_viewoid', $openid_cbox_value); $openid_cbox->addOption(1, _US_ALLOWVIEWEMAILOPENID); $openid_tray->addElement($openid_cbox); $form->addElement($openid_tray); @@ -210,19 +207,19 @@ $form->addElement($url_text); $timezone_select = new \XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $xoopsUser->getVar('timezone_offset')); - $icq_text = new \XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E')); - $aim_text = new \XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoopsUser->getVar('user_aim', 'E')); - $yim_text = new \XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoopsUser->getVar('user_yim', 'E')); - $msnm_text = new \XoopsFormText(_US_MSNM, 'user_msnm', 30, 100, $xoopsUser->getVar('user_msnm', 'E')); - $location_text = new \XoopsFormText(_US_LOCATION, 'user_from', 30, 100, $xoopsUser->getVar('user_from', 'E')); + $icq_text = new \XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E')); + $aim_text = new \XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoopsUser->getVar('user_aim', 'E')); + $yim_text = new \XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoopsUser->getVar('user_yim', 'E')); + $msnm_text = new \XoopsFormText(_US_MSNM, 'user_msnm', 30, 100, $xoopsUser->getVar('user_msnm', 'E')); + $location_text = new \XoopsFormText(_US_LOCATION, 'user_from', 30, 100, $xoopsUser->getVar('user_from', 'E')); $occupation_text = new \XoopsFormText(_US_OCCUPATION, 'user_occ', 30, 100, $xoopsUser->getVar('user_occ', 'E')); - $interest_text = new \XoopsFormText(_US_INTEREST, 'user_intrest', 30, 150, $xoopsUser->getVar('user_intrest', 'E')); - $sig_tray = new \XoopsFormElementTray(_US_SIGNATURE, '
    '); + $interest_text = new \XoopsFormText(_US_INTEREST, 'user_intrest', 30, 150, $xoopsUser->getVar('user_intrest', 'E')); + $sig_tray = new \XoopsFormElementTray(_US_SIGNATURE, '
    '); include_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; $sig_tarea = new \XoopsFormDhtmlTextArea('', 'user_sig', $xoopsUser->getVar('user_sig', 'E')); $sig_tray->addElement($sig_tarea); $sig_cbox_value = $xoopsUser->getVar('attachsig') ? 1 : 0; - $sig_cbox = new \XoopsFormCheckBox('', 'attachsig', $sig_cbox_value); + $sig_cbox = new \XoopsFormCheckBox('', 'attachsig', $sig_cbox_value); $sig_cbox->addOption(1, _US_SHOWSIG); $sig_tray->addElement($sig_cbox); $umode_select = new \XoopsFormSelect(_US_CDISPLAYMODE, 'umode', $xoopsUser->getVar('umode')); @@ -237,20 +234,20 @@ $notify_method_select->addOptionArray([XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL]); $notify_mode_select = new \XoopsFormSelect(_NOT_NOTIFYMODE, 'notify_mode', $xoopsUser->getVar('notify_mode')); $notify_mode_select->addOptionArray([XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN]); - $bio_tarea = new \XoopsFormTextArea(_US_EXTRAINFO, 'bio', $xoopsUser->getVar('bio', 'E')); + $bio_tarea = new \XoopsFormTextArea(_US_EXTRAINFO, 'bio', $xoopsUser->getVar('bio', 'E')); $cookie_radio_value = empty($_COOKIE[$xoopsConfig['usercookie']]) ? 0 : 1; - $cookie_radio = new \XoopsFormRadioYN(_US_USECOOKIE, 'usecookie', $cookie_radio_value, _YES, _NO); - $pwd_text = new \XoopsFormPassword('', 'password', 10, 255); - $pwd_text2 = new \XoopsFormPassword('', 'vpass', 10, 255); - $pwd_tray = new \XoopsFormElementTray(_US_PASSWORD . '
    ' . _US_TYPEPASSTWICE); + $cookie_radio = new \XoopsFormRadioYN(_US_USECOOKIE, 'usecookie', $cookie_radio_value, _YES, _NO); + $pwd_text = new \XoopsFormPassword('', 'password', 10, 255); + $pwd_text2 = new \XoopsFormPassword('', 'vpass', 10, 255); + $pwd_tray = new \XoopsFormElementTray(_US_PASSWORD . '
    ' . _US_TYPEPASSTWICE); $pwd_tray->addElement($pwd_text); $pwd_tray->addElement($pwd_text2); $mailok_radio = new \XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $xoopsUser->getVar('user_mailok')); if (defined('ICMS_VERSION_NAME')) { $salt_hidden = new \XoopsFormHidden('salt', $xoopsUser->getVar('salt')); } - $uid_hidden = new \XoopsFormHidden('uid', $uid); - $op_hidden = new \XoopsFormHidden('op', 'saveuser'); + $uid_hidden = new \XoopsFormHidden('uid', $uid); + $op_hidden = new \XoopsFormHidden('op', 'saveuser'); $submit_button = new \XoopsFormButton('', 'submit', _US_SAVECHANGES, 'submit'); $form->addElement($timezone_select); @@ -287,11 +284,11 @@ if ('avatarform' == $op) { include XOOPS_ROOT_PATH . '/header.php'; $uid = (int)$xoopsUser->getVar('uid'); - echo '' . _US_PROFILE . ' »» ' . _US_UPLOADMYAVATAR . '

    '; + echo '' . _US_PROFILE . ' »» ' . _US_UPLOADMYAVATAR . '

    '; $oldavatar = $xoopsUser->getVar('user_avatar'); if (!empty($oldavatar) && 'blank.gif' != $oldavatar) { echo '

    ' . _US_OLDDELETED . '

    '; - echo '
    '; + echo ''; } if (1 == $xoopsConfigUser['avatar_allow_upload'] && $xoopsUser->getVar('posts') >= $xoopsConfigUser['avatar_minposts']) { include_once __DIR__ . '/class/xoopsformloader.php'; @@ -306,7 +303,7 @@ $form->display(); } $avatarHandler = xoops_getHandler('avatar'); - $form2 = new \XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); + $form2 = new \XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); $avatar_select = new \XoopsFormSelect('', 'user_avatar', $xoopsUser->getVar('user_avatar')); $avatar_select->addOptionArray($avatarHandler->getList('S')); $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"uploads\", \"\", \"" . XOOPS_URL . "\")'"); @@ -314,7 +311,8 @@ $avatar_tray->addElement($avatar_select); $avatar_tray->addElement( new \XoopsFormLabel( - '', "getVar('user_avatar', 'E') . "' name='avatar' id='avatar' alt='' /> " . _LIST . '' + '', + "getVar('user_avatar', 'E') . "' name='avatar' id='avatar' alt=''> " . _LIST . '' ) ); $form2->addElement($avatar_tray); @@ -327,10 +325,10 @@ if ('avatarupload' == $op) { if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); + redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); } $xoops_upload_file = []; - $uid = 0; + $uid = 0; if (!empty($_POST['xoops_upload_file']) && is_array($_POST['xoops_upload_file'])) { $xoops_upload_file = $_POST['xoops_upload_file']; } @@ -347,7 +345,7 @@ $uploader->setPrefix('cavt'); if ($uploader->upload()) { $avtHandler = xoops_getHandler('avatar'); - $avatar = $avtHandler->create(); + $avatar = $avtHandler->create(); $avatar->setVar('avatar_file', $uploader->getSavedFileName()); $avatar->setVar('avatar_name', $xoopsUser->getVar('uname')); $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); @@ -357,12 +355,12 @@ @unlink($uploader->getSavedDestination()); } else { $oldavatar = $xoopsUser->getVar('user_avatar'); - if (!empty($oldavatar) && preg_match('/^cavt/', strtolower($oldavatar))) { - $avatars =& $avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); + if (!empty($oldavatar) && preg_match('/^cavt/', mb_strtolower($oldavatar))) { + $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); $oldavatar_path = str_replace('\\', '/', realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar)); - if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { + if (0 === mb_strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { unlink($oldavatar_path); } } @@ -382,7 +380,7 @@ if ('avatarchoose' == $op) { if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); + redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); } $uid = 0; if (!empty($_POST['uid'])) { @@ -392,19 +390,19 @@ redirect_header('index.php', 3, _US_NOEDITRIGHT); } $user_avatar = ''; - $avtHandler = xoops_getHandler('avatar'); + $avtHandler = xoops_getHandler('avatar'); if (!empty($_POST['user_avatar'])) { - $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); + $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); $criteria_avatar = new \CriteriaCompo(new \Criteria('avatar_file', $user_avatar)); $criteria_avatar->add(new \Criteria('avatar_type', 'S')); - $avatars =& $avtHandler->getObjects($criteria_avatar); + $avatars = &$avtHandler->getObjects($criteria_avatar); if (!is_array($avatars) || !count($avatars)) { $user_avatar = 'blank.gif'; } unset($avatars, $criteria_avatar); } $user_avatarpath = str_replace('\\', '/', realpath(XOOPS_UPLOAD_PATH . '/' . $user_avatar)); - if (0 === strpos($user_avatarpath, XOOPS_UPLOAD_PATH) && is_file($user_avatarpath)) { + if (0 === mb_strpos($user_avatarpath, XOOPS_UPLOAD_PATH) && is_file($user_avatarpath)) { $oldavatar = $xoopsUser->getVar('user_avatar'); $xoopsUser->setVar('user_avatar', $user_avatar); $memberHandler = xoops_getHandler('member'); @@ -414,18 +412,18 @@ include XOOPS_ROOT_PATH . '/footer.php'; exit(); } - if ($oldavatar && preg_match('/^cavt/', strtolower($oldavatar))) { - $avatars =& $avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); + if ($oldavatar && preg_match('/^cavt/', mb_strtolower($oldavatar))) { + $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); $oldavatar_path = str_replace('\\', '/', realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar)); - if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { + if (0 === mb_strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { unlink($oldavatar_path); } } } if ('blank.gif' != $user_avatar) { - $avatars =& $avtHandler->getObjects(new \Criteria('avatar_file', $user_avatar)); + $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $user_avatar)); if (is_object($avatars[0])) { $avtHandler->addUser($avatars[0]->getVar('avatar_id'), $uid); } diff --git a/fans.php b/fans.php index 83292d5d..62d43bdf 100644 --- a/fans.php +++ b/fans.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_fans.tpl'; @@ -33,8 +32,8 @@ /** * Friends */ -$criteria_friends = new \Criteria('friend2_uid', $controller->uidOwner); -$criteria_fans = new \Criteria('fan', 1); +$criteria_friends = new \Criteria('friend2_uid', $controller->uidOwner); +$criteria_fans = new \Criteria('fan', 1); $criteria_compo_fans = new \CriteriaCompo($criteria_friends); $criteria_compo_fans->add($criteria_fans); $nb_friends = $controller->friendshipsFactory->getCount($criteria_compo_fans); @@ -48,7 +47,7 @@ /** * Let's get the user name of the owner of the album */ -$owner = new \XoopsUser(); +$owner = new \XoopsUser(); $identifier = $owner::getUnameFromId($controller->uidOwner); /** @@ -57,7 +56,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); @@ -73,7 +72,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nb_friends, $xoopsModuleConfig['friendsperpage'], $start, 'start', 'uid=' . (int)$controller->uidOwner); -$navegacao = $barra_navegacao->renderImageNav(2); +$navegacao = $barra_navegacao->renderImageNav(2); //permissions $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); diff --git a/friends.php b/friends.php index e1fa8cee..b2175e75 100644 --- a/friends.php +++ b/friends.php @@ -16,10 +16,8 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; - $GLOBALS['xoopsOption']['template_main'] = 'yogurt_friends.tpl'; require __DIR__ . '/header.php'; @@ -36,7 +34,7 @@ * Friends */ $criteria_friends = new \Criteria('friend1_uid', (int)$controller->uidOwner); -$nb_friends = $controller->friendshipsFactory->getCount($criteria_friends); +$nb_friends = $controller->friendshipsFactory->getCount($criteria_friends); $criteria_friends->setLimit($xoopsModuleConfig['friendsperpage']); $criteria_friends->setStart($start); $vetor = $controller->friendshipsFactory->getFriends('', $criteria_friends, 0); @@ -47,7 +45,7 @@ /** * Let's get the user name of the owner of the album */ -$owner = new \XoopsUser(); +$owner = new \XoopsUser(); $identifier = $owner::getUnameFromId($controller->uidOwner); /** @@ -56,7 +54,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); @@ -72,7 +70,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nbSections['nbFriends'], $xoopsModuleConfig['friendsperpage'], $start, 'start', 'uid=' . (int)$controller->uidOwner); -$navegacao = $barra_navegacao->renderImageNav(2); +$navegacao = $barra_navegacao->renderImageNav(2); //permissions $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); diff --git a/header.php b/header.php index 5bac914c..c6400ae8 100644 --- a/header.php +++ b/header.php @@ -4,7 +4,7 @@ include __DIR__ . '/preloads/autoloader.php'; -require dirname(dirname(__DIR__)) . '/mainfile.php'; +require dirname(dirname(__DIR__)) . '/mainfile.php'; require XOOPS_ROOT_PATH . '/header.php'; $moduleDirName = basename(__DIR__); @@ -33,14 +33,13 @@ $xoopsTpl = new \XoopsTpl(); } - -$albumFactory = new Yogurt\ImageHandler($xoopsDB); -$visitorsFactory = new Yogurt\VisitorsHandler($xoopsDB); -$videosFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\ImageHandler($xoopsDB); +$visitorsFactory = new Yogurt\VisitorsHandler($xoopsDB); +$videosFactory = new Yogurt\SeutuboHandler($xoopsDB); $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); +$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$isOwner = 0; +$isOwner = 0; $isanonym = 1; $isfriend = 0; @@ -54,15 +53,15 @@ $uid_owner = (int)$_GET['uid']; } else { $uid_owner = 1; - $isOwner = 0; + $isOwner = 0; } } else { $isanonym = 0; if (isset($_GET['uid'])) { $uid_owner = (int)$_GET['uid']; - $isOwner = ($xoopsUser->getVar('uid') == $uid_owner) ? 1 : 0; + $isOwner = ($xoopsUser->getVar('uid') == $uid_owner) ? 1 : 0; } else { $uid_owner = (int)$xoopsUser->getVar('uid'); - $isOwner = 1; + $isOwner = 1; } } diff --git a/include/common.php b/include/common.php index 78eacc10..9d5e470a 100644 --- a/include/common.php +++ b/include/common.php @@ -17,6 +17,7 @@ * @author XOOPS Development Team */ use XoopsModules\Yogurt; + include dirname(__DIR__) . '/preloads/autoloader.php'; $moduleDirName = basename(dirname(__DIR__)); @@ -61,15 +62,15 @@ } $icons = [ - 'edit' => " . _EDIT . ", - 'delete' => "" . _DELETE . "", - 'clone' => "" . _CLONE . "", + 'edit' => " . _EDIT . ", + 'delete' => "" . _DELETE . "", + 'clone' => "" . _CLONE . "", 'preview' => "" . _PREVIEW . "", - 'print' => "" . _CLONE . "", - 'pdf' => "" . _CLONE . "", - 'add' => "" . _ADD . "", - '0' => "" . 0 . "", - '1' => "" . 1 . "", + 'print' => "" . _CLONE . "", + 'pdf' => "" . _CLONE . "", + 'add' => "" . _ADD . "", + '0' => "" . 0 . "", + '1' => "" . 1 . "", ]; $debug = false; diff --git a/include/jquery.lightbox-0.3.css b/include/jquery.lightbox-0.3.css index 565602f2..c5262e73 100644 --- a/include/jquery.lightbox-0.3.css +++ b/include/jquery.lightbox-0.3.css @@ -53,7 +53,7 @@ width: 100%; z-index: 10; } -#lightbox-container-image-box > #lightbox-nav { left: 0; } +#lightbox-container-image-box> #lightbox-nav { left: 0; } #lightbox-nav a { outline: none;} #lightbox-nav-btnPrev, #lightbox-nav-btnNext { width: 49%; @@ -61,12 +61,12 @@ background: transparent url(___just-anything-here.gif) no-repeat; /* Trick IE into showing hover */ display: block; } -#lightbox-nav-btnPrev { - left: 0; +#lightbox-nav-btnPrev { + left: 0; float: left; } -#lightbox-nav-btnNext { - right: 0; +#lightbox-nav-btnNext { + right: 0; float: right; } #lightbox-container-image-data-box { @@ -79,22 +79,22 @@ padding: 0 10px 0; } #lightbox-container-image-data { - padding: 0 10px; - color: #666; + padding: 0 10px; + color: #666; +} +#lightbox-container-image-data #lightbox-image-details { + width: 70%; + float: left; + text-align: left; } -#lightbox-container-image-data #lightbox-image-details { - width: 70%; - float: left; - text-align: left; -} #lightbox-image-details-caption { font-weight: bold; } #lightbox-image-details-currentNumber { - display: block; - clear: left; - padding-bottom: 1.0em; -} + display: block; + clear: left; + padding-bottom: 1.0em; +} #lightbox-secNav-btnClose { - width: 66px; + width: 66px; float: right; - padding-bottom: 0.7em; + padding-bottom: 0.7em; } diff --git a/include/jquery.lightbox-0.3.js b/include/jquery.lightbox-0.3.js index 7a726704..d5f5e961 100644 --- a/include/jquery.lightbox-0.3.js +++ b/include/jquery.lightbox-0.3.js @@ -14,370 +14,370 @@ // Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias (function($) { - /** - * $ is an alias to jQuery object - * - */ - $.fn.lightBox = function(settings) { - // Settings to configure the jQuery lightBox plugin how you like - settings = jQuery.extend({ - // Configuration related to overlay - overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color. - overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9 - // Configuration related to images - imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon - imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image - imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image - imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn - // Configuration related to container image box - containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value - containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default. - // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts. - txtImage: 'Image', // (string) Specify text "Image" - txtOf: 'of', // (string) Specify text "of" - // Don´t alter these variables in any way - imageArray: [], - activeImage: 0 - },settings); - // Caching the jQuery object with all elements matched - var jQueryMatchedObj = this; // This, in this context, refer to jQuery object - /** - * Initializing the plugin calling the start function - * - * @return boolean false - */ - function _initialize() { - _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked - return false; // Avoid the browser following the link - } - /** - * Start the jQuery lightBox plugin - * - * @param object objClicked The object (link) whick the user have clicked - * @param object jQueryMatchedObj The jQuery object with all elements matched - */ - function _start(objClicked,jQueryMatchedObj) { - // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay. - $('embed, object, select').hide(); - // Call the function to create the markup structure; style some elements; assign events in some elements. - _set_interface(); - // Unset total images in imageArray - settings.imageArray.length = 0; - // Unset image active information - settings.activeImage = 0; - // We have an image set? Or just an image? Let´s see it. - if ( jQueryMatchedObj.length == 1 ) { - // Add an Array, with href and title atributes, inside the Array that storage the images references - settings.imageArray.push(new Array(jQueryMatchedObj.attr('href'),jQueryMatchedObj.attr('title'))); - } else { - // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references - for ( var i = 0; i < jQueryMatchedObj.length; i++ ) { - settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title'))); - } - } - // In some cases IE get the full path and in another get just the relative path. So, use match to verify is better instead the operator != - while ( !settings.imageArray[settings.activeImage][0].match(objClicked.getAttribute('href')) ) { - settings.activeImage++; - } - // Call the function that prepares image exibition - _set_image_to_view(); - } - /** - * Create the jQuery lightBox plugin interface - * - * The HTML markup will be like that: -
    -
    - - -
    - * - */ - function _set_interface() { - // Apply the HTML markup into body tag - $('body').append('
    '); - // Get page sizes - var arrPageSizes = ___getPageSize(); - // Style overlay and show it - $('#jquery-overlay').css({ - backgroundColor: settings.overlayBgColor, - opacity: settings.overlayOpacity, - width: arrPageSizes[0], - height: arrPageSizes[1] - }).fadeIn(); - // Get page scroll - var arrPageScroll = ___getPageScroll(); - // Calculate top and left offset for the jquery-lightbox div object and show it - $('#jquery-lightbox').css({ - top: arrPageScroll[1] + (arrPageSizes[3] / 10), - left: arrPageScroll[0] - }).show(); - // Assigning click events in elements to close overlay - $('#jquery-overlay,#jquery-lightbox').click(function() { - _finish(); - }); - // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects - $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() { - _finish(); - return false; - }); - // If window was resized, calculate the new overlay dimensions - $(window).resize(function() { - // Get page sizes - var arrPageSizes = ___getPageSize(); - // Style overlay and show it - $('#jquery-overlay').css({ - width: arrPageSizes[0], - height: arrPageSizes[1] - }); - // Get page scroll - var arrPageScroll = ___getPageScroll(); - // Calculate top and left offset for the jquery-lightbox div object and show it - $('#jquery-lightbox').css({ - top: arrPageScroll[1] + (arrPageSizes[3] / 10), - left: arrPageScroll[0] - }); - }); - } - /** - * Prepares image exibition; doing a image´s preloader to calculate it´s size - * - */ - function _set_image_to_view() { // show the loading - // Show the loading - $('#lightbox-loading').show(); - // Hide some elements - $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide(); - // Image preload process - var objImagePreloader = new Image(); - objImagePreloader.onload = function() { - $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]); - // Perfomance an effect in the image container resizing it - _resize_container_image_box(objImagePreloader.width,objImagePreloader.height); - // clear onLoad, IE behaves irratically with animated gifs otherwise - objImagePreloader.onload=function(){}; - } - objImagePreloader.src = settings.imageArray[settings.activeImage][0]; - }; - /** - * Perfomance an effect in the image container resizing it - * - * @param integer intImageWidth The image´s width that will be showed - * @param integer intImageHeight The image´s height that will be showed - */ - function _resize_container_image_box(intImageWidth,intImageHeight) { - // Get current width and height - var intCurrentWidth = $('#lightbox-container-image-box').width(); - var intCurrentHeight = $('#lightbox-container-image-box').height(); - // Get the width and height of the selected image plus the padding - var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value - var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value - // Diferences - var intDiffW = intCurrentWidth - intWidth; - var intDiffH = intCurrentHeight - intHeight; - // Perfomance the effect - $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); }); - if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) { - if ( $.browser.msie ) { - ___pause(250); - } else { - ___pause(100); - } - } - $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) }); - $('#lightbox-container-image-data-box').css({ width: intImageWidth }); - }; - /** - * Show the prepared image - * - */ - function _show_image() { - $('#lightbox-loading').hide(); - $('#lightbox-image').fadeIn(function() { - _show_image_data(); - _set_navigation(); - }); - _preload_neighbor_images(); - }; - /** - * Show the image information - * - */ - function _show_image_data() { - $('#lightbox-container-image-data-box').slideDown('fast'); - $('#lightbox-image-details-caption').hide(); - if ( settings.imageArray[settings.activeImage][1] ) { - $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show(); - } - // If we have a image set, display 'Image X of X' - if ( settings.imageArray.length > 1 ) { - $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show(); - } - } - /** - * Display the button navigations - * - */ - function _set_navigation() { - $('#lightbox-nav').show(); - - // Show the prev button, if not the first image in set - if ( settings.activeImage != 0 ) { - // Show the images button for Next buttons - $('#lightbox-nav-btnPrev').unbind().hover(function() { - $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }); - },function() { - $(this).css({ 'background' : 'transparent url(___just-anything-here.gif) no-repeat' }); - }).show().bind('click',function() { - settings.activeImage = settings.activeImage - 1; - _set_image_to_view(); - return false; - }); - } - - // Show the next button, if not the last image in set - if ( settings.activeImage != ( settings.imageArray.length -1 ) ) { - // Show the images button for Next buttons - $('#lightbox-nav-btnNext').unbind().hover(function() { - $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }); - },function() { - $(this).css({ 'background' : 'transparent url(___just-anything-here.gif) no-repeat' }); - }).show().bind('click',function() { - settings.activeImage = settings.activeImage + 1; - _set_image_to_view(); - return false; - }); - } - } - /** - * Preload prev and next images being showed - * - */ - function _preload_neighbor_images() { - if ( (settings.imageArray.length -1) > settings.activeImage ) { - objNext = new Image(); - objNext.src = settings.imageArray[settings.activeImage + 1][0]; - } - if ( settings.activeImage > 0 ) { - objPrev = new Image(); - objPrev.src = settings.imageArray[settings.activeImage -1][0]; - } - } - /** - * Remove jQuery lightBox plugin HTML markup - * - */ - function _finish() { - $('#jquery-lightbox').remove(); - $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); }); - // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay. - $('embed, object, select').show(); - } - /** - / THIRD FUNCTION - * getPageSize() by quirksmode.com - * - * @return Array Return an array with page width, height and window width, height - */ - function ___getPageSize() { - var xScroll, yScroll; - if (window.innerHeight && window.scrollMaxY) { - xScroll = window.innerWidth + window.scrollMaxX; - yScroll = window.innerHeight + window.scrollMaxY; - } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac - xScroll = document.body.scrollWidth; - yScroll = document.body.scrollHeight; - } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari - xScroll = document.body.offsetWidth; - yScroll = document.body.offsetHeight; - } - var windowWidth, windowHeight; - if (self.innerHeight) { // all except Explorer - if(document.documentElement.clientWidth){ - windowWidth = document.documentElement.clientWidth; - } else { - windowWidth = self.innerWidth; - } - windowHeight = self.innerHeight; - } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode - windowWidth = document.documentElement.clientWidth; - windowHeight = document.documentElement.clientHeight; - } else if (document.body) { // other Explorers - windowWidth = document.body.clientWidth; - windowHeight = document.body.clientHeight; - } - // for small pages with total height less then height of the viewport - if(yScroll < windowHeight){ - pageHeight = windowHeight; - } else { - pageHeight = yScroll; - } - // for small pages with total width less then width of the viewport - if(xScroll < windowWidth){ - pageWidth = xScroll; - } else { - pageWidth = windowWidth; - } - arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) - return arrayPageSize; - }; - /** - / THIRD FUNCTION - * getPageScroll() by quirksmode.com - * - * @return Array Return an array with x,y page scroll values. - */ - function ___getPageScroll() { - var xScroll, yScroll; - if (self.pageYOffset) { - yScroll = self.pageYOffset; - xScroll = self.pageXOffset; - } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict - yScroll = document.documentElement.scrollTop; - xScroll = document.documentElement.scrollLeft; - } else if (document.body) {// all other Explorers - yScroll = document.body.scrollTop; - xScroll = document.body.scrollLeft; - } - arrayPageScroll = new Array(xScroll,yScroll) - return arrayPageScroll; - }; - /** - * Stop the code execution from a escified time in milisecond - * - */ - function ___pause(ms) { - var date = new Date(); - curDate = null; - do { var curDate = new Date(); } - while ( curDate - date < ms); - }; - // Return the jQuery object for chaining - return this.click(_initialize); - }; -})(jQuery); // Call and execute the function immediately passing the jQuery object \ No newline at end of file + /** + * $ is an alias to jQuery object + * + */ + $.fn.lightBox = function(settings) { + // Settings to configure the jQuery lightBox plugin how you like + settings = jQuery.extend({ + // Configuration related to overlay + overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color. + overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9 + // Configuration related to images + imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon + imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image + imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image + imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn + // Configuration related to container image box + containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value + containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default. + // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts. + txtImage: 'Image', // (string) Specify text "Image" + txtOf: 'of', // (string) Specify text "of" + // Don´t alter these variables in any way + imageArray: [], + activeImage: 0 + },settings); + // Caching the jQuery object with all elements matched + var jQueryMatchedObj = this; // This, in this context, refer to jQuery object + /** + * Initializing the plugin calling the start function + * + * @return boolean false + */ + function _initialize() { + _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked + return false; // Avoid the browser following the link + } + /** + * Start the jQuery lightBox plugin + * + * @param object objClicked The object (link) whick the user have clicked + * @param object jQueryMatchedObj The jQuery object with all elements matched + */ + function _start(objClicked,jQueryMatchedObj) { + // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay. + $('embed, object, select').hide(); + // Call the function to create the markup structure; style some elements; assign events in some elements. + _set_interface(); + // Unset total images in imageArray + settings.imageArray.length = 0; + // Unset image active information + settings.activeImage = 0; + // We have an image set? Or just an image? Let´s see it. + if ( jQueryMatchedObj.length == 1 ) { + // Add an Array, with href and title atributes, inside the Array that storage the images references + settings.imageArray.push(new Array(jQueryMatchedObj.attr('href'),jQueryMatchedObj.attr('title'))); + } else { + // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references + for ( var i = 0; i < jQueryMatchedObj.length; i++ ) { + settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title'))); + } + } + // In some cases IE get the full path and in another get just the relative path. So, use match to verify is better instead the operator != + while ( !settings.imageArray[settings.activeImage][0].match(objClicked.getAttribute('href')) ) { + settings.activeImage++; + } + // Call the function that prepares image exibition + _set_image_to_view(); + } + /** + * Create the jQuery lightBox plugin interface + * + * The HTML markup will be like that: +
    +
    + + +
    + * + */ + function _set_interface() { + // Apply the HTML markup into body tag + $('body').append('
    '); + // Get page sizes + var arrPageSizes = ___getPageSize(); + // Style overlay and show it + $('#jquery-overlay').css({ + backgroundColor: settings.overlayBgColor, + opacity: settings.overlayOpacity, + width: arrPageSizes[0], + height: arrPageSizes[1] + }).fadeIn(); + // Get page scroll + var arrPageScroll = ___getPageScroll(); + // Calculate top and left offset for the jquery-lightbox div object and show it + $('#jquery-lightbox').css({ + top: arrPageScroll[1] + (arrPageSizes[3] / 10), + left: arrPageScroll[0] + }).show(); + // Assigning click events in elements to close overlay + $('#jquery-overlay,#jquery-lightbox').click(function() { + _finish(); + }); + // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects + $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() { + _finish(); + return false; + }); + // If window was resized, calculate the new overlay dimensions + $(window).resize(function() { + // Get page sizes + var arrPageSizes = ___getPageSize(); + // Style overlay and show it + $('#jquery-overlay').css({ + width: arrPageSizes[0], + height: arrPageSizes[1] + }); + // Get page scroll + var arrPageScroll = ___getPageScroll(); + // Calculate top and left offset for the jquery-lightbox div object and show it + $('#jquery-lightbox').css({ + top: arrPageScroll[1] + (arrPageSizes[3] / 10), + left: arrPageScroll[0] + }); + }); + } + /** + * Prepares image exibition; doing a image´s preloader to calculate it´s size + * + */ + function _set_image_to_view() { // show the loading + // Show the loading + $('#lightbox-loading').show(); + // Hide some elements + $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide(); + // Image preload process + var objImagePreloader = new Image(); + objImagePreloader.onload = function() { + $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]); + // Perfomance an effect in the image container resizing it + _resize_container_image_box(objImagePreloader.width,objImagePreloader.height); + // clear onLoad, IE behaves irratically with animated gifs otherwise + objImagePreloader.onload=function(){}; + } + objImagePreloader.src = settings.imageArray[settings.activeImage][0]; + }; + /** + * Perfomance an effect in the image container resizing it + * + * @param integer intImageWidth The image´s width that will be showed + * @param integer intImageHeight The image´s height that will be showed + */ + function _resize_container_image_box(intImageWidth,intImageHeight) { + // Get current width and height + var intCurrentWidth = $('#lightbox-container-image-box').width(); + var intCurrentHeight = $('#lightbox-container-image-box').height(); + // Get the width and height of the selected image plus the padding + var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value + var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value + // Diferences + var intDiffW = intCurrentWidth - intWidth; + var intDiffH = intCurrentHeight - intHeight; + // Perfomance the effect + $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); }); + if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) { + if ( $.browser.msie ) { + ___pause(250); + } else { + ___pause(100); + } + } + $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) }); + $('#lightbox-container-image-data-box').css({ width: intImageWidth }); + }; + /** + * Show the prepared image + * + */ + function _show_image() { + $('#lightbox-loading').hide(); + $('#lightbox-image').fadeIn(function() { + _show_image_data(); + _set_navigation(); + }); + _preload_neighbor_images(); + }; + /** + * Show the image information + * + */ + function _show_image_data() { + $('#lightbox-container-image-data-box').slideDown('fast'); + $('#lightbox-image-details-caption').hide(); + if ( settings.imageArray[settings.activeImage][1] ) { + $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show(); + } + // If we have a image set, display 'Image X of X' + if ( settings.imageArray.length> 1 ) { + $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show(); + } + } + /** + * Display the button navigations + * + */ + function _set_navigation() { + $('#lightbox-nav').show(); + + // Show the prev button, if not the first image in set + if ( settings.activeImage != 0 ) { + // Show the images button for Next buttons + $('#lightbox-nav-btnPrev').unbind().hover(function() { + $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' }); + },function() { + $(this).css({ 'background' : 'transparent url(___just-anything-here.gif) no-repeat' }); + }).show().bind('click',function() { + settings.activeImage = settings.activeImage - 1; + _set_image_to_view(); + return false; + }); + } + + // Show the next button, if not the last image in set + if ( settings.activeImage != ( settings.imageArray.length -1 ) ) { + // Show the images button for Next buttons + $('#lightbox-nav-btnNext').unbind().hover(function() { + $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }); + },function() { + $(this).css({ 'background' : 'transparent url(___just-anything-here.gif) no-repeat' }); + }).show().bind('click',function() { + settings.activeImage = settings.activeImage + 1; + _set_image_to_view(); + return false; + }); + } + } + /** + * Preload prev and next images being showed + * + */ + function _preload_neighbor_images() { + if ( (settings.imageArray.length -1)> settings.activeImage ) { + objNext = new Image(); + objNext.src = settings.imageArray[settings.activeImage + 1][0]; + } + if ( settings.activeImage> 0 ) { + objPrev = new Image(); + objPrev.src = settings.imageArray[settings.activeImage -1][0]; + } + } + /** + * Remove jQuery lightBox plugin HTML markup + * + */ + function _finish() { + $('#jquery-lightbox').remove(); + $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); }); + // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay. + $('embed, object, select').show(); + } + /** + / THIRD FUNCTION + * getPageSize() by quirksmode.com + * + * @return Array Return an array with page width, height and window width, height + */ + function ___getPageSize() { + var xScroll, yScroll; + if (window.innerHeight && window.scrollMaxY) { + xScroll = window.innerWidth + window.scrollMaxX; + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight> document.body.offsetHeight){ // all but Explorer Mac + xScroll = document.body.scrollWidth; + yScroll = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + xScroll = document.body.offsetWidth; + yScroll = document.body.offsetHeight; + } + var windowWidth, windowHeight; + if (self.innerHeight) { // all except Explorer + if(document.documentElement.clientWidth){ + windowWidth = document.documentElement.clientWidth; + } else { + windowWidth = self.innerWidth; + } + windowHeight = self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode + windowWidth = document.documentElement.clientWidth; + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { // other Explorers + windowWidth = document.body.clientWidth; + windowHeight = document.body.clientHeight; + } + // for small pages with total height less then height of the viewport + if(yScroll < windowHeight){ + pageHeight = windowHeight; + } else { + pageHeight = yScroll; + } + // for small pages with total width less then width of the viewport + if(xScroll < windowWidth){ + pageWidth = xScroll; + } else { + pageWidth = windowWidth; + } + arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) + return arrayPageSize; + }; + /** + / THIRD FUNCTION + * getPageScroll() by quirksmode.com + * + * @return Array Return an array with x,y page scroll values. + */ + function ___getPageScroll() { + var xScroll, yScroll; + if (self.pageYOffset) { + yScroll = self.pageYOffset; + xScroll = self.pageXOffset; + } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict + yScroll = document.documentElement.scrollTop; + xScroll = document.documentElement.scrollLeft; + } else if (document.body) {// all other Explorers + yScroll = document.body.scrollTop; + xScroll = document.body.scrollLeft; + } + arrayPageScroll = new Array(xScroll,yScroll) + return arrayPageScroll; + }; + /** + * Stop the code execution from a escified time in milisecond + * + */ + function ___pause(ms) { + var date = new Date(); + curDate = null; + do { var curDate = new Date(); } + while ( curDate - date < ms); + }; + // Return the jQuery object for chaining + return this.click(_initialize); + }; +})(jQuery); // Call and execute the function immediately passing the jQuery object diff --git a/include/notification.inc.php b/include/notification.inc.php index 7813b6d1..929650d9 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -17,8 +17,6 @@ * @since */ -use XoopsModules\Yogurt; - /** * Protection against inclusion outside the site */ @@ -34,55 +32,59 @@ function yogurt_iteminfo($category, $item_id) { $moduleHandler = xoops_getHandler('module'); - $module = $moduleHandler->getByDirname('yogurt'); + $module = $moduleHandler->getByDirname('yogurt'); if ('global' == $category) { $item['name'] = ''; - $item['url'] = ''; + $item['url'] = ''; + return $item; } global $xoopsDB; if ('picture' == $category) { - $sql = 'SELECT title,uid_owner,url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT title,uid_owner,url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['uid_owner']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['uid_owner']); $item['name'] = $identifier . "'s Album"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/album.php?uid=' . $result_array['uid_owner']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/album.php?uid=' . $result_array['uid_owner']; + return $item; } if ('video' == $category) { - $sql = 'SELECT video_id,uid_owner,video_desc,youtube_code, mainvideo FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT video_id,uid_owner,video_desc,youtube_code, mainvideo FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['uid_owner']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['uid_owner']); $item['name'] = $identifier . "'s Videos"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner']; + return $item; } if ('Note' == $category) { - $sql = 'SELECT Note_id, Note_from, Note_to, Note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE Note_from = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT Note_id, Note_from, Note_to, Note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE Note_from = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['Note_from']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['Note_from']); $item['name'] = $identifier . "'s Notes"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['Note_from']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['Note_from']; + return $item; } } diff --git a/include/search.inc.php b/include/search.inc.php index 2914fda5..2cd29498 100644 --- a/include/search.inc.php +++ b/include/search.inc.php @@ -38,14 +38,14 @@ function yogurt_search($queryarray, $andor, $limit, $offset, $userid) { global $xoopsDB, $module; //getting the url to the uploads directory - $moduleHandler = xoops_getHandler('module'); - $modulo = $moduleHandler->getByDirname('yogurt'); - $configHandler = xoops_getHandler('config'); - $moduleConfig = $configHandler->getConfigsByCat(0, $modulo->getVar('mid')); + $moduleHandler = xoops_getHandler('module'); + $modulo = $moduleHandler->getByDirname('yogurt'); + $configHandler = xoops_getHandler('config'); + $moduleConfig = $configHandler->getConfigsByCat(0, $modulo->getVar('mid')); $path_uploadimages = XOOPS_UPLOAD_URL; $ret = []; - $sql = 'SELECT cod_img, title, data_creation, uid_owner, url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE '; + $sql = 'SELECT cod_img, title, data_creation, uid_owner, url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE '; if (0 != $userid) { $sql .= '(uid_owner =' . (int)$userid . ')'; } @@ -64,23 +64,23 @@ function yogurt_search($queryarray, $andor, $limit, $offset, $userid) $sql .= 'ORDER BY cod_img DESC'; //echo $sql; //printr($xoopsModules); - $result = $xoopsDB->query($sql, $limit, $offset); - $i = 0; - $stringofimage = 'images/search.png" />'; - while (false !== ($myrow = $xoopsDB->fetchArray($result))) { + $result = $xoopsDB->query($sql, $limit, $offset); + $i = 0; + $stringofimage = 'images/search.png">'; + while (false !== ($myrow = $xoopsDB->fetchArray($result))) { if (0 != $userid) { if ($limit > 5) { - $ret[$i]['image'] = "images/search.png' />
    " . '
    " . ' '; + $stringofimage .= ' '; } } else { - $ret[$i]['image'] = "images/search.png' />
    " . "
    " . "getNumbersSections(); /** @@ -53,25 +50,25 @@ $petition = 0; if (1 == $controller->isOwner) { $criteria_uidpetition = new \Criteria('petioned_uid', $controller->uidOwner); - $newpetition = $controller->petitionsFactory->getObjects($criteria_uidpetition); + $newpetition = $controller->petitionsFactory->getObjects($criteria_uidpetition); if ($newpetition) { - $nb_petitions = count($newpetition); + $nb_petitions = count($newpetition); $petitionerHandler = xoops_getHandler('member'); - $petitioner = $petitionerHandler->getUser($newpetition[0]->getVar('petitioner_uid')); - $petitioner_uid = $petitioner->getVar('uid'); - $petitioner_uname = $petitioner->getVar('uname'); + $petitioner = $petitionerHandler->getUser($newpetition[0]->getVar('petitioner_uid')); + $petitioner_uid = $petitioner->getVar('uid'); + $petitioner_uname = $petitioner->getVar('uname'); $petitioner_avatar = $petitioner->getVar('user_avatar'); - $petition_id = $newpetition[0]->getVar('friendpet_id'); - $petition = 1; + $petition_id = $newpetition[0]->getVar('friendpet_id'); + $petition = 1; } } /** * Criteria for mainvideo */ -$criteria_uidvideo = new \Criteria('uid_owner', $controller->uidOwner); +$criteria_uidvideo = new \Criteria('uid_owner', $controller->uidOwner); $criteria_mainvideo = new \Criteria('main_video', '1'); -$criteria_video = new \CriteriaCompo($criteria_mainvideo); +$criteria_video = new \CriteriaCompo($criteria_mainvideo); $criteria_video->add($criteria_uidvideo); if (($nbSections['nbVideos'] > 0) && ($videos = $controller->videosFactory->getObjects($criteria_video))) { @@ -82,9 +79,8 @@ /** * Friends */ - $criteria_friends = new \Criteria('friend1_uid', $controller->uidOwner); -$friends = $controller->friendshipsFactory->getFriends(9, $criteria_friends); +$friends = $controller->friendshipsFactory->getFriends(9, $criteria_friends); $controller->visitorsFactory->purgeVisits(); $evaluation = $controller->friendshipsFactory->getMoyennes($controller->uidOwner); @@ -92,14 +88,12 @@ /** * Tribes */ - $criteria_tribes = new \Criteria('rel_user_uid', $controller->uidOwner); -$tribes = $controller->reltribeusersFactory->getTribes(9, $criteria_tribes); +$tribes = $controller->reltribeusersFactory->getTribes(9, $criteria_tribes); /** * Visitors */ - if (0 == $controller->isAnonym) { /** * Fectching last visitors @@ -118,10 +112,10 @@ /** * Lets populate an array with the dati from visitors */ - $i = 0; + $i = 0; $visitors_array = []; foreach ($visitors_object_array as $visitor) { - $indice = $visitor->getVar('uid_visitor', 's'); + $indice = $visitor->getVar('uid_visitor', 's'); $visitors_array[$indice] = $visitor->getVar('uname_visitor', 's'); $i++; @@ -140,8 +134,8 @@ $avatar = $controller->owner->getVar('user_avatar'); $memberHandler = xoops_getHandler('member'); -$thisUser = $memberHandler->getUser($controller->uidOwner); -$myts = MyTextSanitizer::getInstance(); +$thisUser = $memberHandler->getUser($controller->uidOwner); +$myts = MyTextSanitizer::getInstance(); /** * Adding to the module js and css of the lightbox and new ones @@ -149,7 +143,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); @@ -278,7 +272,7 @@ if ($nbSections['nbVideos'] > 0) { $xoopsTpl->assign('mainvideocode', $mainvideocode); $xoopsTpl->assign('mainvideodesc', $mainvideodesc); - $xoopsTpl->assign('width', $xoopsModuleConfig['width_maintube']);// Falta configurar o tamnho do main nas configs e alterar no template + $xoopsTpl->assign('width', $xoopsModuleConfig['width_maintube']); // Falta configurar o tamnho do main nas configs e alterar no template $xoopsTpl->assign('height', $xoopsModuleConfig['height_maintube']); } //friends @@ -358,25 +352,25 @@ $xoopsTpl->assign('lang_realname', _US_REALNAME); $xoopsTpl->assign('name', $thisUser->getVar('name')); -$gpermHandler = xoops_getHandler('groupperm'); -$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; +$gpermHandler = xoops_getHandler('groupperm'); +$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; $moduleHandler = xoops_getHandler('module'); -$criteria = new \CriteriaCompo(new \Criteria('hassearch', 1)); +$criteria = new \CriteriaCompo(new \Criteria('hassearch', 1)); $criteria->add(new \Criteria('isactive', 1)); $mids = array_keys($moduleHandler->getList($criteria)); //userranl $userrank = $thisUser->rank(); if ($userrank['image']) { - $xoopsTpl->assign('user_rankimage', ''); + $xoopsTpl->assign('user_rankimage', ''); } $xoopsTpl->assign('user_ranktitle', $userrank['title']); foreach ($mids as $mid) { if ($gpermHandler->checkRight('module_read', $mid, $groups)) { - $module = $moduleHandler->get($mid); + $module = $moduleHandler->get($mid); $user_uid = $thisUser->getVar('uid'); - $results = $module->search('', '', 5, 0, $user_uid); + $results = $module->search('', '', 5, 0, $user_uid); if (is_array($results)) { $count = count($results); } @@ -393,7 +387,7 @@ } $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']); - $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; + $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; } if (5 == $count) { $showall_link = '' . _US_SHOWALL . ''; diff --git a/ishot.php b/ishot.php index b43bf7c9..7d5bb1f1 100644 --- a/ishot.php +++ b/ishot.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; @@ -28,7 +27,7 @@ $ishotFactory = new Yogurt\IshotHandler($xoopsDB); $uid_voted = (int)$_POST['uid_voted']; -$ishot = (int)$_POST['ishot']; +$ishot = (int)$_POST['ishot']; $uid_voter = (int)$xoopsUser->getVar('uid'); if (!$GLOBALS['xoopsSecurity']->check()) { @@ -47,7 +46,7 @@ */ $criteria_uidvoter = new \Criteria('uid_voter', $uid_voter); $criteria_uidvoted = new \Criteria('uid_voted', $uid_voted); -$criteria = new \CriteriaCompo($criteria_uidvoter); +$criteria = new \CriteriaCompo($criteria_uidvoter); $criteria->add($criteria_uidvoted); if (0 == $ishotFactory->getCount($criteria)) { diff --git a/js/jquery.tabs.pack.js b/js/jquery.tabs.pack.js index e958e76b..50997eac 100644 --- a/js/jquery.tabs.pack.js +++ b/js/jquery.tabs.pack.js @@ -11,4 +11,4 @@ * * Version: 2.7.4 */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.2l({z:{2k:0}});$.1P.z=4(x,w){3(O x==\'2Y\')w=x;w=$.2l({K:(x&&O x==\'1Z\'&&x>0)?--x:0,12:C,J:$.1f?2h:T,18:T,1r:\'2XQ;\',21:\'18-2F-\',1m:C,1u:C,1l:C,1F:C,1x:\'2u\',2r:C,2p:C,2m:T,2i:C,1d:C,1c:C,1j:\'z-1M\',H:\'z-2b\',14:\'z-12\',16:\'z-26\',1q:\'z-1H\',1L:\'z-2L\',2j:\'10\'},w||{});$.8.1D=$.8.U&&($.8.1Y&&$.8.1Y<7||/2A 6.0/.2y(2x.2w));4 1w(){1V(0,0)}F 5.Y(4(){2 p=5;2 r=$(\'13.\'+w.1j,p);r=r.V()&&r||$(\'>13:9(0)\',p);2 j=$(\'a\',r);3(w.18){j.Y(4(){2 c=w.21+(++$.z.2k),B=\'#\'+c,2f=5.1O;5.1O=B;$(\'<10 S="\'+c+\'" 34="\'+w.16+\'">\').2c(p);$(5).19(\'1B\',4(e,a){2 b=$(5).I(w.1L),X=$(\'X\',5)[0],27=X.1J;3(w.1r){X.1J=\'<24>\'+w.1r+\'\'}1p(4(){$(B).2T(2f,4(){3(w.1r){X.1J=27}b.17(w.1L);a&&a()})},0)})})}2 n=$(\'10.\'+w.16,p);n=n.V()&&n||$(\'>\'+w.2j,p);r.P(\'.\'+w.1j)||r.I(w.1j);n.Y(4(){2 a=$(5);a.P(\'.\'+w.16)||a.I(w.16)});2 s=$(\'A\',r).20($(\'A.\'+w.H,r)[0]);3(s>=0){w.K=s}3(1e.B){j.Y(4(i){3(5.B==1e.B){w.K=i;3(($.8.U||$.8.2E)&&!w.18){2 a=$(1e.B);2 b=a.15(\'S\');a.15(\'S\',\'\');1p(4(){a.15(\'S\',b)},2D)}1w();F T}})}3($.8.U){1w()}n.1a(\':9(\'+w.K+\')\').1C().1n().2C(\':9(\'+w.K+\')\').I(w.1q);$(\'A\',r).17(w.H).9(w.K).I(w.H);j.9(w.K).N(\'1B\').1n();3(w.2m){2 l=4(d){2 c=$.2B(n.1t(),4(a){2 h,1A=$(a);3(d){3($.8.1D){a.Z.2z(\'1X\');a.Z.G=\'\';a.1k=C}h=1A.L({\'1h-G\':\'\'}).G()}E{h=1A.G()}F h}).2v(4(a,b){F b-a});3($.8.1D){n.Y(4(){5.1k=c[0]+\'1W\';5.Z.2t(\'1X\',\'5.Z.G = 5.1k ? 5.1k : "2s"\')})}E{n.L({\'1h-G\':c[0]+\'1W\'})}};l();2 q=p.1U;2 m=p.1v;2 v=$(\'#z-2q-2o-V\').1t(0)||$(\'M\').L({1T:\'2n\',3a:\'39\',38:\'37\'}).2c(Q.1S).1t(0);2 o=v.1v;36(4(){2 b=p.1U;2 a=p.1v;2 c=v.1v;3(a>m||b!=q||c!=o){l((b>q||c<10><32 31="2a" 30="h" />\').1t(0);b.2a();$(5).N(\'1b\');3(w.J){$.1f.1N(a)}}E{3(w.J){1e.B=a.1z(\'#\',\'\')}E{$(5).N(\'1b\')}}});j.19(\'1E\',4(){2 a=$(5).1g(\'A:9(0)\');3($.8.1y){a.1o({W:0},1,4(){a.L({W:\'\'})})}a.I(w.14)});3(w.12&&w.12.1K){29(2 i=0,k=w.12.1K;i13:9(0)\',5);2 a;3(!c||O c==\'1Z\'){a=$(\'A a\',b).9((c&&c>0&&c-1||0))}E 3(O c==\'2J\'){a=$(\'A a[@1O$="#\'+c+\'"]\',b)}a.N(d)})}})(y[i])}$.1P.2I=4(){2 c=[];5.Y(4(){2 a=$(\'13.z-1M\',5);a=a.V()&&a||$(\'>13:9(0)\',5);2 b=$(\'A\',a);c.2H(b.20(b.1a(\'.z-2b\')[0])+1)});F c[0]}})(2G);',62,197,'||var|if|function|this|||browser|eq||||||||||||||||||||||||||tabs|li|hash|null|toShow|else|return|height|selectedClass|addClass|bookmarkable|initial|css||trigger|typeof|is|document|toHide|id|false|msie|size|opacity|span|each|style|div|hideAnim|disabled|ul|disabledClass|attr|containerClass|removeClass|remote|bind|filter|click|onShow|onHide|location|ajaxHistory|parents|min|locked|navClass|minHeight|fxShow|fxFade|end|animate|setTimeout|hideClass|spinner|documentElement|get|fxSlide|offsetHeight|unFocus|fxSpeed|safari|replace|jq|loadRemoteTab|show|msie6|disableTab|fxHide|window|hide|switchTab|innerHTML|length|loadingClass|nav|update|href|fn|hideSpeed|showSpeed|body|display|offsetWidth|scrollTo|px|behaviour|version|number|index|hashPrefix|scrollTop|scrollLeft|em|blur|container|tabTitle|enableTab|for|submit|selected|appendTo|form|triggerTab|url|width|true|onClick|tabStruct|remoteCount|extend|fxAutoHeight|block|font|fxHideSpeed|watch|fxShowSpeed|1px|setExpression|normal|sort|userAgent|navigator|test|removeExpression|MSIE|map|not|500|opera|tab|jQuery|push|activeTab|string|initialize|loading|pageYOffset|pageXOffset|such|no|8230|There|alert|load|siblings|overflow|visible|Loading|object|clientX|value|type|input|action|class|50|setInterval|hidden|visibility|absolute|position'.split('|'),0,{})) \ No newline at end of file +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.2l({z:{2k:0}});$.1P.z=4(x,w){3(O x==\'2Y\')w=x;w=$.2l({K:(x&&O x==\'1Z\'&&x>0)?--x:0,12:C,J:$.1f?2h:T,18:T,1r:\'2XQ;\',21:\'18-2F-\',1m:C,1u:C,1l:C,1F:C,1x:\'2u\',2r:C,2p:C,2m:T,2i:C,1d:C,1c:C,1j:\'z-1M\',H:\'z-2b\',14:\'z-12\',16:\'z-26\',1q:\'z-1H\',1L:\'z-2L\',2j:\'10\'},w||{});$.8.1D=$.8.U&&($.8.1Y&&$.8.1Y<7||/2A 6.0/.2y(2x.2w));4 1w(){1V(0,0)}F 5.Y(4(){2 p=5;2 r=$(\'13.\'+w.1j,p);r=r.V()&&r||$(\'>13:9(0)\',p);2 j=$(\'a\',r);3(w.18){j.Y(4(){2 c=w.21+(++$.z.2k),B=\'#\'+c,2f=5.1O;5.1O=B;$(\'<10 S="\'+c+\'" 34="\'+w.16+\'">\').2c(p);$(5).19(\'1B\',4(e,a){2 b=$(5).I(w.1L),X=$(\'X\',5)[0],27=X.1J;3(w.1r){X.1J=\'<24>\'+w.1r+\'\'}1p(4(){$(B).2T(2f,4(){3(w.1r){X.1J=27}b.17(w.1L);a&&a()})},0)})})}2 n=$(\'10.\'+w.16,p);n=n.V()&&n||$(\'>\'+w.2j,p);r.P(\'.\'+w.1j)||r.I(w.1j);n.Y(4(){2 a=$(5);a.P(\'.\'+w.16)||a.I(w.16)});2 s=$(\'A\',r).20($(\'A.\'+w.H,r)[0]);3(s>=0){w.K=s}3(1e.B){j.Y(4(i){3(5.B==1e.B){w.K=i;3(($.8.U||$.8.2E)&&!w.18){2 a=$(1e.B);2 b=a.15(\'S\');a.15(\'S\',\'\');1p(4(){a.15(\'S\',b)},2D)}1w();F T}})}3($.8.U){1w()}n.1a(\':9(\'+w.K+\')\').1C().1n().2C(\':9(\'+w.K+\')\').I(w.1q);$(\'A\',r).17(w.H).9(w.K).I(w.H);j.9(w.K).N(\'1B\').1n();3(w.2m){2 l=4(d){2 c=$.2B(n.1t(),4(a){2 h,1A=$(a);3(d){3($.8.1D){a.Z.2z(\'1X\');a.Z.G=\'\';a.1k=C}h=1A.L({\'1h-G\':\'\'}).G()}E{h=1A.G()}F h}).2v(4(a,b){F b-a});3($.8.1D){n.Y(4(){5.1k=c[0]+\'1W\';5.Z.2t(\'1X\',\'5.Z.G = 5.1k ? 5.1k : "2s"\')})}E{n.L({\'1h-G\':c[0]+\'1W\'})}};l();2 q=p.1U;2 m=p.1v;2 v=$(\'#z-2q-2o-V\').1t(0)||$(\'M\').L({1T:\'2n\',3a:\'39\',38:\'37\'}).2c(Q.1S).1t(0);2 o=v.1v;36(4(){2 b=p.1U;2 a=p.1v;2 c=v.1v;3(a>m||b!=q||c!=o){l((b>q||c<10><32 31="2a" 30="h">\').1t(0);b.2a();$(5).N(\'1b\');3(w.J){$.1f.1N(a)}}E{3(w.J){1e.B=a.1z(\'#\',\'\')}E{$(5).N(\'1b\')}}});j.19(\'1E\',4(){2 a=$(5).1g(\'A:9(0)\');3($.8.1y){a.1o({W:0},1,4(){a.L({W:\'\'})})}a.I(w.14)});3(w.12&&w.12.1K){29(2 i=0,k=w.12.1K;i13:9(0)\',5);2 a;3(!c||O c==\'1Z\'){a=$(\'A a\',b).9((c&&c>0&&c-1||0))}E 3(O c==\'2J\'){a=$(\'A a[@1O$="#\'+c+\'"]\',b)}a.N(d)})}})(y[i])}$.1P.2I=4(){2 c=[];5.Y(4(){2 a=$(\'13.z-1M\',5);a=a.V()&&a||$(\'>13:9(0)\',5);2 b=$(\'A\',a);c.2H(b.20(b.1a(\'.z-2b\')[0])+1)});F c[0]}})(2G);',62,197,'||var|if|function|this|||browser|eq||||||||||||||||||||||||||tabs|li|hash|null|toShow|else|return|height|selectedClass|addClass|bookmarkable|initial|css||trigger|typeof|is|document|toHide|id|false|msie|size|opacity|span|each|style|div|hideAnim|disabled|ul|disabledClass|attr|containerClass|removeClass|remote|bind|filter|click|onShow|onHide|location|ajaxHistory|parents|min|locked|navClass|minHeight|fxShow|fxFade|end|animate|setTimeout|hideClass|spinner|documentElement|get|fxSlide|offsetHeight|unFocus|fxSpeed|safari|replace|jq|loadRemoteTab|show|msie6|disableTab|fxHide|window|hide|switchTab|innerHTML|length|loadingClass|nav|update|href|fn|hideSpeed|showSpeed|body|display|offsetWidth|scrollTo|px|behaviour|version|number|index|hashPrefix|scrollTop|scrollLeft|em|blur|container|tabTitle|enableTab|for|submit|selected|appendTo|form|triggerTab|url|width|true|onClick|tabStruct|remoteCount|extend|fxAutoHeight|block|font|fxHideSpeed|watch|fxShowSpeed|1px|setExpression|normal|sort|userAgent|navigator|test|removeExpression|MSIE|map|not|500|opera|tab|jQuery|push|activeTab|string|initialize|loading|pageYOffset|pageXOffset|such|no|8230|There|alert|load|siblings|overflow|visible|Loading|object|clientX|value|type|input|action|class|50|setInterval|hidden|visibility|absolute|position'.split('|'),0,{})) diff --git a/kickfromtribe.php b/kickfromtribe.php index 0b7e9cf3..27b3c41f 100644 --- a/kickfromtribe.php +++ b/kickfromtribe.php @@ -16,12 +16,11 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; -$tribe_id = (int)$_POST['tribe_id']; +$tribe_id = (int)$_POST['tribe_id']; $rel_user_uid = (int)$_POST['rel_user_uid']; if (1 != $_POST['confirm']) { @@ -32,14 +31,14 @@ * The user must be the owner */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); - $tribesFactory = new Yogurt\TribesHandler($xoopsDB); - $tribe = $tribesFactory->get($tribe_id); - // echo "
    ";
    -    //	print_r($tribe);
    +    $tribesFactory = new Yogurt\TribesHandler($xoopsDB);
    +    $tribe = $tribesFactory->get($tribe_id);
    +    //  echo "
    ";
    +    //  print_r($tribe);
         if ($xoopsUser->getVar('uid') == $tribe->getVar('owner_uid')) {
             $criteria_rel_user_uid = new \Criteria('rel_user_uid', $rel_user_uid);
    -        $criteria_tribe_id     = new \Criteria('rel_tribe_id', $tribe_id);
    -        $criteria              = new \CriteriaCompo($criteria_rel_user_uid);
    +        $criteria_tribe_id = new \Criteria('rel_tribe_id', $tribe_id);
    +        $criteria = new \CriteriaCompo($criteria_rel_user_uid);
             $criteria->add($criteria_tribe_id);
             /**
              * Try to delete
    diff --git a/language/english/admin.php b/language/english/admin.php
    index d409bd0f..c7d24e59 100644
    --- a/language/english/admin.php
    +++ b/language/english/admin.php
    @@ -19,8 +19,8 @@
     //index.php
     define(
         '_MA_YOG_FRAMEWORKSFALSE',
    -    "You need to install this package, in order to make this module work correctly:

    -Frameworks v 1.1 or newer
    " + "You need to install this package, in order to make this module work correctly:

    +Frameworks v 1.1 or newer
    " ); define('_MA_YOG_FRAMEWORKSTRUE', 'You have version %s of the Frameworks package'); define('_MA_YOG_BY', 'By'); diff --git a/language/english/common.php b/language/english/common.php index 37cb251e..3ad79e6d 100644 --- a/language/english/common.php +++ b/language/english/common.php @@ -18,9 +18,8 @@ * @since 3.23 * @author Xoops Development Team */ - -$moduleDirName = basename(dirname(dirname(__DIR__))); -$moduleDirNameUpper = strtoupper($moduleDirName); +$moduleDirName = basename(dirname(dirname(__DIR__))); +$moduleDirNameUpper = mb_strtoupper($moduleDirName); define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: '); define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: '); diff --git a/language/english/main.php b/language/english/main.php index 76dd92d8..67e9ad71 100644 --- a/language/english/main.php +++ b/language/english/main.php @@ -19,16 +19,16 @@ //Present in many files (videos pictures etc...) define('_MD_YOGURT_DELETE', 'Delete'); define('_MD_YOGURT_EDITDESC', 'Edit description'); -define('_MD_YOGURT_TOKENEXPIRED', 'Your Security Token has Expired
    Please Try Again'); +define('_MD_YOGURT_TOKENEXPIRED', 'Your Security Token has Expired
    Please Try Again'); define('_MD_YOGURT_DESC_EDITED', 'The description was edited successfully'); define('_MD_YOGURT_CAPTION', 'Caption'); define('_MD_YOGURT_YOUCANUPLOAD', "You can only upload jpg's files and up to %s KBytes in size"); define('_MD_YOGURT_UPLOADPICTURE', 'Upload Picture'); define( '_MD_YOGURT_NOCACHACA', - 'Bad, Bad Module...No cacha�a for you!
    + 'Bad, Bad Module...No cacha�a for you!
    Unfortunately, this module has acted in an unexpected way. Hopefully it will return to its helpful self if you try again. ' -);//Funny general error message +); //Funny general error message define('_MD_YOGURT_PAGETITLE', "%s - %s's Social Network"); define('_MD_YOGURT_SUBMIT', 'Submit'); define('_MD_YOGURT_VIDEOS', 'Videos'); @@ -73,7 +73,7 @@ ########################################################## FRIENDS ################################################### //friends.php define('_MD_YOGURT_FRIENDSTITLE', "%s's Friends"); -define('_MD_YOGURT_NOFRIENDSYET', 'No friends yet');//also present in index.php +define('_MD_YOGURT_NOFRIENDSYET', 'No friends yet'); //also present in index.php define('_MD_YOGURT_MYFRIENDS', 'My Friends'); define('_MD_YOGURT_FRIENDSHIPCONFIGS', 'Set the configs of this friendship. Evaluate your friend.'); @@ -82,11 +82,11 @@ define('_MD_YOGURT_FRIENDNAME', 'Username'); define('_MD_YOGURT_LEVEL', 'Friendship level:'); define('_MD_YOGURT_UNKNOWNACCEPTED', "Haven't met accepted"); -define('_MD_YOGURT_AQUAITANCE', 'Acquaintances');//also present in index.php -define('_MD_YOGURT_FRIEND', 'Friend');//also present in index.php -define('_MD_YOGURT_BESTFRIEND', 'Best Friend');//also present in index.php -define('_MD_YOGURT_FAN', 'Fan');//also present in index.php -define('_MD_YOGURT_SEXY', 'Sexy');//also present in index.php +define('_MD_YOGURT_AQUAITANCE', 'Acquaintances'); //also present in index.php +define('_MD_YOGURT_FRIEND', 'Friend'); //also present in index.php +define('_MD_YOGURT_BESTFRIEND', 'Best Friend'); //also present in index.php +define('_MD_YOGURT_FAN', 'Fan'); //also present in index.php +define('_MD_YOGURT_SEXY', 'Sexy'); //also present in index.php define('_MD_YOGURT_SEXYNO', 'Nope'); define('_MD_YOGURT_SEXYYES', 'Yes'); define('_MD_YOGURT_SEXYALOT', 'Very much!'); @@ -106,7 +106,7 @@ //submitfriendpetition.php define('_MD_YOGURT_PETITIONED', 'A friend request has been sent to this user, Wait until he accepts to have him in your friends list.'); -define('_MD_YOGURT_ALREADY_PETITIONED', 'You have already sent a friendship request to this user or vice-versa
    , Wait untill he accepts or rejects it or check if he has asked you as a friend visiting your profile page.'); +define('_MD_YOGURT_ALREADY_PETITIONED', 'You have already sent a friendship request to this user or vice-versa
    , Wait untill he accepts or rejects it or check if he has asked you as a friend visiting your profile page.'); //makefriends.php define('_MD_YOGURT_FRIENDMADE', 'Added as a friend!'); @@ -124,7 +124,7 @@ define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Add favourite videos'); define( '_MD_YOGURT_ADDVIDEOSHELP', - 'If you want to upload your own video for sharing, then upload your videos to + 'If you want to upload your own video for sharing, then upload your videos to YouTube and then add the URL to here ' ); //The name of the site will show after this define('_MD_YOGURT_MYVIDEOS', 'My Videos'); @@ -142,11 +142,11 @@ ############################## TRIBES ######################################################## //class/Tribes.php define('_MD_YOGURT_SUBMIT_TRIBE', 'Create a new tribe'); -define('_MD_YOGURT_UPLOADTRIBE', 'Save Tribe');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_IMAGE', 'Tribe Image');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_TITLE', 'Title');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_DESC', 'Description');//also present in many ther tribes related -define('_MD_YOGURTCREATEYOURTRIBE', 'Create your own Tribe!');//also present in many ther tribes related +define('_MD_YOGURT_UPLOADTRIBE', 'Save Tribe'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_IMAGE', 'Tribe Image'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_TITLE', 'Title'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_DESC', 'Description'); //also present in many ther tribes related +define('_MD_YOGURTCREATEYOURTRIBE', 'Create your own Tribe!'); //also present in many ther tribes related //abandontribe.php define('_MD_YOGURT_ASKCONFIRMABANDONTRIBE', 'Are you sure you want to leave this Tribe?'); @@ -163,11 +163,11 @@ define('_MD_YOGURT_TRIBEDELETED', 'Tribe deleted!'); //edit_tribe.php -define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Keep this image');//also present in other tribes related +define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Keep this image'); //also present in other tribes related define('_MD_YOGURT_TRIBEEDITED', 'Tribe edited'); -define('_MD_YOGURT_EDIT_TRIBE', 'Edit your Tribe');//also present in other tribes related -define('_MD_YOGURT_TRIBEOWNER', 'You are the owner of this Tribe!');//also present in other tribes related -define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Members of Tribe');//also present in other tribes related +define('_MD_YOGURT_EDIT_TRIBE', 'Edit your Tribe'); //also present in other tribes related +define('_MD_YOGURT_TRIBEOWNER', 'You are the owner of this Tribe!'); //also present in other tribes related +define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Members of Tribe'); //also present in other tribes related //submit_tribe.php define('_MD_YOGURT_TRIBE_CREATED', 'Your Tribe was created'); @@ -187,9 +187,9 @@ //notebook.php define('_MD_YOGURT_ENTERTEXTNOTE', 'Enter Text or Xoops Codes'); define('_MD_YOGURT_SENDNOTE', 'post Note'); -define('_MD_YOGURT_ANSWERNOTE', 'Reply');//also present in configs.php +define('_MD_YOGURT_ANSWERNOTE', 'Reply'); //also present in configs.php define('_MD_YOGURT_MYNOTEBOOK', 'My Notebook'); -define('_MD_YOGURT_CANCEL', 'Cancel');//also present in configs.php +define('_MD_YOGURT_CANCEL', 'Cancel'); //also present in configs.php define('_MD_YOGURT_NOTETIPS', 'Note tips'); define('_MD_YOGURT_BOLD', 'bold'); define('_MD_YOGURT_ITALIC', 'italic'); @@ -225,7 +225,7 @@ define('_MD_YOGURT_CONFIGSSAVE', 'Configuration saved!'); //class/yogurt_controller.php -define('_MD_YOGURT_NOPRIVILEGE', "The owner of this profile has set the privileges to see it,
    higher than you have now.
    Login to become their friend.
    If they haven't set it, so only they can see,
    then you will be able to view it."); +define('_MD_YOGURT_NOPRIVILEGE', "The owner of this profile has set the privileges to see it,
    higher than you have now.
    Login to become their friend.
    If they haven't set it, so only they can see,
    then you will be able to view it."); ###################################### OTHERS ############################## @@ -253,7 +253,7 @@ //suspend.php define('_MD_YOGURT_SUSPENDED', 'User under suspension until %s'); -define('_MD_YOGURT_USERSUSPENDED', 'User suspended!');//als0 present in index.php +define('_MD_YOGURT_USERSUSPENDED', 'User suspended!'); //als0 present in index.php //unsuspend.php define('_MD_YOGURT_USERUNSUSPENDED', 'User Unsuspended'); @@ -327,7 +327,7 @@ define('_MD_YOGURT_TITLEAUDIO', 'Title of file or song'); define('_MD_YOGURT_ADDAUDIO', 'Add an mp3 file'); define('_MD_YOGURT_SUBMITAUDIO', 'Upload file'); -define('_MD_YOGURT_ADDAUDIOHELP', 'Choose an mp3 file on your computer, max size %s ,
    Leave title and author fields blank if your file has metainfo already'); +define('_MD_YOGURT_ADDAUDIOHELP', 'Choose an mp3 file on your computer, max size %s ,
    Leave title and author fields blank if your file has metainfo already'); //19/04/2008 define('_MD_YOGURT_AUDIODELETED', 'Your mp3 file was deleted!'); diff --git a/language/english/modinfo.php b/language/english/modinfo.php index 6fa3cbe8..0049817d 100644 --- a/language/english/modinfo.php +++ b/language/english/modinfo.php @@ -22,23 +22,23 @@ define('_MI_YOG_ADMENU2', 'About'); define('_MI_YOG_SMNAME1', 'Submit'); define('_MI_YOG_THUMW_TITLE', 'Thumb Width'); -define('_MI_YOG_THUMBW_DESC', 'Thumbnails width in pixels
    This means your picture thumbnail will be
    most of this size in width
    All proportions are maintained'); +define('_MI_YOG_THUMBW_DESC', 'Thumbnails width in pixels
    This means your picture thumbnail will be
    most of this size in width
    All proportions are maintained'); define('_MI_YOG_THUMBH_TITLE', 'Thumb Height'); -define('_MI_YOG_THUMBH_DESC', 'Thumbnails Height in pixels
    This means your picture thumbnail will be
    most of this size in height
    All proportions are maintained'); +define('_MI_YOG_THUMBH_DESC', 'Thumbnails Height in pixels
    This means your picture thumbnail will be
    most of this size in height
    All proportions are maintained'); define('_MI_YOG_RESIZEDW_TITLE', 'Resized picture width'); -define('_MI_YOG_RESIZEDW_DESC', 'Resized picture width in pixels
    This means your picture will be
    most of this size in width
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template'); +define('_MI_YOG_RESIZEDW_DESC', 'Resized picture width in pixels
    This means your picture will be
    most of this size in width
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template'); define('_MI_YOG_RESIZEDH_TITLE', 'Resized picture height'); -define('_MI_YOG_RESIZEDH_DESC', 'Resized picture height in pixels
    This means your picture will be
    most of this size in height
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template design'); +define('_MI_YOG_RESIZEDH_DESC', 'Resized picture height in pixels
    This means your picture will be
    most of this size in height
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template design'); define('_MI_YOG_ORIGINALW_TITLE', 'Max original picture width'); -define('_MI_YOG_ORIGINALW_DESC', "Maximum original picture width in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); +define('_MI_YOG_ORIGINALW_DESC', "Maximum original picture width in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); define('_MI_YOG_ORIGINALH_TITLE', 'Max original picture height'); -define('_MI_YOG_ORIGINALH_DESC', "Maximum original picture height in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); +define('_MI_YOG_ORIGINALH_DESC', "Maximum original picture height in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); define('_MI_YOG_PATHUPLOAD_TITLE', 'Path Uploads'); -define('_MI_YOG_PATHUPLOAD_DESC', 'Path to the uploads directory
    in Linux it should look like this /var/www/uploads
    in Windows like this C:/Program Files/www'); +define('_MI_YOG_PATHUPLOAD_DESC', 'Path to the uploads directory
    in Linux it should look like this /var/www/uploads
    in Windows like this C:/Program Files/www'); define('_MI_YOG_LINKPATHUPLOAD_TITLE', 'Link to your uploads directory'); -define('_MI_YOG_LINKPATHUPLOAD_DESC', 'This is the address of the root path to uploads
    like http://www.yoursite.com/uploads'); +define('_MI_YOG_LINKPATHUPLOAD_DESC', 'This is the address of the root path to uploads
    like http://www.yoursite.com/uploads'); define('_MI_YOG_MAXFILEBYTES_TITLE', 'Max size in bytes'); -define('_MI_YOG_MAXFILEBYTES_DESC', 'This is the maximum size a picture file can be
    You can set it in bytes like this: 512000 for 500 KB
    Be careful that the maximum size is also set in the php.ini file. The server is currently set to ' . ini_get('post_max_size')); +define('_MI_YOG_MAXFILEBYTES_DESC', 'This is the maximum size a picture file can be
    You can set it in bytes like this: 512000 for 500 KB
    Be careful that the maximum size is also set in the php.ini file. The server is currently set to ' . ini_get('post_max_size')); define('_MI_YOG_PICTURE_NOTIFYTIT', 'Album'); define('_MI_YOG_PICTURE_NOTIFYDSC', "Notifications related to user's album"); @@ -54,7 +54,7 @@ define('_MI_YOG_PICTURE_TEMPLATEFRIENDSDESC', 'This template shows the friends of the user'); define('_MI_YOGURT_MYFRIENDS', 'My Friends'); define('_MI_YOG_FRIENDSPERPAGE_TITLE', 'Friends per page'); -define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Set the number of friends to show per page
    In the my Friends page'); +define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Set the number of friends to show per page
    In the my Friends page'); define('_MI_YOG_PICTURESPERPAGE_TITLE', 'Pictures showing per page before pagination'); define('_MI_YOGURT_LAST', 'Last pictures block'); @@ -62,7 +62,7 @@ define('_MI_YOG_DELETEPHYSICAL_TITLE', 'DELETE files FROM the upload folder TO'); define( '_MI_YOG_DELETEPHYSICAL_DESC', - "Confirming yes here, will allow the script to delete the files from the uploaded data in the database as well.
    Be careful about this feature, if you exclude the files from the folder and not only in the database, some people who may have linked to the image directly in another part of the site may also lose their content;
    at the same time if you don't exclude them, you may use to much space in the server hard disk.
    Configure this item well for your needs." + "Confirming yes here, will allow the script to delete the files from the uploaded data in the database as well.
    Be careful about this feature, if you exclude the files from the folder and not only in the database, some people who may have linked to the image directly in another part of the site may also lose their content;
    at the same time if you don't exclude them, you may use to much space in the server hard disk.
    Configure this item well for your needs." ); define('_MI_YOGURT_MYVIDEOS', 'My Videos'); diff --git a/language/german/admin.php b/language/german/admin.php index 3ae204a1..ff0ffde5 100644 --- a/language/german/admin.php +++ b/language/german/admin.php @@ -19,8 +19,8 @@ //index.php define( '_MA_YOG_FRAMEWORKSFALSE', - "Sie müssen Frameworks installieren, damit dieses Modul korrekt funktioniert:

    -Frameworks v 1.1 oder neuer wird empfohlen
    " + "Sie müssen Frameworks installieren, damit dieses Modul korrekt funktioniert:

    +Frameworks v 1.1 oder neuer wird empfohlen
    " ); define('_MA_YOG_FRAMEWORKSTRUE', 'Sie haben Framework-Version %s'); define('_MA_YOG_BY', 'Von'); diff --git a/language/german/main.php b/language/german/main.php index 084d760e..1602a443 100644 --- a/language/german/main.php +++ b/language/german/main.php @@ -19,16 +19,16 @@ //Present in many files (videos pictures etc...) define('_MD_YOGURT_DELETE', 'Löschen'); define('_MD_YOGURT_EDITDESC', 'Beschreibung bearbeiten'); -define('_MD_YOGURT_TOKENEXPIRED', 'Dein Sicherheitstoken ist abgelaufen
    Bitte nochmal versuchen'); +define('_MD_YOGURT_TOKENEXPIRED', 'Dein Sicherheitstoken ist abgelaufen
    Bitte nochmal versuchen'); define('_MD_YOGURT_DESC_EDITED', 'Die Beschreibung wurde erfolgreich geändert'); define('_MD_YOGURT_CAPTION', 'Titel'); -define('_MD_YOGURT_YOUCANUPLOAD', 'Du kannst nur JPG-Dateien mit einer maximalen Dateigröße von %s KBytes hochladen!
    Bilder kannst Du ganz einfach unter www.bilder-editieren.de bearbeiten.'); +define('_MD_YOGURT_YOUCANUPLOAD', 'Du kannst nur JPG-Dateien mit einer maximalen Dateigröße von %s KBytes hochladen!
    Bilder kannst Du ganz einfach unter www.bilder-editieren.de bearbeiten.'); define('_MD_YOGURT_UPLOADPICTURE', 'Bild hochladen'); define( '_MD_YOGURT_NOCACHACA', - 'Ein Problem ist aufgetreten ... sieht nicht gut aus
    + 'Ein Problem ist aufgetreten ... sieht nicht gut aus
    Das Modul hat sich in einer unerwarteten Weise verhalten. Bitte versuche deine letzte Aktion erneut.' -);//Funny general error message +); //Funny general error message define('_MD_YOGURT_PAGETITLE', "%s - %s's Social Network"); define('_MD_YOGURT_SUBMIT', 'Absenden'); define('_MD_YOGURT_VIDEOS', 'Videos'); @@ -73,7 +73,7 @@ ########################################################## FRIENDS ################################################### //friends.php define('_MD_YOGURT_FRIENDSTITLE', 'Freunde von %s'); -define('_MD_YOGURT_NOFRIENDSYET', 'Keine Freunde');//also present in index.php +define('_MD_YOGURT_NOFRIENDSYET', 'Keine Freunde'); //also present in index.php define('_MD_YOGURT_MYFRIENDS', 'Meine Freunde'); define('_MD_YOGURT_FRIENDSHIPCONFIGS', 'Setze die Art dieser Freundschaft und bewerte deinen Freund.'); @@ -82,11 +82,11 @@ define('_MD_YOGURT_FRIENDNAME', 'Benutzername'); define('_MD_YOGURT_LEVEL', 'Freundschaftsebene:'); define('_MD_YOGURT_UNKNOWNACCEPTED', 'Nicht akzeptiert'); -define('_MD_YOGURT_AQUAITANCE', 'Bekanntenkreis');//also present in index.php -define('_MD_YOGURT_FRIEND', 'Freund');//also present in index.php -define('_MD_YOGURT_BESTFRIEND', 'Bester Freund');//also present in index.php -define('_MD_YOGURT_FAN', 'Fan');//also present in index.php -define('_MD_YOGURT_SEXY', 'Sexy');//also present in index.php +define('_MD_YOGURT_AQUAITANCE', 'Bekanntenkreis'); //also present in index.php +define('_MD_YOGURT_FRIEND', 'Freund'); //also present in index.php +define('_MD_YOGURT_BESTFRIEND', 'Bester Freund'); //also present in index.php +define('_MD_YOGURT_FAN', 'Fan'); //also present in index.php +define('_MD_YOGURT_SEXY', 'Sexy'); //also present in index.php define('_MD_YOGURT_SEXYNO', 'Nein'); define('_MD_YOGURT_SEXYYES', 'Ja'); define('_MD_YOGURT_SEXYALOT', 'Sehr!'); @@ -106,7 +106,7 @@ //submitfriendpetition.php define('_MD_YOGURT_PETITIONED', 'Eine Anfrage wurde an diesen Benutzer gesendet. Wenn er zustimmt wird er in deiner Freundesliste erscheinen.'); -define('_MD_YOGURT_ALREADY_PETITIONED', 'Du hast bereits eine Anfrage auf Freundschaft an dieses Mitglied gesendet (oder umgekehrt).
    Warte bitte auf Zustimmtung oder Ablehnung.'); +define('_MD_YOGURT_ALREADY_PETITIONED', 'Du hast bereits eine Anfrage auf Freundschaft an dieses Mitglied gesendet (oder umgekehrt).
    Warte bitte auf Zustimmtung oder Ablehnung.'); //makefriends.php define('_MD_YOGURT_FRIENDMADE', 'Als Freund hinzugefügt!'); @@ -142,11 +142,11 @@ ############################## TRIBES ######################################################## //class/Tribes.php define('_MD_YOGURT_SUBMIT_TRIBE', 'Neue Gruppe anlegen'); -define('_MD_YOGURT_UPLOADTRIBE', 'Gruppe speichern');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_IMAGE', 'Gruppenbild (125 Pixel breit und 80 Pixel hoch für optimale Darstellung)');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_TITLE', 'Titel');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_DESC', 'Beschreibung');//also present in many ther tribes related -define('_MD_YOGURTCREATEYOURTRIBE', 'Eigene Gruppe erstellen!');//also present in many ther tribes related +define('_MD_YOGURT_UPLOADTRIBE', 'Gruppe speichern'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_IMAGE', 'Gruppenbild (125 Pixel breit und 80 Pixel hoch für optimale Darstellung)'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_TITLE', 'Titel'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_DESC', 'Beschreibung'); //also present in many ther tribes related +define('_MD_YOGURTCREATEYOURTRIBE', 'Eigene Gruppe erstellen!'); //also present in many ther tribes related //abandontribe.php define('_MD_YOGURT_ASKCONFIRMABANDONTRIBE', 'Willst du diese Gruppe wirklich verlassen?'); @@ -163,11 +163,11 @@ define('_MD_YOGURT_TRIBEDELETED', 'Gruppe gelöscht!'); //edit_tribe.php -define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Dieses Bild behalten');//also present in other tribes related +define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Dieses Bild behalten'); //also present in other tribes related define('_MD_YOGURT_TRIBEEDITED', 'Gruppe bearbeitet'); -define('_MD_YOGURT_EDIT_TRIBE', 'Deine Gruppe bearbeiten');//also present in other tribes related -define('_MD_YOGURT_TRIBEOWNER', 'Du bist Besitzer dieser Gruppe!');//also present in other tribes related -define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Mitglieder dieser Gruppe');//also present in other tribes related +define('_MD_YOGURT_EDIT_TRIBE', 'Deine Gruppe bearbeiten'); //also present in other tribes related +define('_MD_YOGURT_TRIBEOWNER', 'Du bist Besitzer dieser Gruppe!'); //also present in other tribes related +define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Mitglieder dieser Gruppe'); //also present in other tribes related //submit_tribe.php define('_MD_YOGURT_TRIBE_CREATED', 'Deine Gruppe wurde erstellt'); @@ -187,9 +187,9 @@ //notebook.php define('_MD_YOGURT_ENTERTEXTNOTE', 'Text eingeben'); define('_MD_YOGURT_SENDNOTE', 'Eintrag schreiben'); -define('_MD_YOGURT_ANSWERNOTE', 'Antworten');//also present in configs.php +define('_MD_YOGURT_ANSWERNOTE', 'Antworten'); //also present in configs.php define('_MD_YOGURT_MYNOTEBOOK', 'Mein Gästebuch'); -define('_MD_YOGURT_CANCEL', 'Abbrechen');//also present in configs.php +define('_MD_YOGURT_CANCEL', 'Abbrechen'); //also present in configs.php define('_MD_YOGURT_NOTETIPS', 'Gästebuch-Tipps'); define('_MD_YOGURT_BOLD', 'Fett'); define('_MD_YOGURT_ITALIC', 'Kursiv'); @@ -225,7 +225,7 @@ define('_MD_YOGURT_CONFIGSSAVE', 'Einstellungen gespeichert!'); //class/yogurt_controller.php -define('_MD_YOGURT_NOPRIVILEGE', 'Du benötigst mehr Rechte, um dieses Profil zu sehen.
    Schließe Freundschaft mit diesem Mitglied.'); +define('_MD_YOGURT_NOPRIVILEGE', 'Du benötigst mehr Rechte, um dieses Profil zu sehen.
    Schließe Freundschaft mit diesem Mitglied.'); ###################################### OTHERS ############################## @@ -253,7 +253,7 @@ //suspend.php define('_MD_YOGURT_SUSPENDED', 'Benutzer gesperrt bis %s'); -define('_MD_YOGURT_USERSUSPENDED', 'Benutzer gesperrt!');//also present in index.php +define('_MD_YOGURT_USERSUSPENDED', 'Benutzer gesperrt!'); //also present in index.php //unsuspend.php define('_MD_YOGURT_USERUNSUSPENDED', 'Benutzersperre aufgehoben'); @@ -327,7 +327,7 @@ define('_MD_YOGURT_TITLEAUDIO', 'Titel oder Songname'); define('_MD_YOGURT_ADDAUDIO', 'Füge eine MP3-Datei hinzu'); define('_MD_YOGURT_SUBMITAUDIO', 'Datei hochgeladen'); -define('_MD_YOGURT_ADDAUDIOHELP', 'Wähle eine MP3-Datei von deinem Rechner (max. %s KBytes)
    Lasse die Felder Titel/Songname und Interpret frei, wenn ID-Tags vorhanden sind'); +define('_MD_YOGURT_ADDAUDIOHELP', 'Wähle eine MP3-Datei von deinem Rechner (max. %s KBytes)
    Lasse die Felder Titel/Songname und Interpret frei, wenn ID-Tags vorhanden sind'); //19/04/2008 define('_MD_YOGURT_AUDIODELETED', 'Dein MP3 wurde gelöscht!'); diff --git a/language/german/modinfo.php b/language/german/modinfo.php index ed12475c..765d6de7 100644 --- a/language/german/modinfo.php +++ b/language/german/modinfo.php @@ -22,23 +22,23 @@ define('_MI_YOG_ADMENU2', 'Über'); define('_MI_YOG_SMNAME1', 'Absenden'); define('_MI_YOG_THUMW_TITLE', 'Miniaturansicht Breite'); -define('_MI_YOG_THUMBW_DESC', 'Miniaturansicht Breite in Pixel.
    Die Miniaturansichten werden auf diese Breite reduziert,
    Proportionen bleiben erhalten'); +define('_MI_YOG_THUMBW_DESC', 'Miniaturansicht Breite in Pixel.
    Die Miniaturansichten werden auf diese Breite reduziert,
    Proportionen bleiben erhalten'); define('_MI_YOG_THUMBH_TITLE', 'Miniaturansicht Höhe'); -define('_MI_YOG_THUMBH_DESC', 'Miniaturansicht Höhe in Pixel.
    Die Miniaturansichten werden auf diese Höhe reduziert,
    Proportionen bleiben erhalten'); +define('_MI_YOG_THUMBH_DESC', 'Miniaturansicht Höhe in Pixel.
    Die Miniaturansichten werden auf diese Höhe reduziert,
    Proportionen bleiben erhalten'); define('_MI_YOG_RESIZEDW_TITLE', 'Angepasste Bilder Breite'); -define('_MI_YOG_RESIZEDW_DESC', 'Maximale Breite der Bilder in Pixel.
    Proportionen bleiben erhalten.
    Ist das Original Bild breiter, wird es reduziert.
    Dadurch wird Ihre Layout nicht zerstört.'); +define('_MI_YOG_RESIZEDW_DESC', 'Maximale Breite der Bilder in Pixel.
    Proportionen bleiben erhalten.
    Ist das Original Bild breiter, wird es reduziert.
    Dadurch wird Ihre Layout nicht zerstört.'); define('_MI_YOG_RESIZEDH_TITLE', 'Angepasste Bilder Höhe'); -define('_MI_YOG_RESIZEDH_DESC', 'Maximale Höhe Ihrer Bilder in Pixel.
    Proportionen bleiben erhalten.
    Ist das Original Bild höher, wird es reduziert.
    Dadurch wird Ihre Layout nicht zerstört.'); +define('_MI_YOG_RESIZEDH_DESC', 'Maximale Höhe Ihrer Bilder in Pixel.
    Proportionen bleiben erhalten.
    Ist das Original Bild höher, wird es reduziert.
    Dadurch wird Ihre Layout nicht zerstört.'); define('_MI_YOG_ORIGINALW_TITLE', 'Maximale Breite der Originalbilder'); -define('_MI_YOG_ORIGINALW_DESC', 'Maximale Breite des Originalbildes in Pixel.
    Bei Überschreiten ist ein Hochladen nicht möglich.'); +define('_MI_YOG_ORIGINALW_DESC', 'Maximale Breite des Originalbildes in Pixel.
    Bei Überschreiten ist ein Hochladen nicht möglich.'); define('_MI_YOG_ORIGINALH_TITLE', 'Maximale Höhe der Originalbilder'); -define('_MI_YOG_ORIGINALH_DESC', 'Maximale Höhe des Originalbildes in Pixel.
    Bei Überschreiten ist ein Hochladen nicht möglich.'); +define('_MI_YOG_ORIGINALH_DESC', 'Maximale Höhe des Originalbildes in Pixel.
    Bei Überschreiten ist ein Hochladen nicht möglich.'); define('_MI_YOG_PATHUPLOAD_TITLE', 'Upload-Pfad'); -define('_MI_YOG_PATHUPLOAD_DESC', 'Pfad zum Upload-Verzeichnis
    in Linux zB.: /var/www/uploads
    in Windows zB.: C:/Programme/www'); +define('_MI_YOG_PATHUPLOAD_DESC', 'Pfad zum Upload-Verzeichnis
    in Linux zB.: /var/www/uploads
    in Windows zB.: C:/Programme/www'); define('_MI_YOG_LINKPATHUPLOAD_TITLE', 'Link zu Ihrem Upload-Verzeichnis'); -define('_MI_YOG_LINKPATHUPLOAD_DESC', 'Adresse zum Root-Pfad des Upload-Verzeichnis
    zB.: http://www.yoursite.com/uploads'); +define('_MI_YOG_LINKPATHUPLOAD_DESC', 'Adresse zum Root-Pfad des Upload-Verzeichnis
    zB.: http://www.yoursite.com/uploads'); define('_MI_YOG_MAXFILEBYTES_TITLE', 'Maximale Dateigröße in bytes'); -define('_MI_YOG_MAXFILEBYTES_DESC', 'Maximale Dateigröße von Bildern
    Angabe in bytes, zB.: 512000 for 500 KB
    Wert kann nicht größer sein als in der PHP.INI des Servers.
    Der Server akzeptiert maximal ' . ini_get('post_max_size')); +define('_MI_YOG_MAXFILEBYTES_DESC', 'Maximale Dateigröße von Bildern
    Angabe in bytes, zB.: 512000 for 500 KB
    Wert kann nicht größer sein als in der PHP.INI des Servers.
    Der Server akzeptiert maximal ' . ini_get('post_max_size')); define('_MI_YOG_PICTURE_NOTIFYTIT', 'Album'); define('_MI_YOG_PICTURE_NOTIFYDSC', 'Benachrichtigungen bezogen auf das User-Album'); @@ -54,7 +54,7 @@ define('_MI_YOG_PICTURE_TEMPLATEFRIENDSDESC', 'Diese Vorlage zeigt die Freunde des Users'); define('_MI_YOGURT_MYFRIENDS', 'Meine Freunde'); define('_MI_YOG_FRIENDSPERPAGE_TITLE', 'Freunde je Seite'); -define('_MI_YOG_FRIENDSPERPAGE_DESC', "Anzahl der Freunde, die je Seite angezeigt werden
    in der 'Meine Freunde' Seite"); +define('_MI_YOG_FRIENDSPERPAGE_DESC', "Anzahl der Freunde, die je Seite angezeigt werden
    in der 'Meine Freunde' Seite"); define('_MI_YOG_PICTURESPERPAGE_TITLE', 'Bilder je Seite vor Seitenumbruch'); define('_MI_YOGURT_LAST', 'Letzte Bilder-Block'); @@ -62,7 +62,7 @@ define('_MI_YOG_DELETEPHYSICAL_TITLE', 'Dateien auch aus dem Upload-Verzeichnis löschen'); define( '_MI_YOG_DELETEPHYSICAL_DESC', - "Bestätigen Sie hier mit 'Ja' erlaubt dem Skript, Dateien sowohl vom Upload-Verzeichnis als auch aus der Datenbank zu löschen.
    Vorsicht mit dieser Funktion. Entfernen Sie die Datei auch aus dem Verzeichnis und nicht nur aus der Datenbank, können User, die direkt auf dieses Bild von einem anderen Teil dieser Seite verlinken, Ihren Inhalt verlieren;
    andererseits benötigen Sie möglicherweise sehr viel Platz auf dem Server.
    Konfigurieren Sie diese Funktion mit Bedacht für Ihre Bedürfnisse." + "Bestätigen Sie hier mit 'Ja' erlaubt dem Skript, Dateien sowohl vom Upload-Verzeichnis als auch aus der Datenbank zu löschen.
    Vorsicht mit dieser Funktion. Entfernen Sie die Datei auch aus dem Verzeichnis und nicht nur aus der Datenbank, können User, die direkt auf dieses Bild von einem anderen Teil dieser Seite verlinken, Ihren Inhalt verlieren;
    andererseits benötigen Sie möglicherweise sehr viel Platz auf dem Server.
    Konfigurieren Sie diese Funktion mit Bedacht für Ihre Bedürfnisse." ); define('_MI_YOGURT_MYVIDEOS', 'Meine Videos'); diff --git a/language/persian/admin.php b/language/persian/admin.php index afd0dfbf..a8f94a0f 100644 --- a/language/persian/admin.php +++ b/language/persian/admin.php @@ -19,8 +19,8 @@ //index.php define( '_MA_YOG_FRAMEWORKSFALSE', - "You need to install this package, in order to make this module work correctly:

    -Frameworks v 1.1 or newer
    " + "You need to install this package, in order to make this module work correctly:

    +Frameworks v 1.1 or newer
    " ); define('_MA_YOG_FRAMEWORKSTRUE', 'You have version %s of the Frameworks package'); define('_MA_YOG_BY', 'By'); diff --git a/language/persian/main.php b/language/persian/main.php index 66da2025..6e16b372 100644 --- a/language/persian/main.php +++ b/language/persian/main.php @@ -19,16 +19,16 @@ //Present in many files (videos pictures etc...) define('_MD_YOGURT_DELETE', 'Delete'); define('_MD_YOGURT_EDITDESC', 'Edit description'); -define('_MD_YOGURT_TOKENEXPIRED', 'Your Security Token has Expired
    Please Try Again'); +define('_MD_YOGURT_TOKENEXPIRED', 'Your Security Token has Expired
    Please Try Again'); define('_MD_YOGURT_DESC_EDITED', 'The description was edited successfully'); define('_MD_YOGURT_CAPTION', 'Caption'); define('_MD_YOGURT_YOUCANUPLOAD', "You can only upload jpg's files and up to %s KBytes in size"); define('_MD_YOGURT_UPLOADPICTURE', 'Upload Picture'); define( '_MD_YOGURT_NOCACHACA', - 'Bad, Bad Module...No cacha�a for you!
    + 'Bad, Bad Module...No cacha�a for you!
    Unfortunately, this module has acted in an unexpected way. Hopefully it will return to its helpful self if you try again. ' -);//Funny general error message +); //Funny general error message define('_MD_YOGURT_PAGETITLE', "%s - %s's Social Network"); define('_MD_YOGURT_SUBMIT', 'Submit'); define('_MD_YOGURT_VIDEOS', 'Videos'); @@ -73,7 +73,7 @@ ########################################################## FRIENDS ################################################### //friends.php define('_MD_YOGURT_FRIENDSTITLE', "%s's Friends"); -define('_MD_YOGURT_NOFRIENDSYET', 'No friends yet');//also present in index.php +define('_MD_YOGURT_NOFRIENDSYET', 'No friends yet'); //also present in index.php define('_MD_YOGURT_MYFRIENDS', 'My Friends'); define('_MD_YOGURT_FRIENDSHIPCONFIGS', 'Set the configs of this friendship. Evaluate your friend.'); @@ -82,11 +82,11 @@ define('_MD_YOGURT_FRIENDNAME', 'Username'); define('_MD_YOGURT_LEVEL', 'Friendship level:'); define('_MD_YOGURT_UNKNOWNACCEPTED', "Haven't met accepted"); -define('_MD_YOGURT_AQUAITANCE', 'Acquaintances');//also present in index.php -define('_MD_YOGURT_FRIEND', 'Friend');//also present in index.php -define('_MD_YOGURT_BESTFRIEND', 'Best Friend');//also present in index.php -define('_MD_YOGURT_FAN', 'Fan');//also present in index.php -define('_MD_YOGURT_SEXY', 'Sexy');//also present in index.php +define('_MD_YOGURT_AQUAITANCE', 'Acquaintances'); //also present in index.php +define('_MD_YOGURT_FRIEND', 'Friend'); //also present in index.php +define('_MD_YOGURT_BESTFRIEND', 'Best Friend'); //also present in index.php +define('_MD_YOGURT_FAN', 'Fan'); //also present in index.php +define('_MD_YOGURT_SEXY', 'Sexy'); //also present in index.php define('_MD_YOGURT_SEXYNO', 'Nope'); define('_MD_YOGURT_SEXYYES', 'Yes'); define('_MD_YOGURT_SEXYALOT', 'Very much!'); @@ -106,7 +106,7 @@ //submitfriendpetition.php define('_MD_YOGURT_PETITIONED', 'A friend request has been sent to this user, Wait until he accepts to have him in your friends list.'); -define('_MD_YOGURT_ALREADY_PETITIONED', 'You have already sent a friendship request to this user or vice-versa
    , Wait untill he accepts or rejects it or check if he has asked you as a friend visiting your profile page.'); +define('_MD_YOGURT_ALREADY_PETITIONED', 'You have already sent a friendship request to this user or vice-versa
    , Wait untill he accepts or rejects it or check if he has asked you as a friend visiting your profile page.'); //makefriends.php define('_MD_YOGURT_FRIENDMADE', 'Added as a friend!'); @@ -124,7 +124,7 @@ define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Add favourite videos'); define( '_MD_YOGURT_ADDVIDEOSHELP', - 'If you want to upload your own video for sharing, then upload your videos to + 'If you want to upload your own video for sharing, then upload your videos to YouTube and then add the URL to here ' ); //The name of the site will show after this define('_MD_YOGURT_MYVIDEOS', 'My Videos'); @@ -142,11 +142,11 @@ ############################## TRIBES ######################################################## //class/Tribes.php define('_MD_YOGURT_SUBMIT_TRIBE', 'Create a new tribe'); -define('_MD_YOGURT_UPLOADTRIBE', 'Save Tribe');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_IMAGE', 'Tribe Image');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_TITLE', 'Title');//also present in many ther tribes related -define('_MD_YOGURT_TRIBE_DESC', 'Description');//also present in many ther tribes related -define('_MD_YOGURTCREATEYOURTRIBE', 'Create your own Tribe!');//also present in many ther tribes related +define('_MD_YOGURT_UPLOADTRIBE', 'Save Tribe'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_IMAGE', 'Tribe Image'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_TITLE', 'Title'); //also present in many ther tribes related +define('_MD_YOGURT_TRIBE_DESC', 'Description'); //also present in many ther tribes related +define('_MD_YOGURTCREATEYOURTRIBE', 'Create your own Tribe!'); //also present in many ther tribes related //abandontribe.php define('_MD_YOGURT_ASKCONFIRMABANDONTRIBE', 'Are you sure you want to leave this Tribe?'); @@ -163,11 +163,11 @@ define('_MD_YOGURT_TRIBEDELETED', 'Tribe deleted!'); //edit_tribe.php -define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Keep this image');//also present in other tribes related +define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Keep this image'); //also present in other tribes related define('_MD_YOGURT_TRIBEEDITED', 'Tribe edited'); -define('_MD_YOGURT_EDIT_TRIBE', 'Edit your Tribe');//also present in other tribes related -define('_MD_YOGURT_TRIBEOWNER', 'You are the owner of this Tribe!');//also present in other tribes related -define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Members of Tribe');//also present in other tribes related +define('_MD_YOGURT_EDIT_TRIBE', 'Edit your Tribe'); //also present in other tribes related +define('_MD_YOGURT_TRIBEOWNER', 'You are the owner of this Tribe!'); //also present in other tribes related +define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Members of Tribe'); //also present in other tribes related //submit_tribe.php define('_MD_YOGURT_TRIBE_CREATED', 'Your Tribe was created'); @@ -187,9 +187,9 @@ //notebook.php define('_MD_YOGURT_ENTERTEXTNOTE', 'Enter Text or Xoops Codes'); define('_MD_YOGURT_SENDNOTE', 'post Note'); -define('_MD_YOGURT_ANSWERNOTE', 'Reply');//also present in configs.php +define('_MD_YOGURT_ANSWERNOTE', 'Reply'); //also present in configs.php define('_MD_YOGURT_MYNOTEBOOK', 'My Notebook'); -define('_MD_YOGURT_CANCEL', 'Cancel');//also present in configs.php +define('_MD_YOGURT_CANCEL', 'Cancel'); //also present in configs.php define('_MD_YOGURT_NOTETIPS', 'Note tips'); define('_MD_YOGURT_BOLD', 'bold'); define('_MD_YOGURT_ITALIC', 'italic'); @@ -225,7 +225,7 @@ define('_MD_YOGURT_CONFIGSSAVE', 'Configuration saved!'); //class/yogurt_controller.php -define('_MD_YOGURT_NOPRIVILEGE', "The owner of this profile has set the privileges to see it,
    higher than you have now.
    Login to become their friend.
    If they haven't set it, so only they can see,
    then you will be able to view it."); +define('_MD_YOGURT_NOPRIVILEGE', "The owner of this profile has set the privileges to see it,
    higher than you have now.
    Login to become their friend.
    If they haven't set it, so only they can see,
    then you will be able to view it."); ###################################### OTHERS ############################## @@ -253,7 +253,7 @@ //suspend.php define('_MD_YOGURT_SUSPENDED', 'User under suspension until %s'); -define('_MD_YOGURT_USERSUSPENDED', 'User suspended!');//als0 present in index.php +define('_MD_YOGURT_USERSUSPENDED', 'User suspended!'); //als0 present in index.php //unsuspend.php define('_MD_YOGURT_USERUNSUSPENDED', 'User Unsuspended'); diff --git a/language/persian/modinfo.php b/language/persian/modinfo.php index 169aa44a..c6b5078f 100644 --- a/language/persian/modinfo.php +++ b/language/persian/modinfo.php @@ -22,23 +22,23 @@ define('_MI_YOG_ADMENU2', 'About'); define('_MI_YOG_SMNAME1', 'Submit'); define('_MI_YOG_THUMW_TITLE', 'Thumb Width'); -define('_MI_YOG_THUMBW_DESC', 'Thumbnails width in pixels
    This means your picture thumbnail will be
    most of this size in width
    All proportions are maintained'); +define('_MI_YOG_THUMBW_DESC', 'Thumbnails width in pixels
    This means your picture thumbnail will be
    most of this size in width
    All proportions are maintained'); define('_MI_YOG_THUMBH_TITLE', 'Thumb Height'); -define('_MI_YOG_THUMBH_DESC', 'Thumbnails Height in pixels
    This means your picture thumbnail will be
    most of this size in height
    All proportions are maintained'); +define('_MI_YOG_THUMBH_DESC', 'Thumbnails Height in pixels
    This means your picture thumbnail will be
    most of this size in height
    All proportions are maintained'); define('_MI_YOG_RESIZEDW_TITLE', 'Resized picture width'); -define('_MI_YOG_RESIZEDW_DESC', 'Resized picture width in pixels
    This means your picture will be
    most of this size in width
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template'); +define('_MI_YOG_RESIZEDW_DESC', 'Resized picture width in pixels
    This means your picture will be
    most of this size in width
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template'); define('_MI_YOG_RESIZEDH_TITLE', 'Resized picture height'); -define('_MI_YOG_RESIZEDH_DESC', 'Resized picture height in pixels
    This means your picture will be
    most of this size in height
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template design'); +define('_MI_YOG_RESIZEDH_DESC', 'Resized picture height in pixels
    This means your picture will be
    most of this size in height
    All proportions are maintained
    The original picture if bigger than this size will
    be resized, so it wont break your template design'); define('_MI_YOG_ORIGINALW_TITLE', 'Max original picture width'); -define('_MI_YOG_ORIGINALW_DESC', "Maximum original picture width in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); +define('_MI_YOG_ORIGINALW_DESC', "Maximum original picture width in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); define('_MI_YOG_ORIGINALH_TITLE', 'Max original picture height'); -define('_MI_YOG_ORIGINALH_DESC', "Maximum original picture height in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); +define('_MI_YOG_ORIGINALH_DESC', "Maximum original picture height in pixels
    This means the user's original picture can't exceed
    this size in height
    else it won't be uploaded"); define('_MI_YOG_PATHUPLOAD_TITLE', 'Path Uploads'); -define('_MI_YOG_PATHUPLOAD_DESC', 'Path to the uploads directory
    in Linux it should look like this /var/www/uploads
    in Windows like this C:/Program Files/www'); +define('_MI_YOG_PATHUPLOAD_DESC', 'Path to the uploads directory
    in Linux it should look like this /var/www/uploads
    in Windows like this C:/Program Files/www'); define('_MI_YOG_LINKPATHUPLOAD_TITLE', 'Link to your uploads directory'); -define('_MI_YOG_LINKPATHUPLOAD_DESC', 'This is the address of the root path to uploads
    like http://www.yoursite.com/uploads'); +define('_MI_YOG_LINKPATHUPLOAD_DESC', 'This is the address of the root path to uploads
    like http://www.yoursite.com/uploads'); define('_MI_YOG_MAXFILEBYTES_TITLE', 'Max size in bytes'); -define('_MI_YOG_MAXFILEBYTES_DESC', 'This is the maximum size a picture file can be
    You can set it in bytes like this: 512000 for 500 KB
    Be careful that the maximum size is also set in the php.ini file. The server is currently set to ' . ini_get('post_max_size')); +define('_MI_YOG_MAXFILEBYTES_DESC', 'This is the maximum size a picture file can be
    You can set it in bytes like this: 512000 for 500 KB
    Be careful that the maximum size is also set in the php.ini file. The server is currently set to ' . ini_get('post_max_size')); define('_MI_YOG_PICTURE_NOTIFYTIT', 'Album'); define('_MI_YOG_PICTURE_NOTIFYDSC', "Notifications related to user's album"); @@ -54,7 +54,7 @@ define('_MI_YOG_PICTURE_TEMPLATEFRIENDSDESC', 'This template shows the friends of the user'); define('_MI_YOGURT_MYFRIENDS', 'My Friends'); define('_MI_YOG_FRIENDSPERPAGE_TITLE', 'Friends per page'); -define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Set the number of friends to show per page
    In the my Friends page'); +define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Set the number of friends to show per page
    In the my Friends page'); define('_MI_YOG_PICTURESPERPAGE_TITLE', 'Pictures showing per page before pagination'); define('_MI_YOGURT_LAST', 'Last pictures block'); @@ -62,7 +62,7 @@ define('_MI_YOG_DELETEPHYSICAL_TITLE', 'DELETE files FROM the upload folder TO'); define( '_MI_YOG_DELETEPHYSICAL_DESC', - "Confirming yes here, will allow the script to delete the files from the uploaded data in the database as well.
    Be careful about this feature, if you exclude the files from the folder and not only in the database, some people who may have linked to the image directly in another part of the site may also lose their content;
    at the same time if you don't exclude them, you may use to much space in the server hard disk.
    Configure this item well for your needs." + "Confirming yes here, will allow the script to delete the files from the uploaded data in the database as well.
    Be careful about this feature, if you exclude the files from the folder and not only in the database, some people who may have linked to the image directly in another part of the site may also lose their content;
    at the same time if you don't exclude them, you may use to much space in the server hard disk.
    Configure this item well for your needs." ); define('_MI_YOGURT_MYVIDEOS', 'My Videos'); diff --git a/language/portuguesebr/admin.php b/language/portuguesebr/admin.php index 6485627b..9334d207 100644 --- a/language/portuguesebr/admin.php +++ b/language/portuguesebr/admin.php @@ -16,7 +16,7 @@ * @author XOOPS Development Team * @since */ -// + /** * Translation for Portuguese users * @@ -35,8 +35,8 @@ //index.php define( '_MA_YOG_FRAMEWORKSFALSE', - "Você precisa instalar este pacote para o módulo funcionar corretamente:

    -Frameworks v 1.1 ou mais recente
    " + "Você precisa instalar este pacote para o módulo funcionar corretamente:

    +Frameworks v 1.1 ou mais recente
    " ); define('_MA_YOG_FRAMEWORKSTRUE', 'Você tem a versão %s do pacote Frameworks'); define('_MA_YOG_BY', 'Por'); diff --git a/language/portuguesebr/blocks.php b/language/portuguesebr/blocks.php index 0b81cfc2..e2b77adf 100644 --- a/language/portuguesebr/blocks.php +++ b/language/portuguesebr/blocks.php @@ -31,5 +31,4 @@ * @Support : http://br.impresscms.org - Team Brazilian. * @Licence : GNU */ - define('_MB_YOG_ALLFRIENDS', 'Ver todos os amigos'); diff --git a/language/portuguesebr/main.php b/language/portuguesebr/main.php index 8be50de1..6a0e19e4 100644 --- a/language/portuguesebr/main.php +++ b/language/portuguesebr/main.php @@ -34,14 +34,14 @@ //Present in many files (videos pictures etc...) define('_MD_YOGURT_DELETE', 'Apagar'); define('_MD_YOGURT_EDITDESC', 'Alterar descrição'); -define('_MD_YOGURT_TOKENEXPIRED', 'Sua senha expirou
    Tente novamente'); +define('_MD_YOGURT_TOKENEXPIRED', 'Sua senha expirou
    Tente novamente'); define('_MD_YOGURT_DESC_EDITED', 'A descrição da foto foi alterada com sucesso'); define('_MD_YOGURT_CAPTION', 'Subtítulo'); define('_MD_YOGURT_YOUCANUPLOAD', 'Você pode submeter apenas arquivos jpg com até %s KBytes'); define('_MD_YOGURT_UPLOADPICTURE', 'Upload Foto'); define( '_MD_YOGURT_NOCACHACA', - 'Desculpe sem cachaça para você
    + 'Desculpe sem cachaça para você
    Infelizmente, este módulo agiu de forma inesperada. Esperemos que ele volte ao seu estado normal quando você tentar novamente. ' ); // Funny geral mensagem de erro define('_MD_YOGURT_PAGETITLE', '%s - Álbum do %s'); @@ -88,7 +88,7 @@ ########################################################## FRIENDS ################################################### //friends.php define('_MD_YOGURT_FRIENDSTITLE', 'Amigos do %s'); -define('_MD_YOGURT_NOFRIENDSYET', 'Nenhum Amigo ainda');//also present in index.php - GibaPhp +define('_MD_YOGURT_NOFRIENDSYET', 'Nenhum Amigo ainda'); //also present in index.php - GibaPhp define('_MD_YOGURT_MYFRIENDS', 'Meus Amigos'); //GibaPhp define('_MD_YOGURT_FRIENDSHIPCONFIGS', 'Defina as configurações desta amizade. Avalie seu amigo.'); //GibaPhp @@ -97,11 +97,11 @@ define('_MD_YOGURT_FRIENDNAME', 'Usuário'); //GibaPhp define('_MD_YOGURT_LEVEL', 'Grau de amizade:'); //GibaPhp define('_MD_YOGURT_UNKNOWNACCEPTED', 'Não conheço mas aceito'); //GibaPhp -define('_MD_YOGURT_AQUAITANCE', 'Conhecidos');//also present in index.php - GibaPhp -define('_MD_YOGURT_FRIEND', 'Amigo');//also present in index.php - GibaPhp -define('_MD_YOGURT_BESTFRIEND', 'Melhor Amigo');//also present in index.php - GibaPhp -define('_MD_YOGURT_FAN', 'Fan');//also present in index.php - GibaPhp -define('_MD_YOGURT_SEXY', 'Sexy');//also present in index.php - GibaPhp +define('_MD_YOGURT_AQUAITANCE', 'Conhecidos'); //also present in index.php - GibaPhp +define('_MD_YOGURT_FRIEND', 'Amigo'); //also present in index.php - GibaPhp +define('_MD_YOGURT_BESTFRIEND', 'Melhor Amigo'); //also present in index.php - GibaPhp +define('_MD_YOGURT_FAN', 'Fan'); //also present in index.php - GibaPhp +define('_MD_YOGURT_SEXY', 'Sexy'); //also present in index.php - GibaPhp define('_MD_YOGURT_SEXYNO', 'Nope'); //GibaPhp - ??? Dúvida no conteúdo... define('_MD_YOGURT_SEXYYES', 'Sim'); //GibaPhp define('_MD_YOGURT_SEXYALOT', 'Muito!'); //GibaPhp @@ -121,7 +121,7 @@ //submitfriendpetition.php define('_MD_YOGURT_PETITIONED', 'Um pedido de amizade foi enviado para este usuário. Espere até que ele aceite para aparecer em sua lista de amigos.'); //GibaPhp -define('_MD_YOGURT_ALREADY_PETITIONED', 'Você já enviou um pedido de amizade para este usuário ou vice-versa.
    Espere até que ele aceite ou rejeite, ou consultando a página de perfil de amigos deste usuário em questão como um visitante.'); //GibaPhp +define('_MD_YOGURT_ALREADY_PETITIONED', 'Você já enviou um pedido de amizade para este usuário ou vice-versa.
    Espere até que ele aceite ou rejeite, ou consultando a página de perfil de amigos deste usuário em questão como um visitante.'); //GibaPhp //makefriends.php define('_MD_YOGURT_FRIENDMADE', 'Adicionado como amigo!'); //GibaPhp @@ -139,7 +139,7 @@ define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Adicione seus vídeos favoritos'); //GibaPhp define( '_MD_YOGURT_ADDVIDEOSHELP', - 'Se você quizer fazer upload do seu vídeo para compartilhar, poderá enviar os seus vídeos para + 'Se você quizer fazer upload do seu vídeo para compartilhar, poderá enviar os seus vídeos para YouTube e, em seguida, adicione a URL aqui ' ); //The name of the site will show after this - GibaPhp define('_MD_YOGURT_MYVIDEOS', 'Meus Videos'); //GibaPhp @@ -157,11 +157,11 @@ ############################## TRIBES ######################################################## //class/Tribes.php define('_MD_YOGURT_SUBMIT_TRIBE', 'Criar uma nova Tribo'); //GibaPhp -define('_MD_YOGURT_UPLOADTRIBE', 'Salvar Tribo');//also present in many ther tribes related - GibaPhp -define('_MD_YOGURT_TRIBE_IMAGE', 'Imagem da Tribo');//also present in many ther tribes related - GibaPhp -define('_MD_YOGURT_TRIBE_TITLE', 'Título');//also present in many ther tribes related - GibaPhp -define('_MD_YOGURT_TRIBE_DESC', 'Descrição');//also present in many ther tribes related - GibaPhp -define('_MD_YOGURTCREATEYOURTRIBE', 'Crie a sua própria Tribo!');//also present in many ther tribes related - GibaPhp +define('_MD_YOGURT_UPLOADTRIBE', 'Salvar Tribo'); //also present in many ther tribes related - GibaPhp +define('_MD_YOGURT_TRIBE_IMAGE', 'Imagem da Tribo'); //also present in many ther tribes related - GibaPhp +define('_MD_YOGURT_TRIBE_TITLE', 'Título'); //also present in many ther tribes related - GibaPhp +define('_MD_YOGURT_TRIBE_DESC', 'Descrição'); //also present in many ther tribes related - GibaPhp +define('_MD_YOGURTCREATEYOURTRIBE', 'Crie a sua própria Tribo!'); //also present in many ther tribes related - GibaPhp //abandontribe.php define('_MD_YOGURT_ASKCONFIRMABANDONTRIBE', 'Tem certeza de que deseja sair desta Tribo?'); //GibaPhp @@ -178,11 +178,11 @@ define('_MD_YOGURT_TRIBEDELETED', 'Tribo apagada!'); //GibaPhp //edit_tribe.php -define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Manter esta imagem');//also present in other tribes related - GibaPhp +define('_MD_YOGURT_MAINTAINOLDIMAGE', 'Manter esta imagem'); //also present in other tribes related - GibaPhp define('_MD_YOGURT_TRIBEEDITED', 'Tribo editada'); //GibaPhp -define('_MD_YOGURT_EDIT_TRIBE', 'Editar sua Tribo');//also present in other tribes related - GibaPhp -define('_MD_YOGURT_TRIBEOWNER', 'Você é o dono deste Tribo!');//also present in other tribes related - GibaPhp -define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Os membros desta Tribo');//also present in other tribes related - GibaPhp +define('_MD_YOGURT_EDIT_TRIBE', 'Editar sua Tribo'); //also present in other tribes related - GibaPhp +define('_MD_YOGURT_TRIBEOWNER', 'Você é o dono deste Tribo!'); //also present in other tribes related - GibaPhp +define('_MD_YOGURT_MEMBERSDOFTRIBE', 'Os membros desta Tribo'); //also present in other tribes related - GibaPhp //submit_tribe.php define('_MD_YOGURT_TRIBE_CREATED', 'Sua Tribo foi criada'); //GibaPhp @@ -202,9 +202,9 @@ //notebook.php define('_MD_YOGURT_ENTERTEXTNOTE', 'Digite o texto ou códigos Especiais'); //GibaPhp define('_MD_YOGURT_SENDNOTE', 'Enviar Note'); //GibaPhp -define('_MD_YOGURT_ANSWERNOTE', 'Responder');//also present in configs.php - GibaPhp +define('_MD_YOGURT_ANSWERNOTE', 'Responder'); //also present in configs.php - GibaPhp define('_MD_YOGURT_MYNOTEBOOK', 'Meu Notebook'); //GibaPhp -define('_MD_YOGURT_CANCEL', 'Cancelar');//also present in configs.php - GibaPhp +define('_MD_YOGURT_CANCEL', 'Cancelar'); //also present in configs.php - GibaPhp define('_MD_YOGURT_NOTETIPS', 'Dicas de Note'); //GibaPhp define('_MD_YOGURT_BOLD', 'Negrito'); //GibaPhp define('_MD_YOGURT_ITALIC', 'itálico'); //GibaPhp @@ -242,7 +242,7 @@ //class/yogurt_controller.php define( '_MD_YOGURT_NOPRIVILEGE', - 'O proprietário deste perfil alterou os privilégios para vê-lo,
    e ficou superior em relação ao que você tem agora.
    Faça o Login para tornar-se seu amigo.
    Se eles não confirmaram ainda as permissões, talvez seja este o motivo que só eles possam ver.
    Após ajustado isto, você será capaz de vê-lo.' + 'O proprietário deste perfil alterou os privilégios para vê-lo,
    e ficou superior em relação ao que você tem agora.
    Faça o Login para tornar-se seu amigo.
    Se eles não confirmaram ainda as permissões, talvez seja este o motivo que só eles possam ver.
    Após ajustado isto, você será capaz de vê-lo.' ); //GibaPhp - Tenho grande dúvida aqui. ###################################### OTHERS ############################## @@ -271,7 +271,7 @@ //suspend.php define('_MD_YOGURT_SUSPENDED', 'Usuário está suspenso até %s'); //GibaPhp -define('_MD_YOGURT_USERSUSPENDED', 'Usuário suspenso!');//als0 present in index.php -GibaPhp +define('_MD_YOGURT_USERSUSPENDED', 'Usuário suspenso!'); //als0 present in index.php -GibaPhp //unsuspend.php define('_MD_YOGURT_USERUNSUSPENDED', 'Usuário Liberado'); //GibaPhp @@ -345,7 +345,7 @@ define('_MD_YOGURT_TITLEAUDIO', 'Título do arquivo ou canção'); define('_MD_YOGURT_ADDAUDIO', 'Adicionar um arquivo MP3'); define('_MD_YOGURT_SUBMITAUDIO', 'Carregar arquivo'); -define('_MD_YOGURT_ADDAUDIOHELP', 'Escolha um arquivo mp3 no seu computador, tamanho máximo %s ,
    Deixe os campos de título e autor em branco se o seu arquivo já tem metainfo'); +define('_MD_YOGURT_ADDAUDIOHELP', 'Escolha um arquivo mp3 no seu computador, tamanho máximo %s ,
    Deixe os campos de título e autor em branco se o seu arquivo já tem metainfo'); //19/04/2008 - 3.3 define('_MD_YOGURT_AUDIODELETED', 'Seu arquivo MP3 foi excluído!'); diff --git a/language/portuguesebr/modinfo.php b/language/portuguesebr/modinfo.php index 36d2aae8..21173b3c 100644 --- a/language/portuguesebr/modinfo.php +++ b/language/portuguesebr/modinfo.php @@ -30,26 +30,25 @@ * @Support : http://br.impresscms.org - Team Brazilian. * @Licence : GNU */ - define('_MI_YOG_NUMBPICT_TITLE', 'Número de fotos'); define('_MI_YOG_NUMBPICT_DESC', 'Número de fotos permitidas na página.'); define('_MI_YOG_ADMENU1', 'Home'); define('_MI_YOG_ADMENU2', 'Sobre'); define('_MI_YOG_SMNAME1', 'Enviar'); define('_MI_YOG_THUMW_TITLE', 'Largura do Thumb'); -define('_MI_YOG_THUMBW_DESC', 'Largura dos Thumbnails em pixels.
    Significa que sua foto terá no máximo a largura indicada. Todas as proporções serão mantidas.'); +define('_MI_YOG_THUMBW_DESC', 'Largura dos Thumbnails em pixels.
    Significa que sua foto terá no máximo a largura indicada. Todas as proporções serão mantidas.'); define('_MI_YOG_THUMBH_TITLE', 'Altura do Thumb'); -define('_MI_YOG_THUMBH_DESC', 'Largura dos Thumbnails em pixels.
    Significa que sua foto terá no máximo a altura indicada. Todas as proporções serão mantidas.'); +define('_MI_YOG_THUMBH_DESC', 'Largura dos Thumbnails em pixels.
    Significa que sua foto terá no máximo a altura indicada. Todas as proporções serão mantidas.'); define('_MI_YOG_RESIZEDW_TITLE', 'Largura da foto redefinida'); -define('_MI_YOG_RESIZEDW_DESC', 'Largura da foto redefinida em pixels.
    Significa que sua foto terá no máximo a largura indicada. Todas as proporções serão mantidas.
    Se a foto original for maior que tamanho indicado ela será redefinida para não quebrar o laytout do seu template.'); +define('_MI_YOG_RESIZEDW_DESC', 'Largura da foto redefinida em pixels.
    Significa que sua foto terá no máximo a largura indicada. Todas as proporções serão mantidas.
    Se a foto original for maior que tamanho indicado ela será redefinida para não quebrar o laytout do seu template.'); define('_MI_YOG_RESIZEDH_TITLE', 'Altura da foto redefinida'); -define('_MI_YOG_RESIZEDH_DESC', 'Altura da foto redefinida em pixels.
    Significa que sua foto terá no máximo a altura indicada. Todas as proporções serão mantidas.
    Se a foto original for maior que tamanho indicado ela será redefinida para não quebrar o laytout do seu template.'); +define('_MI_YOG_RESIZEDH_DESC', 'Altura da foto redefinida em pixels.
    Significa que sua foto terá no máximo a altura indicada. Todas as proporções serão mantidas.
    Se a foto original for maior que tamanho indicado ela será redefinida para não quebrar o laytout do seu template.'); define('_MI_YOG_ORIGINALW_TITLE', 'Largura máxima da foto original'); -define('_MI_YOG_ORIGINALW_DESC', 'Largura máxima medida em pixels.
    Significa que a foto original do usuário não pode exceder a largura indicada ou não será realizado o upload.'); +define('_MI_YOG_ORIGINALW_DESC', 'Largura máxima medida em pixels.
    Significa que a foto original do usuário não pode exceder a largura indicada ou não será realizado o upload.'); define('_MI_YOG_ORIGINALH_TITLE', 'Altura máxima da foto original'); -define('_MI_YOG_ORIGINALH_DESC', 'Altura máxima medida em pixels.
    Significa que a foto original do usuário não pode exceder a altura indicada ou não será realizado o upload.'); +define('_MI_YOG_ORIGINALH_DESC', 'Altura máxima medida em pixels.
    Significa que a foto original do usuário não pode exceder a altura indicada ou não será realizado o upload.'); define('_MI_YOG_PATHUPLOAD_TITLE', 'Local dos Uploads'); -define('_MI_YOG_PATHUPLOAD_DESC', 'Endereço real para o diretório que receberá as fotos.
    No linux deverá ser (ex.): /var/www/uploads
    No windows deverá ser (ex.): C:/Program Files/www'); +define('_MI_YOG_PATHUPLOAD_DESC', 'Endereço real para o diretório que receberá as fotos.
    No linux deverá ser (ex.): /var/www/uploads
    No windows deverá ser (ex.): C:/Program Files/www'); define('_MI_YOG_LINKPATHUPLOAD_TITLE', 'Link para o diretótio que receberá as fotos'); define('_MI_YOG_LINKPATHUPLOAD_DESC', 'Indicar o endereço do diretório que receberá as fotos dos usuário, exemplo: http://www.yoursite.com/uploads'); define('_MI_YOG_MAXFILEBYTES_TITLE', 'Tamanho máximo em bytes'); @@ -69,7 +68,7 @@ define('_MI_YOG_PICTURE_TEMPLATEFRIENDSDESC', 'Esta template exibe os amigos do usuário'); define('_MI_YOGURT_MYFRIENDS', 'Meus Amigos'); define('_MI_YOG_FRIENDSPERPAGE_TITLE', 'Amigos por página'); -define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Ajuste o número de amigos exibidos por a página
    Em minha página de amigos'); +define('_MI_YOG_FRIENDSPERPAGE_DESC', 'Ajuste o número de amigos exibidos por a página
    Em minha página de amigos'); define('_MI_YOG_PICTURESPERPAGE_TITLE', 'Fotos por página antes de mostrar a paginação'); define('_MI_YOGURT_LAST', 'Bloco de últimas fotos'); @@ -77,7 +76,7 @@ define('_MI_YOG_DELETEPHYSICAL_TITLE', 'Apagar arquivos da pasta upload também'); define( '_MI_YOG_DELETEPHYSICAL_DESC', - 'Dizer sim aqui, permitirá que as fotos enviadas sejam apagadas da pasta bem como do banco de dados
    Tenha cuidado com esta opção, pois se você excluir o arquivo da pasta e não só do banco de dados as pessoas que criaram links diretos para a foto em outra parte do site perderão o conteúdo,
    ao mesmo tempo, se você excluí-las, as fotos podem ocupar muito espaço no servidor
    Configures este item de acordo com as suas necessidades.' + 'Dizer sim aqui, permitirá que as fotos enviadas sejam apagadas da pasta bem como do banco de dados
    Tenha cuidado com esta opção, pois se você excluir o arquivo da pasta e não só do banco de dados as pessoas que criaram links diretos para a foto em outra parte do site perderão o conteúdo,
    ao mesmo tempo, se você excluí-las, as fotos podem ocupar muito espaço no servidor
    Configures este item de acordo com as suas necessidades.' ); define('_MI_YOGURT_MYVIDEOS', 'Meus Videos'); //GibaPhp diff --git a/mainvideo.php b/mainvideo.php index 71a117be..e5ca96ba 100644 --- a/mainvideo.php +++ b/mainvideo.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -31,7 +30,7 @@ * Creating the factory loading the video changing its caption */ $videoFactory = new Yogurt\SeutuboHandler($xoopsDB); -$video = $videoFactory->create(false); +$video = $videoFactory->create(false); $video->load($cod_img); $video->setVar('main_video', 1); diff --git a/makefriends.php b/makefriends.php index efd8d484..5aefbedb 100644 --- a/makefriends.php +++ b/makefriends.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; @@ -29,11 +28,11 @@ * Factory of petitions created */ $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); +$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$petition_id = (int)$_POST['petition_id']; +$petition_id = (int)$_POST['petition_id']; $friendship_level = (int)$_POST['level']; -$uid = (int)$xoopsUser->getVar('uid'); +$uid = (int)$xoopsUser->getVar('uid'); if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); diff --git a/notebook.php b/notebook.php index cc1539de..f4bf42bb 100644 --- a/notebook.php +++ b/notebook.php @@ -16,13 +16,12 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_notebook.tpl'; require __DIR__ . '/header.php'; -$controller = new Yogurt\ControllerNotes($xoopsDB, $xoopsUser); +$controller = new Yogurt\ControllerNotes($xoopsDB, $xoopsUser); $nbSections = $controller->getNumbersSections(); //$controller->renderFormNewPost($xoopsTpl); @@ -36,7 +35,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/private.php b/private.php index 25228356..9d261f0e 100644 --- a/private.php +++ b/private.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -33,7 +32,7 @@ * Creating the factory loading the picture changing its caption */ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); -$picture = $pictureFactory->create(false); +$picture = $pictureFactory->create(false); $picture->load($cod_img); $picture->setVar('private', (int)$_POST['private']); diff --git a/search.php b/search.php index b0b6a9a2..3d7f285f 100644 --- a/search.php +++ b/search.php @@ -16,18 +16,15 @@ * @author XOOPS Development Team * @since */ - -use XoopsModules\Yogurt; - require __DIR__ . '/header.php'; -$myts = MyTextSanitizer::getInstance(); -$op = isset($_REQUEST['op']) ? htmlspecialchars($_REQUEST['op'], ENT_QUOTES | ENT_HTML5) : 'search'; +$myts = MyTextSanitizer::getInstance(); +$op = isset($_REQUEST['op']) ? htmlspecialchars($_REQUEST['op'], ENT_QUOTES | ENT_HTML5) : 'search'; $groups = $xoopsUser ? $xoopsUser->getGroups() : [XOOPS_GROUP_ANONYMOUS]; switch ($op) { default: case 'search': - $xoopsOption['cache_group'] = implode('', $groups); + $xoopsOption['cache_group'] = implode('', $groups); $GLOBALS['xoopsOption']['template_main'] = 'yogurt_search.tpl'; include XOOPS_ROOT_PATH . '/header.php'; @@ -36,7 +33,7 @@ // Get fields $fields = $profileHandler->loadFields(); // Get ids of fields that can be searched - $gpermHandler = xoops_getHandler('groupperm'); + $gpermHandler = xoops_getHandler('groupperm'); $searchable_fields = $gpermHandler->getItemIds('smartprofile_search', $groups, $xoopsModule->getVar('mid')); include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; @@ -80,10 +77,9 @@ unset($tray); } break; - case 'radio': case 'select': - $size = count($fields[$i]->getVar('field_options')) > 10 ? 10 : count($fields[$i]->getVar('field_options')); + $size = count($fields[$i]->getVar('field_options')) > 10 ? 10 : count($fields[$i]->getVar('field_options')); $element = new \XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, $size, true); $options = $fields[$i]->getVar('field_options'); asort($options); @@ -91,7 +87,6 @@ $searchform->addElement($element); unset($element); break; - case 'yesno': $element = new \XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 2, true); $element->addOption(1, _YES); @@ -99,13 +94,11 @@ $searchform->addElement($element); unset($element); break; - case 'date': case 'datetime': $searchform->addElement(new \XoopsFormTextDateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . '_larger', 15, 0)); $searchform->addElement(new \XoopsFormTextDateSelect(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . '_smaller', 15, time())); break; - // case "datetime": // $searchform->addElement(new XoopsFormDateTime(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger", 15, 1)); // $searchform->addElement(new XoopsFormDateTime(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller", 15, 0)); @@ -118,7 +111,6 @@ $searchform->addElement($element); unset($element); break; - case 'language': $element = new \XoopsFormSelectLang($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 6); $searchform->addElement($element); @@ -145,7 +137,6 @@ $searchform->assign($xoopsTpl); break; - case 'results': $GLOBALS['xoopsOption']['template_main'] = 'smartprofile_results.tpl'; include_once XOOPS_ROOT_PATH . '/header.php'; @@ -156,9 +147,9 @@ // Get fields $fields = $profileHandler->loadFields(); // Get ids of fields that can be searched - $gpermHandler = xoops_getHandler('groupperm'); + $gpermHandler = xoops_getHandler('groupperm'); $searchable_fields = $gpermHandler->getItemIds('smartprofile_search', $groups, $xoopsModule->getVar('mid')); - $searchvars = []; + $searchvars = []; $criteria = new \CriteriaCompo(new \Criteria('level', 0, '>')); if (isset($_REQUEST['uname']) && '' != $_REQUEST['uname']) { @@ -167,11 +158,9 @@ case XOOPS_MATCH_START: $string .= '%'; break; - case XOOPS_MATCH_END: $string = '%' . $string; break; - case XOOPS_MATCH_CONTAIN: $string = '%' . $string . '%'; break; @@ -185,11 +174,9 @@ case XOOPS_MATCH_START: $string .= '%'; break; - case XOOPS_MATCH_END: $string = '%' . $string; break; - case XOOPS_MATCH_CONTAIN: $string = '%' . $string . '%'; break; @@ -218,15 +205,14 @@ switch ($fields[$i]->getVar('field_valuetype')) { case XOBJ_DTYPE_OTHER: case XOBJ_DTYPE_INT: - $value = array_map('intval', $_REQUEST[$fieldname]); + $value = array_map('intval', $_REQUEST[$fieldname]); $searchvars[] = $fieldname; $criteria->add(new \Criteria($fieldname, '(' . implode(',', $value) . ')', 'IN')); break; - case XOBJ_DTYPE_URL: case XOBJ_DTYPE_TXTBOX: case XOBJ_DTYPE_TXTAREA: - $value = array_map([$xoopsDB, 'quoteString'], $_REQUEST[$fieldname]); + $value = array_map([$xoopsDB, 'quoteString'], $_REQUEST[$fieldname]); $searchvars[] = $fieldname; $criteria->add(new \Criteria($fieldname, '(' . implode(',', $value) . ')', 'IN')); break; @@ -259,7 +245,6 @@ $criteria->add(new \Criteria($fieldname, $value, '<=')); } break; - // case "datetime": // $value = $_REQUEST[$fieldname."_larger"]['date']; // if (intval($value) < 0) { //intval() of a date string is -1 @@ -286,14 +271,14 @@ default: if (isset($_REQUEST[$fieldname . '_larger']) && 0 != (int)$_REQUEST[$fieldname . '_larger']) { - $value = (int)$_REQUEST[$fieldname . '_larger']; + $value = (int)$_REQUEST[$fieldname . '_larger']; $search_url[] = $fieldname . '_larger=' . $value; $searchvars[] = $fieldname; $criteria->add(new \Criteria($fieldname, $value, '>=')); } if (isset($_REQUEST[$fieldname . '_smaller']) && 0 != (int)$_REQUEST[$fieldname . '_smaller']) { - $value = (int)$_REQUEST[$fieldname . '_smaller']; + $value = (int)$_REQUEST[$fieldname . '_smaller']; $search_url[] = $fieldname . '_smaller=' . $value; $searchvars[] = $fieldname; $criteria->add(new \Criteria($fieldname, $value, '<=')); @@ -303,7 +288,7 @@ if (isset($_REQUEST[$fieldname]) && !isset($_REQUEST[$fieldname . '_smaller']) && !isset($_REQUEST[$fieldname . '_larger'])) { if (!is_array($_REQUEST[$fieldname])) { - $value = (int)$_REQUEST[$fieldname]; + $value = (int)$_REQUEST[$fieldname]; $search_url[] = $fieldname . '=' . $value; $criteria->add(new \Criteria($fieldname, $value, '=')); } else { @@ -317,7 +302,6 @@ $searchvars[] = $fieldname; } break; - case XOBJ_DTYPE_URL: case XOBJ_DTYPE_TXTBOX: case XOBJ_DTYPE_TXTAREA: @@ -327,17 +311,15 @@ case XOOPS_MATCH_START: $value .= '%'; break; - case XOOPS_MATCH_END: $value = '%' . $value; break; - case XOOPS_MATCH_CONTAIN: $value = '%' . $value . '%'; break; } $search_url[] = $fieldname . '=' . $value; - $operator = 'LIKE'; + $operator = 'LIKE'; $criteria->add(new \Criteria($fieldname, $value, $operator)); $searchvars[] = $fieldname; } diff --git a/search_tribe.php b/search_tribe.php index 49f749f8..cc514b02 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribes_results.tpl'; @@ -30,34 +29,34 @@ $nbSections = $controller->getNumbersSections(); $start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0; -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; +$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; $tribe_keyword = trim(htmlspecialchars($_GET['tribe_keyword'], ENT_QUOTES | ENT_HTML5)); /** * All Tribes */ -$criteria_title = new \Criteria('tribe_title', '%' . $tribe_keyword . '%', 'LIKE'); -$criteria_desc = new \Criteria('tribe_desc', '%' . $tribe_keyword . '%', 'LIKE'); +$criteria_title = new \Criteria('tribe_title', '%' . $tribe_keyword . '%', 'LIKE'); +$criteria_desc = new \Criteria('tribe_desc', '%' . $tribe_keyword . '%', 'LIKE'); $criteria_tribes = new \CriteriaCompo($criteria_title); $criteria_tribes->add($criteria_desc, 'OR'); $nb_tribes = $controller->tribesFactory->getCount($criteria_tribes); $criteria_tribes->setLimit($xoopsModuleConfig['tribesperpage']); $criteria_tribes->setStart($start_all); $tribes_objects = $controller->tribesFactory->getObjects($criteria_tribes); -$i = 0; +$i = 0; foreach ($tribes_objects as $tribe_object) { - $tribes[$i]['id'] = $tribe_object->getVar('tribe_id'); + $tribes[$i]['id'] = $tribe_object->getVar('tribe_id'); $tribes[$i]['title'] = $tribe_object->getVar('tribe_title'); - $tribes[$i]['img'] = $tribe_object->getVar('tribe_img'); - $tribes[$i]['desc'] = $tribe_object->getVar('tribe_desc'); - $tribes[$i]['uid'] = $tribe_object->getVar('owner_uid'); + $tribes[$i]['img'] = $tribe_object->getVar('tribe_img'); + $tribes[$i]['desc'] = $tribe_object->getVar('tribe_desc'); + $tribes[$i]['uid'] = $tribe_object->getVar('owner_uid'); $i++; } $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); @@ -68,7 +67,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nb_tribes, $xoopsModuleConfig['tribesperpage'], $start_all, 'start_all', 'tribe_keyword=' . $tribe_keyword . '&start_my=' . $start_my); -$barrinha = $barra_navegacao->renderImageNav(2); +$barrinha = $barra_navegacao->renderImageNav(2); //permissions $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); @@ -135,7 +134,7 @@ $xoopsTpl->assign('barra_navegacao', $barrinha); //$xoopsTpl->assign('barra_navegacao_my',$barrinha_my); //$xoopsTpl->assign('nb_tribes',$nb_mytribes);// this is the one wich shows in the upper bar actually is about the mytribes -$xoopsTpl->assign('nb_tribes_all', $nb_tribes);//this is total number of tribes +$xoopsTpl->assign('nb_tribes_all', $nb_tribes); //this is total number of tribes $xoopsTpl->assign('lang_createtribe', _MD_YOGURTCREATEYOURTRIBE); $xoopsTpl->assign('lang_owner', _MD_YOGURT_TRIBEOWNER); diff --git a/searchmembers.php b/searchmembers.php index 8d15bc95..f26d9c70 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -1,5 +1,5 @@ getUserCount(new \Criteria('level', 0, '>')); + $total = $memberHandler->getUserCount(new \Criteria('level', 0, '>')); include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - $uname_text = new \XoopsFormText('', 'user_uname', 30, 60); + $uname_text = new \XoopsFormText('', 'user_uname', 30, 60); $uname_match = new \XoopsFormSelectMatchOption('', 'user_uname_match'); - $uname_tray = new \XoopsFormElementTray(_MD_YOGURT_UNAME, ' '); + $uname_tray = new \XoopsFormElementTray(_MD_YOGURT_UNAME, ' '); $uname_tray->addElement($uname_match); $uname_tray->addElement($uname_text); - $name_text = new \XoopsFormText('', 'user_name', 30, 60); + $name_text = new \XoopsFormText('', 'user_name', 30, 60); $name_match = new \XoopsFormSelectMatchOption('', 'user_name_match'); - $name_tray = new \XoopsFormElementTray(_MD_YOGURT_REALNAME, ' '); + $name_tray = new \XoopsFormElementTray(_MD_YOGURT_REALNAME, ' '); $name_tray->addElement($name_match); $name_tray->addElement($name_text); - $email_text = new \XoopsFormText('', 'user_email', 30, 60); + $email_text = new \XoopsFormText('', 'user_email', 30, 60); $email_match = new \XoopsFormSelectMatchOption('', 'user_email_match'); - $email_tray = new \XoopsFormElementTray(_MD_YOGURT_EMAIL, ' '); + $email_tray = new \XoopsFormElementTray(_MD_YOGURT_EMAIL, ' '); $email_tray->addElement($email_match); $email_tray->addElement($email_text); $url_text = new \XoopsFormText(_MD_YOGURT_URLC, 'user_url', 30, 100); //$theme_select = new XoopsFormSelectTheme(_MD_YOGURT_THEME, "user_theme"); //$timezone_select = new XoopsFormSelectTimezone(_MD_YOGURT_TIMEZONE, "user_timezone_offset"); - $icq_text = new \XoopsFormText('', 'user_icq', 30, 100); + $icq_text = new \XoopsFormText('', 'user_icq', 30, 100); $icq_match = new \XoopsFormSelectMatchOption('', 'user_icq_match'); - $icq_tray = new \XoopsFormElementTray(_MD_YOGURT_ICQ, ' '); + $icq_tray = new \XoopsFormElementTray(_MD_YOGURT_ICQ, ' '); $icq_tray->addElement($icq_match); $icq_tray->addElement($icq_text); - $aim_text = new \XoopsFormText('', 'user_aim', 30, 100); + $aim_text = new \XoopsFormText('', 'user_aim', 30, 100); $aim_match = new \XoopsFormSelectMatchOption('', 'user_aim_match'); - $aim_tray = new \XoopsFormElementTray(_MD_YOGURT_AIM, ' '); + $aim_tray = new \XoopsFormElementTray(_MD_YOGURT_AIM, ' '); $aim_tray->addElement($aim_match); $aim_tray->addElement($aim_text); - $yim_text = new \XoopsFormText('', 'user_yim', 30, 100); + $yim_text = new \XoopsFormText('', 'user_yim', 30, 100); $yim_match = new \XoopsFormSelectMatchOption('', 'user_yim_match'); - $yim_tray = new \XoopsFormElementTray(_MD_YOGURT_YIM, ' '); + $yim_tray = new \XoopsFormElementTray(_MD_YOGURT_YIM, ' '); $yim_tray->addElement($yim_match); $yim_tray->addElement($yim_text); - $msnm_text = new \XoopsFormText('', 'user_msnm', 30, 100); + $msnm_text = new \XoopsFormText('', 'user_msnm', 30, 100); $msnm_match = new \XoopsFormSelectMatchOption('', 'user_msnm_match'); - $msnm_tray = new \XoopsFormElementTray(_MD_YOGURT_MSNM, ' '); + $msnm_tray = new \XoopsFormElementTray(_MD_YOGURT_MSNM, ' '); $msnm_tray->addElement($msnm_match); $msnm_tray->addElement($msnm_text); - $location_text = new \XoopsFormText(_MD_YOGURT_LOCATION, 'user_from', 30, 100); + $location_text = new \XoopsFormText(_MD_YOGURT_LOCATION, 'user_from', 30, 100); $occupation_text = new \XoopsFormText(_MD_YOGURT_OCCUPATION, 'user_occ', 30, 100); - $interest_text = new \XoopsFormText(_MD_YOGURT_INTEREST, 'user_intrest', 30, 100); + $interest_text = new \XoopsFormText(_MD_YOGURT_INTEREST, 'user_intrest', 30, 100); //$bio_text = new XoopsFormText(_MD_YOGURT_EXTRAINFO, "user_bio", 30, 100); $lastlog_more = new \XoopsFormText(_MD_YOGURT_LASTLOGMORE, 'user_lastlog_more', 10, 5); $lastlog_less = new \XoopsFormText(_MD_YOGURT_LASTLOGLESS, 'user_lastlog_less', 10, 5); - $reg_more = new \XoopsFormText(_MD_YOGURT_REGMORE, 'user_reg_more', 10, 5); - $reg_less = new \XoopsFormText(_MD_YOGURT_REGLESS, 'user_reg_less', 10, 5); - $posts_more = new \XoopsFormText(_MD_YOGURT_POSTSMORE, 'user_posts_more', 10, 5); - $posts_less = new \XoopsFormText(_MD_YOGURT_POSTSLESS, 'user_posts_less', 10, 5); - $sort_select = new \XoopsFormSelect(_MD_YOGURT_SORT, 'user_sort'); + $reg_more = new \XoopsFormText(_MD_YOGURT_REGMORE, 'user_reg_more', 10, 5); + $reg_less = new \XoopsFormText(_MD_YOGURT_REGLESS, 'user_reg_less', 10, 5); + $posts_more = new \XoopsFormText(_MD_YOGURT_POSTSMORE, 'user_posts_more', 10, 5); + $posts_less = new \XoopsFormText(_MD_YOGURT_POSTSLESS, 'user_posts_less', 10, 5); + $sort_select = new \XoopsFormSelect(_MD_YOGURT_SORT, 'user_sort'); $sort_select->addOptionArray(['uname' => _MD_YOGURT_UNAME, 'email' => _MD_YOGURT_EMAIL, 'last_login' => _MD_YOGURT_LASTLOGIN, 'user_regdate' => _MD_YOGURT_REGDATE, 'posts' => _MD_YOGURT_POSTS]); $order_select = new \XoopsFormSelect(_MD_YOGURT_ORDER, 'user_order'); $order_select->addOptionArray(['ASC' => _MD_YOGURT_ASC, 'DESC' => _MD_YOGURT_DESC]); - $limit_text = new \XoopsFormText(_MD_YOGURT_LIMIT, 'limit', 6, 2); - $op_hidden = new \XoopsFormHidden('op', 'submit'); + $limit_text = new \XoopsFormText(_MD_YOGURT_LIMIT, 'limit', 6, 2); + $op_hidden = new \XoopsFormHidden('op', 'submit'); $submit_button = new \XoopsFormButton('', 'user_submit', _SUBMIT, 'submit'); $form = new \XoopsThemeForm('', 'searchform', 'searchmembers.php'); @@ -141,7 +141,7 @@ $GLOBALS['xoopsOption']['template_main'] = 'yogurt_searchresults.tpl'; include XOOPS_ROOT_PATH . '/header.php'; $iamadmin = $xoopsUserIsAdmin; - $myts = MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $criteria = new \CriteriaCompo(); if (!empty($_POST['user_uname'])) { $match = (!empty($_POST['user_uname_match'])) ? (int)$_POST['user_uname_match'] : XOOPS_MATCH_START; @@ -280,28 +280,28 @@ } if (!empty($_POST['user_lastlog_more']) && is_numeric($_POST['user_lastlog_more'])) { $f_user_lastlog_more = (int)trim($_POST['user_lastlog_more']); - $time = time() - (60 * 60 * 24 * $f_user_lastlog_more); + $time = time() - (60 * 60 * 24 * $f_user_lastlog_more); if ($time > 0) { $criteria->add(new \Criteria('last_login', $time, '<')); } } if (!empty($_POST['user_lastlog_less']) && is_numeric($_POST['user_lastlog_less'])) { $f_user_lastlog_less = (int)trim($_POST['user_lastlog_less']); - $time = time() - (60 * 60 * 24 * $f_user_lastlog_less); + $time = time() - (60 * 60 * 24 * $f_user_lastlog_less); if ($time > 0) { $criteria->add(new \Criteria('last_login', $time, '>')); } } if (!empty($_POST['user_reg_more']) && is_numeric($_POST['user_reg_more'])) { $f_user_reg_more = (int)trim($_POST['user_reg_more']); - $time = time() - (60 * 60 * 24 * $f_user_reg_more); + $time = time() - (60 * 60 * 24 * $f_user_reg_more); if ($time > 0) { $criteria->add(new \Criteria('user_regdate', $time, '<')); } } if (!empty($_POST['user_reg_less']) && is_numeric($_POST['user_reg_less'])) { $f_user_reg_less = (int)$_POST['user_reg_less']; - $time = time() - (60 * 60 * 24 * $f_user_reg_less); + $time = time() - (60 * 60 * 24 * $f_user_reg_less); if ($time > 0) { $criteria->add(new \Criteria('user_regdate', $time, '>')); } @@ -314,8 +314,8 @@ } $criteria->add(new \Criteria('level', 0, '>')); $validsort = ['uname', 'email', 'last_login', 'user_regdate', 'posts']; - $sort = (!in_array($_POST['user_sort'], $validsort)) ? 'uname' : htmlspecialchars($_POST['user_sort'], ENT_QUOTES | ENT_HTML5); - $order = 'ASC'; + $sort = (!in_array($_POST['user_sort'], $validsort)) ? 'uname' : htmlspecialchars($_POST['user_sort'], ENT_QUOTES | ENT_HTML5); + $order = 'ASC'; if (isset($_POST['user_order']) && 'DESC' == $_POST['user_order']) { $order = 'DESC'; } @@ -324,9 +324,9 @@ $limit = 50; } - $start = (!empty($_POST['start'])) ? (int)$_POST['start'] : 0; + $start = (!empty($_POST['start'])) ? (int)$_POST['start'] : 0; $memberHandler = xoops_getHandler('member'); - $total = $memberHandler->getUserCount($criteria); + $total = $memberHandler->getUserCount($criteria); $xoopsTpl->assign('lang_search', _MD_YOGURT_SEARCH); $xoopsTpl->assign('lang_results', _MD_YOGURT_RESULTS); $xoopsTpl->assign('total_found', $total); @@ -352,28 +352,28 @@ $criteria->setLimit($limit); $foundusers = $memberHandler->getUsers($criteria, true); foreach (array_keys($foundusers) as $j) { - $userdata['avatar'] = $foundusers[$j]->getVar('user_avatar') ? "getVar('user_avatar') . "' alt='' />" : ' '; + $userdata['avatar'] = $foundusers[$j]->getVar('user_avatar') ? "getVar('user_avatar') . "' alt=''>" : ' '; $userdata['realname'] = $foundusers[$j]->getVar('name') ?: ' '; - $userdata['name'] = $foundusers[$j]->getVar('uname'); - $userdata['id'] = $foundusers[$j]->getVar('uid'); + $userdata['name'] = $foundusers[$j]->getVar('uname'); + $userdata['id'] = $foundusers[$j]->getVar('uid'); if (1 == $foundusers[$j]->getVar('user_viewemail') || $iamadmin) { - $userdata['email'] = "" . sprintf(_SENDEMAILTO, $foundusers[$j]->getVar("; + $userdata['email'] = "" . sprintf(_SENDEMAILTO, $foundusers[$j]->getVar("; } else { $userdata['email'] = ' '; } if ($xoopsUser) { $userdata['pmlink'] = "getVar('uid') . "\",\"pmlite\",450,370);'>" . sprintf(
-                        _SENDPMTO,
-                        $foundusers[$j]->getVar(
-                            "; + _SENDPMTO, + $foundusers[$j]->getVar( + 'uname', + 'E' + ) + ) . "'>"; } else { $userdata['pmlink'] = ' '; } if ('' != $foundusers[$j]->getVar('url', 'E')) { - $userdata['website'] = "" . _VISITWEBSITE . ""; + $userdata['website'] = "" . _VISITWEBSITE . ""; } else { $userdata['website'] = ' '; } @@ -405,19 +405,19 @@ if ($totalpages > 1) { $hiddenform = ""; foreach ($_POST as $k => $v) { - $hiddenform .= "\n"; + $hiddenform .= "\n"; } if (!isset($_POST['limit'])) { - $hiddenform .= "\n"; + $hiddenform .= "\n"; } if (!isset($_POST['start'])) { - $hiddenform .= "\n"; + $hiddenform .= "\n"; } $prev = $start - $limit; if ($start - $limit >= 0) { $hiddenform .= "" . _MD_YOGURT_PREVIOUS . " \n"; } - $counter = 1; + $counter = 1; $currentpage = ($start + $limit) / $limit; while ($counter <= $totalpages) { if ($counter == $currentpage) { @@ -450,7 +450,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/seutubo.php b/seutubo.php index 1d39765d..273744e5 100644 --- a/seutubo.php +++ b/seutubo.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_seutubo.tpl'; @@ -41,8 +40,7 @@ /** * Get all videos of this user and assign them to template */ - -$videos = $controller->getVideos($criteriaUidVideo); +$videos = $controller->getVideos($criteriaUidVideo); $videos_array = $controller->assignVideoContent($nbSections['nbVideos'], $videos); if (is_array($videos_array)) { @@ -59,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/submit.php b/submit.php index 46b9bb0f..585dde81 100644 --- a/submit.php +++ b/submit.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; /** @@ -44,14 +43,14 @@ /** * Getting parameters defined in admin side */ -$path_upload = XOOPS_ROOT_PATH . '/uploads'; -$pictwidth = $xoopsModuleConfig['resized_width']; -$pictheight = $xoopsModuleConfig['resized_height']; -$thumbwidth = $xoopsModuleConfig['thumb_width']; -$thumbheight = $xoopsModuleConfig['thumb_height']; -$maxfilebytes = $xoopsModuleConfig['maxfilesize']; +$path_upload = XOOPS_ROOT_PATH . '/uploads'; +$pictwidth = $xoopsModuleConfig['resized_width']; +$pictheight = $xoopsModuleConfig['resized_height']; +$thumbwidth = $xoopsModuleConfig['thumb_width']; +$thumbheight = $xoopsModuleConfig['thumb_height']; +$maxfilebytes = $xoopsModuleConfig['maxfilesize']; $maxfileheight = $xoopsModuleConfig['max_original_height']; -$maxfilewidth = $xoopsModuleConfig['max_original_width']; +$maxfilewidth = $xoopsModuleConfig['max_original_width']; /** * If we are receiving a file @@ -69,8 +68,8 @@ */ if ($albumFactory->receivePicture($title, $path_upload, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $maxfilebytes, $maxfilewidth, $maxfileheight)) { $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname'); - $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid'); - $notificationHandler = xoops_getHandler('notification'); + $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid'); + $notificationHandler = xoops_getHandler('notification'); $notificationHandler->triggerEvent('picture', $xoopsUser->getVar('uid'), 'new_picture', $extra_tags); //header("Location: ".XOOPS_URL."/modules/yogurt/index.php?uid=".$xoopsUser->getVar('uid')); redirect_header(XOOPS_URL . '/modules/yogurt/album.php?uid=' . $xoopsUser->getVar('uid'), 3, _MD_YOGURT_UPLOADED); diff --git a/submit_configs.php b/submit_configs.php index e35cf361..172bb2d5 100644 --- a/submit_configs.php +++ b/submit_configs.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -32,30 +31,28 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } -/** - * - */ -// $this->initVar("config_id",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("config_uid",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("pictures",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("videos",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("tribes",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("Notes",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("friends",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("profile_contact",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("profile_general",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("profile_stats",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("suspension",XOBJ_DTYPE_INT,null,false,10); -// $this->initVar("backup_password",XOBJ_DTYPE_TXTBOX, null, false); -// $this->initVar("backup_email",XOBJ_DTYPE_TXTBOX, null, false); -// $this->initVar("end_suspension",XOBJ_DTYPE_TXTBOX, null, false); -//$pic = $_POST['pic']; -//$vid = $_POST['vid']; +// $this->initVar("config_id",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("config_uid",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("pictures",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("videos",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("tribes",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("Notes",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("friends",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("profile_contact",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("profile_general",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("profile_stats",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("suspension",XOBJ_DTYPE_INT,null,false,10); +// $this->initVar("backup_password",XOBJ_DTYPE_TXTBOX, null, false); +// $this->initVar("backup_email",XOBJ_DTYPE_TXTBOX, null, false); +// $this->initVar("end_suspension",XOBJ_DTYPE_TXTBOX, null, false); + +//$pic = $_POST['pic']; +//$vid = $_POST['vid']; //$aud = $_POST['aud']; -//$tri = $_POST['tribes']; -//$fri = $_POST['friends']; -//$scr = $_POST['Notes']; +//$tri = $_POST['tribes']; +//$fri = $_POST['friends']; +//$scr = $_POST['Notes']; //$pcon = $_POST['profileContact']; //$pgen = $_POST['gen']; //$psta = $_POST['stat']; @@ -63,7 +60,7 @@ $criteria = new \Criteria('config_uid', $xoopsUser->getVar('uid')); if ($configsFactory->getCount($criteria) > 0) { $configs = $configsFactory->getObjects($criteria); - $config = $configs[0]; + $config = $configs[0]; $config->unsetNew(); } else { $config = $configsFactory->create(); diff --git a/submit_friendpetition.php b/submit_friendpetition.php index 93439030..dae5d675 100644 --- a/submit_friendpetition.php +++ b/submit_friendpetition.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; @@ -65,8 +64,8 @@ if ($friendpetitionFactory->insert($newpetition)) { $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname'); - $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid'); - $notificationHandler = xoops_getHandler('notification'); + $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid'); + $notificationHandler = xoops_getHandler('notification'); $notificationHandler->triggerEvent('friendship', $_POST['petitioned_uid'], 'new_friendship', $extra_tags); redirect_header(XOOPS_URL . '/modules/yogurt/index.php?uid=' . $_POST['petitioned_uid'], 3, _MD_YOGURT_PETITIONED); diff --git a/submit_scrap.php b/submit_scrap.php index 3d4c8d73..f53b14b9 100644 --- a/submit_scrap.php +++ b/submit_scrap.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -37,22 +36,19 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } -/** - * - */ -$myts = MyTextSanitizer::getInstance(); +$myts = MyTextSanitizer::getInstance(); $Notebook_uid = $_POST['uid']; -$Note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1); -$mainform = (!empty($_POST['mainform'])) ? 1 : 0; -$Note = $NotesFactory->create(); +$Note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1); +$mainform = (!empty($_POST['mainform'])) ? 1 : 0; +$Note = $NotesFactory->create(); $Note->setVar('Note_text', $Note_text); $Note->setVar('Note_from', $xoopsUser->getVar('uid')); $Note->setVar('Note_to', $Notebook_uid); $NotesFactory->insert($Note); $extra_tags['X_OWNER_NAME'] = $xoopsUser::getUnameFromId($Notebook_uid); -$extra_tags['X_OWNER_UID'] = $Notebook_uid; -$notificationHandler = xoops_getHandler('notification'); +$extra_tags['X_OWNER_UID'] = $Notebook_uid; +$notificationHandler = xoops_getHandler('notification'); $notificationHandler->triggerEvent('Note', $xoopsUser->getVar('uid'), 'new_Note', $extra_tags); if (1 == $mainform) { redirect_header('notebook.php?uid=' . $Notebook_uid, 1, _MD_YOGURT_NOTE_SENT); diff --git a/submit_tribe.php b/submit_tribe.php index 16f38395..3239f317 100644 --- a/submit_tribe.php +++ b/submit_tribe.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -32,7 +31,7 @@ * Factories of tribes */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); -$tribesFactory = new Yogurt\TribesHandler($xoopsDB); +$tribesFactory = new Yogurt\TribesHandler($xoopsDB); $marker = isset($_POST['marker']) ? $_POST['marker'] : 0; @@ -43,21 +42,19 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } - /** - * - */ - $myts = MyTextSanitizer::getInstance(); - $tribe_title = $myts->displayTarea($_POST['tribe_title'], 0, 1, 1, 1, 1); - $tribe_desc = $myts->displayTarea($_POST['tribe_desc'], 0, 1, 1, 1, 1); - $tribe_img = (!empty($_POST['tribe_img'])) ? $_POST['tribe_img'] : ''; - $path_upload = XOOPS_ROOT_PATH . '/uploads'; - $pictwidth = $xoopsModuleConfig['resized_width']; - $pictheight = $xoopsModuleConfig['resized_height']; - $thumbwidth = $xoopsModuleConfig['thumb_width']; - $thumbheight = $xoopsModuleConfig['thumb_height']; - $maxfilebytes = $xoopsModuleConfig['maxfilesize']; + + $myts = MyTextSanitizer::getInstance(); + $tribe_title = $myts->displayTarea($_POST['tribe_title'], 0, 1, 1, 1, 1); + $tribe_desc = $myts->displayTarea($_POST['tribe_desc'], 0, 1, 1, 1, 1); + $tribe_img = (!empty($_POST['tribe_img'])) ? $_POST['tribe_img'] : ''; + $path_upload = XOOPS_ROOT_PATH . '/uploads'; + $pictwidth = $xoopsModuleConfig['resized_width']; + $pictheight = $xoopsModuleConfig['resized_height']; + $thumbwidth = $xoopsModuleConfig['thumb_width']; + $thumbheight = $xoopsModuleConfig['thumb_height']; + $maxfilebytes = $xoopsModuleConfig['maxfilesize']; $maxfileheight = $xoopsModuleConfig['max_original_height']; - $maxfilewidth = $xoopsModuleConfig['max_original_width']; + $maxfilewidth = $xoopsModuleConfig['max_original_width']; if ($tribesFactory->receiveTribe($tribe_title, $tribe_desc, '', $path_upload, $maxfilebytes, $maxfilewidth, $maxfileheight)) { $reltribeuser = $reltribeuserFactory->create(); $reltribeuser->setVar('rel_tribe_id', $xoopsDB->getInsertId()); diff --git a/submitaudio.php b/submitaudio.php index d9842c34..3e6298c7 100644 --- a/submitaudio.php +++ b/submitaudio.php @@ -16,13 +16,11 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; /** * Xoops header ... */ - $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; require __DIR__ . '/header.php'; @@ -40,13 +38,13 @@ /** * Getting the title */ -$title = $myts->displayTarea($_POST['title'], 0, 1, 1, 1, 1); +$title = $myts->displayTarea($_POST['title'], 0, 1, 1, 1, 1); $author = $myts->displayTarea($_POST['author'], 0, 1, 1, 1, 1); /** * Getting parameters defined in admin side */ -$path_upload = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/'; +$path_upload = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/'; $maxfilebytes = $xoopsModuleConfig['maxfilesize']; /** diff --git a/suspend.php b/suspend.php index e2143e27..abb60713 100644 --- a/suspend.php +++ b/suspend.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -32,12 +31,12 @@ * Creating the factory loading the picture changing its caption */ $suspensionsFactory = new Yogurt\SuspensionsHandler($xoopsDB); -$suspension = $suspensionsFactory->create(false); +$suspension = $suspensionsFactory->create(false); $suspension->load($uid); if ($xoopsUser->isAdmin(1)) { $memberHandler = xoops_getHandler('member'); - $thisUser = $memberHandler->getUser($uid); + $thisUser = $memberHandler->getUser($uid); $suspension->setVar('uid', $uid); $suspension->setVar('old_email', $thisUser->getVar('email')); $suspension->setVar('old_pass', $thisUser->getVar('pass')); diff --git a/templates/blocks/yogurt_block_friends.tpl b/templates/blocks/yogurt_block_friends.tpl index 9db8f0d7..cd0b95fb 100644 --- a/templates/blocks/yogurt_block_friends.tpl +++ b/templates/blocks/yogurt_block_friends.tpl @@ -1,7 +1,7 @@ <{section name=i loop=$block.friends}>
    + <{ if $block.friends[i].user_avatar=="blank.gif" }> <{else}> <{/if}>
    <{$block.friends[i].uname}>
    +
    +
    <{/section}> <{$block.lang_allfriends}> diff --git a/templates/blocks/yogurt_block_hotfriends.tpl b/templates/blocks/yogurt_block_hotfriends.tpl index 08cdc154..cc20a975 100644 --- a/templates/blocks/yogurt_block_hotfriends.tpl +++ b/templates/blocks/yogurt_block_hotfriends.tpl @@ -1,7 +1,7 @@ <{section name=i loop=$block.friends}>
    + /<{$block.friends[i].user_avatar}>>
    <{$block.friends[i].uname}>
    +
    +
    <{/section}> <{$block.lang_allfriends}> diff --git a/templates/blocks/yogurt_block_hottest.tpl b/templates/blocks/yogurt_block_hottest.tpl index 8a3367ed..9fa64482 100644 --- a/templates/blocks/yogurt_block_hottest.tpl +++ b/templates/blocks/yogurt_block_hottest.tpl @@ -1,5 +1,5 @@ <{section name=i loop=$block.friends}> -
    +
    <{/section}> diff --git a/templates/blocks/yogurt_block_lastpictures.tpl b/templates/blocks/yogurt_block_lastpictures.tpl index e7367fb8..e268b2dd 100644 --- a/templates/blocks/yogurt_block_lastpictures.tpl +++ b/templates/blocks/yogurt_block_lastpictures.tpl @@ -1,7 +1,7 @@ <{section name=i loop=$block}> <{/section}> diff --git a/templates/yogurt_album.tpl b/templates/yogurt_album.tpl index 80fe3732..6bc2708f 100644 --- a/templates/yogurt_album.tpl +++ b/templates/yogurt_album.tpl @@ -1,17 +1,17 @@ <{include file="db:yogurt_navbar.tpl"}> <{ if ($showForm==1) }> -
    -

    - <{$lang_formtitle}> -

    - +
    +

    + <{$lang_formtitle}> +

    +

    <{$token}>

    -

    +

    -

    +

    +

    <{ /if}> @@ -25,42 +25,42 @@ <{ if $lang_nopicyet=="" }> <{section name=i loop=$pics_array}> - <{ if (($pics_array[i].private == 0) || ($isOwner==1)) }> -
    " > + <{ if (($pics_array[i].private == 0) || ($isOwner==1)) }> +
    ">
    - + <{$token}> - -
    -
    - + +
    +
    + <{$token}> -
    +
    - + <{$token}> -
    +
    - + <{$token}> - <{ if $pics_array[i].private == 1}> - + <{ if $pics_array[i].private == 1}> + <{else}> - + - <{ /if }> -
    - <{ if ($pics_array[i].private == 1) }> -

    Private

    - <{ /if }> + <{ /if }> + + <{ if ($pics_array[i].private == 1) }> +

    Private

    + <{ /if }>

    <{$pics_array[i].desc}>

    -
    +
    <{ /if }> <{/section}> <{ else }> diff --git a/templates/yogurt_audio.tpl b/templates/yogurt_audio.tpl index 1e2ca50d..5bce0ea3 100644 --- a/templates/yogurt_audio.tpl +++ b/templates/yogurt_audio.tpl @@ -1,93 +1,93 @@ <{include file="db:yogurt_navbar.tpl"}> <{ if $isOwner }> -
    -

    - <{$lang_addaudios}> -

    -
    - <{$token}> -

    - <{$lang_audiohelp}>

    -

    - - -

    -

    - - -

    -

    -

    - -

    -
    - -
    +
    +

    + <{$lang_addaudios}> +

    +
    + <{$token}> +

    + <{$lang_audiohelp}>

    +

    + + +

    +

    + + +

    +

    +

    + +

    +
    + +
    <{ /if}>
    -

    - <{$player_from_list}> -

    +

    + <{$player_from_list}> +

    - +
    -

    - - <{$lang_audios}> - -

    - <{if $nb_audio<=0}> -

    - <{$lang_noaudioyet}> -

    - <{/if}> - - - - <{section name=i loop=$audios}> -
    "> -
    - - -
    -
    -

    - <{$audios[i].title}> <{$audios[i].author}> -

    -

    <{$lang_meta}>

    -

    <{$lang_title}>: <{$audios[i].meta.Title}>

    -

    <{$lang_album}>: <{$audios[i].meta.Album}>

    -

    <{$lang_artist}>: <{$audios[i].meta.Artist}>

    -

    <{$lang_year}>: <{$audios[i].meta.Year}>

    -
    - -

    <{ if $isOwner==1 }> -
    - - <{$token}> - -
    - - - <{ /if}> -
    -
    - <{/section}> +

    + + <{$lang_audios}> + +

    + <{if $nb_audio<=0}> +

    + <{$lang_noaudioyet}> +

    + <{/if}> + + + + <{section name=i loop=$audios}> +
    "> +
    + + +
    +
    +

    + <{$audios[i].title}> <{$audios[i].author}> +

    +

    <{$lang_meta}>

    +

    <{$lang_title}>: <{$audios[i].meta.Title}>

    +

    <{$lang_album}>: <{$audios[i].meta.Album}>

    +

    <{$lang_artist}>: <{$audios[i].meta.Artist}>

    +

    <{$lang_year}>: <{$audios[i].meta.Year}>

    +
    + +

    <{ if $isOwner==1 }> +
    + + <{$token}> + +
    + + + <{ /if}> +
    +
    + <{/section}>
    - <{$pageNav}> + <{$pageNav}>
    <{include file="db:yogurt_footer.tpl"}> diff --git a/templates/yogurt_configs.tpl b/templates/yogurt_configs.tpl index eefecb53..9c05a657 100644 --- a/templates/yogurt_configs.tpl +++ b/templates/yogurt_configs.tpl @@ -7,100 +7,100 @@

    <{$lang_whocan}>

    <{ if $allow_pictures!=-1 }> -
    +
    <{$lang_configpictures}> - -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    - -

    <{ /if }><{ if $allow_videos!=-1 }> -
    + +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    + +

    <{ /if }><{ if $allow_videos!=-1 }> +
    <{$lang_configvideos}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    <{ /if }><{ if $allow_tribes!=-1 }> -
    +

    <{ /if }><{ if $allow_tribes!=-1 }> +
    <{$lang_configtribes}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    <{ /if }> +

    <{ /if }> <{ if $allow_Notes!=-1 }> -
    +
    <{$lang_configNotes}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    -<{ /if }><{ if $allow_friends!=-1 }> -
    +

    --><{ /if }><{ if $allow_friends!=-1 }> +
    <{$lang_configfriends}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    <{ /if }> +

    <{ /if }> -
    +
    <{$lang_configprofilecontact}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    -
    +

    +
    <{$lang_configprofilegeneral}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    -
    +

    +
    <{$lang_configprofilestats}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    +

    <{ if $allow_audios!=-1 }> -
    +
    <{$lang_configaudio}> -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    -

    checked="checked"<{/if}> />

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    +

    checked="checked"<{/if}>>

    -

    +

    <{ /if }>

    <{$token}> diff --git a/templates/yogurt_edittribe.tpl b/templates/yogurt_edittribe.tpl index ddc48901..39e90ce3 100644 --- a/templates/yogurt_edittribe.tpl +++ b/templates/yogurt_edittribe.tpl @@ -1,115 +1,115 @@ <{include file="db:yogurt_navbar.tpl"}> - -

    <{$lang_edittribe}>

    - -

    - - -

    -

    - - -

    - -
    -

    - -

    -

    - - - - -

    -
    -

    - - -

    -

    - - -

    -

    - -

    + +

    <{$lang_edittribe}>

    + +

    + + +

    +

    + + +

    + +
    +

    + +

    +

    + + + + +

    +
    +

    + + +

    +

    + + +

    +

    + +

    <{$token}> - - + +

    <{$lang_membersoftribe}>

    <{section name=i loop=$tribe_members}> -
    "> -

    - <{$tribe_members[i].uname}> -

    -

    - - -

    - <{$tribe_members[i].uname}> -

    - - <{if $tribe_members[i].isOwner }> - <{$lang_owner}> - <{else}> -
    - - - -
    - <{ /if }> - -

    -
    - <{/section}> +
    "> +

    + <{$tribe_members[i].uname}> +

    +

    + + +

    + <{$tribe_members[i].uname}> +

    + + <{if $tribe_members[i].isOwner }> + <{$lang_owner}> + <{else}> +
    + + + +
    + <{ /if }> + +

    +
    + <{/section}>
    diff --git a/templates/yogurt_fans.tpl b/templates/yogurt_fans.tpl index 3a0888f3..82738e09 100644 --- a/templates/yogurt_fans.tpl +++ b/templates/yogurt_fans.tpl @@ -1,28 +1,28 @@ <{include file="db:yogurt_navbar.tpl"}> -
    +

    <{$lang_fanstitle}>

    <{if $lang_nofansyet==""}> - <{section name=i loop=$friends}> -
    "> -

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    - <{if $isOwner }>
    - + <{section name=i loop=$friends}> +
    - <{/section}> + + + +
    + <{/section}> <{ else }>

    <{$lang_nofansyet}>

    <{ /if}> diff --git a/templates/yogurt_friends.tpl b/templates/yogurt_friends.tpl index e2934723..e8a21cfb 100644 --- a/templates/yogurt_friends.tpl +++ b/templates/yogurt_friends.tpl @@ -1,21 +1,21 @@ <{include file="db:yogurt_navbar.tpl"}> -
    +

    <{$lang_friendstitle}>

    <{if $lang_nofriendsyet==""}> - <{section name=i loop=$friends}> -
    "> -

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    - <{if $isOwner }>
    - + <{section name=i loop=$friends}> +
    - <{/section}> +
    + <{/section}> <{ else }>

    <{$lang_nofriendsyet}>

    <{ /if}> diff --git a/templates/yogurt_index.tpl b/templates/yogurt_index.tpl index 6b5067b0..92471f3f 100644 --- a/templates/yogurt_index.tpl +++ b/templates/yogurt_index.tpl @@ -5,31 +5,31 @@

    <{$lang_youhavexpetitions}>

    - +
    <{$lang_askingfriend}>
      -
    • - - <{$lang_rejected}> -
    • -
    • - - <{$lang_accepted}> -
    • - -
    • - - <{$lang_acquaintance}> -
    • - -
    • - - <{$lang_friend}> -
    • +
    • + + <{$lang_rejected}> +
    • +
    • + + <{$lang_accepted}> +
    • + +
    • + + <{$lang_acquaintance}> +
    • + +
    • + + <{$lang_friend}> +
    - - + + <{$token}>
    @@ -38,7 +38,7 @@ <{if (($isfriend!=1) && ($isOwner==0) && ($isanonym!=1))}>
    -<{$lang_askusertobefriend}> +<{$lang_askusertobefriend}> <{$token}>
    @@ -46,40 +46,40 @@ <{ /if }> <{ /if }> <{ if $allow_friends }> -
    -

    <{$lang_fans}> ( <{$nb_fans}> ) -| <{$lang_trusty}>

      

    +
    +

    <{$lang_fans}> ( <{$nb_fans}> ) +| <{$lang_trusty}>

      

    -| <{$lang_cool}>

      

    +| <{$lang_cool}>

      

    -| <{$lang_sexy}>

      

    +| <{$lang_sexy}>

      

    <{/if}>
    <{ if $allow_pictures || $allow_videos }>
    -

    - <{$owner_uname}> -

    +

    + <{$owner_uname}> +

    <{ if $allow_pictures }> -
    - <{if $avatar_url!="" && $avatar_url!="blank.gif" }> - - <{ else }> - - <{if $isOwner}> -

    - <{$lang_selectavatar}> -

    - <{ else }> -

    - <{$lang_noavatar}> -

    - <{/if}> - <{ /if }> -
    -<{/if}> +
    + <{if $avatar_url!="" && $avatar_url!="blank.gif" }> + + <{ else }> + + <{if $isOwner}> +

    + <{$lang_selectavatar}> +

    + <{ else }> +

    + <{$lang_noavatar}> +

    + <{/if}> + <{ /if }> +
    +<{/if}>
    <{/if}> @@ -87,42 +87,42 @@ <{ if ($isOwner==1) }> -
    -

    <{$lang_visitors}>

    -

    - <{foreach from=$visitors key=k item=v}> - > <{$v}>   - <{/foreach}> -

    -
    +
    +

    <{$lang_visitors}>

    +

    + <{foreach from=$visitors key=k item=v}> + > <{$v}>   + <{/foreach}> +

    +
    <{ /if }> <{ if $allow_profile_general==1}>
    -

    <{$lang_detailsinfo}> <{ if $isOwner==1 }> <{/if}>

    -

    <{$lang_uname}>:<{$user_uname}>

    -

    <{$lang_realname}>:<{$user_realname}>

    -

    <{$lang_location}>:<{$user_location}>

    -

    <{$lang_occupation}>:<{$user_occupation}>

    -

    <{$lang_interest}>:<{$user_interest}>

    -

    <{$lang_extrainfo}>:

    +

    <{$lang_detailsinfo}> <{ if $isOwner==1 }> <{/if}>

    +

    <{$lang_uname}>:<{$user_uname}>

    +

    <{$lang_realname}>:<{$user_realname}>

    +

    <{$lang_location}>:<{$user_location}>

    +

    <{$lang_occupation}>:<{$user_occupation}>

    +

    <{$lang_interest}>:<{$user_interest}>

    +

    <{$lang_extrainfo}>:

    <{$user_extrainfo}>

    <{ /if }> <{ if $allow_profile_contact==1}>
    -

    <{$lang_contactinfo}> <{ if $isOwner==1 }> <{/if}>

    -

    <{$lang_website}>:<{$user_websiteurl}>

    -

    <{$lang_email}>:<{ mailto address=$user_email encode="javascript"}>

    +

    <{$lang_contactinfo}> <{ if $isOwner==1 }> <{/if}>

    +

    <{$lang_website}>:<{$user_websiteurl}>

    +

    <{$lang_email}>:<{ mailto address=$user_email encode="javascript"}>

    <{ if $isanonym!=1 && $isOwner!=1 }> -

    <{$lang_privmsg}>:Send Private Message to suico

    +

    <{$lang_privmsg}>:Send Private Message to suico

    <{ /if }> -

    <{$lang_icq}>:<{$user_icq}>

    -

    <{$lang_aim}>:<{$user_aim}>

    -

    <{$lang_yim}>:<{$user_yim}>

    -

    <{$lang_msnm}>:<{$user_msnm}>

    +

    <{$lang_icq}>:<{$user_icq}>

    +

    <{$lang_aim}>:<{$user_aim}>

    +

    <{$lang_yim}>:<{$user_yim}>

    +

    <{$lang_msnm}>:<{$user_msnm}>

    <{ /if }> @@ -131,11 +131,11 @@ <{ if $allow_profile_stats}>

    <{$lang_statistics}>

    -

    <{$lang_membersince}>:<{$user_joindate}>

    -

    <{$lang_rank}>:<{$user_rankimage}> <{$user_ranktitle}>

    -

    <{$lang_posts}>:<{$user_posts}>

    -

    <{$lang_lastlogin}>:<{$user_lastlogin}>

    -

    <{$lang_signature}>:

    +

    <{$lang_membersince}>:<{$user_joindate}>

    +

    <{$lang_rank}>:<{$user_rankimage}> <{$user_ranktitle}>

    +

    <{$lang_posts}>:<{$user_posts}>

    +

    <{$lang_lastlogin}>:<{$user_lastlogin}>

    +

    <{$lang_signature}>:

    <{$user_signature}>

    @@ -147,11 +147,11 @@ <{foreach item=module from=$modules name="search_results"}> -
    -

    - - - +
    +

    + + + <{$module.name}>

    @@ -159,13 +159,13 @@ <{foreach item=result from=$module.results}> -

    "> - <{$module.name}> +

    "> + <{$module.name}> <{$result.title}> -
    +
    (<{$result.time}>)

    @@ -185,40 +185,40 @@
    -

    <{$lang_videos}> ( <{$nb_videos}> )

    - <{ if $allow_videos==1 }> -
    - <{if $mainvideocode!="" }> - - - - - -

    - <{$mainvideodesc}> -

    - <{ else }> - - <{if $isOwner}> -

    - <{$lang_selectmainvideo}> -

    - <{else}> -

    - <{$lang_nomainvideo}> -

    - <{/if}> - <{ /if }> -
    - <{/if}> +

    <{$lang_videos}> ( <{$nb_videos}> )

    + <{ if $allow_videos==1 }> +
    + <{if $mainvideocode!="" }> + + + + + +

    + <{$mainvideodesc}> +

    + <{ else }> + + <{if $isOwner}> +

    + <{$lang_selectmainvideo}> +

    + <{else}> +

    + <{$lang_nomainvideo}> +

    + <{/if}> + <{ /if }> +
    + <{/if}>
    <{ if $allow_friends==1 }>

    <{$lang_friendstitle}> ( <{$nb_friends}> )

    -<{if $nb_friends==0}>

    <{$lang_nofriendsyet}>

    <{ /if }> +<{if $nb_friends==0}>

    <{$lang_nofriendsyet}>

    <{ /if }> <{section name=i loop=$friends}> -
    "> + <{/section}> @@ -230,10 +230,10 @@ <{ if $allow_tribes==1}>

    <{$lang_tribes}> (<{$nb_tribes}>)

    -<{if $nb_tribes==0}>

    <{$lang_notribesyet}>

    <{ /if }> +<{if $nb_tribes==0}>

    <{$lang_notribesyet}>

    <{ /if }> <{section name=i loop=$tribes}> -
    "> -<{$tribes[i].title}>

    <{$tribes[i].title}>

    <{$tribes[i].desc}>

    +
    "> +<{$tribes[i].title}>

    <{$tribes[i].title}>

    <{$tribes[i].desc}>

    <{/section}>

    diff --git a/templates/yogurt_navbar.tpl b/templates/yogurt_navbar.tpl index e929976e..6e5defd4 100644 --- a/templates/yogurt_navbar.tpl +++ b/templates/yogurt_navbar.tpl @@ -1,48 +1,48 @@

    <{ if $isWebmaster==1 }>
    <{ if $isSuspended==0 }>
    -<{$token}> +<{$token}>
    <{ else }> <{$lang_suspended}> -
    <{$token}> +<{$token}>
    <{/if}>
    <{/if}>
    -

    - <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}> -

    + + <{$lang_home}> + + > + + <{$module_name}> + + > + + <{$owner_uname}> + + > + <{$section_name}> +

    +

    + <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}> +

    + - +

- +
diff --git a/templates/yogurt_notebook.tpl b/templates/yogurt_notebook.tpl index fd3764ed..c180b5c6 100644 --- a/templates/yogurt_notebook.tpl +++ b/templates/yogurt_notebook.tpl @@ -1,84 +1,84 @@ <{include file='db:yogurt_navbar.tpl'}> <{ if $isanonym!=1 }> -
-
-

- - <{$token}> - -

+
+ +

+ + <{$token}> + +

-

- - - <{$lang_tips}> - -

- -
- [b]<{$lang_bold}>[/b] => <{$lang_bold}> | [i]<{$lang_italic}>[/i] => <{$lang_italic}> | [u]<{$lang_underline}>[/u] => <{$lang_underline}> -
+

+ + + <{$lang_tips}> + +

+ +
+ [b]<{$lang_bold}>[/b] => <{$lang_bold}> | [i]<{$lang_italic}>[/i] => <{$lang_italic}> | [u]<{$lang_underline}>[/u] => <{$lang_underline}> +
<{ /if}>
-

<{$section_name}>

+

<{$section_name}>

<{ if $lang_noNotesyet=="" }> <{section name=i loop=$Notes}> - -
"> -
-

 <{$Notes[i].uname}> -

- <{ if $Notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> - <{ if $isOwner==1}> -

-

- - -
- -

- <{ /if}> -
-
-

<{$section_name}> -  <{$Notes[i].text}> - -

- <{ if $isOwner==1}> -
-
- - - <{$token}> -
- -
-
-
- <{/if}> + +
"> +
+

 <{$Notes[i].uname}> +

+ <{ if $Notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> + <{ if $isOwner==1}> +

+

+ + +
+ +

+ <{ /if}>
- +
+

<{$section_name}> +  <{$Notes[i].text}> + +

+ <{ if $isOwner==1}> +
+
+ + + <{$token}> +
+ +
+
+
+ <{/if}> +
+
<{/section}> <{ else }>

<{$lang_noNotesyet}>

<{ /if }> - - + +
- <{$pageNav}> + <{$pageNav}>
<{include file='db:yogurt_footer.tpl'}> diff --git a/templates/yogurt_notifications.tpl b/templates/yogurt_notifications.tpl index a934b3d9..7377e21b 100644 --- a/templates/yogurt_notifications.tpl +++ b/templates/yogurt_notifications.tpl @@ -1,13 +1,13 @@ <{if $xoops_notification.show}>

<{$lang_activenotifications}>

- - + + - + <{foreach name=outer item=category from=$xoops_notification.categories}> @@ -18,15 +18,15 @@ <{/if}> <{/foreach}> <{/foreach}> - +
<{$lang_notificationoptions}>
<{$lang_category}> <{$lang_events}>
<{counter assign=index}> - - checked="checked"<{/if}> /> + + checked="checked"<{/if}>> <{$event.caption}>
@@ -34,4 +34,4 @@
-<{/if}> \ No newline at end of file +<{/if}> diff --git a/templates/yogurt_searchresults.tpl b/templates/yogurt_searchresults.tpl index 0eed858a..1dc4a05b 100644 --- a/templates/yogurt_searchresults.tpl +++ b/templates/yogurt_searchresults.tpl @@ -7,7 +7,7 @@ <{$lang_avatar}><{$lang_username}><{$lang_realname}> <{section name=i loop=$users}> - <{$users[i].avatar}><{$users[i].name}>
<{if $is_admin == true}><{$users[i].adminlink}><{/if}><{$users[i].realname}> + <{$users[i].avatar}><{$users[i].name}>
<{if $is_admin == true}><{$users[i].adminlink}><{/if}><{$users[i].realname}> <{/section}>
diff --git a/templates/yogurt_seutubo.tpl b/templates/yogurt_seutubo.tpl index c3f1cad7..807f2ee7 100644 --- a/templates/yogurt_seutubo.tpl +++ b/templates/yogurt_seutubo.tpl @@ -1,33 +1,33 @@ <{include file="db:yogurt_navbar.tpl"}> <{ if $isOwner }> -
-

- <{$lang_addvideos}> -

-
- <{$token}> -

- <{$lang_videohelp}> <{$xoops_sitename}>. -

-

- - -

-

- - -

-

- -

-
- +
+

+ <{$lang_addvideos}> +

+
+ <{$token}> +

+ <{$lang_videohelp}> <{$xoops_sitename}>. +

+

+ + +

+

+ + +

+

+ +

+
+ -
+
<{ /if}>
-

- - <{$lang_videos}> - -

- <{if $nb_videos<=0}> -

- <{$lang_novideoyet}> -

- <{/if}> - - - - <{section name=i loop=$videos}> -
"> -
- - - - - -
-
-

- <{$videos[i].desc}> -

<{ if $isOwner==1 }> -
- - <{$token}> - -
-
- - <{$token}> - -
-
- - <{$token}> - -
- <{ /if}> -
-
- <{/section}> +

+ + <{$lang_videos}> + +

+ <{if $nb_videos<=0}> +

+ <{$lang_novideoyet}> +

+ <{/if}> + + + + <{section name=i loop=$videos}> +
"> +
+ + + + + +
+
+

+ <{$videos[i].desc}> +

<{ if $isOwner==1 }> +
+ + <{$token}> + +
+
+ + <{$token}> + +
+
+ + <{$token}> + +
+ <{ /if}> +
+
+ <{/section}>
- <{$pageNav}> + <{$pageNav}>
<{include file="db:yogurt_footer.tpl"}> diff --git a/templates/yogurt_tribe.tpl b/templates/yogurt_tribe.tpl index 99712746..8584b984 100644 --- a/templates/yogurt_tribe.tpl +++ b/templates/yogurt_tribe.tpl @@ -1,59 +1,59 @@ <{include file="db:yogurt_navbar.tpl"}> - +
- +

<{$tribe_title}>

- +

- +

- +

<{$tribe_desc}> <{ if $isanonym!=1 }> - <{if $memberOfTribe ==1}>

- + <{if $memberOfTribe ==1}> +
<{ else}>
- +
<{/if}> <{/if}>

- - <{ if $allow_friends }> + + <{ if $allow_friends }>

<{$lang_membersoftribe}>

<{section name=i loop=$tribe_members}>
">

<{$tribe_members[i].uname}> -<{if $tribe_owneruid==$tribe_members[i].uid}><{$lang_owner}><{/if}> +<{if $tribe_owneruid==$tribe_members[i].uid}><{$lang_owner}><{/if}>

- <{ if $tribe_members[i].avatar=="blank.gif"}><{else}> <{/if}> - + <{ if $tribe_members[i].avatar=="blank.gif"}><{else}> <{/if}> + <{if $tribe_owneruid==$useruid}> -

- - + + + -
+ <{/if}>

<{/section}>
<{/if}> - - - - - - - + + + + + + +
<{$commentsnav}> <{$lang_notice}> diff --git a/templates/yogurt_tribes.tpl b/templates/yogurt_tribes.tpl index dd0296fb..5b45a475 100644 --- a/templates/yogurt_tribes.tpl +++ b/templates/yogurt_tribes.tpl @@ -1,58 +1,58 @@ <{include file="db:yogurt_navbar.tpl"}> -<{ if $isanonym!=1 }> - +<{ if $isanonym!=1 }> +
- -

<{$lang_createtribe}>

- -

- -

- -

- - - - -

- -

- - -

- -

- - -

- -

- -

- -<{$token}> + +

<{$lang_createtribe}>

+ +

+ +

+ +

+ + + + +

+ +

+ + +

+ +

+ + +

+ +

+ +

+ +<{$token}>
@@ -65,101 +65,101 @@ function xoopsFormValidate_form_tribe() { myform = window.document.form_tribe; i <{ /if}> -
-

- <{$lang_mytribestitle}> -

- - <{if $nb_tribes<=0}> -

- <{$lang_notribesyet}> -

- <{ /if}> - <{section name=i loop=$mytribes}> -
"> -

- <{$mytribes[i].title}> -

-

- - <{$mytribes[i].title}> -

- <{$mytribes[i].title}><{$mytribes[i].desc}> -

- - <{if $isOwner }> -
- - -
- <{if $xoops_userid == $mytribes[i].uid }> -
- <{$lang_owner}> -
- <{ /if }> - <{ /if }> - -

-
- <{/section}> +
+

+ <{$lang_mytribestitle}> +

+ + <{if $nb_tribes<=0}> +

+ <{$lang_notribesyet}> +

+ <{ /if}> + <{section name=i loop=$mytribes}> +
"> +

+ <{$mytribes[i].title}> +

+

+ + <{$mytribes[i].title}> +

+ <{$mytribes[i].title}><{$mytribes[i].desc}> +

+ + <{if $isOwner }> +
+ + +
+ <{if $xoops_userid == $mytribes[i].uid }> +
+ <{$lang_owner}> +
+ <{ /if }> + <{ /if }> + +

+
+ <{/section}>
- <{$barra_navegacao_my}> + <{$barra_navegacao_my}>
-
-

- <{$lang_tribestitle}> -

- - <{if $nb_tribes_all<=0}> -

- <{$lang_notribesyet}> -

- <{ /if}> - - <{section name=j loop=$tribes}> -
"> - <{$tribes[j].title}> -

- <{$tribes[j].title}> -

-

- -

- <{$tribes[j].desc}> -

- -

- <{if $isOwner }> -
- - -
- - <{if $xoops_userid == $tribes[j].uid }> -
- - -
-
- - -
-
- <{$lang_owner}> -
- <{ /if }> - +
+

+ <{$lang_tribestitle}> +

+ + <{if $nb_tribes_all<=0}> +

+ <{$lang_notribesyet}> +

+ <{ /if}> + + <{section name=j loop=$tribes}> +
"> + <{$tribes[j].title}> +

+ <{$tribes[j].title}> +

+

+ +

+ <{$tribes[j].desc}> +

+ +

+ <{if $isOwner }> +
+ + +
+ + <{if $xoops_userid == $tribes[j].uid }> +
+ + +
+
+ + +
+
+ <{$lang_owner}> +
+ <{ /if }> + <{ /if }> -
- <{/section}> +
+ <{/section}>
- <{$barra_navegacao}> + <{$barra_navegacao}>
diff --git a/templates/yogurt_tribes_results.tpl b/templates/yogurt_tribes_results.tpl index 4258d735..03f0b006 100644 --- a/templates/yogurt_tribes_results.tpl +++ b/templates/yogurt_tribes_results.tpl @@ -2,76 +2,76 @@ <{include file="db:yogurt_navbar.tpl"}> <{/if}> -
-

- <{$lang_tribestitle}> -

- - <{if $nb_tribes_all<=0}> -

- <{$lang_notribesyet}> -

- <{ /if}> - - <{section name=j loop=$tribes}> -
"> - <{$tribes[j].title}> -

- <{$tribes[j].title}> -

-

- -

- <{$tribes[j].desc}> -

- -

- <{if $isOwner }> -
- - -
- - <{if $xoops_userid == $tribes[j].uid }> -
- - -
-
- - -
-
- <{$lang_owner}> -
- <{ /if }> - +
+

+ <{$lang_tribestitle}> +

+ + <{if $nb_tribes_all<=0}> +

+ <{$lang_notribesyet}> +

+ <{ /if}> + + <{section name=j loop=$tribes}> +
"> + <{$tribes[j].title}> +

+ <{$tribes[j].title}> +

+

+ +

+ <{$tribes[j].desc}> +

+ +

+ <{if $isOwner }> +
+ + +
+ + <{if $xoops_userid == $tribes[j].uid }> +
+ + +
+
+ + +
+
+ <{$lang_owner}> +
+ <{ /if }> + <{ /if }> -
- <{/section}> +
+ <{/section}>
- <{$barra_navegacao}> + <{$barra_navegacao}>
diff --git a/testdata/index.php b/testdata/index.php index 220b215f..047fc662 100644 --- a/testdata/index.php +++ b/testdata/index.php @@ -13,7 +13,6 @@ * @since 2.5.9 * @author Michael Beck (aka Mamba) */ - use XoopsModules\Yogurt; use XoopsModules\Yogurt\Common; use XoopsModules\Yogurt\Utility; @@ -23,7 +22,7 @@ $op = \Xmf\Request::getCmd('op', ''); -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); $helper = Yogurt\Helper::getInstance(); @@ -54,10 +53,10 @@ function loadSampleData() { global $xoopsConfig; - $moduleDirName = basename(dirname(__DIR__)); + $moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); - $utility = new Yogurt\Utility(); + $utility = new Yogurt\Utility(); $configurator = new Common\Configurator(); $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables'); @@ -79,7 +78,7 @@ function loadSampleData() if (is_array($configurator->copyTestFolders) && count($configurator->copyTestFolders) > 0) { // $file = __DIR__ . '/../testdata/images/'; foreach (array_keys($configurator->copyTestFolders) as $i) { - $src = $configurator->copyTestFolders[$i][0]; + $src = $configurator->copyTestFolders[$i][0]; $dest = $configurator->copyTestFolders[$i][1]; $utility::rcopy($src, $dest); } @@ -91,7 +90,7 @@ function saveSampleData() { global $xoopsConfig; - $moduleDirName = basename(dirname(__DIR__)); + $moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables'); @@ -117,7 +116,7 @@ function saveSampleData() function exportSchema() { - $moduleDirName = basename(dirname(__DIR__)); + $moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); try { diff --git a/tribe.php b/tribe.php index 62f09a29..220a7f8a 100644 --- a/tribe.php +++ b/tribe.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribe.tpl'; @@ -31,8 +30,8 @@ $tribe_id = (int)$_GET['tribe_id']; $criteria = new \Criteria('tribe_id', $tribe_id); -$tribes = $controller->tribesFactory->getObjects($criteria); -$tribe = $tribes[0]; +$tribes = $controller->tribesFactory->getObjects($criteria); +$tribe = $tribes[0]; /** * Render a form with the info of the user @@ -92,7 +91,7 @@ //navbar $xoopsTpl->assign('module_name', $xoopsModule->getVar('name')); $xoopsTpl->assign('lang_mysection', _MD_YOGURT_TRIBES . ' :: ' . $tribe->getVar('tribe_title')); -$xoopsTpl->assign('section_name', _MD_YOGURT_TRIBES . ' > ' . $tribe->getVar('tribe_title')); +$xoopsTpl->assign('section_name', _MD_YOGURT_TRIBES . '> ' . $tribe->getVar('tribe_title')); $xoopsTpl->assign('lang_home', _MD_YOGURT_HOME); $xoopsTpl->assign('lang_photos', _MD_YOGURT_PHOTOS); $xoopsTpl->assign('lang_friends', _MD_YOGURT_FRIENDS); @@ -118,7 +117,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/tribes.php b/tribes.php index 02c97007..4dacd867 100644 --- a/tribes.php +++ b/tribes.php @@ -16,10 +16,8 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; - $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribes.tpl'; require __DIR__ . '/header.php'; @@ -31,13 +29,13 @@ $nbSections = $controller->getNumbersSections(); $start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0; -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; +$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; /** * All Tribes */ $criteria_tribes = new \Criteria('tribe_id', 0, '>'); -$nb_tribes = $controller->tribesFactory->getCount($criteria_tribes); +$nb_tribes = $controller->tribesFactory->getCount($criteria_tribes); $criteria_tribes->setLimit($xoopsModuleConfig['tribesperpage']); $criteria_tribes->setStart($start_all); $tribes = $controller->tribesFactory->getTribes($criteria_tribes); @@ -45,9 +43,9 @@ /** * My Tribes */ -$mytribes = ''; +$mytribes = ''; $criteria_mytribes = new \Criteria('rel_user_uid', $controller->uidOwner); -$nb_mytribes = $controller->reltribeusersFactory->getCount($criteria_mytribes); +$nb_mytribes = $controller->reltribeusersFactory->getCount($criteria_mytribes); $criteria_mytribes->setLimit($xoopsModuleConfig['tribesperpage']); $criteria_mytribes->setStart($start_my); $mytribes = $controller->reltribeusersFactory->getTribes('', $criteria_mytribes, 0); @@ -58,7 +56,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); @@ -74,10 +72,10 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nb_tribes, $xoopsModuleConfig['tribesperpage'], $start_all, 'start_all', 'uid=' . (int)$controller->uidOwner . '&start_my=' . $start_my); -$barrinha = $barra_navegacao->renderImageNav(2);//alltribes +$barrinha = $barra_navegacao->renderImageNav(2); //alltribes $barra_navegacao_my = new \XoopsPageNav($nb_mytribes, $xoopsModuleConfig['tribesperpage'], $start_my, 'start_my', 'uid=' . (int)$controller->uidOwner . '&start_all=' . $start_all); -$barrinha_my = $barra_navegacao_my->renderImageNav(2); +$barrinha_my = $barra_navegacao_my->renderImageNav(2); $maxfilebytes = $xoopsModuleConfig['maxfilesize']; @@ -140,10 +138,10 @@ $xoopsTpl->assign('lang_notribesyet', _MD_YOGURT_NOTRIBESYET); //page nav -$xoopsTpl->assign('barra_navegacao', $barrinha);//alltribes +$xoopsTpl->assign('barra_navegacao', $barrinha); //alltribes $xoopsTpl->assign('barra_navegacao_my', $barrinha_my); -$xoopsTpl->assign('nb_tribes', $nb_mytribes);// this is the one wich shows in the upper bar actually is about the mytribes -$xoopsTpl->assign('nb_tribes_all', $nb_tribes);//this is total number of tribes +$xoopsTpl->assign('nb_tribes', $nb_mytribes); // this is the one wich shows in the upper bar actually is about the mytribes +$xoopsTpl->assign('nb_tribes_all', $nb_tribes); //this is total number of tribes $xoopsTpl->assign('lang_createtribe', _MD_YOGURTCREATEYOURTRIBE); $xoopsTpl->assign('lang_owner', _MD_YOGURT_TRIBEOWNER); diff --git a/unsuspenduser.php b/unsuspenduser.php index ced216b1..f4bea10f 100644 --- a/unsuspenduser.php +++ b/unsuspenduser.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -30,12 +29,12 @@ * Creating the factory loading the picture changing its caption */ $suspensionsFactory = new Yogurt\SuspensionsHandler($xoopsDB); -$suspension = $suspensionsFactory->create(false); +$suspension = $suspensionsFactory->create(false); $suspension->load($uid); if ($xoopsUser->isAdmin(1)) { $memberHandler = xoops_getHandler('member'); - $thisUser = $memberHandler->getUser($uid); + $thisUser = $memberHandler->getUser($uid); $thisUser->setVar('email', $suspension->getVar('old_email', 'n')); $thisUser->setVar('pass', $suspension->getVar('old_pass', 'n')); diff --git a/video_submited.php b/video_submited.php index 00af7e9e..e65e9369 100644 --- a/video_submited.php +++ b/video_submited.php @@ -16,7 +16,6 @@ * @author XOOPS Development Team * @since */ - use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; @@ -42,18 +41,18 @@ $newvideo->setVar('uid_owner', (int)$xoopsUser->getVar('uid')); $newvideo->setVar('video_desc', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); -if (11 == strlen($url)) { +if (11 == mb_strlen($url)) { $code = $url; } else { - $position_of_code = strpos($url, 'v='); - $code = substr($url, $position_of_code + 2, 11); + $position_of_code = mb_strpos($url, 'v='); + $code = mb_substr($url, $position_of_code + 2, 11); } $newvideo->setVar('youtube_code', $code); if ($albumFactory->insert($newvideo)) { $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname'); - $extra_tags['X_OWNER_UID'] = (int)$xoopsUser->getVar('uid'); - $notificationHandler = xoops_getHandler('notification'); + $extra_tags['X_OWNER_UID'] = (int)$xoopsUser->getVar('uid'); + $notificationHandler = xoops_getHandler('notification'); $notificationHandler->triggerEvent('video', (int)$xoopsUser->getVar('uid'), 'new_video', $extra_tags); redirect_header(XOOPS_URL . '/modules/yogurt/seutubo.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_VIDEOSAVED); } else { diff --git a/xoops_version.php b/xoops_version.php index 1dac67ba..a35439e7 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -16,84 +16,83 @@ * @author XOOPS Development Team * @since */ - $moduleDirName = basename(__DIR__); // ------------------- Informations ------------------- // $modversion = [ - 'version' => 3.4, - 'module_status' => 'Beta 2', - 'release_date' => '2020/03/28', - 'name' => _MI_YOGURT_MODULE_NAME, - 'description' => _MI_YOGURT_MODULEDESC, - 'official' => 0, + 'version' => 3.4, + 'module_status' => 'Beta 2', + 'release_date' => '2020/03/28', + 'name' => _MI_YOGURT_MODULE_NAME, + 'description' => _MI_YOGURT_MODULEDESC, + 'official' => 0, //1 indicates official XOOPS module supported by XOOPS Dev Team, 0 means 3rd party supported - 'author' => 'Marcello Brandao', - 'credits' => 'XOOPS Development Team, The ImpressCMS Project, Jquery Lightbox, Komeia, vaughan,', - 'author_mail' => 'author-email', - 'author_website_url' => 'https://xoops.org', + 'author' => 'Marcello Brandao', + 'credits' => 'XOOPS Development Team, The ImpressCMS Project, Jquery Lightbox, Komeia, vaughan,', + 'author_mail' => 'author-email', + 'author_website_url' => 'https://xoops.org', 'author_website_name' => 'XOOPS', - 'license' => 'GPL 2.0 or later', - 'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', - 'help' => 'page=help', + 'license' => 'GPL 2.0 or later', + 'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', + 'help' => 'page=help', // ------------------- Folders & Files ------------------- - 'release_info' => 'Changelog', - 'release_file' => XOOPS_URL . "/modules/$moduleDirName/docs/changelog.txt", - // - 'manual' => 'link to manual file', - 'manual_file' => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt", + 'release_info' => 'Changelog', + 'release_file' => XOOPS_URL . "/modules/$moduleDirName/docs/changelog.txt", + + 'manual' => 'link to manual file', + 'manual_file' => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt", // images - 'image' => 'assets/images/logoModule.png', - 'iconsmall' => 'assets/images/iconsmall.png', - 'iconbig' => 'assets/images/iconbig.png', - 'dirname' => $moduleDirName, - 'modicons16' => 'assets/images/icons/16', - 'modicons32' => 'assets/images/icons/32', - 'demo_site_url' => 'https://xoops.org', - 'demo_site_name' => 'XOOPS Demo Site', - 'support_url' => 'https://xoops.org/modules/newbb/viewforum.php?forum=28/', - 'support_name' => 'Support Forum', - 'submit_bug' => 'https://github.com/XoopsModules25x/' . $moduleDirName . '/issues', - 'module_website_url' => 'www.xoops.org', + 'image' => 'assets/images/logoModule.png', + 'iconsmall' => 'assets/images/iconsmall.png', + 'iconbig' => 'assets/images/iconbig.png', + 'dirname' => $moduleDirName, + 'modicons16' => 'assets/images/icons/16', + 'modicons32' => 'assets/images/icons/32', + 'demo_site_url' => 'https://xoops.org', + 'demo_site_name' => 'XOOPS Demo Site', + 'support_url' => 'https://xoops.org/modules/newbb/viewforum.php?forum=28/', + 'support_name' => 'Support Forum', + 'submit_bug' => 'https://github.com/XoopsModules25x/' . $moduleDirName . '/issues', + 'module_website_url' => 'www.xoops.org', 'module_website_name' => 'XOOPS Project', // ------------------- Min Requirements ------------------- - 'min_php' => '7.1', - 'min_xoops' => '2.5.10', - 'min_admin' => '1.2', - 'min_db' => ['mysql' => '5.5'], + 'min_php' => '7.1', + 'min_xoops' => '2.5.10', + 'min_admin' => '1.2', + 'min_db' => ['mysql' => '5.5'], // ------------------- Admin Menu ------------------- - 'system_menu' => 1, - 'hasAdmin' => 1, - 'adminindex' => 'admin/index.php', - 'adminmenu' => 'admin/menu.php', + 'system_menu' => 1, + 'hasAdmin' => 1, + 'adminindex' => 'admin/index.php', + 'adminmenu' => 'admin/menu.php', // ------------------- Main Menu ------------------- - 'hasMain' => 1, - 'sub' => [ + 'hasMain' => 1, + 'sub' => [ [ 'name' => _MI_YOGURT_SEARCH, - 'url' => 'searchmembers.php', + 'url' => 'searchmembers.php', ], [ 'name' => _MI_YOGURT_MYPROFILE, - 'url' => 'index.php', + 'url' => 'index.php', ], ], // ------------------- Install/Update ------------------- - 'onInstall' => 'include/oninstall.php', - 'onUpdate' => 'include/onupdate.php', + 'onInstall' => 'include/oninstall.php', + 'onUpdate' => 'include/onupdate.php', // 'onUninstall' => 'include/onuninstall.php', // ------------------- PayPal --------------------------- - 'paypal' => [ - 'business' => 'xoopsfoundation@gmail.com', - 'item_name' => 'Donation : ' . _MI_YOGURT_MODULE_NAME, - 'amount' => 0, + 'paypal' => [ + 'business' => 'xoopsfoundation@gmail.com', + 'item_name' => 'Donation : ' . _MI_YOGURT_MODULE_NAME, + 'amount' => 0, 'currency_code' => 'USD', ], // ------------------- Mysql ----------------------------- - 'sqlfile' => ['mysql' => 'sql/mysql.sql'], + 'sqlfile' => ['mysql' => 'sql/mysql.sql'], // ------------------- Tables ---------------------------- - 'tables' => [ + 'tables' => [ $moduleDirName . '_' . 'friendpetition', $moduleDirName . '_' . 'friendship', $moduleDirName . '_' . 'images', @@ -108,7 +107,6 @@ ], ]; - // ------------------- Help files ------------------- // $modversion['helpsection'] = [ ['name' => _MI_YOGURT_OVERVIEW, 'link' => 'page=help'], @@ -119,16 +117,16 @@ // SX Updater/Installer $modversion['simpleversion'] = '3.4'; -$modversion['simplename'] = 'yogurt'; -$modversion['simpleid'] = 22; +$modversion['simplename'] = 'yogurt'; +$modversion['simpleid'] = 22; //Adicionado para rodar no about -$modversion['developer_website_url'] = 'https://sourceforge.net/projects/galeriayogurt/'; +$modversion['developer_website_url'] = 'https://sourceforge.net/projects/galeriayogurt/'; $modversion['developer_website_name'] = 'Sourceforge - galeriayogurt'; -$modversion['developer_email'] = 'marcello.brandao@gmail.com'; -$modversion['status_version'] = 'Beta'; -$modversion['status'] = 'Beta'; -$modversion['date'] = '2017-11-11'; +$modversion['developer_email'] = 'marcello.brandao@gmail.com'; +$modversion['status_version'] = 'Beta'; +$modversion['status'] = 'Beta'; +$modversion['date'] = '2017-11-11'; $modversion['people']['developers'][] = 'Suico (Dev)'; $modversion['people']['developers'][] = 'Alfred (Dev)'; @@ -149,33 +147,32 @@ $modversion['people']['other'][] = 'Komeia (patrocanio)'; -$modversion['demo_site_url'] = 'http://www.marcellobrandao.eti.br'; -$modversion['demo_site_name'] = 'Marcello Brandao Site'; -$modversion['support_site_url'] = 'http://sourceforge.net/projects/galeriayogurt/'; +$modversion['demo_site_url'] = 'http://www.marcellobrandao.eti.br'; +$modversion['demo_site_name'] = 'Marcello Brandao Site'; +$modversion['support_site_url'] = 'http://sourceforge.net/projects/galeriayogurt/'; $modversion['support_site_name'] = 'Sourceforge'; -$modversion['submit_bug'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988288'; -$modversion['submit_feature'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988291'; - +$modversion['submit_bug'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988288'; +$modversion['submit_feature'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988291'; //$modversion['config'][1]['valuetype'] = 'int'; //can be 'int', 'float', 'textarea' or 'array'. All items with formtype 'multi_xxx' must have the valuetype 'array' $modversion['config'][] = [ - 'name' => 'enable_pictures', - 'title' => '_MI_YOG_ENABLEPICT_TITLE', + 'name' => 'enable_pictures', + 'title' => '_MI_YOG_ENABLEPICT_TITLE', 'description' => '_MI_YOG_ENABLEPICT_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'nb_pict', - 'title' => '_MI_YOG_NUMBPICT_TITLE', + 'name' => 'nb_pict', + 'title' => '_MI_YOG_NUMBPICT_TITLE', 'description' => '_MI_YOG_NUMBPICT_DESC', - 'default' => 12, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 12, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; /* @@ -199,229 +196,228 @@ */ $modversion['config'][] = [ - 'name' => 'thumb_width', - 'title' => '_MI_YOG_THUMW_TITLE', + 'name' => 'thumb_width', + 'title' => '_MI_YOG_THUMW_TITLE', 'description' => '_MI_YOG_THUMBW_DESC', - 'default' => 125, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 125, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'thumb_height', - 'title' => '_MI_YOG_THUMBH_TITLE', + 'name' => 'thumb_height', + 'title' => '_MI_YOG_THUMBH_TITLE', 'description' => '_MI_YOG_THUMBH_DESC', - 'default' => 175, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 175, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'resized_width', - 'title' => '_MI_YOG_RESIZEDW_TITLE', + 'name' => 'resized_width', + 'title' => '_MI_YOG_RESIZEDW_TITLE', 'description' => '_MI_YOG_RESIZEDW_DESC', - 'default' => 650, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 650, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'resized_height', - 'title' => '_MI_YOG_RESIZEDH_TITLE', + 'name' => 'resized_height', + 'title' => '_MI_YOG_RESIZEDH_TITLE', 'description' => '_MI_YOG_RESIZEDH_DESC', - 'default' => 450, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 450, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'max_original_width', - 'title' => '_MI_YOG_ORIGINALW_TITLE', + 'name' => 'max_original_width', + 'title' => '_MI_YOG_ORIGINALW_TITLE', 'description' => '_MI_YOG_ORIGINALW_DESC', - 'default' => 2048, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 2048, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'max_original_height', - 'title' => '_MI_YOG_ORIGINALH_TITLE', + 'name' => 'max_original_height', + 'title' => '_MI_YOG_ORIGINALH_TITLE', 'description' => '_MI_YOG_ORIGINALH_DESC', - 'default' => 1600, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 1600, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'maxfilesize', - 'title' => '_MI_YOG_MAXFILEBYTES_TITLE', + 'name' => 'maxfilesize', + 'title' => '_MI_YOG_MAXFILEBYTES_TITLE', 'description' => '_MI_YOG_MAXFILEBYTES_DESC', - 'default' => 512000, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 512000, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'picturesperpage', - 'title' => '_MI_YOG_PICTURESPERPAGE_TITLE', + 'name' => 'picturesperpage', + 'title' => '_MI_YOG_PICTURESPERPAGE_TITLE', 'description' => '_MI_YOG_PICTURESPERPAGE_DESC', - 'default' => 6, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 6, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'physical_delete', - 'title' => '_MI_YOG_DELETEPHYSICAL_TITLE', + 'name' => 'physical_delete', + 'title' => '_MI_YOG_DELETEPHYSICAL_TITLE', 'description' => '_MI_YOG_DELETEPHYSICAL_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'images_order', - 'title' => '_MI_YOG_IMGORDER_TITLE', + 'name' => 'images_order', + 'title' => '_MI_YOG_IMGORDER_TITLE', 'description' => '_MI_YOG_IMGORDER_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'enable_friends', - 'title' => '_MI_YOG_ENABLEFRIENDS_TITLE', + 'name' => 'enable_friends', + 'title' => '_MI_YOG_ENABLEFRIENDS_TITLE', 'description' => '_MI_YOG_ENABLEFRIENDS_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'friendsperpage', - 'title' => '_MI_YOG_FRIENDSPERPAGE_TITLE', + 'name' => 'friendsperpage', + 'title' => '_MI_YOG_FRIENDSPERPAGE_TITLE', 'description' => '_MI_YOG_FRIENDSPERPAGE_DESC', - 'default' => 12, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 12, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'enable_audio', - 'title' => '_MI_YOG_ENABLEAUDIO_TITLE', + 'name' => 'enable_audio', + 'title' => '_MI_YOG_ENABLEAUDIO_TITLE', 'description' => '_MI_YOG_ENABLEAUDIO_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'nb_audio', - 'title' => '_MI_YOG_NUMBAUDIO_TITLE', + 'name' => 'nb_audio', + 'title' => '_MI_YOG_NUMBAUDIO_TITLE', 'description' => '_MI_YOG_NUMBAUDIO_DESC', - 'default' => 12, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 12, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'audiosperpage', - 'title' => '_MI_YOG_AUDIOSPERPAGE_TITLE', + 'name' => 'audiosperpage', + 'title' => '_MI_YOG_AUDIOSPERPAGE_TITLE', 'description' => '_MI_YOG_AUDIOSPERPAGE_DESC', - 'default' => 20, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 20, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'enable_videos', - 'title' => '_MI_YOG_ENABLEVIDEOS_TITLE', + 'name' => 'enable_videos', + 'title' => '_MI_YOG_ENABLEVIDEOS_TITLE', 'description' => '_MI_YOG_ENABLEVIDEOS_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'videosperpage', - 'title' => '_MI_YOG_VIDEOSPERPAGE_TITLE', + 'name' => 'videosperpage', + 'title' => '_MI_YOG_VIDEOSPERPAGE_TITLE', 'description' => '_MI_YOG_VIDEOSPERPAGE_DESC', - 'default' => 6, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 6, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - - 'name' => 'width_tube', - 'title' => '_MI_YOG_TUBEW_TITLE', + 'name' => 'width_tube', + 'title' => '_MI_YOG_TUBEW_TITLE', 'description' => '_MI_YOG_TUBEW_DESC', - 'default' => 450, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 450, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'height_tube', - 'title' => '_MI_YOG_TUBEH_TITLE', + 'name' => 'height_tube', + 'title' => '_MI_YOG_TUBEH_TITLE', 'description' => '_MI_YOG_TUBEH_DESC', - 'default' => 350, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 350, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'width_maintube', - 'title' => '_MI_YOG_MAINTUBEW_TITLE', + 'name' => 'width_maintube', + 'title' => '_MI_YOG_MAINTUBEW_TITLE', 'description' => '_MI_YOG_MAINTUBEW_DESC', - 'default' => 250, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 250, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'height_maintube', - 'title' => '_MI_YOG_MAINTUBEH_TITLE', + 'name' => 'height_maintube', + 'title' => '_MI_YOG_MAINTUBEH_TITLE', 'description' => '_MI_YOG_MAINTUBEH_DESC', - 'default' => 210, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 210, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'enable_tribes', - 'title' => '_MI_YOG_ENABLETRIBES_TITLE', + 'name' => 'enable_tribes', + 'title' => '_MI_YOG_ENABLETRIBES_TITLE', 'description' => '_MI_YOG_ENABLETRIBES_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'tribesperpage', - 'title' => '_MI_YOG_TRIBESPERPAGE_TITLE', + 'name' => 'tribesperpage', + 'title' => '_MI_YOG_TRIBESPERPAGE_TITLE', 'description' => '_MI_YOG_TRIBESPERPAGE_DESC', - 'default' => 6, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 6, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'enable_notes', - 'title' => '_MI_YOG_ENABLENOTES_TITLE', + 'name' => 'enable_notes', + 'title' => '_MI_YOG_ENABLENOTES_TITLE', 'description' => '_MI_YOG_ENABLENOTES_DESC', - 'default' => 1, - 'formtype' => 'yesno', - 'valuetype' => 'int', + 'default' => 1, + 'formtype' => 'yesno', + 'valuetype' => 'int', ]; $modversion['config'][] = [ - 'name' => 'Notesperpage', - 'title' => '_MI_YOG_NOTESPERPAGE_TITLE', + 'name' => 'Notesperpage', + 'title' => '_MI_YOG_NOTESPERPAGE_TITLE', 'description' => '_MI_YOG_NOTESPERPAGE_DESC', - 'default' => 20, - 'formtype' => 'textbox', - 'valuetype' => 'int', + 'default' => 20, + 'formtype' => 'textbox', + 'valuetype' => 'int', ]; $modversion['templates'] = [ @@ -444,109 +440,107 @@ ['file' => 'yogurt_fans.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATEFANS], ]; - global $xoopsModule; if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname']) { $moduleHandler = xoops_getHandler('module'); - $mod_yogurt = $moduleHandler->getByDirname('yogurt'); - $confHandler = xoops_getHandler('config'); - $moduleConfig = $confHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid')); + $mod_yogurt = $moduleHandler->getByDirname('yogurt'); + $confHandler = xoops_getHandler('config'); + $moduleConfig = $confHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid')); if (1 == $moduleConfig['enable_notes']) { $modversion['sub'][3]['name'] = _MI_YOGURT_MYNOTES; - $modversion['sub'][3]['url'] = 'notebook.php'; + $modversion['sub'][3]['url'] = 'notebook.php'; } if (1 == $moduleConfig['enable_pictures']) { $modversion['sub'][4]['name'] = _MI_YOGURT_MYPICTURES; - $modversion['sub'][4]['url'] = 'album.php'; + $modversion['sub'][4]['url'] = 'album.php'; } if (1 == $moduleConfig['enable_audio']) { $modversion['sub'][5]['name'] = _MI_YOGURT_MYAUDIOS; - $modversion['sub'][5]['url'] = 'audio.php'; + $modversion['sub'][5]['url'] = 'audio.php'; } if (1 == $moduleConfig['enable_videos']) { $modversion['sub'][6]['name'] = _MI_YOGURT_MYVIDEOS; - $modversion['sub'][6]['url'] = 'seutubo.php'; + $modversion['sub'][6]['url'] = 'seutubo.php'; } if (1 == $moduleConfig['enable_friends']) { $modversion['sub'][7]['name'] = _MI_YOGURT_MYFRIENDS; - $modversion['sub'][7]['url'] = 'friends.php'; + $modversion['sub'][7]['url'] = 'friends.php'; } if (1 == $moduleConfig['enable_tribes']) { $modversion['sub'][8]['name'] = _MI_YOGURT_MYTRIBES; - $modversion['sub'][8]['url'] = 'tribes.php'; + $modversion['sub'][8]['url'] = 'tribes.php'; } } $modversion['sub'][9]['name'] = _MI_YOGURT_MYCONFIGS; -$modversion['sub'][9]['url'] = 'configs.php'; +$modversion['sub'][9]['url'] = 'configs.php'; - -$modversion['hasComments'] = 1; +$modversion['hasComments'] = 1; $modversion['comments']['itemName'] = 'tribe_id'; $modversion['comments']['pageName'] = 'tribe.php'; // Search -$modversion['hasSearch'] = 0;//disabled for version 3.0 will come back in a next release +$modversion['hasSearch'] = 0; //disabled for version 3.0 will come back in a next release $modversion['search']['file'] = 'include/search.inc.php'; $modversion['search']['func'] = 'yogurt_search'; //Notifications -$modversion['hasNotification'] = 1; -$modversion['notification']['category'][1]['name'] = 'picture'; -$modversion['notification']['category'][1]['title'] = _MI_YOG_PICTURE_NOTIFYTIT; -$modversion['notification']['category'][1]['description'] = _MI_YOG_PICTURE_NOTIFYDSC; +$modversion['hasNotification'] = 1; +$modversion['notification']['category'][1]['name'] = 'picture'; +$modversion['notification']['category'][1]['title'] = _MI_YOG_PICTURE_NOTIFYTIT; +$modversion['notification']['category'][1]['description'] = _MI_YOG_PICTURE_NOTIFYDSC; $modversion['notification']['category'][1]['subscribe_from'] = 'album.php'; -$modversion['notification']['category'][1]['item_name'] = 'uid'; +$modversion['notification']['category'][1]['item_name'] = 'uid'; $modversion['notification']['category'][1]['allow_bookmark'] = 1; -$modversion['notification']['event'][1]['name'] = 'new_picture'; -$modversion['notification']['event'][1]['category'] = 'picture'; -$modversion['notification']['event'][1]['title'] = _MI_YOG_PICTURE_NEWPIC_NOTIFY; -$modversion['notification']['event'][1]['caption'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYCAP; -$modversion['notification']['event'][1]['description'] = _MI_YOG_PICTURE_NEWPOST_NOTIFYDSC; -$modversion['notification']['event'][1]['mail_template'] = 'picture_newpic_notify'; -$modversion['notification']['event'][1]['mail_subject'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYSBJ; - -$modversion['notification']['category'][2]['name'] = 'video'; -$modversion['notification']['category'][2]['title'] = _MI_YOG_VIDEO_NOTIFYTIT; -$modversion['notification']['category'][2]['description'] = _MI_YOG_VIDEO_NOTIFYDSC; +$modversion['notification']['event'][1]['name'] = 'new_picture'; +$modversion['notification']['event'][1]['category'] = 'picture'; +$modversion['notification']['event'][1]['title'] = _MI_YOG_PICTURE_NEWPIC_NOTIFY; +$modversion['notification']['event'][1]['caption'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYCAP; +$modversion['notification']['event'][1]['description'] = _MI_YOG_PICTURE_NEWPOST_NOTIFYDSC; +$modversion['notification']['event'][1]['mail_template'] = 'picture_newpic_notify'; +$modversion['notification']['event'][1]['mail_subject'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYSBJ; + +$modversion['notification']['category'][2]['name'] = 'video'; +$modversion['notification']['category'][2]['title'] = _MI_YOG_VIDEO_NOTIFYTIT; +$modversion['notification']['category'][2]['description'] = _MI_YOG_VIDEO_NOTIFYDSC; $modversion['notification']['category'][2]['subscribe_from'] = 'seutubo.php'; -$modversion['notification']['category'][2]['item_name'] = 'uid'; +$modversion['notification']['category'][2]['item_name'] = 'uid'; $modversion['notification']['category'][2]['allow_bookmark'] = 1; -$modversion['notification']['event'][2]['name'] = 'new_video'; -$modversion['notification']['event'][2]['category'] = 'video'; -$modversion['notification']['event'][2]['title'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFY; -$modversion['notification']['event'][2]['caption'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYCAP; -$modversion['notification']['event'][2]['description'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYDSC; -$modversion['notification']['event'][2]['mail_template'] = 'video_newvideo_notify'; -$modversion['notification']['event'][2]['mail_subject'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYSBJ; - -$modversion['notification']['category'][3]['name'] = 'Note'; -$modversion['notification']['category'][3]['title'] = _MI_YOG_NOTE_NOTIFYTIT; -$modversion['notification']['category'][3]['description'] = _MI_YOG_NOTE_NOTIFYDSC; +$modversion['notification']['event'][2]['name'] = 'new_video'; +$modversion['notification']['event'][2]['category'] = 'video'; +$modversion['notification']['event'][2]['title'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFY; +$modversion['notification']['event'][2]['caption'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYCAP; +$modversion['notification']['event'][2]['description'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYDSC; +$modversion['notification']['event'][2]['mail_template'] = 'video_newvideo_notify'; +$modversion['notification']['event'][2]['mail_subject'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYSBJ; + +$modversion['notification']['category'][3]['name'] = 'Note'; +$modversion['notification']['category'][3]['title'] = _MI_YOG_NOTE_NOTIFYTIT; +$modversion['notification']['category'][3]['description'] = _MI_YOG_NOTE_NOTIFYDSC; $modversion['notification']['category'][3]['subscribe_from'] = 'notebook.php'; -$modversion['notification']['category'][3]['item_name'] = 'uid'; +$modversion['notification']['category'][3]['item_name'] = 'uid'; $modversion['notification']['category'][3]['allow_bookmark'] = 1; -$modversion['notification']['event'][3]['name'] = 'new_Note'; -$modversion['notification']['event'][3]['category'] = 'Note'; -$modversion['notification']['event'][3]['title'] = _MI_YOG_NOTE_NEWNOTE_NOTIFY; -$modversion['notification']['event'][3]['caption'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYCAP; -$modversion['notification']['event'][3]['description'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYDSC; -$modversion['notification']['event'][3]['mail_template'] = 'Note_newNote_notify'; -$modversion['notification']['event'][3]['mail_subject'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYSBJ; - -$modversion['notification']['category'][4]['name'] = 'friendship'; -$modversion['notification']['category'][4]['title'] = _MI_YOG_FRIENDSHIP_NOTIFYTIT; -$modversion['notification']['category'][4]['description'] = _MI_YOG_FRIENDSHIP_NOTIFYDSC; +$modversion['notification']['event'][3]['name'] = 'new_Note'; +$modversion['notification']['event'][3]['category'] = 'Note'; +$modversion['notification']['event'][3]['title'] = _MI_YOG_NOTE_NEWNOTE_NOTIFY; +$modversion['notification']['event'][3]['caption'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYCAP; +$modversion['notification']['event'][3]['description'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYDSC; +$modversion['notification']['event'][3]['mail_template'] = 'Note_newNote_notify'; +$modversion['notification']['event'][3]['mail_subject'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYSBJ; + +$modversion['notification']['category'][4]['name'] = 'friendship'; +$modversion['notification']['category'][4]['title'] = _MI_YOG_FRIENDSHIP_NOTIFYTIT; +$modversion['notification']['category'][4]['description'] = _MI_YOG_FRIENDSHIP_NOTIFYDSC; $modversion['notification']['category'][4]['subscribe_from'] = 'friends.php'; -$modversion['notification']['category'][4]['item_name'] = 'uid'; +$modversion['notification']['category'][4]['item_name'] = 'uid'; $modversion['notification']['category'][4]['allow_bookmark'] = 0; -$modversion['notification']['event'][4]['name'] = 'new_friendship'; -$modversion['notification']['event'][4]['category'] = 'friendship'; -$modversion['notification']['event'][4]['title'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFY; -$modversion['notification']['event'][4]['caption'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYCAP; -$modversion['notification']['event'][4]['description'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYDSC; -$modversion['notification']['event'][4]['mail_template'] = 'friendship_newpetition_notify'; -$modversion['notification']['event'][4]['mail_subject'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYSBJ; +$modversion['notification']['event'][4]['name'] = 'new_friendship'; +$modversion['notification']['event'][4]['category'] = 'friendship'; +$modversion['notification']['event'][4]['title'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFY; +$modversion['notification']['event'][4]['caption'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYCAP; +$modversion['notification']['event'][4]['description'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYDSC; +$modversion['notification']['event'][4]['mail_template'] = 'friendship_newpetition_notify'; +$modversion['notification']['event'][4]['mail_subject'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYSBJ; $modversion['notification']['lookup_file'] = 'include/notification.inc.php'; $modversion['notification']['lookup_func'] = 'yogurt_iteminfo'; @@ -554,22 +548,21 @@ //$modversion['notification']['tags_func'] = 'yogurt_tags'; $modversion['blocks'][] = [ - 'file' => 'blocks.php', - 'name' => _MI_YOGURT_FRIENDS, + 'file' => 'blocks.php', + 'name' => _MI_YOGURT_FRIENDS, 'description' => _MI_YOGURT_FRIENDS_DESC, - 'show_func' => 'b_yogurt_friends_show', - 'options' => '5', - 'edit_func' => 'b_yogurt_friends_edit', - 'template' => 'yogurt_block_friends.tpl', + 'show_func' => 'b_yogurt_friends_show', + 'options' => '5', + 'edit_func' => 'b_yogurt_friends_edit', + 'template' => 'yogurt_block_friends.tpl', ]; $modversion['blocks'][] = [ - 'file' => 'blocks.php', - 'name' => _MI_YOGURT_LAST, + 'file' => 'blocks.php', + 'name' => _MI_YOGURT_LAST, 'description' => _MI_YOGURT_LAST_DESC, - 'show_func' => 'b_yogurt_lastpictures_show', - 'options' => '5', - 'edit_func' => 'b_yogurt_lastpictures_edit', - 'template' => 'yogurt_block_lastpictures.tpl', + 'show_func' => 'b_yogurt_lastpictures_show', + 'options' => '5', + 'edit_func' => 'b_yogurt_lastpictures_edit', + 'template' => 'yogurt_block_lastpictures.tpl', ]; - From 251218e097465316472cb46f82005b880d6df173 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Mon, 30 Mar 2020 14:37:14 -0400 Subject: [PATCH 23/43] cosmetics --- abandontribe.php | 9 +- admin/admin_header.php | 4 +- admin/main.php | 8 +- admin/menu.php | 18 +- album.php | 15 +- audio.php | 3 +- avatar.php | 7 +- becomemembertribe.php | 9 +- blocks/blocks.php | 5 +- class/Audio.php | 10 +- class/AudioController.php | 28 +- class/AudioHandler.php | 24 +- class/Configs.php | 10 +- class/ConfigsHandler.php | 16 +- class/ControllerConfigs.php | 4 +- class/ControllerFriends.php | 4 +- class/ControllerIndex.php | 4 +- class/ControllerNotes.php | 4 +- class/ControllerPhotos.php | 4 +- class/ControllerTribes.php | 4 +- class/Friendpetition.php | 10 +- class/FriendpetitionHandler.php | 16 +- class/Friendship.php | 10 +- class/FriendshipHandler.php | 76 ++--- class/Helper.php | 6 +- class/Image.php | 10 +- class/ImageHandler.php | 102 +++--- class/Ishot.php | 10 +- class/IshotHandler.php | 36 +- class/Notes.php | 10 +- class/NotesHandler.php | 32 +- class/Reltribeuser.php | 10 +- class/ReltribeuserHandler.php | 42 +-- class/Seutubo.php | 10 +- class/SeutuboHandler.php | 28 +- class/Suspensions.php | 10 +- class/SuspensionsHandler.php | 16 +- class/Tribes.php | 10 +- class/TribesHandler.php | 78 ++--- class/VideoController.php | 12 +- class/Visitors.php | 10 +- class/VisitorsHandler.php | 18 +- class/YogurtControler.php | 70 ++-- class/class.Id3v1.php | 40 ++- class/common/Configurator.php | 32 +- class/common/DirectoryChecker.php | 5 +- class/common/FileChecker.php | 7 +- class/common/FilesManagement.php | 4 +- class/common/Migrate.php | 6 +- class/common/ModuleFeedback.php | 30 +- class/common/Resizer.php | 54 +-- class/common/ServerStats.php | 6 +- class/common/SysUtility.php | 23 +- class/common/VersionChecks.php | 22 +- class/common/breadcrumb.php | 5 +- comment_new.php | 5 +- config/assigns.php | 132 ++++---- config/config.php | 24 +- config/icons.php | 20 +- config/imageconfig.php | 52 +-- config/paths.php | 16 +- configs.php | 17 +- delaudio.php | 7 +- delete_scrap.php | 7 +- delete_tribe.php | 9 +- delfriendship.php | 3 +- delpicture.php | 9 +- delvideo.php | 5 +- editdesc.php | 11 +- editdescvideo.php | 13 +- editfriendship.php | 19 +- edittribe.php | 19 +- edituser.php | 55 ++- fans.php | 9 +- friends.php | 7 +- header.php | 16 +- include/common.php | 29 +- include/notification.inc.php | 34 +- include/search.inc.php | 34 +- index.php | 43 +-- ishot.php | 5 +- kickfromtribe.php | 11 +- language/english/common.php | 2 +- mainvideo.php | 3 +- makefriends.php | 7 +- notebook.php | 1 + private.php | 3 +- search.php | 26 +- search_tribe.php | 19 +- searchmembers.php | 86 ++--- seutubo.php | 3 +- submit.php | 19 +- submit_configs.php | 3 +- submit_friendpetition.php | 5 +- submit_scrap.php | 13 +- submit_tribe.php | 25 +- submitaudio.php | 5 +- suspend.php | 5 +- testdata/index.php | 13 +- tribe.php | 5 +- tribes.php | 13 +- unsuspenduser.php | 5 +- video_submited.php | 7 +- xoops_version.php | 536 +++++++++++++++--------------- 104 files changed, 1262 insertions(+), 1209 deletions(-) diff --git a/abandontribe.php b/abandontribe.php index 4bb9f44b..99bec7d0 100644 --- a/abandontribe.php +++ b/abandontribe.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -39,10 +40,10 @@ * The user must be the owner */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); - $criteria_rel_id = new \Criteria('rel_id', $reltribeuser_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('rel_user_uid', $uid); - $criteria = new \CriteriaCompo($criteria_rel_id); + $criteria_rel_id = new \Criteria('rel_id', $reltribeuser_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('rel_user_uid', $uid); + $criteria = new \CriteriaCompo($criteria_rel_id); $criteria->add($criteria_uid); /** diff --git a/admin/admin_header.php b/admin/admin_header.php index a6521210..c89cb235 100644 --- a/admin/admin_header.php +++ b/admin/admin_header.php @@ -41,8 +41,8 @@ $xoopsTpl = new \XoopsTpl(); } -$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16); -$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32); +$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16); +$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32); $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); // Local icons path diff --git a/admin/main.php b/admin/main.php index b50efbad..2781341c 100644 --- a/admin/main.php +++ b/admin/main.php @@ -67,7 +67,7 @@ function about() { $moduleHandler = xoops_getHandler('module'); - $modulo = $moduleHandler->getByDirname('yogurt'); + $modulo = $moduleHandler->getByDirname('yogurt'); echo "
getInfo('dirname') . '/' . $modulo->getInfo('image') . "' alt='Yogurt' style='float: left; margin-right: 10px;'/>
@@ -115,7 +115,7 @@ function about()
"; - $vetorpessoas = $modulo->getInfo('people'); + $vetorpessoas = $modulo->getInfo('people'); $vetordevelopers = $vetorpessoas['developers']; foreach ($vetordevelopers as $developer) { echo $developer . ' '; @@ -332,7 +332,7 @@ function homedefault() if ($isframeworksrequirement) { loadModuleAdminMenu(2, '-> About'); } - // renderUglierMenu(2, '-> About'); + // renderUglierMenu(2, '-> About'); about(); @@ -341,7 +341,7 @@ function homedefault() if ($isframeworksrequirement) { loadModuleAdminMenu(1, '-> home'); } - // renderUglierMenu(1, '-> home'); + // renderUglierMenu(1, '-> home'); homedefault(); diff --git a/admin/menu.php b/admin/menu.php index a707e59b..55160a87 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -18,7 +18,7 @@ */ include dirname(__DIR__) . '/preloads/autoloader.php'; -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); $helper = \XoopsModules\Yogurt\Helper::getInstance(); @@ -36,24 +36,24 @@ $adminmenu[] = [ 'title' => _MI_YOG_ADMENU1, - 'link' => 'admin/index.php', - 'icon' => $pathIcon32 . '/home.png', + 'link' => 'admin/index.php', + 'icon' => $pathIcon32 . '/home.png', ]; $adminmenu[] = [ 'title' => _MI_YOG_MENU_02, - 'link' => 'admin/main.php', - 'icon' => $pathIcon32 . '/manage.png', + 'link' => 'admin/main.php', + 'icon' => $pathIcon32 . '/manage.png', ]; $adminmenu[] = [ 'title' => _MI_YOG_ADMENU2, - 'link' => 'admin/main.php?op=about', - 'icon' => $pathIcon32 . '/about.png', + 'link' => 'admin/main.php?op=about', + 'icon' => $pathIcon32 . '/about.png', ]; $adminmenu[] = [ 'title' => _MI_YOG_ADMENU2, - 'link' => 'admin/about.php', - 'icon' => $pathIcon32 . '/about.png', + 'link' => 'admin/about.php', + 'icon' => $pathIcon32 . '/about.png', ]; diff --git a/album.php b/album.php index e283bbb6..4b8d8498 100644 --- a/album.php +++ b/album.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_album.tpl'; @@ -41,8 +42,8 @@ $criteria_uid = new \Criteria('uid_owner', $controller->uidOwner); } else { $criteria_private = new \Criteria('private', 0); - $criteria_uid2 = new \Criteria('uid_owner', (int)$controller->uidOwner); - $criteria_uid = new \CriteriaCompo($criteria_uid2); + $criteria_uid2 = new \Criteria('uid_owner', (int)$controller->uidOwner); + $criteria_uid = new \CriteriaCompo($criteria_uid2); $criteria_uid->add($criteria_private); } $criteria_uid->setLimit($xoopsModuleConfig['picturesperpage']); @@ -70,8 +71,8 @@ */ $i = 0; foreach ($pictures_object_array as $picture) { - $pictures_array[$i]['url'] = $picture->getVar('url', 's'); - $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); + $pictures_array[$i]['url'] = $picture->getVar('url', 's'); + $pictures_array[$i]['desc'] = $picture->getVar('title', 's'); $pictures_array[$i]['cod_img'] = $picture->getVar('cod_img', 's'); $pictures_array[$i]['private'] = $picture->getVar('private', 's'); $xoopsTpl->assign('pics_array', $pictures_array); @@ -93,9 +94,9 @@ /** * Let's get the user name of the owner of the album */ -$owner = new \XoopsUser($controller->uidOwner); +$owner = new \XoopsUser($controller->uidOwner); $identifier = $owner->getVar('uname'); -$avatar = $owner->getVar('user_avatar'); +$avatar = $owner->getVar('user_avatar'); /** * Adding to the module js and css of the lightbox and new ones @@ -119,7 +120,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nbSections['nbPhotos'], $xoopsModuleConfig['picturesperpage'], $start, 'start', 'uid=' . (int)$controller->uidOwner); -$navegacao = $barra_navegacao->renderImageNav(2); +$navegacao = $barra_navegacao->renderImageNav(2); /** * Assigning smarty variables diff --git a/audio.php b/audio.php index 52792d25..48dc4d10 100644 --- a/audio.php +++ b/audio.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_audio.tpl'; @@ -40,7 +41,7 @@ /** * Get all audios of this user and assign them to template */ -$audios = $controller->getAudio($criteriaUidAudio); +$audios = $controller->getAudio($criteriaUidAudio); $audios_array = $controller->assignAudioContent($nbSections['nbAudio'], $audios); if (is_array($audios_array)) { diff --git a/avatar.php b/avatar.php index 091bd550..fbb81729 100644 --- a/avatar.php +++ b/avatar.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -28,13 +29,13 @@ * Creating the factory loading the picture changing its caption */ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); -$picture = $pictureFactory->create(false); +$picture = $pictureFactory->create(false); $picture->load($_POST['cod_img']); $uid = (int)$xoopsUser->getVar('uid'); -$image = XOOPS_ROOT_PATH . '/uploads/' . 'thumb_' . $picture->getVar('url'); -$avatar = 'av' . $uid . '_' . time() . '.jpg'; +$image = XOOPS_ROOT_PATH . '/uploads/' . 'thumb_' . $picture->getVar('url'); +$avatar = 'av' . $uid . '_' . time() . '.jpg'; $imageavatar = XOOPS_ROOT_PATH . '/uploads/' . $avatar; if (!copy($image, $imageavatar)) { diff --git a/becomemembertribe.php b/becomemembertribe.php index 037afe68..481f68b8 100644 --- a/becomemembertribe.php +++ b/becomemembertribe.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -28,14 +29,14 @@ * Factories of tribes... testing for zend editor */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); -$tribesFactory = new Yogurt\TribesHandler($xoopsDB); +$tribesFactory = new Yogurt\TribesHandler($xoopsDB); $tribe_id = (int)$_POST['tribe_id']; -$uid = (int)$xoopsUser->getVar('uid'); +$uid = (int)$xoopsUser->getVar('uid'); -$criteria_uid = new \Criteria('rel_user_uid', $uid); +$criteria_uid = new \Criteria('rel_user_uid', $uid); $criteria_tribe_id = new \Criteria('rel_tribe_id', $tribe_id); -$criteria = new \CriteriaCompo($criteria_uid); +$criteria = new \CriteriaCompo($criteria_uid); $criteria->add($criteria_tribe_id); if ($reltribeuserFactory->getCount($criteria) < 1) { $reltribeuser = $reltribeuserFactory->create(); diff --git a/blocks/blocks.php b/blocks/blocks.php index ba99d62c..61652e36 100644 --- a/blocks/blocks.php +++ b/blocks/blocks.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; if (!defined('XOOPS_ROOT_PATH')) { @@ -32,7 +33,7 @@ function b_yogurt_friends_show($options) { global $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsUser; - $myts = MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $block = []; if (!empty($xoopsUser)) { @@ -73,7 +74,7 @@ function b_yogurt_friends_edit($options) function b_yogurt_lastpictures_show($options) { global $xoopsDB, $xoopsModule, $xoopsModuleConfig; - $myts = MyTextSanitizer::getInstance(); + $myts = MyTextSanitizer::getInstance(); $block = []; /** diff --git a/class/Audio.php b/class/Audio.php index 7da2cd7e..771a2d60 100644 --- a/class/Audio.php +++ b/class/Audio.php @@ -51,7 +51,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio') . ' WHERE audio_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -70,8 +70,8 @@ public function load($id) */ public function getAllyogurt_audios($criteria = [], $asobject = false, $sort = 'audio_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -83,13 +83,13 @@ public function getAllyogurt_audios($criteria = [], $asobject = false, $sort = ' $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT audio_id FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT audio_id FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_audio_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_audio') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/AudioController.php b/class/AudioController.php index e9cd5b61..2d23ffb1 100644 --- a/class/AudioController.php +++ b/class/AudioController.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** @@ -63,6 +63,8 @@ public function getAudio($criteria) * @param $nbAudios * @param $audios * @return bool + * @throws \Exception + * @throws \Exception */ public function assignAudioContent($nbAudios, $audios) { @@ -75,21 +77,21 @@ public function assignAudioContent($nbAudios, $audios) */ $i = 0; foreach ($audios as $audio) { - $audios_array[$i]['url'] = $audio->getVar('url', 's'); - $audios_array[$i]['title'] = $audio->getVar('title', 's'); - $audios_array[$i]['id'] = $audio->getVar('audio_id', 's'); + $audios_array[$i]['url'] = $audio->getVar('url', 's'); + $audios_array[$i]['title'] = $audio->getVar('title', 's'); + $audios_array[$i]['id'] = $audio->getVar('audio_id', 's'); $audios_array[$i]['author'] = $audio->getVar('author', 's'); if (str_replace('.', '', PHP_VERSION) > 499) { $audio_path = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/' . $audio->getVar('url', 's'); // echo $audio_path; - $mp3filemetainfo = new Id3v1($audio_path, true); - $mp3filemetainfoarray = []; - $mp3filemetainfoarray['Title'] = $mp3filemetainfo->getTitle(); + $mp3filemetainfo = new Id3v1($audio_path, true); + $mp3filemetainfoarray = []; + $mp3filemetainfoarray['Title'] = $mp3filemetainfo->getTitle(); $mp3filemetainfoarray['Artist'] = $mp3filemetainfo->getArtist(); - $mp3filemetainfoarray['Album'] = $mp3filemetainfo->getAlbum(); - $mp3filemetainfoarray['Year'] = $mp3filemetainfo->getYear(); - $audios_array[$i]['meta'] = $mp3filemetainfoarray; + $mp3filemetainfoarray['Album'] = $mp3filemetainfo->getAlbum(); + $mp3filemetainfoarray['Year'] = $mp3filemetainfo->getYear(); + $audios_array[$i]['meta'] = $mp3filemetainfoarray; } else { $audios_array[$i]['nometa'] = 1; } @@ -105,11 +107,13 @@ public function assignAudioContent($nbAudios, $audios) * @param int $audiosPerPage the number of videos in a page * @param int $start at which position of the array we start * @param int $interval how many pages between the first link and the next one + * @return string|null + * @return string|null */ public function AudiosNavBar($nbAudios, $audiosPerPage, $start, $interval) { $pageNav = new \XoopsPageNav($nbAudios, $audiosPerPage, $start, 'start', 'uid=' . $this->uidOwner); - $navBar = $pageNav->renderImageNav($interval); + $navBar = $pageNav->renderImageNav($interval); return $navBar; } diff --git a/class/AudioHandler.php b/class/AudioHandler.php index bc28ed65..044e9640 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -88,15 +88,15 @@ public function insert(\XoopsObject $yogurtAudio, $force = false) if ($yogurtAudio->isNew()) { // ajout/modification d'un yogurt_audio $yogurtAudio = new Audio(); - $format = 'INSERT INTO %s (audio_id, title, author, url, uid_owner, data_creation, data_update)'; - $format .= ' VALUES (%u, %s, %s, %s, %u, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now); - $force = true; + $format = 'INSERT INTO %s (audio_id, title, author, url, uid_owner, data_creation, data_update)'; + $format .= ' VALUES (%u, %s, %s, %s, %u, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'audio_id=%u, title=%s, author=%s, url=%s, uid_owner=%u, data_creation=%s, data_update=%s'; $format .= ' WHERE audio_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now, $audio_id); + $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now, $audio_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -143,14 +143,14 @@ public function delete(\XoopsObject $yogurtAudio, $force = false) * retrieve yogurt_audios from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link yogurt_audio} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_audio'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -223,7 +223,7 @@ public function deleteAll($criteria = null) * @param string $title A litle description of the file * @param string $path_upload The path to where the file should be uploaded * @param string $author the author of the music or audio file - * @param $maxfilebytes + * @param $maxfilebytes * @return bool FALSE if upload fails or database fails */ public function receiveAudio($title, $path_upload, $author, $maxfilebytes) @@ -237,7 +237,7 @@ public function receiveAudio($title, $path_upload, $author, $maxfilebytes) // mimetypes and settings put this in admin part later $allowed_mimetypes = ['audio/mp3', 'audio/x-mp3', 'audio/mpeg']; - $maxfilesize = $maxfilebytes; + $maxfilesize = $maxfilebytes; // create the object to upload $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize); @@ -255,7 +255,7 @@ public function receiveAudio($title, $path_upload, $author, $maxfilebytes) // now let s create a new object audio and set its variables //echo "passei aqui"; $audio = $this->create(); - $url = $uploader->getSavedFileName(); + $url = $uploader->getSavedFileName(); $audio->setVar('url', $url); $audio->setVar('title', $title); $audio->setVar('author', $author); @@ -263,7 +263,7 @@ public function receiveAudio($title, $path_upload, $author, $maxfilebytes) $audio->setVar('uid_owner', $uid); $this->insert($audio); $saved_destination = $uploader->getSavedDestination(); - //print_r($_FILES); + //print_r($_FILES); } else { echo '

' . $uploader->getErrors() . '

'; diff --git a/class/Configs.php b/class/Configs.php index 56c8e60d..2cd8fcc3 100644 --- a/class/Configs.php +++ b/class/Configs.php @@ -58,7 +58,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs') . ' WHERE config_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -77,8 +77,8 @@ public function load($id) */ public function getAllyogurt_configss($criteria = [], $asobject = false, $sort = 'config_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -90,13 +90,13 @@ public function getAllyogurt_configss($criteria = [], $asobject = false, $sort = $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT config_id FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT config_id FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_configs_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_configs') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index 6c2689c9..590ec77d 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -87,9 +87,9 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) if ($yogurt_configs->isNew()) { // ajout/modification d'un Configs $yogurt_configs = new Configs(); - $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, Notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; - $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %s)'; - $sql = sprintf( + $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, Notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; + $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %s)'; + $sql = sprintf( $format, $this->db->prefix('yogurt_configs'), $config_id, @@ -108,12 +108,12 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) $this->db->quoteString($backup_email), $this->db->quoteString($end_suspension) ); - $force = true; + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'config_id=%u, config_uid=%u, pictures=%u, audio=%u, videos=%u, tribes=%u, Notes=%u, friends=%u, profile_contact=%u, profile_general=%u, profile_stats=%u, suspension=%u, backup_password=%s, backup_email=%s, end_suspension=%s'; $format .= ' WHERE config_id = %u'; - $sql = sprintf( + $sql = sprintf( $format, $this->db->prefix('yogurt_configs'), $config_id, @@ -179,14 +179,14 @@ public function delete(\XoopsObject $yogurt_configs, $force = false) * retrieve yogurt_configss from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Configs} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_configs'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { diff --git a/class/ControllerConfigs.php b/class/ControllerConfigs.php index cf9c34cb..7b4bfe90 100644 --- a/class/ControllerConfigs.php +++ b/class/ControllerConfigs.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerFriends.php b/class/ControllerFriends.php index eb1604a6..dac8adce 100644 --- a/class/ControllerFriends.php +++ b/class/ControllerFriends.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerIndex.php b/class/ControllerIndex.php index f98520c6..eb2c1590 100644 --- a/class/ControllerIndex.php +++ b/class/ControllerIndex.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index 738c8ff1..c25f0fef 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerPhotos.php b/class/ControllerPhotos.php index a2c35855..dc781192 100644 --- a/class/ControllerPhotos.php +++ b/class/ControllerPhotos.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerTribes.php b/class/ControllerTribes.php index 61c888f1..ab526bfc 100644 --- a/class/ControllerTribes.php +++ b/class/ControllerTribes.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/Friendpetition.php b/class/Friendpetition.php index 8e354cca..d1271f54 100644 --- a/class/Friendpetition.php +++ b/class/Friendpetition.php @@ -46,7 +46,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition') . ' WHERE friendpet_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -65,8 +65,8 @@ public function load($id) */ public function getAllyogurt_friendpetitions($criteria = [], $asobject = false, $sort = 'friendpet_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -78,13 +78,13 @@ public function getAllyogurt_friendpetitions($criteria = [], $asobject = false, $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT friendpet_id FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT friendpet_id FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_friendpetition_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendpetition') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index bde14397..1f467caa 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $yogurt_friendpetition, $force = false) if ($yogurt_friendpetition->isNew()) { // ajout/modification d'un Friendpetition $yogurt_friendpetition = new Friendpetition(); - $format = 'INSERT INTO %s (friendpet_id, petitioner_uid, petioned_uid)'; - $format .= 'VALUES (%u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid); - $force = true; + $format = 'INSERT INTO %s (friendpet_id, petitioner_uid, petioned_uid)'; + $format .= 'VALUES (%u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'friendpet_id=%u, petitioner_uid=%u, petioned_uid=%u'; $format .= ' WHERE friendpet_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid, $friendpet_id); + $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid, $friendpet_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $yogurt_friendpetition, $force = false) * retrieve yogurt_friendpetitions from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Friendpetition} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendpetition'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { diff --git a/class/Friendship.php b/class/Friendship.php index 0424aad8..2c2f6599 100644 --- a/class/Friendship.php +++ b/class/Friendship.php @@ -58,7 +58,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship') . ' WHERE friendship_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -77,8 +77,8 @@ public function load($id) */ public function getAllyogurt_friendships($criteria = [], $asobject = false, $sort = 'friendship_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -90,13 +90,13 @@ public function getAllyogurt_friendships($criteria = [], $asobject = false, $sor $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT friendship_id FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT friendship_id FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_friendship_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_friendship') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index efd03f43..d69669c2 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -94,15 +94,15 @@ public function insert(\XoopsObject $yogurt_friendship, $force = false) if ($yogurt_friendship->isNew()) { // ajout/modification d'un Friendship $yogurt_friendship = new Friendship(); - $format = 'INSERT INTO %s (friendship_id, friend1_uid, friend2_uid, LEVEL, hot, trust, cool, fan)'; - $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan); - $force = true; + $format = 'INSERT INTO %s (friendship_id, friend1_uid, friend2_uid, LEVEL, hot, trust, cool, fan)'; + $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'friendship_id=%u, friend1_uid=%u, friend2_uid=%u, level=%u, hot=%u, trust=%u, cool=%u, fan=%u'; $format .= ' WHERE friendship_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan, $friendship_id); + $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan, $friendship_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -149,14 +149,14 @@ public function delete(\XoopsObject $yogurt_friendship, $force = false) * retrieve yogurt_friendships from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Friendship} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_friendship'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -231,9 +231,9 @@ public function deleteAll($criteria = null) */ public function getFriends($nbfriends, $criteria = null, $shuffle = 1) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, friend2_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); + $sql = 'SELECT uname, user_avatar, friend2_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack @@ -246,12 +246,12 @@ public function getFriends($nbfriends, $criteria = null, $shuffle = 1) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid'] = $myrow['friend2_uid']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid'] = $myrow['friend2_uid']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; $i++; } @@ -272,9 +272,9 @@ public function getFriends($nbfriends, $criteria = null, $shuffle = 1) */ public function getFans($nbfriends, $criteria = null, $shuffle = 1) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, friend1_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); + $sql = 'SELECT uname, user_avatar, friend1_uid FROM ' . $this->db->prefix('yogurt_friendship') . ', ' . $this->db->prefix('users'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack @@ -287,12 +287,12 @@ public function getFans($nbfriends, $criteria = null, $shuffle = 1) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid'] = $myrow['friend1_uid']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid'] = $myrow['friend1_uid']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; $i++; } @@ -314,12 +314,12 @@ public function renderFormSubmit($friend) /** * criteria fetch friendship to be edited */ - $criteria_friend1 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); - $criteria_friend2 = new \Criteria('friend2_uid', $friend->getVar('uid')); + $criteria_friend1 = new \Criteria('friend1_uid', $xoopsUser->getVar('uid')); + $criteria_friend2 = new \Criteria('friend2_uid', $friend->getVar('uid')); $criteria_friendship = new \CriteriaCompo($criteria_friend1); $criteria_friendship->add($criteria_friend2); $friendships = $this->getObjects($criteria_friendship); - $friendship = $friendships[0]; + $friendship = $friendships[0]; $form = new \XoopsThemeForm(_MD_YOGURT_EDITFRIENDSHIP, 'form_editfriendship', 'editfriendship.php', 'post', true); //$field_friend_avatar = new XoopsFormLabel(_MD_YOGURT_PHOTO, "getVar('user_avatar').">"); @@ -355,9 +355,9 @@ public function renderFormSubmit($friend) $field_friend_cool->addOption('3', '' . _MD_YOGURT_COOLALOT . ''); $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPDATEFRIEND, 'submit'); - $field_friend_friendid = new \XoopsFormHidden('friend_uid', $friend->getVar('uid')); - $field_friend_marker = new \XoopsFormHidden('marker', '1'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPDATEFRIEND, 'submit'); + $field_friend_friendid = new \XoopsFormHidden('friend_uid', $friend->getVar('uid')); + $field_friend_marker = new \XoopsFormHidden('marker', '1'); $field_friend_friendshio_id = new \XoopsFormHidden('friendship_id', $friendship->getVar('friendship_id')); $form->addElement($field_friend_friendid); $form->addElement($field_friend_friendshio_id); @@ -385,38 +385,38 @@ public function getMoyennes($user_uid) { global $xoopsUser; - $vetor = []; - $vetor['mediahot'] = 0; + $vetor = []; + $vetor['mediahot'] = 0; $vetor['mediatrust'] = 0; - $vetor['mediacool'] = 0; - $vetor['sumfan'] = 0; + $vetor['mediacool'] = 0; + $vetor['sumfan'] = 0; //Calculating avg(hot) - $sql = 'SELECT friend2_uid, Avg(hot) AS mediahot FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (hot>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $sql = 'SELECT friend2_uid, Avg(hot) AS mediahot FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (hot>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; $result = $this->db->query($sql); while (false !== ($myrow = $this->db->fetchArray($result))) { $vetor['mediahot'] = $myrow['mediahot'] * 16; } //Calculating avg(trust) - $sql = 'SELECT friend2_uid, Avg(trust) AS mediatrust FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (trust>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $sql = 'SELECT friend2_uid, Avg(trust) AS mediatrust FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (trust>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; $result = $this->db->query($sql); while (false !== ($myrow = $this->db->fetchArray($result))) { $vetor['mediatrust'] = $myrow['mediatrust'] * 16; } //Calculating avg(cool) - $sql = 'SELECT friend2_uid, Avg(cool) AS mediacool FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' WHERE (cool>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $sql = 'SELECT friend2_uid, Avg(cool) AS mediacool FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' WHERE (cool>0) GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; $result = $this->db->query($sql); while (false !== ($myrow = $this->db->fetchArray($result))) { $vetor['mediacool'] = $myrow['mediacool'] * 16; } //Calculating sum(fans) - $sql = 'SELECT friend2_uid, Sum(fan) AS sumfan FROM ' . $this->db->prefix('yogurt_friendship'); - $sql .= ' GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; + $sql = 'SELECT friend2_uid, Sum(fan) AS sumfan FROM ' . $this->db->prefix('yogurt_friendship'); + $sql .= ' GROUP BY friend2_uid HAVING (friend2_uid=' . $user_uid . ') '; $result = $this->db->query($sql); while (false !== ($myrow = $this->db->fetchArray($result))) { $vetor['sumfan'] = $myrow['sumfan']; diff --git a/class/Helper.php b/class/Helper.php index 3fc50308..4ec4291c 100644 --- a/class/Helper.php +++ b/class/Helper.php @@ -33,7 +33,7 @@ class Helper extends \Xmf\Module\Helper */ public function __construct($debug = false) { - $this->debug = $debug; + $this->debug = $debug; $moduleDirName = basename(dirname(__DIR__)); parent::__construct($moduleDirName); } @@ -77,9 +77,9 @@ public function getHandler($name) throw new \RuntimeException("Class '$class' not found"); } /** @var \XoopsMySQLDatabase $db */ - $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $db = \XoopsDatabaseFactory::getDatabaseConnection(); $helper = self::getInstance(); - $ret = new $class($db, $helper); + $ret = new $class($db, $helper); $this->addLog("Getting handler '{$name}'"); return $ret; diff --git a/class/Image.php b/class/Image.php index 2369072b..801ba9f0 100644 --- a/class/Image.php +++ b/class/Image.php @@ -75,7 +75,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images') . ' WHERE cod_img=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -94,8 +94,8 @@ public function load($id) */ public function getAllyogurt_imagess($criteria = [], $asobject = false, $sort = 'cod_img', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -107,13 +107,13 @@ public function getAllyogurt_imagess($criteria = [], $asobject = false, $sort = $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT cod_img FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT cod_img FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_images_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_images') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 2c2e4254..23e6e0f0 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -112,9 +112,9 @@ public function insert(\XoopsObject $yogurt_images, $force = false) if ($yogurt_images->isNew()) { // ajout/modification d'un Image $yogurt_images = new Image(); - $format = 'INSERT INTO %s (cod_img, title, data_creation, data_update, uid_owner, url, private)'; - $format .= 'VALUES (%u, %s, %s, %s, %s, %s, 0)'; - $sql = sprintf( + $format = 'INSERT INTO %s (cod_img, title, data_creation, data_update, uid_owner, url, private)'; + $format .= 'VALUES (%u, %s, %s, %s, %s, %s, 0)'; + $sql = sprintf( $format, $this->db->prefix('yogurt_images'), $cod_img, @@ -124,12 +124,12 @@ public function insert(\XoopsObject $yogurt_images, $force = false) $this->db->quoteString($uid_owner), $this->db->quoteString($url) ); - $force = true; + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'cod_img=%u, title=%s, data_creation=%s, data_update=%s, uid_owner=%s, url=%s, private=%s'; $format .= ' WHERE cod_img = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_images'), $cod_img, $this->db->quoteString($title), $now, $now, $this->db->quoteString($uid_owner), $this->db->quoteString($url), $this->db->quoteString($private), $cod_img); + $sql = sprintf($format, $this->db->prefix('yogurt_images'), $cod_img, $this->db->quoteString($title), $now, $now, $this->db->quoteString($uid_owner), $this->db->quoteString($url), $this->db->quoteString($private), $cod_img); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -176,14 +176,14 @@ public function delete(\XoopsObject $yogurt_images, $force = false) * retrieve yogurt_imagess from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Image} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_images'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -261,11 +261,11 @@ public function deleteAll($criteria = null) */ public function renderFormSubmit($maxbytes, $xoopsTpl) { - $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_PIC_TITLE, 'form_picture', 'submit.php', 'post', true); - $field_url = new \XoopsFormFile(_MD_YOGURT_SELECT_PHOTO, 'sel_photo', 2000000); + $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_PIC_TITLE, 'form_picture', 'submit.php', 'post', true); + $field_url = new \XoopsFormFile(_MD_YOGURT_SELECT_PHOTO, 'sel_photo', 2000000); $field_desc = new \XoopsFormText(_MD_YOGURT_CAPTION, 'caption', 35, 55); $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADPICTURE, 'submit'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADPICTURE, 'submit'); $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); $form->addElement($field_warning); $form->addElement($field_url, true); @@ -286,18 +286,18 @@ public function renderFormSubmit($maxbytes, $xoopsTpl) * * @param string $caption The description of the picture * @param int $cod_img the id of the image in database - * @param string $filename the url to the thumb of the image so it can be displayed + * @param string $filename the url to the thumb of the image so it can be displayed * @return bool TRUE */ public function renderFormEdit($caption, $cod_img, $filename) { - $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdesc.php', 'post', true); + $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdesc.php', 'post', true); $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); $field_warning = new \XoopsFormLabel("sssss"); $field_cod_img = new \XoopsFormHidden('cod_img', $cod_img); - $field_marker = new \XoopsFormHidden('marker', 1); + $field_marker = new \XoopsFormHidden('marker', 1); $form->addElement($field_warning); $form->addElement($field_desc); $form->addElement($field_cod_img); @@ -313,13 +313,13 @@ public function renderFormEdit($caption, $cod_img, $filename) * * @param string $title A litle description of the file * @param string $path_upload The path to where the file should be uploaded - * @param int $thumbwidth the width in pixels that the thumbnail will have - * @param int $thumbheight the height in pixels that the thumbnail will have - * @param int $pictwidth the width in pixels that the pic will have - * @param int $pictheight the height in pixels that the pic will have - * @param int $maxfilebytes the maximum size a file can have to be uploaded in bytes - * @param int $maxfilewidth the maximum width in pixels that a pic can have - * @param int $maxfileheight the maximum height in pixels that a pic can have + * @param int $thumbwidth the width in pixels that the thumbnail will have + * @param int $thumbheight the height in pixels that the thumbnail will have + * @param int $pictwidth the width in pixels that the pic will have + * @param int $pictheight the height in pixels that the pic will have + * @param int $maxfilebytes the maximum size a file can have to be uploaded in bytes + * @param int $maxfilewidth the maximum width in pixels that a pic can have + * @param int $maxfileheight the maximum height in pixels that a pic can have * @return bool FALSE if upload fails or database fails */ public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $maxfilebytes, $maxfilewidth, $maxfileheight) @@ -333,7 +333,7 @@ public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, // mimetypes and settings put this in admin part later $allowed_mimetypes = ['image/jpeg', 'image/pjpeg']; - $maxfilesize = $maxfilebytes; + $maxfilesize = $maxfilebytes; // create the object to upload $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); @@ -351,7 +351,7 @@ public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, } // now let s create a new object picture and set its variables $picture = $this->create(); - $url = $uploader->getSavedFileName(); + $url = $uploader->getSavedFileName(); $picture->setVar('url', $url); $picture->setVar('title', $title); $picture->setVar('private', 0); @@ -376,17 +376,17 @@ public function receivePicture($title, $path_upload, $thumbwidth, $thumbheight, * Resize a picture and save it to $path_upload * * @param string $img the path to the file - * @param int $thumbwidth the width in pixels that the thumbnail will have - * @param int $thumbheight the height in pixels that the thumbnail will have - * @param int $pictwidth the width in pixels that the pic will have - * @param int $pictheight the height in pixels that the pic will have + * @param int $thumbwidth the width in pixels that the thumbnail will have + * @param int $thumbheight the height in pixels that the thumbnail will have + * @param int $pictwidth the width in pixels that the pic will have + * @param int $pictheight the height in pixels that the pic will have * @param string $path_upload The path to where the files should be saved after resizing */ public function resizeImage($img, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $path_upload) { - $img2 = $img; - $path = pathinfo($img); - $img = imagecreatefromjpeg($img); + $img2 = $img; + $path = pathinfo($img); + $img = imagecreatefromjpeg($img); $xratio = $thumbwidth / imagesx($img); $yratio = $thumbheight / imagesy($img); @@ -404,8 +404,8 @@ public function resizeImage($img, $thumbwidth, $thumbheight, $pictwidth, $picthe } imagedestroy($img); - $path2 = pathinfo($img2); - $img2 = imagecreatefromjpeg($img2); + $path2 = pathinfo($img2); + $img2 = imagecreatefromjpeg($img2); $xratio2 = $pictwidth / imagesx($img2); $yratio2 = $pictheight / imagesy($img2); if ($xratio2 < 1 || $yratio2 < 1) { @@ -434,13 +434,13 @@ public function getLastPictures($limit) $sql = 'SELECT uname, t.uid_owner, t.url FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); - $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; + $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; $result = $this->db->query($sql, $limit, 0); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid_voted'] = $myrow['uid_owner']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid_voted'] = $myrow['uid_owner']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['url']; $i++; } @@ -458,15 +458,15 @@ public function getLastPicturesForBlock($limit) $sql = 'SELECT uname, t.uid_owner, t.url, t.title FROM ' . $this->db->prefix('yogurt_images') . ' AS t, ' . $this->db->prefix('users'); - $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; + $sql .= ' WHERE uid_owner = uid AND private=0 ORDER BY cod_img DESC'; $result = $this->db->query($sql, $limit, 0); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid_voted'] = $myrow['uid_owner']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid_voted'] = $myrow['uid_owner']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['img_filename'] = $myrow['url']; - $vetor[$i]['caption'] = $myrow['title']; + $vetor[$i]['caption'] = $myrow['title']; $i++; } @@ -478,15 +478,15 @@ public function getLastPicturesForBlock($limit) * Resize a picture and save it to $path_upload * * @param string $img the path to the file - * @param $width - * @param $height + * @param $width + * @param $height * @param string $path_upload The path to where the files should be saved after resizing */ public function makeAvatar($img, $width, $height, $path_upload) { - $img2 = $img; - $path = pathinfo($img); - $img = imagecreatefromjpeg($img); + $img2 = $img; + $path = pathinfo($img); + $img = imagecreatefromjpeg($img); $xratio = $thumbwidth / imagesx($img); $yratio = $thumbheight / imagesy($img); @@ -504,8 +504,8 @@ public function makeAvatar($img, $width, $height, $path_upload) } imagedestroy($img); - $path2 = pathinfo($img2); - $img2 = imagecreatefromjpeg($img2); + $path2 = pathinfo($img2); + $img2 = imagecreatefromjpeg($img2); $xratio2 = $pictwidth / imagesx($img2); $yratio2 = $pictheight / imagesy($img2); if ($xratio2 < 1 || $yratio2 < 1) { diff --git a/class/Ishot.php b/class/Ishot.php index 8e01bee0..d40eb44d 100644 --- a/class/Ishot.php +++ b/class/Ishot.php @@ -63,7 +63,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot') . ' WHERE cod_ishot=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -82,8 +82,8 @@ public function load($id) */ public function getAllyogurt_ishots($criteria = [], $asobject = false, $sort = 'cod_ishot', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -95,13 +95,13 @@ public function getAllyogurt_ishots($criteria = [], $asobject = false, $sort = ' $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT cod_ishot FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT cod_ishot FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_ishot_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_ishot') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/IshotHandler.php b/class/IshotHandler.php index 681e834e..adfa4e7d 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -102,15 +102,15 @@ public function insert(\XoopsObject $yogurt_ishot, $force = false) if ($yogurt_ishot->isNew()) { // ajout/modification d'un Ishot $yogurt_ishot = new Ishot(); - $format = 'INSERT INTO %s (cod_ishot, uid_voter, uid_voted, ishot, DATE)'; - $format .= 'VALUES (%u, %u, %u, %u, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date)); - $force = true; + $format = 'INSERT INTO %s (cod_ishot, uid_voter, uid_voted, ishot, DATE)'; + $format .= 'VALUES (%u, %u, %u, %u, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'cod_ishot=%u, uid_voter=%u, uid_voted=%u, ishot=%u, date=%s'; $format .= ' WHERE cod_ishot = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date), $cod_ishot); + $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date), $cod_ishot); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -162,9 +162,9 @@ public function delete(\XoopsObject $yogurt_ishot, $force = false) */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_ishot'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -253,12 +253,12 @@ public function getHottest($criteria = null) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['qtd'] = $myrow['qtd']; - $vetor[$i]['uid_voted'] = $myrow['uid_voted']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['qtd'] = $myrow['qtd']; + $vetor[$i]['uid_voted'] = $myrow['uid_voted']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; $i++; } @@ -273,9 +273,9 @@ public function getHottest($criteria = null) */ public function getHotFriends($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT uname, user_avatar, uid_voted FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); + $sql = 'SELECT uname, user_avatar, uid_voted FROM ' . $this->db->prefix('yogurt_ishot') . ', ' . $this->db->prefix('users'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack @@ -287,11 +287,11 @@ public function getHotFriends($criteria = null, $id_as_key = false) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid_voted'] = $myrow['uid_voted']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid_voted'] = $myrow['uid_voted']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; $i++; } diff --git a/class/Notes.php b/class/Notes.php index c25d4f65..713bff31 100644 --- a/class/Notes.php +++ b/class/Notes.php @@ -50,7 +50,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -69,8 +69,8 @@ public function load($id) */ public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'Note_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -82,13 +82,13 @@ public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = ' $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT Note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT Note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_Notes_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/NotesHandler.php b/class/NotesHandler.php index bc37e280..53a82698 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -88,9 +88,9 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) if ($yogurt_Notes->isNew()) { // ajout/modification d'unNotes $yogurt_Notes = new Notes(); - $format = 'INSERT INTO %s (Note_id, Note_text, Note_from, Note_to, private)'; - $format .= 'VALUES (%u, %s, %u, %u, %u)'; - $sql = sprintf( + $format = 'INSERT INTO %s (Note_id, Note_text, Note_from, Note_to, private)'; + $format .= 'VALUES (%u, %s, %u, %u, %u)'; + $sql = sprintf( $format, $this->db->prefix('yogurt_Notes'), $Note_id, @@ -99,12 +99,12 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) $Note_to, $private ); - $force = true; + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'Note_id=%u, Note_text=%s, Note_from=%u, Note_to=%u, private=%u'; $format .= ' WHERE Note_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $Note_id, $this->db->quoteString($Note_text), $Note_from, $Note_to, $private, $Note_id); + $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $Note_id, $this->db->quoteString($Note_text), $Note_from, $Note_to, $private, $Note_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -156,9 +156,9 @@ public function delete(\XoopsObject $yogurt_Notes, $force = false) */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -233,8 +233,8 @@ public function deleteAll($criteria = null) public function getNotes($nbNotes, $criteria) { $myts = new \MyTextSanitizer(); - $ret = []; - $sql = 'SELECT Note_id, uid, uname, user_avatar, Note_from, Note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); + $ret = []; + $sql = 'SELECT Note_id, uid, uname, user_avatar, Note_from, Note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack @@ -246,16 +246,16 @@ public function getNotes($nbNotes, $criteria) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['uid'] = $myrow['uid']; - $vetor[$i]['uname'] = $myrow['uname']; + $vetor[$i]['uid'] = $myrow['uid']; + $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $temptext = $myts->xoopsCodeDecode($myrow['Note_text'], 1); - $vetor[$i]['text'] = $myts->nl2Br($temptext); - $vetor[$i]['id'] = $myrow['Note_id']; + $temptext = $myts->xoopsCodeDecode($myrow['Note_text'], 1); + $vetor[$i]['text'] = $myts->nl2Br($temptext); + $vetor[$i]['id'] = $myrow['Note_id']; $i++; } diff --git a/class/Reltribeuser.php b/class/Reltribeuser.php index 9c1b3bc2..5a8f3366 100644 --- a/class/Reltribeuser.php +++ b/class/Reltribeuser.php @@ -46,7 +46,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser') . ' WHERE rel_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -65,8 +65,8 @@ public function load($id) */ public function getAllyogurt_reltribeusers($criteria = [], $asobject = false, $sort = 'rel_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -78,13 +78,13 @@ public function getAllyogurt_reltribeusers($criteria = [], $asobject = false, $s $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT rel_id FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT rel_id FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_reltribeuser_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_reltribeuser') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index 86edd1c5..0c2bc6d2 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $yogurt_reltribeuser, $force = false) if ($yogurt_reltribeuser->isNew()) { // ajout/modification d'un Reltribeuser $yogurt_reltribeuser = new Reltribeuser(); - $format = 'INSERT INTO %s (rel_id, rel_tribe_id, rel_user_uid)'; - $format .= 'VALUES (%u, %u, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid); - $force = true; + $format = 'INSERT INTO %s (rel_id, rel_tribe_id, rel_user_uid)'; + $format .= 'VALUES (%u, %u, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'rel_id=%u, rel_tribe_id=%u, rel_user_uid=%u'; $format .= ' WHERE rel_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid, $rel_id); + $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid, $rel_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $yogurt_reltribeuser, $force = false) * retrieve yogurt_reltribeusers from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Reltribeuser} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_reltribeuser'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -238,15 +238,15 @@ public function getTribes($nbtribes, $criteria = null, $shuffle = 1) $start = $criteria->getStart(); $result = $this->db->query($sql, $limit, $start); - $vetor = []; - $i = 0; + $vetor = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $vetor[$i]['title'] = $myrow['tribe_title']; - $vetor[$i]['desc'] = $myrow['tribe_desc']; - $vetor[$i]['img'] = $myrow['tribe_img']; - $vetor[$i]['id'] = $myrow['rel_id']; - $vetor[$i]['uid'] = $myrow['owner_uid']; + $vetor[$i]['title'] = $myrow['tribe_title']; + $vetor[$i]['desc'] = $myrow['tribe_desc']; + $vetor[$i]['img'] = $myrow['tribe_img']; + $vetor[$i]['id'] = $myrow['rel_id']; + $vetor[$i]['uid'] = $myrow['owner_uid']; $vetor[$i]['tribe_id'] = $myrow['rel_tribe_id']; $i++; @@ -276,14 +276,14 @@ public function getUsersFromTribe($tribeId, $start, $nbUsers, $isShuffle = 0) $sql .= ' WHERE rel_user_uid = uid AND rel_tribe_id = tribe_id AND tribe_id =' . $tribeId . ' GROUP BY rel_user_uid '; $result = $this->db->query($sql, $nbUsers, $start); - $ret = []; - $i = 0; + $ret = []; + $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $ret[$i]['uid'] = $myrow['uid']; - $ret[$i]['uname'] = $myrow['uname']; - $ret[$i]['avatar'] = $myrow['user_avatar']; - $isOwner = ($myrow['rel_user_uid'] == $myrow['owner_uid']) ? 1 : 0; + $ret[$i]['uid'] = $myrow['uid']; + $ret[$i]['uname'] = $myrow['uname']; + $ret[$i]['avatar'] = $myrow['user_avatar']; + $isOwner = ($myrow['rel_user_uid'] == $myrow['owner_uid']) ? 1 : 0; $ret[$i]['isOwner'] = $isOwner; $i++; } diff --git a/class/Seutubo.php b/class/Seutubo.php index 3dbfd942..a92adf02 100644 --- a/class/Seutubo.php +++ b/class/Seutubo.php @@ -56,7 +56,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -75,8 +75,8 @@ public function load($id) */ public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = 'video_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -88,13 +88,13 @@ public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_seutubo_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/SeutuboHandler.php b/class/SeutuboHandler.php index 40dc1949..9fb6a0ea 100644 --- a/class/SeutuboHandler.php +++ b/class/SeutuboHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $yogurt_seutubo, $force = false) if ($yogurt_seutubo->isNew()) { // ajout/modification d'un Seutubo $yogurt_seutubo = new Seutubo(); - $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; - $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); - $force = true; + $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; + $format .= 'VALUES (%u, %u, %s, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'video_id=%u, uid_owner=%u, video_desc=%s, youtube_code=%s, main_video=%s'; $format .= ' WHERE video_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); + $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $yogurt_seutubo, $force = false) * retrieve yogurt_seutubos from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Seutubo} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -226,7 +226,7 @@ public function deleteAll($criteria = null) */ public function renderFormSubmit($xoopsTpl) { - $form = new \XoopsThemeForm(_MD_YOGURT_ADDFAVORITEVIDEOS, 'form_videos', 'video_submited.php', 'post', true); + $form = new \XoopsThemeForm(_MD_YOGURT_ADDFAVORITEVIDEOS, 'form_videos', 'video_submited.php', 'post', true); $field_code = new \XoopsFormText(_MD_YOGURT_YOUTUBECODE, 'codigo', 50, 250); $field_desc = new \XoopsFormTextArea(_MD_YOGURT_CAPTION, 'caption'); $form->setExtra('enctype="multipart/form-data"'); @@ -252,16 +252,16 @@ public function renderFormSubmit($xoopsTpl) * * @param string $caption The description of the picture * @param int $cod_img the id of the image in database - * @param string $filename the url to the thumb of the image so it can be displayed + * @param string $filename the url to the thumb of the image so it can be displayed * @return bool TRUE */ public function renderFormEdit($caption, $cod_img, $filename) { - $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdescvideo.php', 'post', true); + $form = new \XoopsThemeForm(_MD_YOGURT_EDITDESC, 'form_picture', 'editdescvideo.php', 'post', true); $field_desc = new \XoopsFormText($caption, 'caption', 35, 55); $form->setExtra('enctype="multipart/form-data"'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); - $field_warning = new \XoopsFormLabel( + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_SUBMIT, 'submit'); + $field_warning = new \XoopsFormLabel( ' @@ -269,7 +269,7 @@ public function renderFormEdit($caption, $cod_img, $filename) ' ); $field_video_id = new \XoopsFormHidden('video_id', $cod_img); - $field_marker = new \XoopsFormHidden('marker', 1); + $field_marker = new \XoopsFormHidden('marker', 1); $form->addElement($field_warning); $form->addElement($field_desc); $form->addElement($field_video_id, true); diff --git a/class/Suspensions.php b/class/Suspensions.php index b4b04e58..55186261 100644 --- a/class/Suspensions.php +++ b/class/Suspensions.php @@ -48,7 +48,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions') . ' WHERE uid=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -67,8 +67,8 @@ public function load($id) */ public function getAllyogurt_suspensionss($criteria = [], $asobject = false, $sort = 'uid', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -80,13 +80,13 @@ public function getAllyogurt_suspensionss($criteria = [], $asobject = false, $so $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT uid FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT uid FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_suspensions_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_suspensions') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index 0f047df2..934ae21f 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $suspensions, $force = false) if ($suspensions->isNew()) { // ajout/modification d'un Suspensions $suspensions = new Suspensions(); - $format = 'INSERT INTO %s (uid, old_pass, old_email, old_signature, suspension_time)'; - $format .= 'VALUES (%u, %s, %s, %s, %u)'; - $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time); - $force = true; + $format = 'INSERT INTO %s (uid, old_pass, old_email, old_signature, suspension_time)'; + $format .= 'VALUES (%u, %s, %s, %s, %u)'; + $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'uid=%u, old_pass=%s, old_email=%s, old_signature=%s, suspension_time=%u'; $format .= ' WHERE uid = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time, $uid); + $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time, $uid); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $suspensions, $force = false) * retrieve yogurt_suspensionss from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Suspensions} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_suspensions'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { diff --git a/class/Tribes.php b/class/Tribes.php index 15386afe..308e119c 100644 --- a/class/Tribes.php +++ b/class/Tribes.php @@ -57,7 +57,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes') . ' WHERE tribe_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -76,8 +76,8 @@ public function load($id) */ public function getAllyogurt_tribess($criteria = [], $asobject = false, $sort = 'tribe_id', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -89,13 +89,13 @@ public function getAllyogurt_tribess($criteria = [], $asobject = false, $sort = $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT tribe_id FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT tribe_id FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_tribes_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_tribes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/TribesHandler.php b/class/TribesHandler.php index e2ca81bd..43acd146 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $yogurt_tribes, $force = false) if ($yogurt_tribes->isNew()) { // ajout/modification d'un Tribes $yogurt_tribes = new Tribes(); - $format = 'INSERT INTO %s (tribe_id, owner_uid, tribe_title, tribe_desc, tribe_img)'; - $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img)); - $force = true; + $format = 'INSERT INTO %s (tribe_id, owner_uid, tribe_title, tribe_desc, tribe_img)'; + $format .= 'VALUES (%u, %u, %s, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'tribe_id=%u, owner_uid=%u, tribe_title=%s, tribe_desc=%s, tribe_img=%s'; $format .= ' WHERE tribe_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img), $tribe_id); + $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img), $tribe_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $yogurt_tribes, $force = false) * retrieve yogurt_tribess from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Tribes} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -180,14 +180,14 @@ public function &getObjects($criteria = null, $id_as_key = false) * retrieve yogurt_tribess from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Tribes} objects */ public function getTribes($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_tribes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -203,11 +203,11 @@ public function getTribes($criteria = null, $id_as_key = false) $i = 0; while (false !== ($myrow = $this->db->fetchArray($result))) { - $ret[$i]['id'] = $myrow['tribe_id']; + $ret[$i]['id'] = $myrow['tribe_id']; $ret[$i]['title'] = $myrow['tribe_title']; - $ret[$i]['img'] = $myrow['tribe_img']; - $ret[$i]['desc'] = $myrow['tribe_desc']; - $ret[$i]['uid'] = $myrow['owner_uid']; + $ret[$i]['img'] = $myrow['tribe_img']; + $ret[$i]['desc'] = $myrow['tribe_desc']; + $ret[$i]['uid'] = $myrow['owner_uid']; $i++; } @@ -264,11 +264,11 @@ public function renderFormSubmit($maxbytes, $xoopsTpl) $form = new \XoopsThemeForm(_MD_YOGURT_SUBMIT_TRIBE, 'form_tribe', 'submit_tribe.php', 'post', true); $form->setExtra('enctype="multipart/form-data"'); - $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'tribe_img', $maxbytes); - $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'tribe_title', 35, 55); - $field_desc = new \XoopsFormText(_MD_YOGURT_TRIBE_DESC, 'tribe_desc', 35, 55); - $field_marker = new \XoopsFormHidden('marker', '1'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); + $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'tribe_img', $maxbytes); + $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'tribe_title', 35, 55); + $field_desc = new \XoopsFormText(_MD_YOGURT_TRIBE_DESC, 'tribe_desc', 35, 55); + $field_marker = new \XoopsFormHidden('marker', '1'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); $form->addElement($field_warning); @@ -293,12 +293,12 @@ public function renderFormEdit($tribe, $maxbytes) $form = new \XoopsThemeForm(_MD_YOGURT_EDIT_TRIBE, 'form_edittribe', 'edittribe.php', 'post', true); $form->setExtra('enctype="multipart/form-data"'); $field_tribeid = new \XoopsFormHidden('tribe_id', $tribe->getVar('tribe_id')); - $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'img', $maxbytes); + $field_url = new \XoopsFormFile(_MD_YOGURT_TRIBE_IMAGE, 'img', $maxbytes); $field_url->setExtra('style="visibility:hidden;"'); - $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'title', 35, 55, $tribe->getVar('tribe_title')); - $field_desc = new \XoopsFormTextArea(_MD_YOGURT_TRIBE_DESC, 'desc', $tribe->getVar('tribe_desc')); - $field_marker = new \XoopsFormHidden('marker', '1'); - $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); + $field_title = new \XoopsFormText(_MD_YOGURT_TRIBE_TITLE, 'title', 35, 55, $tribe->getVar('tribe_title')); + $field_desc = new \XoopsFormTextArea(_MD_YOGURT_TRIBE_DESC, 'desc', $tribe->getVar('tribe_desc')); + $field_marker = new \XoopsFormHidden('marker', '1'); + $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPLOADTRIBE, 'submit'); $field_warning = new \XoopsFormLabel(sprintf(_MD_YOGURT_YOUCANUPLOAD, $maxbytes / 1024)); $field_oldpicture = new \XoopsFormLabel(_MD_YOGURT_TRIBE_IMAGE, ''); @@ -368,7 +368,7 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload if (1 == $change_img) { // mimetypes and settings put this in admin part later $allowed_mimetypes = ['image/jpeg', 'image/pjpeg']; - $maxfilesize = $maxfilebytes; + $maxfilesize = $maxfilebytes; // create the object to upload $uploader = new \XoopsMediaUploader($path_upload, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); @@ -387,9 +387,9 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload } // now let s create a new object picture and set its variables - $url = $uploader->getSavedFileName(); + $url = $uploader->getSavedFileName(); $saved_destination = $uploader->getSavedDestination(); - $image_name = $this->resizeImage2($saved_destination, 125, 80, $path_upload); + $image_name = $this->resizeImage2($saved_destination, 125, 80, $path_upload); $tribe->setVar('tribe_img', $image_name); } else { echo '

' . $uploader->getErrors() . '

'; @@ -410,15 +410,15 @@ public function receiveTribe($tribe_title, $tribe_desc, $tribe_img, $path_upload /** * Resize a picture and save it to $path_upload * - * @param $img_path - * @param int $thumbwidth the width in pixels that the thumbnail will have - * @param int $thumbheight the height in pixels that the thumbnail will have + * @param $img_path + * @param int $thumbwidth the width in pixels that the thumbnail will have + * @param int $thumbheight the height in pixels that the thumbnail will have * @param string $path_upload The path to where the files should be saved after resizing */ public function resizeImage($img_path, $thumbwidth, $thumbheight, $path_upload) { - $path = pathinfo($img_path); - $img = imagecreatefromjpeg($img_path); + $path = pathinfo($img_path); + $img = imagecreatefromjpeg($img_path); $xratio = $thumbwidth / imagesx($img); $yratio = $thumbheight / imagesy($img); @@ -452,25 +452,25 @@ public function resizeImage2($img_path, $thumbwidth, $thumbheight, $path_upload) global $xoopsUser, $xoopsModule; $path = pathinfo($img_path); - $img = imagecreatefromjpeg($img_path); + $img = imagecreatefromjpeg($img_path); if (imagesx($img) < 128) { $x1 = (128 - imagesx($img)) / 2; $x2 = 0; - $w = imagesx($img); + $w = imagesx($img); } else { $x1 = 0; $x2 = (imagesx($img) - 128) / 2; - $w = 125; + $w = 125; } if (imagesy($img) < 80) { $y1 = (80 - imagesy($img)) / 2; $y2 = 0; - $h = imagesy($img); + $h = imagesy($img); } else { $y1 = 0; $y2 = (imagesy($img) - 80) / 2; - $h = 80; + $h = 80; } $xratio = $thumbwidth / imagesx($img); @@ -478,7 +478,7 @@ public function resizeImage2($img_path, $thumbwidth, $thumbheight, $path_upload) $resized = imagecreatefromgif('images/tribetemplate.gif'); - $imagem = imagecopymerge($resized, $img, $x1, $y1, $x2, $y2, $w, $h, 90); + $imagem = imagecopymerge($resized, $img, $x1, $y1, $x2, $y2, $w, $h, 90); $gif_name = 'tribe_' . $xoopsUser->getVar('uid') . mt_rand(1000000, 9999999) . '.gif'; imagegif($resized, $path_upload . '/' . $gif_name); imagedestroy($resized); diff --git a/class/VideoController.php b/class/VideoController.php index 1a6feb7e..6473f3c8 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** @@ -91,9 +91,9 @@ public function assignVideoContent($nbVideos, $videos) */ $i = 0; foreach ($videos as $video) { - $videos_array[$i]['url'] = $video->getVar('youtube_code', 's'); + $videos_array[$i]['url'] = $video->getVar('youtube_code', 's'); $videos_array[$i]['desc'] = $video->getVar('video_desc', 's'); - $videos_array[$i]['id'] = $video->getVar('video_id', 's'); + $videos_array[$i]['id'] = $video->getVar('video_id', 's'); $i++; } @@ -107,11 +107,13 @@ public function assignVideoContent($nbVideos, $videos) * @param int $videosPerPage the number of videos in a page * @param int $start at which position of the array we start * @param int $interval how many pages between the first link and the next one + * @return string|null + * @return string|null */ public function VideosNavBar($nbVideos, $videosPerPage, $start, $interval) { $pageNav = new \XoopsPageNav($nbVideos, $videosPerPage, $start, 'start', 'uid=' . $this->uidOwner); - $navBar = $pageNav->renderImageNav($interval); + $navBar = $pageNav->renderImageNav($interval); return $navBar; } diff --git a/class/Visitors.php b/class/Visitors.php index 8aa8be44..0b90672e 100644 --- a/class/Visitors.php +++ b/class/Visitors.php @@ -47,7 +47,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors') . ' WHERE cod_visit=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors') . ' WHERE cod_visit=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -66,8 +66,8 @@ public function load($id) */ public function getAllyogurt_visitorss($criteria = [], $asobject = false, $sort = 'cod_visit', $order = 'ASC', $limit = 0, $start = 0) { - $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $ret = []; + $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $ret = []; $where_query = ''; if (is_array($criteria) && count($criteria) > 0) { $where_query = ' WHERE'; @@ -79,13 +79,13 @@ public function getAllyogurt_visitorss($criteria = [], $asobject = false, $sort $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT cod_visit FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT cod_visit FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_visitors_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_visitors') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new static($myrow); diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index c239adf3..0a41cfa2 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -87,15 +87,15 @@ public function insert(\XoopsObject $yogurt_visitors, $force = false) if ($yogurt_visitors->isNew()) { // ajout/modification d'un Yogurt\Visitors $yogurt_visitors = new Visitors(); - $format = 'INSERT INTO %s (cod_visit, uid_owner, uid_visitor,uname_visitor)'; - $format .= 'VALUES (%u, %u, %u, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor)); - $force = true; + $format = 'INSERT INTO %s (cod_visit, uid_owner, uid_visitor,uname_visitor)'; + $format .= 'VALUES (%u, %u, %u, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'cod_visit=%u, uid_owner=%u, uid_visitor=%u, uname_visitor=%s '; $format .= ' WHERE cod_visit = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor), $cod_visit); + $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor), $cod_visit); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -142,14 +142,14 @@ public function delete(\XoopsObject $yogurt_visitors, $force = false) * retrieve yogurt_visitorss from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met - * @param bool $id_as_key use the UID as key for the array? + * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Yogurt\Visitors} objects */ public function &getObjects($criteria = null, $id_as_key = false) { - $ret = []; + $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_visitors'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -201,7 +201,7 @@ public function getCount($criteria = null) * delete yogurt_visitorss matching a set of conditions * * @param \CriteriaElement $criteria {@link \CriteriaElement} - * @param bool $force + * @param bool $force * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null, $force = false) diff --git a/class/YogurtControler.php b/class/YogurtControler.php index 4e22e130..423b0c80 100644 --- a/class/YogurtControler.php +++ b/class/YogurtControler.php @@ -22,7 +22,7 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once '../../class/pagenav.php'; +include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ @@ -38,7 +38,7 @@ //include_once 'class/Configs.php'; //include_once 'class/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once 'class/class.Id3v1.php'; + include_once __DIR__ . '/class.Id3v1.php'; } /** @@ -78,12 +78,12 @@ class YogurtController extends \XoopsObject */ public function __construct($db, $user) { - $this->db = $db; - $this->user = $user; - $this->isOwner = 0; + $this->db = $db; + $this->user = $user; + $this->isOwner = 0; $this->isAnonym = 1; $this->isFriend = 0; - $this->isUser = 0; + $this->isUser = 0; $this->createFactories(); $this->getPermissions(); $this->checkPrivilege(''); @@ -95,7 +95,7 @@ public function checkSuspension() $criteria_suspended = new \Criteria('uid', $this->uidOwner); if (1 == $this->isSuspended) { $suspensions = $this->suspensionsFactory->getObjects($criteria_suspended); - $suspension = $suspensions[0]; + $suspension = $suspensions[0]; if (time() > $suspension->getVar('suspension_time')) { $suspension = $this->suspensionsFactory->create(false); $suspension->load($this->uidOwner); @@ -140,7 +140,7 @@ public function getPermissions() */ if (!empty($_GET['uid'])) { $memberHandler = xoops_getHandler('member'); - $user = $memberHandler->getUser((int)$_GET['uid']); + $user = $memberHandler->getUser((int)$_GET['uid']); if (!is_object($user)) { redirect_header('index.php', 3, _MD_YOGURT_USERDOESNTEXIST); } @@ -152,28 +152,28 @@ public function getPermissions() */ if (empty($this->user)) { $this->isAnonym = 1; - $this->isUser = 0; + $this->isUser = 0; if (!empty($_GET['uid'])) { $this->uidOwner = (int)$_GET['uid']; } else { $this->uidOwner = 1; - $this->isOwner = 0; + $this->isOwner = 0; } } else { $this->isAnonym = 0; - $this->isUser = 1; + $this->isUser = 1; if (!empty($_GET['uid'])) { $this->uidOwner = (int)$_GET['uid']; - $this->isOwner = ($this->user->getVar('uid') == (int)$_GET['uid']) ? 1 : 0; + $this->isOwner = ($this->user->getVar('uid') == (int)$_GET['uid']) ? 1 : 0; } else { $this->uidOwner = $this->user->getVar('uid'); - $this->isOwner = 1; + $this->isOwner = 1; } } - $this->owner = new \XoopsUser($this->uidOwner); + $this->owner = new \XoopsUser($this->uidOwner); $criteria_suspended = new \Criteria('uid', $this->uidOwner); $this->isSuspended = ($this->suspensionsFactory->getCount($criteria_suspended) > 0) ? 1 : 0; @@ -217,23 +217,23 @@ public function getPermissions() */ public function getNumbersSections() { - $criteriaTribes = new \Criteria('rel_user_uid', $this->uidOwner); + $criteriaTribes = new \Criteria('rel_user_uid', $this->uidOwner); $nbSections['nbTribes'] = $this->reltribeusersFactory->getCount($criteriaTribes); - $criteriaUid = new \Criteria('uid_owner', $this->uidOwner); - $criteriaAlbum = new \CriteriaCompo($criteriaUid); + $criteriaUid = new \Criteria('uid_owner', $this->uidOwner); + $criteriaAlbum = new \CriteriaCompo($criteriaUid); if (0 == $this->isOwner) { $criteriaPrivate = new \Criteria('private', 0); $criteriaAlbum->add($criteriaPrivate); } - $nbSections['nbPhotos'] = $this->albumFactory->getCount($criteriaAlbum); - $criteriaFriends = new \Criteria('friend1_uid', $this->uidOwner); + $nbSections['nbPhotos'] = $this->albumFactory->getCount($criteriaAlbum); + $criteriaFriends = new \Criteria('friend1_uid', $this->uidOwner); $nbSections['nbFriends'] = $this->friendshipsFactory->getCount($criteriaFriends); - $criteriaUidAudio = new \Criteria('uid_owner', $this->uidOwner); - $nbSections['nbAudio'] = $this->audioFactory->getCount($criteriaUidAudio); - $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); - $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); - $criteriaUidNotes = new \Criteria('Note_to', $this->uidOwner); - $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); + $criteriaUidAudio = new \Criteria('uid_owner', $this->uidOwner); + $nbSections['nbAudio'] = $this->audioFactory->getCount($criteriaUidAudio); + $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); + $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); + $criteriaUidNotes = new \Criteria('Note_to', $this->uidOwner); + $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); return $nbSections; } @@ -243,17 +243,17 @@ public function getNumbersSections() */ public function createFactories() { - $this->albumFactory = new ImageHandler($this->db); - $this->visitorsFactory = new VisitorsHandler($this->db); - $this->audioFactory = new AudioHandler($this->db); - $this->videosFactory = new SeutuboHandler($this->db); - $this->petitionsFactory = new FriendpetitionHandler($this->db); - $this->friendshipsFactory = new FriendshipHandler($this->db); + $this->albumFactory = new ImageHandler($this->db); + $this->visitorsFactory = new VisitorsHandler($this->db); + $this->audioFactory = new AudioHandler($this->db); + $this->videosFactory = new SeutuboHandler($this->db); + $this->petitionsFactory = new FriendpetitionHandler($this->db); + $this->friendshipsFactory = new FriendshipHandler($this->db); $this->reltribeusersFactory = new ReltribeuserHandler($this->db); - $this->NotesFactory = new NotesHandler($this->db); - $this->tribesFactory = new TribesHandler($this->db); - $this->configsFactory = new ConfigsHandler($this->db); - $this->suspensionsFactory = new SuspensionsHandler($this->db); + $this->NotesFactory = new NotesHandler($this->db); + $this->tribesFactory = new TribesHandler($this->db); + $this->configsFactory = new ConfigsHandler($this->db); + $this->suspensionsFactory = new SuspensionsHandler($this->db); } /** diff --git a/class/class.Id3v1.php b/class/class.Id3v1.php index 2627be75..8e567dc8 100644 --- a/class/class.Id3v1.php +++ b/class/class.Id3v1.php @@ -254,10 +254,8 @@ class Id3v1 * Checks if the parameters are valid and then gets ID3 tags, if there * are some. * - * @param resource stream - * @param bool $readOnly * @param mixed $filename - * @throws \Exception + * @param bool $readOnly * @see $_tags */ public function __construct($filename, $readOnly = false) @@ -419,8 +417,8 @@ public function getId3v1Version() * Sets the Id3v1 version, which will be used * * @param string $version The version you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see self::ID3V1_1 * @see self::ID3V1_0 */ @@ -450,8 +448,8 @@ public function setId3v1Version($version) * the method itself also accepts longer terms. * * @param string $title The title you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setTitle($title) @@ -476,8 +474,8 @@ public function setTitle($title) * the method itself also accepts longer terms. * * @param string $artist The artist you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setArtist($artist) @@ -502,8 +500,8 @@ public function setArtist($artist) * the method itself also accepts longer terms. * * @param string $album The album you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setAlbum($album) @@ -530,8 +528,8 @@ public function setAlbum($album) * The method itselfs takes also longer terms. * * @param string $comment The comment you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setComment($comment) @@ -555,8 +553,8 @@ public function setComment($comment) * You can either use the genre id, or the genre name. * * @param string|int $genre The genre you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setGenre($genre) @@ -580,8 +578,8 @@ public function setGenre($genre) * Sets the year * * @param int $year The year you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags */ public function setYear($year) @@ -607,8 +605,8 @@ public function setYear($year) * ID3V1_0 you have to set it manually after calling this method. * * @param int $track The tracl you want to set - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags * @see setId3v1Version() * @see getId3v1Version() @@ -621,7 +619,7 @@ public function setTrack($track) if (is_int($track) && 0 != $track) { $this->_tags['track'] = $track; - $this->_version = self::ID3V1_1; + $this->_version = self::ID3V1_1; } else { throw new \RuntimeException('Track type invalid or zero'); } @@ -644,13 +642,13 @@ public function clearAllTags() } $this->_tags['marking'] = 'TAG'; - $this->_tags['title'] = ''; - $this->_tags['artist'] = ''; - $this->_tags['album'] = ''; - $this->_tags['year'] = null; + $this->_tags['title'] = ''; + $this->_tags['artist'] = ''; + $this->_tags['album'] = ''; + $this->_tags['year'] = null; $this->_tags['comment'] = ''; - $this->_tags['track'] = null; - $this->_tags['genre'] = 255; + $this->_tags['track'] = null; + $this->_tags['genre'] = 255; return $this; } @@ -706,8 +704,8 @@ public static function getGenreList() * This method saves the set tags to the file. Therefore it seeks to * the end of the file and writes the Id3v1 bytestream to it. * - * @throws \Exception * @return Id3v1 Implements fluent interface + * @throws \Exception * @see $_tags * @see setTitle() * @see setArtist() @@ -761,8 +759,8 @@ public function save() * * * @param string $name - * @throws \Exception * @return mixed Depends on tag, which will be returned + * @throws \Exception */ public function __get($name) { @@ -801,8 +799,8 @@ public function __get($name) * * @param string $name * @param string $value - * @throws \Exception * @return mixed Depends on tag + * @throws \Exception */ public function __set($name, $value) { diff --git a/class/common/Configurator.php b/class/common/Configurator.php index 480ce4af..e1baec20 100644 --- a/class/common/Configurator.php +++ b/class/common/Configurator.php @@ -29,15 +29,15 @@ class Configurator { public $name; - public $paths = []; - public $uploadFolders = []; - public $copyBlankFiles = []; + public $paths = []; + public $uploadFolders = []; + public $copyBlankFiles = []; public $copyTestFolders = []; public $templateFolders = []; - public $oldFiles = []; - public $oldFolders = []; - public $renameTables = []; - public $moduleStats = []; + public $oldFiles = []; + public $oldFolders = []; + public $renameTables = []; + public $moduleStats = []; public $modCopyright; public $icons; @@ -54,17 +54,17 @@ public function __construct() $config = include dirname(dirname(__DIR__)) . '/config/config.php'; - $this->name = $config->name; - $this->paths = $config->paths; - $this->uploadFolders = $config->uploadFolders; - $this->copyBlankFiles = $config->copyBlankFiles; + $this->name = $config->name; + $this->paths = $config->paths; + $this->uploadFolders = $config->uploadFolders; + $this->copyBlankFiles = $config->copyBlankFiles; $this->copyTestFolders = $config->copyTestFolders; $this->templateFolders = $config->templateFolders; - $this->oldFiles = $config->oldFiles; - $this->oldFolders = $config->oldFolders; - $this->renameTables = $config->renameTables; - $this->moduleStats = $config->moduleStats; - $this->modCopyright = $config->modCopyright; + $this->oldFiles = $config->oldFiles; + $this->oldFolders = $config->oldFolders; + $this->renameTables = $config->renameTables; + $this->moduleStats = $config->moduleStats; + $this->modCopyright = $config->modCopyright; $this->icons = include dirname(dirname(__DIR__)) . '/config/icons.php'; $this->paths = include dirname(dirname(__DIR__)) . '/config/paths.php'; diff --git a/class/common/DirectoryChecker.php b/class/common/DirectoryChecker.php index 363c3d35..e9490474 100644 --- a/class/common/DirectoryChecker.php +++ b/class/common/DirectoryChecker.php @@ -19,13 +19,14 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @author Xoops Development Team */ + use Xmf\Request; use XoopsModules\Yogurt; //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; -$moduleDirName = basename(dirname(dirname(__DIR__))); +$moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('directorychecker', $moduleDirName); @@ -52,7 +53,7 @@ public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = n if (null === $redirectFile) { $redirectFile = $_SERVER['SCRIPT_NAME']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (!@is_dir($path)) { $path_status = ""; diff --git a/class/common/FileChecker.php b/class/common/FileChecker.php index bcd811ed..0f282b05 100644 --- a/class/common/FileChecker.php +++ b/class/common/FileChecker.php @@ -19,13 +19,14 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @author Xoops Development Team */ + use Xmf\Request; use XoopsModules\Yogurt; //defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php'; -$moduleDirName = basename(dirname(dirname(__DIR__))); +$moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('filechecker', $moduleDirName); @@ -51,7 +52,7 @@ public static function getFileStatus($file_path, $original_file_path, $redirectF if (null === $redirectFile) { $redirectFile = $_SERVER['SCRIPT_NAME']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $original_file_path) { if (self::fileExists($file_path)) { @@ -89,7 +90,7 @@ public static function getFileStatus($file_path, $original_file_path, $redirectF */ public static function copyFile($source_path, $destination_path) { - $source_path = str_replace('..', '', $source_path); + $source_path = str_replace('..', '', $source_path); $destination_path = str_replace('..', '', $destination_path); return @copy($source_path, $destination_path); diff --git a/class/common/FilesManagement.php b/class/common/FilesManagement.php index 3b2f19d0..ece50186 100644 --- a/class/common/FilesManagement.php +++ b/class/common/FilesManagement.php @@ -24,8 +24,8 @@ trait FilesManagement * * @param string $folder The full path of the directory to check * - * @throws \RuntimeException * @return void + * @throws \RuntimeException */ public static function createFolder($folder) { @@ -195,7 +195,7 @@ public static function rrmdir($src) foreach ($iterator as $fObj) { if ($fObj->isFile()) { $filename = $fObj->getPathname(); - $fObj = null; // clear this iterator object to close the file + $fObj = null; // clear this iterator object to close the file if (!unlink($filename)) { return false; // couldn't delete the file } diff --git a/class/common/Migrate.php b/class/common/Migrate.php index 4ac248bd..74452980 100644 --- a/class/common/Migrate.php +++ b/class/common/Migrate.php @@ -81,7 +81,7 @@ private function convertIPAddresses($tableName, $columnName) */ private function moveDoColumns() { - $tableName = 'newbb_posts_text'; + $tableName = 'newbb_posts_text'; $srcTableName = 'newbb_posts'; if ($this->tableHandler->useTable($tableName) && $this->tableHandler->useTable($srcTableName)) { @@ -89,8 +89,8 @@ private function moveDoColumns() if (false === $attributes) { $this->synchronizeTable($tableName); $updateTable = $GLOBALS['xoopsDB']->prefix($tableName); - $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); - $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; + $joinTable = $GLOBALS['xoopsDB']->prefix($srcTableName); + $sql = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml, t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . ' , t1.doimage = t2.doimage, t1.dobr = t2.dobr'; $this->tableHandler->addToQueue($sql); } } diff --git a/class/common/ModuleFeedback.php b/class/common/ModuleFeedback.php index 269fb9b8..8aaeddae 100644 --- a/class/common/ModuleFeedback.php +++ b/class/common/ModuleFeedback.php @@ -28,10 +28,10 @@ */ class ModuleFeedback extends \XoopsObject { - public $name = ''; - public $email = ''; - public $site = ''; - public $type = ''; + public $name = ''; + public $email = ''; + public $site = ''; + public $type = ''; public $content = ''; /** @@ -67,7 +67,7 @@ public function getFormFeedback($action = false) if (false === $action) { $action = $_SERVER['REQUEST_URI']; } - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); // Get Theme Form xoops_load('XoopsFormLoader'); @@ -96,21 +96,21 @@ public function getFormFeedback($action = false) $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS')); $form->addElement($fbtypeSelect, true); - $editorConfigs = []; - $editorConfigs['name'] = 'fb_content'; - $editorConfigs['value'] = $this->content; - $editorConfigs['rows'] = 5; - $editorConfigs['cols'] = 40; - $editorConfigs['width'] = '100%'; + $editorConfigs = []; + $editorConfigs['name'] = 'fb_content'; + $editorConfigs['value'] = $this->content; + $editorConfigs['rows'] = 5; + $editorConfigs['cols'] = 40; + $editorConfigs['width'] = '100%'; $editorConfigs['height'] = '400px'; /** @var \XoopsModuleHandler $moduleHandler */ $moduleHandler = xoops_getHandler('module'); - $module = $moduleHandler->getByDirname('system'); + $module = $moduleHandler->getByDirname('system'); /** @var \XoopsConfigHandler $configHandler */ - $configHandler = xoops_getHandler('config'); - $config = $configHandler->getConfigsByCat(0, $module->getVar('mid')); + $configHandler = xoops_getHandler('config'); + $config = $configHandler->getConfigsByCat(0, $module->getVar('mid')); $editorConfigs['editor'] = $config['general_editor']; - $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); + $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); $form->addElement($editor, true); $form->addElement(new \XoopsFormHidden('op', 'send')); diff --git a/class/common/Resizer.php b/class/common/Resizer.php index 7d75cf7d..37c63978 100644 --- a/class/common/Resizer.php +++ b/class/common/Resizer.php @@ -24,16 +24,16 @@ */ class Resizer { - public $sourceFile = ''; - public $endFile = ''; - public $maxWidth = 0; - public $maxHeight = 0; + public $sourceFile = ''; + public $endFile = ''; + public $maxWidth = 0; + public $maxHeight = 0; public $imageMimetype = ''; - public $jpgQuality = 90; - public $mergeType = 0; - public $mergePos = 0; - public $degrees = 0; - public $error = ''; + public $jpgQuality = 90; + public $mergeType = 0; + public $mergePos = 0; + public $degrees = 0; + public $error = ''; /** * resize image if size exceed given width/height @@ -59,7 +59,7 @@ public function resizeImage() return 'Unsupported format'; } - $width = imagesx($img); + $width = imagesx($img); $height = imagesy($img); if ($width > $this->maxWidth || $height > $this->maxHeight) { @@ -68,16 +68,16 @@ public function resizeImage() if ($width < $this->maxWidth) { $new_width = $width; } else { - $new_width = $this->maxWidth; - $divisor = $width / $new_width; + $new_width = $this->maxWidth; + $divisor = $width / $new_width; $new_height = floor($height / $divisor); } } elseif ($height < $this->maxHeight) { $new_height = $height; } else { $new_height = $this->maxHeight; - $divisor = $height / $new_height; - $new_width = floor($width / $divisor); + $divisor = $height / $new_height; + $new_width = floor($width / $divisor); } // Create a new temporary image. @@ -139,19 +139,19 @@ public function resizeAndCrop() list($original_w, $original_h) = getimagesize($this->sourceFile); // RESIZE IMAGE AND PRESERVE PROPORTIONS - $max_width_resize = $this->maxWidth; + $max_width_resize = $this->maxWidth; $max_height_resize = $this->maxHeight; if ($original_w > $original_h) { $max_height_ratio = $this->maxHeight / $original_h; $max_width_resize = (int)round($original_w * $max_height_ratio); } else { - $max_width_ratio = $this->maxWidth / $original_w; + $max_width_ratio = $this->maxWidth / $original_w; $max_height_resize = (int)round($original_h * $max_width_ratio); } if ($max_width_resize < $this->maxWidth) { - $max_height_ratio = $this->maxWidth / $max_width_resize; + $max_height_ratio = $this->maxWidth / $max_width_resize; $max_height_resize = (int)round($this->maxHeight * $max_height_ratio); - $max_width_resize = $this->maxWidth; + $max_width_resize = $this->maxWidth; } // CREATE THE PROPORTIONAL IMAGE RESOURCE @@ -162,7 +162,7 @@ public function resizeAndCrop() // CREATE THE CENTERED CROPPED IMAGE TO THE SPECIFIED DIMENSIONS $final = imagecreatetruecolor($this->maxWidth, $this->maxHeight); - $max_width_offset = 0; + $max_width_offset = 0; $max_height_offset = 0; if ($this->maxWidth < $max_width_resize) { $max_width_offset = (int)round(($max_width_resize - $this->maxWidth) / 2); @@ -184,12 +184,12 @@ public function resizeAndCrop() public function mergeImage() { $dest = imagecreatefromjpeg($this->endFile); - $src = imagecreatefromjpeg($this->sourceFile); + $src = imagecreatefromjpeg($this->sourceFile); if (4 == $this->mergeType) { - $imgWidth = (int)round($this->maxWidth / 2 - 1); + $imgWidth = (int)round($this->maxWidth / 2 - 1); $imgHeight = (int)round($this->maxHeight / 2 - 1); - $posCol2 = (int)round($this->maxWidth / 2 + 1); - $posRow2 = (int)round($this->maxHeight / 2 + 1); + $posCol2 = (int)round($this->maxWidth / 2 + 1); + $posRow2 = (int)round($this->maxHeight / 2 + 1); switch ($this->mergePos) { case 1: imagecopy($dest, $src, 0, 0, 0, 0, $imgWidth, $imgHeight); //top left @@ -206,11 +206,11 @@ public function mergeImage() } } if (6 == $this->mergeType) { - $imgWidth = (int)round($this->maxWidth / 3 - 1); + $imgWidth = (int)round($this->maxWidth / 3 - 1); $imgHeight = (int)round($this->maxHeight / 2 - 1); - $posCol2 = (int)round($this->maxWidth / 3 + 1); - $posCol3 = $posCol2 + (int)round($this->maxWidth / 3 + 1); - $posRow2 = (int)round($this->maxHeight / 2 + 1); + $posCol2 = (int)round($this->maxWidth / 3 + 1); + $posCol3 = $posCol2 + (int)round($this->maxWidth / 3 + 1); + $posRow2 = (int)round($this->maxHeight / 2 + 1); switch ($this->mergePos) { case 1: diff --git a/class/common/ServerStats.php b/class/common/ServerStats.php index ac8d90fd..4936c0c1 100644 --- a/class/common/ServerStats.php +++ b/class/common/ServerStats.php @@ -26,7 +26,7 @@ trait ServerStats */ public static function getServerStats() { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('common', $moduleDirName); $html = ''; @@ -45,7 +45,7 @@ public static function getServerStats() $html .= '
    '; $gdlib = function_exists('gd_info') ? '' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '' : '' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . ''; - $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; + $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; if (function_exists('gd_info')) { if (true === ($gdlib = gd_info())) { $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '' . $gdlib['GD Version'] . ''; @@ -59,7 +59,7 @@ public static function getServerStats() // $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; $downloads = ini_get('file_uploads') ? '' . constant('CO_' . $moduleDirNameUpper . '_ON') . '' : '' . constant('CO_' . $moduleDirNameUpper . '_OFF') . ''; - $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; + $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' ' . ini_get('upload_max_filesize') . ''; $html .= '
  • ' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' ' . ini_get('post_max_size') . ''; diff --git a/class/common/SysUtility.php b/class/common/SysUtility.php index 952c2e8a..1b0b4a32 100644 --- a/class/common/SysUtility.php +++ b/class/common/SysUtility.php @@ -21,6 +21,7 @@ * @author ZySpec * @author Mamba */ + use XoopsModules\Yogurt\Helper; /** @@ -29,9 +30,11 @@ class SysUtility { use VersionChecks; + //checkVerXoops, checkVerPhp Traits use ServerStats; + // getServerStats Trait use FilesManagement; @@ -61,8 +64,8 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac // splits all html-tags to scanable lines preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER); $total_length = mb_strlen($ending); - $open_tags = []; - $truncate = ''; + $open_tags = []; + $truncate = ''; foreach ($lines as $line_matchings) { // if there is any html-tag in this line, handle it and add it (uncounted) to the output if (!empty($line_matchings[1])) { @@ -88,7 +91,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac $content_length = mb_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); if ($total_length + $content_length > $length) { // the number of characters which are left - $left = $length - $total_length; + $left = $length - $total_length; $entities_length = 0; // search for html entities if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { @@ -107,7 +110,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac // maximum lenght is reached, so get off the loop break; } - $truncate .= $line_matchings[2]; + $truncate .= $line_matchings[2]; $total_length += $content_length; // if the maximum length is reached, get off the loop @@ -151,12 +154,12 @@ public static function getEditor($helper = null, $options = null) { /** @var Helper $helper */ if (null === $options) { - $options = []; - $options['name'] = 'Editor'; - $options['value'] = 'Editor'; - $options['rows'] = 10; - $options['cols'] = '100%'; - $options['width'] = '100%'; + $options = []; + $options['name'] = 'Editor'; + $options['value'] = 'Editor'; + $options['rows'] = 10; + $options['cols'] = '100%'; + $options['width'] = '100%'; $options['height'] = '400px'; } diff --git a/class/common/VersionChecks.php b/class/common/VersionChecks.php index b6ade710..c5ad082f 100644 --- a/class/common/VersionChecks.php +++ b/class/common/VersionChecks.php @@ -23,12 +23,13 @@ trait VersionChecks * Verifies XOOPS version meets minimum requirements for this module * @static * + * @param \XoopsModule|null $module * @param null|string $requiredVer * @return bool true if meets requirements, false if not */ public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = null) { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $module) { $module = \XoopsModule::getByDirname($moduleDirName); @@ -55,11 +56,12 @@ public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = * Verifies PHP version meets minimum requirements for this module * @static * + * @param \XoopsModule|null $module * @return bool true if meets requirements, false if not */ public static function checkVerPhp(\XoopsModule $module = null) { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); if (null === $module) { $module = \XoopsModule::getByDirname($moduleDirName); @@ -94,12 +96,12 @@ public static function checkVerPhp(\XoopsModule $module = null) */ public static function checkVerModule($helper, $source = 'github', $default = 'master') { - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); - $update = ''; - $repository = 'XoopsModules25x/' . $moduleDirName; + $update = ''; + $repository = 'XoopsModules25x/' . $moduleDirName; // $repository = 'XoopsModules25x/publisher'; //for testing only - $ret = ''; + $ret = ''; $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; if ('github' === $source) { if (function_exists('curl_init') && false !== ($curlHandle = curl_init())) { @@ -113,10 +115,10 @@ public static function checkVerModule($helper, $source = 'github', $default = 'm } elseif (false !== mb_strpos($curlReturn, 'Not Found')) { trigger_error('Repository Not Found: ' . $infoReleasesUrl); } else { - $file = json_decode($curlReturn, false); + $file = json_decode($curlReturn, false); $latestVersionLink = sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default); - $latestVersion = $file[0]->tag_name; - $prerelease = $file[0]->prerelease; + $latestVersion = $file[0]->tag_name; + $prerelease = $file[0]->prerelease; if ('master' !== $latestVersionLink) { $update = constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion; } @@ -132,7 +134,7 @@ public static function checkVerModule($helper, $source = 'github', $default = 'm // $moduleVersion = '1.0'; //for testing only // $moduleDirName = 'publisher'; //for testing only if (!$prerelease && version_compare($moduleVersion, $latestVersion, '<')) { - $ret = []; + $ret = []; $ret[] = $update; $ret[] = $latestVersionLink; } diff --git a/class/common/breadcrumb.php b/class/common/breadcrumb.php index fd337fc5..720b20c6 100644 --- a/class/common/breadcrumb.php +++ b/class/common/breadcrumb.php @@ -27,6 +27,7 @@ * $breadcrumb->addLink( 'bread 3', 'index3.php' ); * echo $breadcrumb->render(); */ + use XoopsModules\Yogurt; use XoopsModules\Yogurt\Common; @@ -37,7 +38,7 @@ */ class Breadcrumb { - public $dirname; + public $dirname; private $bread = []; public function __construct() @@ -54,7 +55,7 @@ public function __construct() public function addLink($title = '', $link = '') { $this->bread[] = [ - 'link' => $link, + 'link' => $link, 'title' => $title, ]; } diff --git a/comment_new.php b/comment_new.php index ff30ef1d..34c892ca 100644 --- a/comment_new.php +++ b/comment_new.php @@ -20,6 +20,7 @@ /** * Xoops header */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -31,8 +32,8 @@ */ $tribe_id = $_GET['com_itemid']; $criteria = new \Criteria('tribe_id', $tribe_id); -$tribes = $controller->tribesFactory->getObjects($criteria); -$tribe = $tribes[0]; +$tribes = $controller->tribesFactory->getObjects($criteria); +$tribe = $tribes[0]; $com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0; if ($com_itemid > 0) { diff --git a/config/assigns.php b/config/assigns.php index 330a636a..b6fdf3d9 100644 --- a/config/assigns.php +++ b/config/assigns.php @@ -3,77 +3,77 @@ // defined('XOOPS_ROOT_PATH') || die('Restricted access'); $GLOBALS['myalbum_assign_globals'] = [ - 'lang_total' => _ALBM_CAPTION_TOTAL, - 'mod_url' => $mod_url, - 'mod_copyright' => $mod_copyright, - 'lang_latest_list' => _ALBM_LATESTLIST, - 'lang_descriptionc' => _ALBM_DESCRIPTIONC, - 'lang_lastupdatec' => _ALBM_LASTUPDATEC, - 'lang_submitter' => _ALBM_SUBMITTER, - 'lang_hitsc' => _ALBM_HITSC, - 'lang_commentsc' => _ALBM_COMMENTSC, - 'lang_new' => _ALBM_NEW, - 'lang_updated' => _ALBM_UPDATED, - 'lang_popular' => _ALBM_POPULAR, - 'lang_ratethisphoto' => _ALBM_RATETHISPHOTO, - 'lang_editthisphoto' => _ALBM_EDITTHISPHOTO, + 'lang_total' => _ALBM_CAPTION_TOTAL, + 'mod_url' => $mod_url, + 'mod_copyright' => $mod_copyright, + 'lang_latest_list' => _ALBM_LATESTLIST, + 'lang_descriptionc' => _ALBM_DESCRIPTIONC, + 'lang_lastupdatec' => _ALBM_LASTUPDATEC, + 'lang_submitter' => _ALBM_SUBMITTER, + 'lang_hitsc' => _ALBM_HITSC, + 'lang_commentsc' => _ALBM_COMMENTSC, + 'lang_new' => _ALBM_NEW, + 'lang_updated' => _ALBM_UPDATED, + 'lang_popular' => _ALBM_POPULAR, + 'lang_ratethisphoto' => _ALBM_RATETHISPHOTO, + 'lang_editthisphoto' => _ALBM_EDITTHISPHOTO, 'lang_deletethisphoto' => _ALBM_DELETE_THIS_PHOTO, - 'lang_guestname' => _ALBM_CAPTION_GUESTNAME, - 'lang_category' => _ALBM_CAPTION_CATEGORY, - 'lang_nomatch' => _ALBM_NOMATCH, - 'lang_directcatsel' => _ALBM_DIRECTCATSEL, - 'photos_url' => $photos_url, - 'thumbs_url' => $thumbs_url, - 'thumbsize' => $myalbum_thumbsize, - 'colsoftableview' => $myalbum_colsoftableview, - 'canrateview' => $GLOBALS['global_perms'] && GPERM_RATEVIEW, - 'canratevote' => $GLOBALS['global_perms'] && GPERM_RATEVOTE, + 'lang_guestname' => _ALBM_CAPTION_GUESTNAME, + 'lang_category' => _ALBM_CAPTION_CATEGORY, + 'lang_nomatch' => _ALBM_NOMATCH, + 'lang_directcatsel' => _ALBM_DIRECTCATSEL, + 'photos_url' => $photos_url, + 'thumbs_url' => $thumbs_url, + 'thumbsize' => $myalbum_thumbsize, + 'colsoftableview' => $myalbum_colsoftableview, + 'canrateview' => $GLOBALS['global_perms'] && GPERM_RATEVIEW, + 'canratevote' => $GLOBALS['global_perms'] && GPERM_RATEVOTE, ]; //Gnavi $gnavi_assign_globals = [ - 'mod_url' => $mod_url, - 'mod_copyright' => $mod_copyright, - 'lang_submitter' => _MD_GNAV_C_SUBMITTER, - 'lang_hitsc' => _MD_GNAV_C_RAT_HITSC, - 'lang_commentsc' => _MD_GNAV_CMT_COMMENTSC, - 'lang_new' => _MD_GNAV_C_NEW, - 'lang_updated' => _MD_GNAV_C_UPDATED, - 'lang_popular' => _MD_GNAV_C_POPULAR, + 'mod_url' => $mod_url, + 'mod_copyright' => $mod_copyright, + 'lang_submitter' => _MD_GNAV_C_SUBMITTER, + 'lang_hitsc' => _MD_GNAV_C_RAT_HITSC, + 'lang_commentsc' => _MD_GNAV_CMT_COMMENTSC, + 'lang_new' => _MD_GNAV_C_NEW, + 'lang_updated' => _MD_GNAV_C_UPDATED, + 'lang_popular' => _MD_GNAV_C_POPULAR, 'lang_ratethisphoto' => _MD_GNAV_RAT_RATETHISPHOTO, 'lang_editthisphoto' => _MD_GNAV_SMT_EDITITEM, - 'lang_guestname' => _GNAV_CAPTION_GUESTNAME, - 'lang_category' => _GNAV_CAPTION_CATEGORY, - 'lang_nomatch' => _MD_GNAV_MSG_NOMATCH, - 'lang_directcatsel' => _MD_GNAV_CAT_DIRECTCATSEL, - 'lang_markerlist' => _MD_GNAV_MAP_MARKERLIST, - 'lang_loading' => _MD_GNAV_MAP_LOADING, - 'lang_lat' => _MD_GNAV_MAP_LAT, - 'lang_lng' => _MD_GNAV_MAP_LNG, - 'lang_zoom' => _MD_GNAV_MAP_ZOOM, - 'lang_movepid' => _MD_GNAV_CAT_MOVE_PARENT, - 'photos_url' => $photos_url, - 'thumbs_url' => $thumbs_url, - 'thumbsize' => $gnavi_thumbsize, - 'colsoftableview' => $gnavi_colsoftableview, - 'colstbl_width' => $gnavi_colsoftableview ? 'width:' . (int)(100 / $gnavi_colsoftableview) . '%;' : '', - 'canrateview' => $global_perms & GNAV_GPERM_RATEVIEW, - 'canratevote' => $global_perms & GNAV_GPERM_RATEVOTE, - 'home' => _MD_GNAV_WEBTOP, - 'canvote' => $gnavi_usevote, - 'comment_dirname' => $gnavi_comment_dirname, - 'comment_forum_id' => $gnavi_comment_forum_id, - 'comment_view' => $gnavi_comment_view, - 'mydirname' => $mydirname, - 'am_cat_edit' => $isadmin ? _MD_GNAV_CAT_EDIT : '', - 'lang_itemlist' => _MD_GNAV_CAT_ITEMLIST, - 'lang_url' => _MD_GNAV_ITM_URL, - 'lang_tel' => _MD_GNAV_ITM_TEL, - 'lang_fax' => _MD_GNAV_ITM_FAX, - 'lang_zip' => _MD_GNAV_ITM_ZIP, - 'lang_address' => _MD_GNAV_ITM_ADDRESS, - 'lang_map' => _MD_GNAV_MAP, - 'lang_readmore' => _MD_GNAV_NAV_READMORE, - 'lang_print' => _MD_GNAV_ITM_PRINT, - 'lang_top_link' => sprintf(_MD_GNAV_MOBILE_TOP, $xoopsModule->getVar('name')), + 'lang_guestname' => _GNAV_CAPTION_GUESTNAME, + 'lang_category' => _GNAV_CAPTION_CATEGORY, + 'lang_nomatch' => _MD_GNAV_MSG_NOMATCH, + 'lang_directcatsel' => _MD_GNAV_CAT_DIRECTCATSEL, + 'lang_markerlist' => _MD_GNAV_MAP_MARKERLIST, + 'lang_loading' => _MD_GNAV_MAP_LOADING, + 'lang_lat' => _MD_GNAV_MAP_LAT, + 'lang_lng' => _MD_GNAV_MAP_LNG, + 'lang_zoom' => _MD_GNAV_MAP_ZOOM, + 'lang_movepid' => _MD_GNAV_CAT_MOVE_PARENT, + 'photos_url' => $photos_url, + 'thumbs_url' => $thumbs_url, + 'thumbsize' => $gnavi_thumbsize, + 'colsoftableview' => $gnavi_colsoftableview, + 'colstbl_width' => $gnavi_colsoftableview ? 'width:' . (int)(100 / $gnavi_colsoftableview) . '%;' : '', + 'canrateview' => $global_perms & GNAV_GPERM_RATEVIEW, + 'canratevote' => $global_perms & GNAV_GPERM_RATEVOTE, + 'home' => _MD_GNAV_WEBTOP, + 'canvote' => $gnavi_usevote, + 'comment_dirname' => $gnavi_comment_dirname, + 'comment_forum_id' => $gnavi_comment_forum_id, + 'comment_view' => $gnavi_comment_view, + 'mydirname' => $mydirname, + 'am_cat_edit' => $isadmin ? _MD_GNAV_CAT_EDIT : '', + 'lang_itemlist' => _MD_GNAV_CAT_ITEMLIST, + 'lang_url' => _MD_GNAV_ITM_URL, + 'lang_tel' => _MD_GNAV_ITM_TEL, + 'lang_fax' => _MD_GNAV_ITM_FAX, + 'lang_zip' => _MD_GNAV_ITM_ZIP, + 'lang_address' => _MD_GNAV_ITM_ADDRESS, + 'lang_map' => _MD_GNAV_MAP, + 'lang_readmore' => _MD_GNAV_NAV_READMORE, + 'lang_print' => _MD_GNAV_ITM_PRINT, + 'lang_top_link' => sprintf(_MD_GNAV_MOBILE_TOP, $xoopsModule->getVar('name')), ]; diff --git a/config/config.php b/config/config.php index 3a120531..e8d1d88c 100644 --- a/config/config.php +++ b/config/config.php @@ -16,20 +16,20 @@ * @since * @author XOOPS Development Team */ -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); return (object)[ - 'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator', - 'paths' => [ - 'dirname' => $moduleDirName, - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, + 'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator', + 'paths' => [ + 'dirname' => $moduleDirName, + 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', + 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, + 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, + 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, ], - 'uploadFolders' => [ + 'uploadFolders' => [ XOOPS_UPLOAD_PATH . '/' . $moduleDirName, XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category', XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots', @@ -58,7 +58,7 @@ // '/templates/blocks/', // '/templates/admin/' ], - 'oldFiles' => [ + 'oldFiles' => [ '/class/request.php', '/class/registry.php', '/class/utilities.php', @@ -67,7 +67,7 @@ // '/include/functions.php', '/ajaxrating.txt', ], - 'oldFolders' => [ + 'oldFolders' => [ '/images', '/css', '/js', @@ -76,7 +76,7 @@ 'renameTables' => [// 'XX_archive' => 'ZZZZ_archive', ], - 'moduleStats' => [ + 'moduleStats' => [ // 'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1), // 'totalitems' => $helper->getHandler('Item')->getItemsCount(), // 'totalsubmitted' => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]), diff --git a/config/icons.php b/config/icons.php index 777c5249..58c688b7 100644 --- a/config/icons.php +++ b/config/icons.php @@ -1,19 +1,19 @@ mb_strtoupper($moduleDirName) . ' IconConfigurator', + 'name' => mb_strtoupper($moduleDirName) . ' IconConfigurator', 'icons' => [ - 'edit' => " . _EDIT . ", - 'delete' => "" . _DELETE . "", - 'clone' => "" . _CLONE . "", + 'edit' => " . _EDIT . ", + 'delete' => "" . _DELETE . "", + 'clone' => "" . _CLONE . "", 'preview' => "" . _PREVIEW . "", - 'print' => "" . _CLONE . "", - 'pdf' => "" . _CLONE . "", - 'add' => "" . _ADD . "", - '0' => "" . 0 . "", - '1' => "" . 1 . "", + 'print' => "" . _CLONE . "", + 'pdf' => "" . _CLONE . "", + 'add' => "" . _ADD . "", + '0' => "" . 0 . "", + '1' => "" . 1 . "", ], ]; diff --git a/config/imageconfig.php b/config/imageconfig.php index c7781fd2..ad820e6f 100644 --- a/config/imageconfig.php +++ b/config/imageconfig.php @@ -1,50 +1,50 @@ 'imageConfigs', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', + 'name' => 'imageConfigs', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', - 'formtype' => 'line_break', - 'valuetype' => 'textbox', - 'default' => 'head', + 'formtype' => 'line_break', + 'valuetype' => 'textbox', + 'default' => 'head', ]; $modversion['config'][] = [ - 'name' => 'imageWidth', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', + 'name' => 'imageWidth', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 1200, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 1200, ]; // =1024/16 $modversion['config'][] = [ - 'name' => 'imageHeight', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', + 'name' => 'imageHeight', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 800, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 800, ]; // =768/16 $modversion['config'][] = [ - 'name' => 'imageFilesize', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', + 'name' => 'imageFilesize', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 2000000, + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 2000000, ]; // =768/16 $modversion['config'][] = [ - 'name' => 'imageUploadPath', - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', + 'name' => 'imageUploadPath', + 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'default' => 'uploads/' . $modversion['dirname'] . '/images', + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'default' => 'uploads/' . $modversion['dirname'] . '/images', ]; diff --git a/config/paths.php b/config/paths.php index 8d4252ae..7e9cc933 100644 --- a/config/paths.php +++ b/config/paths.php @@ -1,17 +1,17 @@ mb_strtoupper($moduleDirName) . ' PathConfigurator', - 'paths' => [ - 'dirname' => $moduleDirName, - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, + 'name' => mb_strtoupper($moduleDirName) . ' PathConfigurator', + 'paths' => [ + 'dirname' => $moduleDirName, + 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', + 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, + 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, + 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, ], 'uploadFolders' => [ XOOPS_UPLOAD_PATH . '/' . $moduleDirName, diff --git a/configs.php b/configs.php index 64d00ae1..f9bafa9f 100644 --- a/configs.php +++ b/configs.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_configs.tpl'; @@ -38,14 +39,14 @@ $criteria = new \Criteria('config_uid', $uid); if ($configsFactory->getCount($criteria) > 0) { $configs = $configsFactory->getObjects($criteria); - $config = $configs[0]; - - $pic = $config->getVar('pictures'); - $aud = $config->getVar('audio'); - $vid = $config->getVar('videos'); - $tri = $config->getVar('tribes'); - $scr = $config->getVar('Notes'); - $fri = $config->getVar('friends'); + $config = $configs[0]; + + $pic = $config->getVar('pictures'); + $aud = $config->getVar('audio'); + $vid = $config->getVar('videos'); + $tri = $config->getVar('tribes'); + $scr = $config->getVar('Notes'); + $fri = $config->getVar('friends'); $pcon = $config->getVar('profile_contact'); $pgen = $config->getVar('profile_general'); $psta = $config->getVar('profile_stats'); diff --git a/delaudio.php b/delaudio.php index 61046a99..27417e47 100644 --- a/delaudio.php +++ b/delaudio.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -37,13 +38,13 @@ */ $audioFactory = new Yogurt\AudioHandler($xoopsDB); $criteria_aud = new \Criteria('audio_id', $cod_audio); - $uid = (int)$xoopsUser->getVar('uid'); + $uid = (int)$xoopsUser->getVar('uid'); $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_aud); + $criteria = new \CriteriaCompo($criteria_aud); $criteria->add($criteria_uid); $objects_array = $audioFactory->getObjects($criteria); - $audio_name = $objects_array[0]->getVar('url'); + $audio_name = $objects_array[0]->getVar('url'); /** * Try to delete diff --git a/delete_scrap.php b/delete_scrap.php index eab2c772..ec7f580c 100644 --- a/delete_scrap.php +++ b/delete_scrap.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -35,9 +36,9 @@ * The user must be the owner */ $criteria_Note_id = new \Criteria('Note_id', $Note_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('Note_to', $uid); - $criteria = new \CriteriaCompo($criteria_Note_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('Note_to', $uid); + $criteria = new \CriteriaCompo($criteria_Note_id); $criteria->add($criteria_uid); /** diff --git a/delete_tribe.php b/delete_tribe.php index c21e43fb..fb1be31a 100644 --- a/delete_tribe.php +++ b/delete_tribe.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -24,7 +25,7 @@ * Factories of tribes */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); -$tribesFactory = new Yogurt\TribesHandler($xoopsDB); +$tribesFactory = new Yogurt\TribesHandler($xoopsDB); $tribe_id = (int)$_POST['tribe_id']; @@ -36,9 +37,9 @@ * The user must be the owner */ $criteria_tribe_id = new \Criteria('tribe_id', $tribe_id); - $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('owner_uid', $uid); - $criteria = new \CriteriaCompo($criteria_tribe_id); + $uid = (int)$xoopsUser->getVar('uid'); + $criteria_uid = new \Criteria('owner_uid', $uid); + $criteria = new \CriteriaCompo($criteria_tribe_id); $criteria->add($criteria_uid); /** diff --git a/delfriendship.php b/delfriendship.php index 8600db00..976c30c2 100644 --- a/delfriendship.php +++ b/delfriendship.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -23,7 +24,7 @@ * Factory of petitions created */ $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); +$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); /** * Getting the uid of the user which user want to ask to be friend diff --git a/delpicture.php b/delpicture.php index 91620413..28e8892e 100644 --- a/delpicture.php +++ b/delpicture.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -35,14 +36,14 @@ */ $albumFactory = new Yogurt\ImageHandler($xoopsDB); $criteria_img = new \Criteria('cod_img', $cod_img); - $uid = (int)$xoopsUser->getVar('uid'); + $uid = (int)$xoopsUser->getVar('uid'); $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_img); + $criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); $objects_array = $albumFactory->getObjects($criteria); - $image_name = $objects_array[0]->getVar('url'); - $avatar_image = $xoopsUser->getVar('user_avatar'); + $image_name = $objects_array[0]->getVar('url'); + $avatar_image = $xoopsUser->getVar('user_avatar'); /** * Try to delete diff --git a/delvideo.php b/delvideo.php index b1a6556d..be913a5f 100644 --- a/delvideo.php +++ b/delvideo.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -35,9 +36,9 @@ */ $albumFactory = new Yogurt\SeutuboHandler($xoopsDB); $criteria_img = new \Criteria('video_id', $cod_video); - $uid = (int)$xoopsUser->getVar('uid'); + $uid = (int)$xoopsUser->getVar('uid'); $criteria_uid = new \Criteria('uid_owner', $uid); - $criteria = new \CriteriaCompo($criteria_img); + $criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); /** diff --git a/editdesc.php b/editdesc.php index d9489613..e6274487 100644 --- a/editdesc.php +++ b/editdesc.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -25,15 +26,15 @@ } $cod_img = $_POST['cod_img']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; -$uid = (int)$xoopsUser->getVar('uid'); +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$uid = (int)$xoopsUser->getVar('uid'); if (1 == $marker) { /** * Creating the factory loading the picture changing its caption */ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); - $picture = $pictureFactory->create(false); + $picture = $pictureFactory->create(false); $picture->load($cod_img); $picture->setVar('title', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); @@ -55,7 +56,7 @@ $albumFactory = new Yogurt\ImageHandler($xoopsDB); $criteria_img = new \Criteria('cod_img', $cod_img); $criteria_uid = new \Criteria('uid_owner', $uid); -$criteria = new \CriteriaCompo($criteria_img); +$criteria = new \CriteriaCompo($criteria_img); $criteria->add($criteria_uid); /** @@ -65,7 +66,7 @@ $array_pict = $albumFactory->getObjects($criteria); if ($array_pict) { $caption = $array_pict[0]->getVar('title'); - $url = $array_pict[0]->getVar('url'); + $url = $array_pict[0]->getVar('url'); } //$url = $xoopsModuleConfig['link_path_upload']."/thumb_".$url; $url = XOOPS_URL . '/uploads/thumb_' . $url; diff --git a/editdescvideo.php b/editdescvideo.php index 6e8d586e..6707b0e6 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -25,7 +26,7 @@ } $cod_img = (int)$_POST['video_id']; -$marker = (int)$_POST['marker']; +$marker = (int)$_POST['marker']; $uid = (int)$xoopsUser->getVar('uid'); @@ -34,7 +35,7 @@ * Creating the factory loading the picture changing its caption */ $videoFactory = new Yogurt\SeutuboHandler($xoopsDB); - $video = $videoFactory->create(false); + $video = $videoFactory->create(false); $video->load($cod_img); $video->setVar('video_desc', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); @@ -53,10 +54,10 @@ * Creating the factory and the criteria to edit the desc of the picture * The user must be the owner */ -$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); $criteria_video = new \Criteria('video_id', $cod_img); -$criteria_uid = new \Criteria('uid_owner', $uid); -$criteria = new \CriteriaCompo($criteria_video); +$criteria_uid = new \Criteria('uid_owner', $uid); +$criteria = new \CriteriaCompo($criteria_video); $criteria->add($criteria_uid); /** @@ -66,7 +67,7 @@ $array_pict = $albumFactory->getObjects($criteria); if ($array_pict) { $caption = $array_pict[0]->getVar('video_desc'); - $url = $array_pict[0]->getVar('youtube_code'); + $url = $array_pict[0]->getVar('youtube_code'); } $albumFactory->renderFormEdit($caption, $cod_img, $url); diff --git a/editfriendship.php b/editfriendship.php index 77fbb93f..c4747f08 100644 --- a/editfriendship.php +++ b/editfriendship.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; @@ -25,22 +26,22 @@ } $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$friend2_uid = (int)$_POST['friend_uid']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$friend2_uid = (int)$_POST['friend_uid']; +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; $friend = new \XoopsUser($friend2_uid); if (1 == $marker) { - $level = $_POST['level']; - $cool = $_POST['cool']; - $sexy = $_POST['hot']; - $trusty = $_POST['trust']; - $fan = $_POST['fan']; + $level = $_POST['level']; + $cool = $_POST['cool']; + $sexy = $_POST['hot']; + $trusty = $_POST['trust']; + $fan = $_POST['fan']; $friendship_id = (int)$_POST['friendship_id']; - $criteria = new \Criteria('friendship_id', $friendship_id); + $criteria = new \Criteria('friendship_id', $friendship_id); $friendships = $friendshipFactory->getObjects($criteria); - $friendship = $friendships[0]; + $friendship = $friendships[0]; $friendship->setVar('level', $level); $friendship->setVar('cool', $cool); $friendship->setVar('hot', $sexy); diff --git a/edittribe.php b/edittribe.php index a98ed415..f5f0f8ba 100644 --- a/edittribe.php +++ b/edittribe.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_edittribe.tpl'; @@ -29,23 +30,23 @@ $nbSections = $controller->getNumbersSections(); $tribe_id = (int)$_POST['tribe_id']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; $criteria = new \Criteria('tribe_id', $tribe_id); -$tribes = $controller->tribesFactory->getObjects($criteria); -$tribe = $tribes[0]; +$tribes = $controller->tribesFactory->getObjects($criteria); +$tribe = $tribes[0]; $uid = $xoopsUser->getVar('uid'); if (1 == $marker && $tribe->getVar('owner_uid') == $uid) { - $title = trim(htmlspecialchars($_POST['title'], ENT_QUOTES | ENT_HTML5)); - $desc = $_POST['desc']; - $img = $_POST['img']; + $title = trim(htmlspecialchars($_POST['title'], ENT_QUOTES | ENT_HTML5)); + $desc = $_POST['desc']; + $img = $_POST['img']; $updateImg = (1 == $_POST['flag_oldimg']) ? 0 : 1; - $path_upload = XOOPS_ROOT_PATH . '/uploads'; - $maxfilebytes = $xoopsModuleConfig['maxfilesize']; + $path_upload = XOOPS_ROOT_PATH . '/uploads'; + $maxfilebytes = $xoopsModuleConfig['maxfilesize']; $maxfileheight = $xoopsModuleConfig['max_original_height']; - $maxfilewidth = $xoopsModuleConfig['max_original_width']; + $maxfilewidth = $xoopsModuleConfig['max_original_width']; $controller->tribesFactory->receiveTribe($title, $desc, $img, $path_upload, $maxfilebytes, $maxfilewidth, $maxfileheight, $updateImg, $tribe); redirect_header('tribes.php?uid=' . $uid, 3, _MD_YOGURT_TRIBEEDITED); diff --git a/edituser.php b/edituser.php index 374608e9..328b1e25 100644 --- a/edituser.php +++ b/edituser.php @@ -38,7 +38,7 @@ //Fix for XOOPS 2.2 and SX if (!defined('XOOPS_CONF_USER')) { $moduleHandler = xoops_getHandler('module'); - $mod_yogurt = $moduleHandler->getByDirname('profile'); + $mod_yogurt = $moduleHandler->getByDirname('profile'); if (1 == $mod_yogurt->getVar('isactive')) { define('XOOPS_CONF_USER', 0); $xoopsConfigUser = $configHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid')); @@ -107,7 +107,7 @@ $op = 'editprofile'; } else { $memberHandler = xoops_getHandler('member'); - $edituser = $memberHandler->getUser($uid); + $edituser = $memberHandler->getUser($uid); $edituser->setVar('name', $_POST['name']); if (1 == $xoopsConfigUser['allow_chgmail']) { $edituser->setVar('email', $email, true); @@ -171,7 +171,7 @@ include_once XOOPS_ROOT_PATH . '/include/comment_constants.php'; $uid = (int)$xoopsUser->getVar('uid'); echo '' . _US_PROFILE . ' »» ' . _US_EDITPROFILE . '

    '; - $form = new \XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); + $form = new \XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); $uname_label = new \XoopsFormLabel(_US_NICKNAME, $xoopsUser->getVar('uname')); $form->addElement($uname_label); $name_text = new \XoopsFormText(_US_REALNAME, 'name', 30, 60, $xoopsUser->getVar('name', 'E')); @@ -184,11 +184,11 @@ } $email_tray->addElement($email_text); $email_cbox_value = $xoopsUser->user_viewemail() ? 1 : 0; - $email_cbox = new \XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value); + $email_cbox = new \XoopsFormCheckBox('', 'user_viewemail', $email_cbox_value); $email_cbox->addOption(1, _US_ALLOWVIEWEMAIL); $email_tray->addElement($email_cbox); if (defined('ICMS_VERSION_NAME')) { - $configHandler = xoops_getHandler('config'); + $configHandler = xoops_getHandler('config'); $icmsauthConfig = $configHandler->getConfigsByCat(XOOPS_CONF_AUTH); if (1 == $icmsauthConfig['auth_openid']) { $openid_tray = new \XoopsFormElementTray(_US_OPENID_FORM_CAPTION, '
    '); @@ -196,7 +196,7 @@ $openid_tray->setDescription(_US_OPENID_FORM_DSC); $openid_tray->addElement($openid_text); $openid_cbox_value = $xoopsUser->user_viewoid() ? 1 : 0; - $openid_cbox = new \XoopsFormCheckBox('', 'user_viewoid', $openid_cbox_value); + $openid_cbox = new \XoopsFormCheckBox('', 'user_viewoid', $openid_cbox_value); $openid_cbox->addOption(1, _US_ALLOWVIEWEMAILOPENID); $openid_tray->addElement($openid_cbox); $form->addElement($openid_tray); @@ -207,19 +207,19 @@ $form->addElement($url_text); $timezone_select = new \XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $xoopsUser->getVar('timezone_offset')); - $icq_text = new \XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E')); - $aim_text = new \XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoopsUser->getVar('user_aim', 'E')); - $yim_text = new \XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoopsUser->getVar('user_yim', 'E')); - $msnm_text = new \XoopsFormText(_US_MSNM, 'user_msnm', 30, 100, $xoopsUser->getVar('user_msnm', 'E')); - $location_text = new \XoopsFormText(_US_LOCATION, 'user_from', 30, 100, $xoopsUser->getVar('user_from', 'E')); + $icq_text = new \XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E')); + $aim_text = new \XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoopsUser->getVar('user_aim', 'E')); + $yim_text = new \XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoopsUser->getVar('user_yim', 'E')); + $msnm_text = new \XoopsFormText(_US_MSNM, 'user_msnm', 30, 100, $xoopsUser->getVar('user_msnm', 'E')); + $location_text = new \XoopsFormText(_US_LOCATION, 'user_from', 30, 100, $xoopsUser->getVar('user_from', 'E')); $occupation_text = new \XoopsFormText(_US_OCCUPATION, 'user_occ', 30, 100, $xoopsUser->getVar('user_occ', 'E')); - $interest_text = new \XoopsFormText(_US_INTEREST, 'user_intrest', 30, 150, $xoopsUser->getVar('user_intrest', 'E')); - $sig_tray = new \XoopsFormElementTray(_US_SIGNATURE, '
    '); + $interest_text = new \XoopsFormText(_US_INTEREST, 'user_intrest', 30, 150, $xoopsUser->getVar('user_intrest', 'E')); + $sig_tray = new \XoopsFormElementTray(_US_SIGNATURE, '
    '); include_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; $sig_tarea = new \XoopsFormDhtmlTextArea('', 'user_sig', $xoopsUser->getVar('user_sig', 'E')); $sig_tray->addElement($sig_tarea); $sig_cbox_value = $xoopsUser->getVar('attachsig') ? 1 : 0; - $sig_cbox = new \XoopsFormCheckBox('', 'attachsig', $sig_cbox_value); + $sig_cbox = new \XoopsFormCheckBox('', 'attachsig', $sig_cbox_value); $sig_cbox->addOption(1, _US_SHOWSIG); $sig_tray->addElement($sig_cbox); $umode_select = new \XoopsFormSelect(_US_CDISPLAYMODE, 'umode', $xoopsUser->getVar('umode')); @@ -234,20 +234,20 @@ $notify_method_select->addOptionArray([XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL]); $notify_mode_select = new \XoopsFormSelect(_NOT_NOTIFYMODE, 'notify_mode', $xoopsUser->getVar('notify_mode')); $notify_mode_select->addOptionArray([XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN]); - $bio_tarea = new \XoopsFormTextArea(_US_EXTRAINFO, 'bio', $xoopsUser->getVar('bio', 'E')); + $bio_tarea = new \XoopsFormTextArea(_US_EXTRAINFO, 'bio', $xoopsUser->getVar('bio', 'E')); $cookie_radio_value = empty($_COOKIE[$xoopsConfig['usercookie']]) ? 0 : 1; - $cookie_radio = new \XoopsFormRadioYN(_US_USECOOKIE, 'usecookie', $cookie_radio_value, _YES, _NO); - $pwd_text = new \XoopsFormPassword('', 'password', 10, 255); - $pwd_text2 = new \XoopsFormPassword('', 'vpass', 10, 255); - $pwd_tray = new \XoopsFormElementTray(_US_PASSWORD . '
    ' . _US_TYPEPASSTWICE); + $cookie_radio = new \XoopsFormRadioYN(_US_USECOOKIE, 'usecookie', $cookie_radio_value, _YES, _NO); + $pwd_text = new \XoopsFormPassword('', 'password', 10, 255); + $pwd_text2 = new \XoopsFormPassword('', 'vpass', 10, 255); + $pwd_tray = new \XoopsFormElementTray(_US_PASSWORD . '
    ' . _US_TYPEPASSTWICE); $pwd_tray->addElement($pwd_text); $pwd_tray->addElement($pwd_text2); $mailok_radio = new \XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $xoopsUser->getVar('user_mailok')); if (defined('ICMS_VERSION_NAME')) { $salt_hidden = new \XoopsFormHidden('salt', $xoopsUser->getVar('salt')); } - $uid_hidden = new \XoopsFormHidden('uid', $uid); - $op_hidden = new \XoopsFormHidden('op', 'saveuser'); + $uid_hidden = new \XoopsFormHidden('uid', $uid); + $op_hidden = new \XoopsFormHidden('op', 'saveuser'); $submit_button = new \XoopsFormButton('', 'submit', _US_SAVECHANGES, 'submit'); $form->addElement($timezone_select); @@ -303,7 +303,7 @@ $form->display(); } $avatarHandler = xoops_getHandler('avatar'); - $form2 = new \XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); + $form2 = new \XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); $avatar_select = new \XoopsFormSelect('', 'user_avatar', $xoopsUser->getVar('user_avatar')); $avatar_select->addOptionArray($avatarHandler->getList('S')); $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"uploads\", \"\", \"" . XOOPS_URL . "\")'"); @@ -311,8 +311,7 @@ $avatar_tray->addElement($avatar_select); $avatar_tray->addElement( new \XoopsFormLabel( - '', - "getVar('user_avatar', 'E') . "' name='avatar' id='avatar' alt=''> " . _LIST . '' + '', "getVar('user_avatar', 'E') . "' name='avatar' id='avatar' alt=''> " . _LIST . '' ) ); $form2->addElement($avatar_tray); @@ -328,7 +327,7 @@ redirect_header('index.php', 3, _US_NOEDITRIGHT . '
    ' . implode('
    ', $GLOBALS['xoopsSecurity']->getErrors())); } $xoops_upload_file = []; - $uid = 0; + $uid = 0; if (!empty($_POST['xoops_upload_file']) && is_array($_POST['xoops_upload_file'])) { $xoops_upload_file = $_POST['xoops_upload_file']; } @@ -345,7 +344,7 @@ $uploader->setPrefix('cavt'); if ($uploader->upload()) { $avtHandler = xoops_getHandler('avatar'); - $avatar = $avtHandler->create(); + $avatar = $avtHandler->create(); $avatar->setVar('avatar_file', $uploader->getSavedFileName()); $avatar->setVar('avatar_name', $xoopsUser->getVar('uname')); $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); @@ -390,9 +389,9 @@ redirect_header('index.php', 3, _US_NOEDITRIGHT); } $user_avatar = ''; - $avtHandler = xoops_getHandler('avatar'); + $avtHandler = xoops_getHandler('avatar'); if (!empty($_POST['user_avatar'])) { - $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); + $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); $criteria_avatar = new \CriteriaCompo(new \Criteria('avatar_file', $user_avatar)); $criteria_avatar->add(new \Criteria('avatar_type', 'S')); $avatars = &$avtHandler->getObjects($criteria_avatar); diff --git a/fans.php b/fans.php index 62d43bdf..7b877cd1 100644 --- a/fans.php +++ b/fans.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_fans.tpl'; @@ -32,8 +33,8 @@ /** * Friends */ -$criteria_friends = new \Criteria('friend2_uid', $controller->uidOwner); -$criteria_fans = new \Criteria('fan', 1); +$criteria_friends = new \Criteria('friend2_uid', $controller->uidOwner); +$criteria_fans = new \Criteria('fan', 1); $criteria_compo_fans = new \CriteriaCompo($criteria_friends); $criteria_compo_fans->add($criteria_fans); $nb_friends = $controller->friendshipsFactory->getCount($criteria_compo_fans); @@ -47,7 +48,7 @@ /** * Let's get the user name of the owner of the album */ -$owner = new \XoopsUser(); +$owner = new \XoopsUser(); $identifier = $owner::getUnameFromId($controller->uidOwner); /** @@ -72,7 +73,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nb_friends, $xoopsModuleConfig['friendsperpage'], $start, 'start', 'uid=' . (int)$controller->uidOwner); -$navegacao = $barra_navegacao->renderImageNav(2); +$navegacao = $barra_navegacao->renderImageNav(2); //permissions $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); diff --git a/friends.php b/friends.php index b2175e75..091711b0 100644 --- a/friends.php +++ b/friends.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_friends.tpl'; @@ -34,7 +35,7 @@ * Friends */ $criteria_friends = new \Criteria('friend1_uid', (int)$controller->uidOwner); -$nb_friends = $controller->friendshipsFactory->getCount($criteria_friends); +$nb_friends = $controller->friendshipsFactory->getCount($criteria_friends); $criteria_friends->setLimit($xoopsModuleConfig['friendsperpage']); $criteria_friends->setStart($start); $vetor = $controller->friendshipsFactory->getFriends('', $criteria_friends, 0); @@ -45,7 +46,7 @@ /** * Let's get the user name of the owner of the album */ -$owner = new \XoopsUser(); +$owner = new \XoopsUser(); $identifier = $owner::getUnameFromId($controller->uidOwner); /** @@ -70,7 +71,7 @@ * Criando a barra de navegao caso tenha muitos amigos */ $barra_navegacao = new \XoopsPageNav($nbSections['nbFriends'], $xoopsModuleConfig['friendsperpage'], $start, 'start', 'uid=' . (int)$controller->uidOwner); -$navegacao = $barra_navegacao->renderImageNav(2); +$navegacao = $barra_navegacao->renderImageNav(2); //permissions $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); diff --git a/header.php b/header.php index c6400ae8..028ee753 100644 --- a/header.php +++ b/header.php @@ -33,13 +33,13 @@ $xoopsTpl = new \XoopsTpl(); } -$albumFactory = new Yogurt\ImageHandler($xoopsDB); -$visitorsFactory = new Yogurt\VisitorsHandler($xoopsDB); -$videosFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\ImageHandler($xoopsDB); +$visitorsFactory = new Yogurt\VisitorsHandler($xoopsDB); +$videosFactory = new Yogurt\SeutuboHandler($xoopsDB); $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); +$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$isOwner = 0; +$isOwner = 0; $isanonym = 1; $isfriend = 0; @@ -53,15 +53,15 @@ $uid_owner = (int)$_GET['uid']; } else { $uid_owner = 1; - $isOwner = 0; + $isOwner = 0; } } else { $isanonym = 0; if (isset($_GET['uid'])) { $uid_owner = (int)$_GET['uid']; - $isOwner = ($xoopsUser->getVar('uid') == $uid_owner) ? 1 : 0; + $isOwner = ($xoopsUser->getVar('uid') == $uid_owner) ? 1 : 0; } else { $uid_owner = (int)$xoopsUser->getVar('uid'); - $isOwner = 1; + $isOwner = 1; } } diff --git a/include/common.php b/include/common.php index 9d5e470a..c1be00e8 100644 --- a/include/common.php +++ b/include/common.php @@ -14,21 +14,22 @@ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) * @package * @since - * @author XOOPS Development Team + * @author XOOPS Development Team */ + use XoopsModules\Yogurt; include dirname(__DIR__) . '/preloads/autoloader.php'; -$moduleDirName = basename(dirname(__DIR__)); +$moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName /** @var \XoopsDatabase $db */ /** @var \XoopsModules\Yogurt\Helper $helper */ /** @var \XoopsModules\Yogurt\Utility $utility */ -$db = \XoopsDatabaseFactory::getDatabaseConnection(); -$debug = false; -$helper = \XoopsModules\Yogurt\Helper::getInstance($debug); +$db = \XoopsDatabaseFactory::getDatabaseConnection(); +$debug = false; +$helper = \XoopsModules\Yogurt\Helper::getInstance($debug); $utility = new \XoopsModules\Yogurt\Utility(); $helper->loadLanguage('common'); @@ -54,7 +55,7 @@ define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); -// define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); + // define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', $pathIcon32 . '/xoopsmicrobutton.gif'); @@ -62,15 +63,15 @@ } $icons = [ - 'edit' => " . _EDIT . ", - 'delete' => "" . _DELETE . "", - 'clone' => "" . _CLONE . "", + 'edit' => " . _EDIT . ", + 'delete' => "" . _DELETE . "", + 'clone' => "" . _CLONE . "", 'preview' => "" . _PREVIEW . "", - 'print' => "" . _CLONE . "", - 'pdf' => "" . _CLONE . "", - 'add' => "" . _ADD . "", - '0' => "" . 0 . "", - '1' => "" . 1 . "", + 'print' => "" . _CLONE . "", + 'pdf' => "" . _CLONE . "", + 'add' => "" . _ADD . "", + '0' => "" . 0 . "", + '1' => "" . 1 . "", ]; $debug = false; diff --git a/include/notification.inc.php b/include/notification.inc.php index 929650d9..8d4c5166 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -32,11 +32,11 @@ function yogurt_iteminfo($category, $item_id) { $moduleHandler = xoops_getHandler('module'); - $module = $moduleHandler->getByDirname('yogurt'); + $module = $moduleHandler->getByDirname('yogurt'); if ('global' == $category) { $item['name'] = ''; - $item['url'] = ''; + $item['url'] = ''; return $item; } @@ -44,46 +44,46 @@ function yogurt_iteminfo($category, $item_id) global $xoopsDB; if ('picture' == $category) { - $sql = 'SELECT title,uid_owner,url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT title,uid_owner,url FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['uid_owner']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['uid_owner']); $item['name'] = $identifier . "'s Album"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/album.php?uid=' . $result_array['uid_owner']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/album.php?uid=' . $result_array['uid_owner']; return $item; } if ('video' == $category) { - $sql = 'SELECT video_id,uid_owner,video_desc,youtube_code, mainvideo FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT video_id,uid_owner,video_desc,youtube_code, mainvideo FROM ' . $xoopsDB->prefix('yogurt_images') . ' WHERE uid_owner = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['uid_owner']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['uid_owner']); $item['name'] = $identifier . "'s Videos"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner']; return $item; } if ('Note' == $category) { - $sql = 'SELECT Note_id, Note_from, Note_to, Note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE Note_from = ' . $item_id . ' LIMIT 1'; - $result = $xoopsDB->query($sql); + $sql = 'SELECT Note_id, Note_from, Note_to, Note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE Note_from = ' . $item_id . ' LIMIT 1'; + $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ - $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['Note_from']); + $owner = new \XoopsUser(); + $identifier = $owner::getUnameFromId($result_array['Note_from']); $item['name'] = $identifier . "'s Notes"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['Note_from']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['Note_from']; return $item; } diff --git a/include/search.inc.php b/include/search.inc.php index 2cd29498..825e4e21 100644 --- a/include/search.inc.php +++ b/include/search.inc.php @@ -27,21 +27,21 @@ /** * Return search results and show images on userinfo page * - * @param array $queryarray the terms to look - * @param string $andor the conector between the terms to be looked - * @param int $limit The number of maximum results - * @param int $offset from wich register start - * @param int $userid from which user to look + * @param array $queryarray the terms to look + * @param string $andor the conector between the terms to be looked + * @param int $limit The number of maximum results + * @param int $offset from wich register start + * @param int $userid from which user to look * @return array $ret with all results */ function yogurt_search($queryarray, $andor, $limit, $offset, $userid) { global $xoopsDB, $module; //getting the url to the uploads directory - $moduleHandler = xoops_getHandler('module'); - $modulo = $moduleHandler->getByDirname('yogurt'); - $configHandler = xoops_getHandler('config'); - $moduleConfig = $configHandler->getConfigsByCat(0, $modulo->getVar('mid')); + $moduleHandler = xoops_getHandler('module'); + $modulo = $moduleHandler->getByDirname('yogurt'); + $configHandler = xoops_getHandler('config'); + $moduleConfig = $configHandler->getConfigsByCat(0, $modulo->getVar('mid')); $path_uploadimages = XOOPS_UPLOAD_URL; $ret = []; @@ -64,14 +64,14 @@ function yogurt_search($queryarray, $andor, $limit, $offset, $userid) $sql .= 'ORDER BY cod_img DESC'; //echo $sql; //printr($xoopsModules); - $result = $xoopsDB->query($sql, $limit, $offset); - $i = 0; + $result = $xoopsDB->query($sql, $limit, $offset); + $i = 0; $stringofimage = 'images/search.png">'; while (false !== ($myrow = $xoopsDB->fetchArray($result))) { if (0 != $userid) { if ($limit > 5) { $ret[$i]['image'] = "images/search.png'>
    " . '
    " . "isOwner) { $criteria_uidpetition = new \Criteria('petioned_uid', $controller->uidOwner); - $newpetition = $controller->petitionsFactory->getObjects($criteria_uidpetition); + $newpetition = $controller->petitionsFactory->getObjects($criteria_uidpetition); if ($newpetition) { - $nb_petitions = count($newpetition); + $nb_petitions = count($newpetition); $petitionerHandler = xoops_getHandler('member'); - $petitioner = $petitionerHandler->getUser($newpetition[0]->getVar('petitioner_uid')); - $petitioner_uid = $petitioner->getVar('uid'); - $petitioner_uname = $petitioner->getVar('uname'); + $petitioner = $petitionerHandler->getUser($newpetition[0]->getVar('petitioner_uid')); + $petitioner_uid = $petitioner->getVar('uid'); + $petitioner_uname = $petitioner->getVar('uname'); $petitioner_avatar = $petitioner->getVar('user_avatar'); - $petition_id = $newpetition[0]->getVar('friendpet_id'); - $petition = 1; + $petition_id = $newpetition[0]->getVar('friendpet_id'); + $petition = 1; } } /** * Criteria for mainvideo */ -$criteria_uidvideo = new \Criteria('uid_owner', $controller->uidOwner); +$criteria_uidvideo = new \Criteria('uid_owner', $controller->uidOwner); $criteria_mainvideo = new \Criteria('main_video', '1'); -$criteria_video = new \CriteriaCompo($criteria_mainvideo); +$criteria_video = new \CriteriaCompo($criteria_mainvideo); $criteria_video->add($criteria_uidvideo); if (($nbSections['nbVideos'] > 0) && ($videos = $controller->videosFactory->getObjects($criteria_video))) { @@ -80,7 +81,7 @@ * Friends */ $criteria_friends = new \Criteria('friend1_uid', $controller->uidOwner); -$friends = $controller->friendshipsFactory->getFriends(9, $criteria_friends); +$friends = $controller->friendshipsFactory->getFriends(9, $criteria_friends); $controller->visitorsFactory->purgeVisits(); $evaluation = $controller->friendshipsFactory->getMoyennes($controller->uidOwner); @@ -89,7 +90,7 @@ * Tribes */ $criteria_tribes = new \Criteria('rel_user_uid', $controller->uidOwner); -$tribes = $controller->reltribeusersFactory->getTribes(9, $criteria_tribes); +$tribes = $controller->reltribeusersFactory->getTribes(9, $criteria_tribes); /** * Visitors @@ -112,10 +113,10 @@ /** * Lets populate an array with the dati from visitors */ - $i = 0; + $i = 0; $visitors_array = []; foreach ($visitors_object_array as $visitor) { - $indice = $visitor->getVar('uid_visitor', 's'); + $indice = $visitor->getVar('uid_visitor', 's'); $visitors_array[$indice] = $visitor->getVar('uname_visitor', 's'); $i++; @@ -134,8 +135,8 @@ $avatar = $controller->owner->getVar('user_avatar'); $memberHandler = xoops_getHandler('member'); -$thisUser = $memberHandler->getUser($controller->uidOwner); -$myts = MyTextSanitizer::getInstance(); +$thisUser = $memberHandler->getUser($controller->uidOwner); +$myts = MyTextSanitizer::getInstance(); /** * Adding to the module js and css of the lightbox and new ones @@ -352,10 +353,10 @@ $xoopsTpl->assign('lang_realname', _US_REALNAME); $xoopsTpl->assign('name', $thisUser->getVar('name')); -$gpermHandler = xoops_getHandler('groupperm'); -$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; +$gpermHandler = xoops_getHandler('groupperm'); +$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; $moduleHandler = xoops_getHandler('module'); -$criteria = new \CriteriaCompo(new \Criteria('hassearch', 1)); +$criteria = new \CriteriaCompo(new \Criteria('hassearch', 1)); $criteria->add(new \Criteria('isactive', 1)); $mids = array_keys($moduleHandler->getList($criteria)); @@ -368,9 +369,9 @@ foreach ($mids as $mid) { if ($gpermHandler->checkRight('module_read', $mid, $groups)) { - $module = $moduleHandler->get($mid); + $module = $moduleHandler->get($mid); $user_uid = $thisUser->getVar('uid'); - $results = $module->search('', '', 5, 0, $user_uid); + $results = $module->search('', '', 5, 0, $user_uid); if (is_array($results)) { $count = count($results); } @@ -387,7 +388,7 @@ } $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']); - $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; + $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; } if (5 == $count) { $showall_link = '' . _US_SHOWALL . ''; diff --git a/ishot.php b/ishot.php index 7d5bb1f1..b43bf7c9 100644 --- a/ishot.php +++ b/ishot.php @@ -16,6 +16,7 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; @@ -27,7 +28,7 @@ $ishotFactory = new Yogurt\IshotHandler($xoopsDB); $uid_voted = (int)$_POST['uid_voted']; -$ishot = (int)$_POST['ishot']; +$ishot = (int)$_POST['ishot']; $uid_voter = (int)$xoopsUser->getVar('uid'); if (!$GLOBALS['xoopsSecurity']->check()) { @@ -46,7 +47,7 @@ */ $criteria_uidvoter = new \Criteria('uid_voter', $uid_voter); $criteria_uidvoted = new \Criteria('uid_voted', $uid_voted); -$criteria = new \CriteriaCompo($criteria_uidvoter); +$criteria = new \CriteriaCompo($criteria_uidvoter); $criteria->add($criteria_uidvoted); if (0 == $ishotFactory->getCount($criteria)) { diff --git a/kickfromtribe.php b/kickfromtribe.php index 27b3c41f..6a313130 100644 --- a/kickfromtribe.php +++ b/kickfromtribe.php @@ -16,11 +16,12 @@ * @author XOOPS Development Team * @since */ + use XoopsModules\Yogurt; require __DIR__ . '/header.php'; -$tribe_id = (int)$_POST['tribe_id']; +$tribe_id = (int)$_POST['tribe_id']; $rel_user_uid = (int)$_POST['rel_user_uid']; if (1 != $_POST['confirm']) { @@ -31,14 +32,14 @@ * The user must be the owner */ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); - $tribesFactory = new Yogurt\TribesHandler($xoopsDB); - $tribe = $tribesFactory->get($tribe_id); + $tribesFactory = new Yogurt\TribesHandler($xoopsDB); + $tribe = $tribesFactory->get($tribe_id); // echo "
    ";
         //  print_r($tribe);
         if ($xoopsUser->getVar('uid') == $tribe->getVar('owner_uid')) {
             $criteria_rel_user_uid = new \Criteria('rel_user_uid', $rel_user_uid);
    -        $criteria_tribe_id = new \Criteria('rel_tribe_id', $tribe_id);
    -        $criteria = new \CriteriaCompo($criteria_rel_user_uid);
    +        $criteria_tribe_id     = new \Criteria('rel_tribe_id', $tribe_id);
    +        $criteria              = new \CriteriaCompo($criteria_rel_user_uid);
             $criteria->add($criteria_tribe_id);
             /**
              * Try to delete
    diff --git a/language/english/common.php b/language/english/common.php
    index 3ad79e6d..bb24d54b 100644
    --- a/language/english/common.php
    +++ b/language/english/common.php
    @@ -18,7 +18,7 @@
      * @since           3.23
      * @author          Xoops Development Team
      */
    -$moduleDirName = basename(dirname(dirname(__DIR__)));
    +$moduleDirName      = basename(dirname(dirname(__DIR__)));
     $moduleDirNameUpper = mb_strtoupper($moduleDirName);
     
     define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
    diff --git a/mainvideo.php b/mainvideo.php
    index e5ca96ba..de044a89 100644
    --- a/mainvideo.php
    +++ b/mainvideo.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -30,7 +31,7 @@
      * Creating the factory  loading the video changing its caption
      */
     $videoFactory = new Yogurt\SeutuboHandler($xoopsDB);
    -$video = $videoFactory->create(false);
    +$video        = $videoFactory->create(false);
     $video->load($cod_img);
     $video->setVar('main_video', 1);
     
    diff --git a/makefriends.php b/makefriends.php
    index 5aefbedb..efd8d484 100644
    --- a/makefriends.php
    +++ b/makefriends.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl';
    @@ -28,11 +29,11 @@
      * Factory of petitions created
      */
     $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB);
    -$friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB);
    +$friendshipFactory     = new Yogurt\FriendshipHandler($xoopsDB);
     
    -$petition_id = (int)$_POST['petition_id'];
    +$petition_id      = (int)$_POST['petition_id'];
     $friendship_level = (int)$_POST['level'];
    -$uid = (int)$xoopsUser->getVar('uid');
    +$uid              = (int)$xoopsUser->getVar('uid');
     
     if (!$GLOBALS['xoopsSecurity']->check()) {
         redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED);
    diff --git a/notebook.php b/notebook.php
    index f4bf42bb..d68dca10 100644
    --- a/notebook.php
    +++ b/notebook.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_notebook.tpl';
    diff --git a/private.php b/private.php
    index 9d261f0e..a77cc1ce 100644
    --- a/private.php
    +++ b/private.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -32,7 +33,7 @@
      * Creating the factory  loading the picture changing its caption
      */
     $pictureFactory = new Yogurt\ImageHandler($xoopsDB);
    -$picture = $pictureFactory->create(false);
    +$picture        = $pictureFactory->create(false);
     $picture->load($cod_img);
     $picture->setVar('private', (int)$_POST['private']);
     
    diff --git a/search.php b/search.php
    index 3d7f285f..f17a4032 100644
    --- a/search.php
    +++ b/search.php
    @@ -18,13 +18,13 @@
      */
     require __DIR__ . '/header.php';
     
    -$myts = MyTextSanitizer::getInstance();
    -$op = isset($_REQUEST['op']) ? htmlspecialchars($_REQUEST['op'], ENT_QUOTES | ENT_HTML5) : 'search';
    +$myts   = MyTextSanitizer::getInstance();
    +$op     = isset($_REQUEST['op']) ? htmlspecialchars($_REQUEST['op'], ENT_QUOTES | ENT_HTML5) : 'search';
     $groups = $xoopsUser ? $xoopsUser->getGroups() : [XOOPS_GROUP_ANONYMOUS];
     switch ($op) {
         default:
         case 'search':
    -        $xoopsOption['cache_group'] = implode('', $groups);
    +        $xoopsOption['cache_group']              = implode('', $groups);
             $GLOBALS['xoopsOption']['template_main'] = 'yogurt_search.tpl';
             include XOOPS_ROOT_PATH . '/header.php';
     
    @@ -33,7 +33,7 @@
             // Get fields
             $fields = $profileHandler->loadFields();
             // Get ids of fields that can be searched
    -        $gpermHandler = xoops_getHandler('groupperm');
    +        $gpermHandler      = xoops_getHandler('groupperm');
             $searchable_fields = $gpermHandler->getItemIds('smartprofile_search', $groups, $xoopsModule->getVar('mid'));
     
             include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    @@ -79,7 +79,7 @@
                             break;
                         case 'radio':
                         case 'select':
    -                        $size = count($fields[$i]->getVar('field_options')) > 10 ? 10 : count($fields[$i]->getVar('field_options'));
    +                        $size    = count($fields[$i]->getVar('field_options')) > 10 ? 10 : count($fields[$i]->getVar('field_options'));
                             $element = new \XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, $size, true);
                             $options = $fields[$i]->getVar('field_options');
                             asort($options);
    @@ -147,9 +147,9 @@
             // Get fields
             $fields = $profileHandler->loadFields();
             // Get ids of fields that can be searched
    -        $gpermHandler = xoops_getHandler('groupperm');
    +        $gpermHandler      = xoops_getHandler('groupperm');
             $searchable_fields = $gpermHandler->getItemIds('smartprofile_search', $groups, $xoopsModule->getVar('mid'));
    -        $searchvars = [];
    +        $searchvars        = [];
     
             $criteria = new \CriteriaCompo(new \Criteria('level', 0, '>'));
             if (isset($_REQUEST['uname']) && '' != $_REQUEST['uname']) {
    @@ -205,14 +205,14 @@
                             switch ($fields[$i]->getVar('field_valuetype')) {
                                 case XOBJ_DTYPE_OTHER:
                                 case XOBJ_DTYPE_INT:
    -                                $value = array_map('intval', $_REQUEST[$fieldname]);
    +                                $value        = array_map('intval', $_REQUEST[$fieldname]);
                                     $searchvars[] = $fieldname;
                                     $criteria->add(new \Criteria($fieldname, '(' . implode(',', $value) . ')', 'IN'));
                                     break;
                                 case XOBJ_DTYPE_URL:
                                 case XOBJ_DTYPE_TXTBOX:
                                 case XOBJ_DTYPE_TXTAREA:
    -                                $value = array_map([$xoopsDB, 'quoteString'], $_REQUEST[$fieldname]);
    +                                $value        = array_map([$xoopsDB, 'quoteString'], $_REQUEST[$fieldname]);
                                     $searchvars[] = $fieldname;
                                     $criteria->add(new \Criteria($fieldname, '(' . implode(',', $value) . ')', 'IN'));
                                     break;
    @@ -271,14 +271,14 @@
     
                                     default:
                                         if (isset($_REQUEST[$fieldname . '_larger']) && 0 != (int)$_REQUEST[$fieldname . '_larger']) {
    -                                        $value = (int)$_REQUEST[$fieldname . '_larger'];
    +                                        $value        = (int)$_REQUEST[$fieldname . '_larger'];
                                             $search_url[] = $fieldname . '_larger=' . $value;
                                             $searchvars[] = $fieldname;
                                             $criteria->add(new \Criteria($fieldname, $value, '>='));
                                         }
     
                                         if (isset($_REQUEST[$fieldname . '_smaller']) && 0 != (int)$_REQUEST[$fieldname . '_smaller']) {
    -                                        $value = (int)$_REQUEST[$fieldname . '_smaller'];
    +                                        $value        = (int)$_REQUEST[$fieldname . '_smaller'];
                                             $search_url[] = $fieldname . '_smaller=' . $value;
                                             $searchvars[] = $fieldname;
                                             $criteria->add(new \Criteria($fieldname, $value, '<='));
    @@ -288,7 +288,7 @@
     
                                 if (isset($_REQUEST[$fieldname]) && !isset($_REQUEST[$fieldname . '_smaller']) && !isset($_REQUEST[$fieldname . '_larger'])) {
                                     if (!is_array($_REQUEST[$fieldname])) {
    -                                    $value = (int)$_REQUEST[$fieldname];
    +                                    $value        = (int)$_REQUEST[$fieldname];
                                         $search_url[] = $fieldname . '=' . $value;
                                         $criteria->add(new \Criteria($fieldname, $value, '='));
                                     } else {
    @@ -319,7 +319,7 @@
                                             break;
                                     }
                                     $search_url[] = $fieldname . '=' . $value;
    -                                $operator = 'LIKE';
    +                                $operator     = 'LIKE';
                                     $criteria->add(new \Criteria($fieldname, $value, $operator));
                                     $searchvars[] = $fieldname;
                                 }
    diff --git a/search_tribe.php b/search_tribe.php
    index cc514b02..a4e01f25 100644
    --- a/search_tribe.php
    +++ b/search_tribe.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribes_results.tpl';
    @@ -29,27 +30,27 @@
     $nbSections = $controller->getNumbersSections();
     
     $start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0;
    -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0;
    +$start_my  = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0;
     
     $tribe_keyword = trim(htmlspecialchars($_GET['tribe_keyword'], ENT_QUOTES | ENT_HTML5));
     /**
      * All Tribes
      */
    -$criteria_title = new \Criteria('tribe_title', '%' . $tribe_keyword . '%', 'LIKE');
    -$criteria_desc = new \Criteria('tribe_desc', '%' . $tribe_keyword . '%', 'LIKE');
    +$criteria_title  = new \Criteria('tribe_title', '%' . $tribe_keyword . '%', 'LIKE');
    +$criteria_desc   = new \Criteria('tribe_desc', '%' . $tribe_keyword . '%', 'LIKE');
     $criteria_tribes = new \CriteriaCompo($criteria_title);
     $criteria_tribes->add($criteria_desc, 'OR');
     $nb_tribes = $controller->tribesFactory->getCount($criteria_tribes);
     $criteria_tribes->setLimit($xoopsModuleConfig['tribesperpage']);
     $criteria_tribes->setStart($start_all);
     $tribes_objects = $controller->tribesFactory->getObjects($criteria_tribes);
    -$i = 0;
    +$i              = 0;
     foreach ($tribes_objects as $tribe_object) {
    -    $tribes[$i]['id'] = $tribe_object->getVar('tribe_id');
    +    $tribes[$i]['id']    = $tribe_object->getVar('tribe_id');
         $tribes[$i]['title'] = $tribe_object->getVar('tribe_title');
    -    $tribes[$i]['img'] = $tribe_object->getVar('tribe_img');
    -    $tribes[$i]['desc'] = $tribe_object->getVar('tribe_desc');
    -    $tribes[$i]['uid'] = $tribe_object->getVar('owner_uid');
    +    $tribes[$i]['img']   = $tribe_object->getVar('tribe_img');
    +    $tribes[$i]['desc']  = $tribe_object->getVar('tribe_desc');
    +    $tribes[$i]['uid']   = $tribe_object->getVar('owner_uid');
         $i++;
     }
     
    @@ -67,7 +68,7 @@
      * Criando a barra de navegao caso tenha muitos amigos
      */
     $barra_navegacao = new \XoopsPageNav($nb_tribes, $xoopsModuleConfig['tribesperpage'], $start_all, 'start_all', 'tribe_keyword=' . $tribe_keyword . '&start_my=' . $start_my);
    -$barrinha = $barra_navegacao->renderImageNav(2);
    +$barrinha        = $barra_navegacao->renderImageNav(2);
     
     //permissions
     $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes'));
    diff --git a/searchmembers.php b/searchmembers.php
    index f26d9c70..f222de39 100644
    --- a/searchmembers.php
    +++ b/searchmembers.php
    @@ -47,63 +47,63 @@
         $GLOBALS['xoopsOption']['template_main'] = 'yogurt_searchform.tpl';
         include XOOPS_ROOT_PATH . '/header.php';
         $memberHandler = xoops_getHandler('member');
    -    $total = $memberHandler->getUserCount(new \Criteria('level', 0, '>'));
    +    $total         = $memberHandler->getUserCount(new \Criteria('level', 0, '>'));
         include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    -    $uname_text = new \XoopsFormText('', 'user_uname', 30, 60);
    +    $uname_text  = new \XoopsFormText('', 'user_uname', 30, 60);
         $uname_match = new \XoopsFormSelectMatchOption('', 'user_uname_match');
    -    $uname_tray = new \XoopsFormElementTray(_MD_YOGURT_UNAME, ' ');
    +    $uname_tray  = new \XoopsFormElementTray(_MD_YOGURT_UNAME, ' ');
         $uname_tray->addElement($uname_match);
         $uname_tray->addElement($uname_text);
    -    $name_text = new \XoopsFormText('', 'user_name', 30, 60);
    +    $name_text  = new \XoopsFormText('', 'user_name', 30, 60);
         $name_match = new \XoopsFormSelectMatchOption('', 'user_name_match');
    -    $name_tray = new \XoopsFormElementTray(_MD_YOGURT_REALNAME, ' ');
    +    $name_tray  = new \XoopsFormElementTray(_MD_YOGURT_REALNAME, ' ');
         $name_tray->addElement($name_match);
         $name_tray->addElement($name_text);
    -    $email_text = new \XoopsFormText('', 'user_email', 30, 60);
    +    $email_text  = new \XoopsFormText('', 'user_email', 30, 60);
         $email_match = new \XoopsFormSelectMatchOption('', 'user_email_match');
    -    $email_tray = new \XoopsFormElementTray(_MD_YOGURT_EMAIL, ' ');
    +    $email_tray  = new \XoopsFormElementTray(_MD_YOGURT_EMAIL, ' ');
         $email_tray->addElement($email_match);
         $email_tray->addElement($email_text);
         $url_text = new \XoopsFormText(_MD_YOGURT_URLC, 'user_url', 30, 100);
         //$theme_select = new XoopsFormSelectTheme(_MD_YOGURT_THEME, "user_theme");
         //$timezone_select = new XoopsFormSelectTimezone(_MD_YOGURT_TIMEZONE, "user_timezone_offset");
    -    $icq_text = new \XoopsFormText('', 'user_icq', 30, 100);
    +    $icq_text  = new \XoopsFormText('', 'user_icq', 30, 100);
         $icq_match = new \XoopsFormSelectMatchOption('', 'user_icq_match');
    -    $icq_tray = new \XoopsFormElementTray(_MD_YOGURT_ICQ, ' ');
    +    $icq_tray  = new \XoopsFormElementTray(_MD_YOGURT_ICQ, ' ');
         $icq_tray->addElement($icq_match);
         $icq_tray->addElement($icq_text);
    -    $aim_text = new \XoopsFormText('', 'user_aim', 30, 100);
    +    $aim_text  = new \XoopsFormText('', 'user_aim', 30, 100);
         $aim_match = new \XoopsFormSelectMatchOption('', 'user_aim_match');
    -    $aim_tray = new \XoopsFormElementTray(_MD_YOGURT_AIM, ' ');
    +    $aim_tray  = new \XoopsFormElementTray(_MD_YOGURT_AIM, ' ');
         $aim_tray->addElement($aim_match);
         $aim_tray->addElement($aim_text);
    -    $yim_text = new \XoopsFormText('', 'user_yim', 30, 100);
    +    $yim_text  = new \XoopsFormText('', 'user_yim', 30, 100);
         $yim_match = new \XoopsFormSelectMatchOption('', 'user_yim_match');
    -    $yim_tray = new \XoopsFormElementTray(_MD_YOGURT_YIM, ' ');
    +    $yim_tray  = new \XoopsFormElementTray(_MD_YOGURT_YIM, ' ');
         $yim_tray->addElement($yim_match);
         $yim_tray->addElement($yim_text);
    -    $msnm_text = new \XoopsFormText('', 'user_msnm', 30, 100);
    +    $msnm_text  = new \XoopsFormText('', 'user_msnm', 30, 100);
         $msnm_match = new \XoopsFormSelectMatchOption('', 'user_msnm_match');
    -    $msnm_tray = new \XoopsFormElementTray(_MD_YOGURT_MSNM, ' ');
    +    $msnm_tray  = new \XoopsFormElementTray(_MD_YOGURT_MSNM, ' ');
         $msnm_tray->addElement($msnm_match);
         $msnm_tray->addElement($msnm_text);
    -    $location_text = new \XoopsFormText(_MD_YOGURT_LOCATION, 'user_from', 30, 100);
    +    $location_text   = new \XoopsFormText(_MD_YOGURT_LOCATION, 'user_from', 30, 100);
         $occupation_text = new \XoopsFormText(_MD_YOGURT_OCCUPATION, 'user_occ', 30, 100);
    -    $interest_text = new \XoopsFormText(_MD_YOGURT_INTEREST, 'user_intrest', 30, 100);
    +    $interest_text   = new \XoopsFormText(_MD_YOGURT_INTEREST, 'user_intrest', 30, 100);
     
         //$bio_text = new XoopsFormText(_MD_YOGURT_EXTRAINFO, "user_bio", 30, 100);
         $lastlog_more = new \XoopsFormText(_MD_YOGURT_LASTLOGMORE, 'user_lastlog_more', 10, 5);
         $lastlog_less = new \XoopsFormText(_MD_YOGURT_LASTLOGLESS, 'user_lastlog_less', 10, 5);
    -    $reg_more = new \XoopsFormText(_MD_YOGURT_REGMORE, 'user_reg_more', 10, 5);
    -    $reg_less = new \XoopsFormText(_MD_YOGURT_REGLESS, 'user_reg_less', 10, 5);
    -    $posts_more = new \XoopsFormText(_MD_YOGURT_POSTSMORE, 'user_posts_more', 10, 5);
    -    $posts_less = new \XoopsFormText(_MD_YOGURT_POSTSLESS, 'user_posts_less', 10, 5);
    -    $sort_select = new \XoopsFormSelect(_MD_YOGURT_SORT, 'user_sort');
    +    $reg_more     = new \XoopsFormText(_MD_YOGURT_REGMORE, 'user_reg_more', 10, 5);
    +    $reg_less     = new \XoopsFormText(_MD_YOGURT_REGLESS, 'user_reg_less', 10, 5);
    +    $posts_more   = new \XoopsFormText(_MD_YOGURT_POSTSMORE, 'user_posts_more', 10, 5);
    +    $posts_less   = new \XoopsFormText(_MD_YOGURT_POSTSLESS, 'user_posts_less', 10, 5);
    +    $sort_select  = new \XoopsFormSelect(_MD_YOGURT_SORT, 'user_sort');
         $sort_select->addOptionArray(['uname' => _MD_YOGURT_UNAME, 'email' => _MD_YOGURT_EMAIL, 'last_login' => _MD_YOGURT_LASTLOGIN, 'user_regdate' => _MD_YOGURT_REGDATE, 'posts' => _MD_YOGURT_POSTS]);
         $order_select = new \XoopsFormSelect(_MD_YOGURT_ORDER, 'user_order');
         $order_select->addOptionArray(['ASC' => _MD_YOGURT_ASC, 'DESC' => _MD_YOGURT_DESC]);
    -    $limit_text = new \XoopsFormText(_MD_YOGURT_LIMIT, 'limit', 6, 2);
    -    $op_hidden = new \XoopsFormHidden('op', 'submit');
    +    $limit_text    = new \XoopsFormText(_MD_YOGURT_LIMIT, 'limit', 6, 2);
    +    $op_hidden     = new \XoopsFormHidden('op', 'submit');
         $submit_button = new \XoopsFormButton('', 'user_submit', _SUBMIT, 'submit');
     
         $form = new \XoopsThemeForm('', 'searchform', 'searchmembers.php');
    @@ -141,7 +141,7 @@
         $GLOBALS['xoopsOption']['template_main'] = 'yogurt_searchresults.tpl';
         include XOOPS_ROOT_PATH . '/header.php';
         $iamadmin = $xoopsUserIsAdmin;
    -    $myts = MyTextSanitizer::getInstance();
    +    $myts     = MyTextSanitizer::getInstance();
         $criteria = new \CriteriaCompo();
         if (!empty($_POST['user_uname'])) {
             $match = (!empty($_POST['user_uname_match'])) ? (int)$_POST['user_uname_match'] : XOOPS_MATCH_START;
    @@ -280,28 +280,28 @@
         }
         if (!empty($_POST['user_lastlog_more']) && is_numeric($_POST['user_lastlog_more'])) {
             $f_user_lastlog_more = (int)trim($_POST['user_lastlog_more']);
    -        $time = time() - (60 * 60 * 24 * $f_user_lastlog_more);
    +        $time                = time() - (60 * 60 * 24 * $f_user_lastlog_more);
             if ($time > 0) {
                 $criteria->add(new \Criteria('last_login', $time, '<'));
             }
         }
         if (!empty($_POST['user_lastlog_less']) && is_numeric($_POST['user_lastlog_less'])) {
             $f_user_lastlog_less = (int)trim($_POST['user_lastlog_less']);
    -        $time = time() - (60 * 60 * 24 * $f_user_lastlog_less);
    +        $time                = time() - (60 * 60 * 24 * $f_user_lastlog_less);
             if ($time > 0) {
                 $criteria->add(new \Criteria('last_login', $time, '>'));
             }
         }
         if (!empty($_POST['user_reg_more']) && is_numeric($_POST['user_reg_more'])) {
             $f_user_reg_more = (int)trim($_POST['user_reg_more']);
    -        $time = time() - (60 * 60 * 24 * $f_user_reg_more);
    +        $time            = time() - (60 * 60 * 24 * $f_user_reg_more);
             if ($time > 0) {
                 $criteria->add(new \Criteria('user_regdate', $time, '<'));
             }
         }
         if (!empty($_POST['user_reg_less']) && is_numeric($_POST['user_reg_less'])) {
             $f_user_reg_less = (int)$_POST['user_reg_less'];
    -        $time = time() - (60 * 60 * 24 * $f_user_reg_less);
    +        $time            = time() - (60 * 60 * 24 * $f_user_reg_less);
             if ($time > 0) {
                 $criteria->add(new \Criteria('user_regdate', $time, '>'));
             }
    @@ -314,8 +314,8 @@
         }
         $criteria->add(new \Criteria('level', 0, '>'));
         $validsort = ['uname', 'email', 'last_login', 'user_regdate', 'posts'];
    -    $sort = (!in_array($_POST['user_sort'], $validsort)) ? 'uname' : htmlspecialchars($_POST['user_sort'], ENT_QUOTES | ENT_HTML5);
    -    $order = 'ASC';
    +    $sort      = (!in_array($_POST['user_sort'], $validsort)) ? 'uname' : htmlspecialchars($_POST['user_sort'], ENT_QUOTES | ENT_HTML5);
    +    $order     = 'ASC';
         if (isset($_POST['user_order']) && 'DESC' == $_POST['user_order']) {
             $order = 'DESC';
         }
    @@ -324,9 +324,9 @@
             $limit = 50;
         }
     
    -    $start = (!empty($_POST['start'])) ? (int)$_POST['start'] : 0;
    +    $start         = (!empty($_POST['start'])) ? (int)$_POST['start'] : 0;
         $memberHandler = xoops_getHandler('member');
    -    $total = $memberHandler->getUserCount($criteria);
    +    $total         = $memberHandler->getUserCount($criteria);
         $xoopsTpl->assign('lang_search', _MD_YOGURT_SEARCH);
         $xoopsTpl->assign('lang_results', _MD_YOGURT_RESULTS);
         $xoopsTpl->assign('total_found', $total);
    @@ -352,10 +352,10 @@
             $criteria->setLimit($limit);
             $foundusers = $memberHandler->getUsers($criteria, true);
             foreach (array_keys($foundusers) as $j) {
    -            $userdata['avatar'] = $foundusers[$j]->getVar('user_avatar') ? "getVar('user_avatar') . "' alt=''>" : ' ';
    +            $userdata['avatar']   = $foundusers[$j]->getVar('user_avatar') ? "getVar('user_avatar') . "' alt=''>" : ' ';
                 $userdata['realname'] = $foundusers[$j]->getVar('name') ?: ' ';
    -            $userdata['name'] = $foundusers[$j]->getVar('uname');
    -            $userdata['id'] = $foundusers[$j]->getVar('uid');
    +            $userdata['name']     = $foundusers[$j]->getVar('uname');
    +            $userdata['id']       = $foundusers[$j]->getVar('uid');
                 if (1 == $foundusers[$j]->getVar('user_viewemail') || $iamadmin) {
                     $userdata['email'] = "" . sprintf(_SENDEMAILTO, $foundusers[$j]->getVar(";
                 } else {
    @@ -363,12 +363,12 @@
                 }
                 if ($xoopsUser) {
                     $userdata['pmlink'] = "getVar('uid') . "\",\"pmlite\",450,370);'>" . sprintf(
    -                    _SENDPMTO,
    -                    $foundusers[$j]->getVar(
    -                        ";
    +                        _SENDPMTO,
    +                        $foundusers[$j]->getVar(
    +                            'uname',
    +                            'E'
    +                        )
    +                    ) . "'>";
                 } else {
                     $userdata['pmlink'] = ' ';
                 }
    @@ -417,7 +417,7 @@
                 if ($start - $limit >= 0) {
                     $hiddenform .= "" . _MD_YOGURT_PREVIOUS . " \n";
                 }
    -            $counter = 1;
    +            $counter     = 1;
                 $currentpage = ($start + $limit) / $limit;
                 while ($counter <= $totalpages) {
                     if ($counter == $currentpage) {
    diff --git a/seutubo.php b/seutubo.php
    index 273744e5..4e40d187 100644
    --- a/seutubo.php
    +++ b/seutubo.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_seutubo.tpl';
    @@ -40,7 +41,7 @@
     /**
      * Get all videos of this user and assign them to template
      */
    -$videos = $controller->getVideos($criteriaUidVideo);
    +$videos       = $controller->getVideos($criteriaUidVideo);
     $videos_array = $controller->assignVideoContent($nbSections['nbVideos'], $videos);
     
     if (is_array($videos_array)) {
    diff --git a/submit.php b/submit.php
    index 585dde81..46b9bb0f 100644
    --- a/submit.php
    +++ b/submit.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     /**
    @@ -43,14 +44,14 @@
     /**
      * Getting parameters defined in admin side
      */
    -$path_upload = XOOPS_ROOT_PATH . '/uploads';
    -$pictwidth = $xoopsModuleConfig['resized_width'];
    -$pictheight = $xoopsModuleConfig['resized_height'];
    -$thumbwidth = $xoopsModuleConfig['thumb_width'];
    -$thumbheight = $xoopsModuleConfig['thumb_height'];
    -$maxfilebytes = $xoopsModuleConfig['maxfilesize'];
    +$path_upload   = XOOPS_ROOT_PATH . '/uploads';
    +$pictwidth     = $xoopsModuleConfig['resized_width'];
    +$pictheight    = $xoopsModuleConfig['resized_height'];
    +$thumbwidth    = $xoopsModuleConfig['thumb_width'];
    +$thumbheight   = $xoopsModuleConfig['thumb_height'];
    +$maxfilebytes  = $xoopsModuleConfig['maxfilesize'];
     $maxfileheight = $xoopsModuleConfig['max_original_height'];
    -$maxfilewidth = $xoopsModuleConfig['max_original_width'];
    +$maxfilewidth  = $xoopsModuleConfig['max_original_width'];
     
     /**
      * If we are receiving a file
    @@ -68,8 +69,8 @@
          */
         if ($albumFactory->receivePicture($title, $path_upload, $thumbwidth, $thumbheight, $pictwidth, $pictheight, $maxfilebytes, $maxfilewidth, $maxfileheight)) {
             $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname');
    -        $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid');
    -        $notificationHandler = xoops_getHandler('notification');
    +        $extra_tags['X_OWNER_UID']  = $xoopsUser->getVar('uid');
    +        $notificationHandler        = xoops_getHandler('notification');
             $notificationHandler->triggerEvent('picture', $xoopsUser->getVar('uid'), 'new_picture', $extra_tags);
             //header("Location: ".XOOPS_URL."/modules/yogurt/index.php?uid=".$xoopsUser->getVar('uid'));
             redirect_header(XOOPS_URL . '/modules/yogurt/album.php?uid=' . $xoopsUser->getVar('uid'), 3, _MD_YOGURT_UPLOADED);
    diff --git a/submit_configs.php b/submit_configs.php
    index 172bb2d5..17337b03 100644
    --- a/submit_configs.php
    +++ b/submit_configs.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -60,7 +61,7 @@
     $criteria = new \Criteria('config_uid', $xoopsUser->getVar('uid'));
     if ($configsFactory->getCount($criteria) > 0) {
         $configs = $configsFactory->getObjects($criteria);
    -    $config = $configs[0];
    +    $config  = $configs[0];
         $config->unsetNew();
     } else {
         $config = $configsFactory->create();
    diff --git a/submit_friendpetition.php b/submit_friendpetition.php
    index dae5d675..93439030 100644
    --- a/submit_friendpetition.php
    +++ b/submit_friendpetition.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl';
    @@ -64,8 +65,8 @@
     
     if ($friendpetitionFactory->insert($newpetition)) {
         $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname');
    -    $extra_tags['X_OWNER_UID'] = $xoopsUser->getVar('uid');
    -    $notificationHandler = xoops_getHandler('notification');
    +    $extra_tags['X_OWNER_UID']  = $xoopsUser->getVar('uid');
    +    $notificationHandler        = xoops_getHandler('notification');
         $notificationHandler->triggerEvent('friendship', $_POST['petitioned_uid'], 'new_friendship', $extra_tags);
     
         redirect_header(XOOPS_URL . '/modules/yogurt/index.php?uid=' . $_POST['petitioned_uid'], 3, _MD_YOGURT_PETITIONED);
    diff --git a/submit_scrap.php b/submit_scrap.php
    index f53b14b9..5af573fc 100644
    --- a/submit_scrap.php
    +++ b/submit_scrap.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -37,18 +38,18 @@
         redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED);
     }
     
    -$myts = MyTextSanitizer::getInstance();
    +$myts         = MyTextSanitizer::getInstance();
     $Notebook_uid = $_POST['uid'];
    -$Note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1);
    -$mainform = (!empty($_POST['mainform'])) ? 1 : 0;
    -$Note = $NotesFactory->create();
    +$Note_text    = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1);
    +$mainform     = (!empty($_POST['mainform'])) ? 1 : 0;
    +$Note         = $NotesFactory->create();
     $Note->setVar('Note_text', $Note_text);
     $Note->setVar('Note_from', $xoopsUser->getVar('uid'));
     $Note->setVar('Note_to', $Notebook_uid);
     $NotesFactory->insert($Note);
     $extra_tags['X_OWNER_NAME'] = $xoopsUser::getUnameFromId($Notebook_uid);
    -$extra_tags['X_OWNER_UID'] = $Notebook_uid;
    -$notificationHandler = xoops_getHandler('notification');
    +$extra_tags['X_OWNER_UID']  = $Notebook_uid;
    +$notificationHandler        = xoops_getHandler('notification');
     $notificationHandler->triggerEvent('Note', $xoopsUser->getVar('uid'), 'new_Note', $extra_tags);
     if (1 == $mainform) {
         redirect_header('notebook.php?uid=' . $Notebook_uid, 1, _MD_YOGURT_NOTE_SENT);
    diff --git a/submit_tribe.php b/submit_tribe.php
    index 3239f317..5c193ee1 100644
    --- a/submit_tribe.php
    +++ b/submit_tribe.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -31,7 +32,7 @@
      * Factories of tribes
      */
     $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB);
    -$tribesFactory = new Yogurt\TribesHandler($xoopsDB);
    +$tribesFactory       = new Yogurt\TribesHandler($xoopsDB);
     
     $marker = isset($_POST['marker']) ? $_POST['marker'] : 0;
     
    @@ -43,18 +44,18 @@
             redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED);
         }
     
    -    $myts = MyTextSanitizer::getInstance();
    -    $tribe_title = $myts->displayTarea($_POST['tribe_title'], 0, 1, 1, 1, 1);
    -    $tribe_desc = $myts->displayTarea($_POST['tribe_desc'], 0, 1, 1, 1, 1);
    -    $tribe_img = (!empty($_POST['tribe_img'])) ? $_POST['tribe_img'] : '';
    -    $path_upload = XOOPS_ROOT_PATH . '/uploads';
    -    $pictwidth = $xoopsModuleConfig['resized_width'];
    -    $pictheight = $xoopsModuleConfig['resized_height'];
    -    $thumbwidth = $xoopsModuleConfig['thumb_width'];
    -    $thumbheight = $xoopsModuleConfig['thumb_height'];
    -    $maxfilebytes = $xoopsModuleConfig['maxfilesize'];
    +    $myts          = MyTextSanitizer::getInstance();
    +    $tribe_title   = $myts->displayTarea($_POST['tribe_title'], 0, 1, 1, 1, 1);
    +    $tribe_desc    = $myts->displayTarea($_POST['tribe_desc'], 0, 1, 1, 1, 1);
    +    $tribe_img     = (!empty($_POST['tribe_img'])) ? $_POST['tribe_img'] : '';
    +    $path_upload   = XOOPS_ROOT_PATH . '/uploads';
    +    $pictwidth     = $xoopsModuleConfig['resized_width'];
    +    $pictheight    = $xoopsModuleConfig['resized_height'];
    +    $thumbwidth    = $xoopsModuleConfig['thumb_width'];
    +    $thumbheight   = $xoopsModuleConfig['thumb_height'];
    +    $maxfilebytes  = $xoopsModuleConfig['maxfilesize'];
         $maxfileheight = $xoopsModuleConfig['max_original_height'];
    -    $maxfilewidth = $xoopsModuleConfig['max_original_width'];
    +    $maxfilewidth  = $xoopsModuleConfig['max_original_width'];
         if ($tribesFactory->receiveTribe($tribe_title, $tribe_desc, '', $path_upload, $maxfilebytes, $maxfilewidth, $maxfileheight)) {
             $reltribeuser = $reltribeuserFactory->create();
             $reltribeuser->setVar('rel_tribe_id', $xoopsDB->getInsertId());
    diff --git a/submitaudio.php b/submitaudio.php
    index 3e6298c7..d966c75f 100644
    --- a/submitaudio.php
    +++ b/submitaudio.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     /**
    @@ -38,13 +39,13 @@
     /**
      * Getting the title
      */
    -$title = $myts->displayTarea($_POST['title'], 0, 1, 1, 1, 1);
    +$title  = $myts->displayTarea($_POST['title'], 0, 1, 1, 1, 1);
     $author = $myts->displayTarea($_POST['author'], 0, 1, 1, 1, 1);
     
     /**
      * Getting parameters defined in admin side
      */
    -$path_upload = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/';
    +$path_upload  = XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/';
     $maxfilebytes = $xoopsModuleConfig['maxfilesize'];
     
     /**
    diff --git a/suspend.php b/suspend.php
    index abb60713..7537eeea 100644
    --- a/suspend.php
    +++ b/suspend.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -31,12 +32,12 @@
      * Creating the factory  loading the picture changing its caption
      */
     $suspensionsFactory = new Yogurt\SuspensionsHandler($xoopsDB);
    -$suspension = $suspensionsFactory->create(false);
    +$suspension         = $suspensionsFactory->create(false);
     $suspension->load($uid);
     
     if ($xoopsUser->isAdmin(1)) {
         $memberHandler = xoops_getHandler('member');
    -    $thisUser = $memberHandler->getUser($uid);
    +    $thisUser      = $memberHandler->getUser($uid);
         $suspension->setVar('uid', $uid);
         $suspension->setVar('old_email', $thisUser->getVar('email'));
         $suspension->setVar('old_pass', $thisUser->getVar('pass'));
    diff --git a/testdata/index.php b/testdata/index.php
    index 047fc662..220b215f 100644
    --- a/testdata/index.php
    +++ b/testdata/index.php
    @@ -13,6 +13,7 @@
      * @since           2.5.9
      * @author          Michael Beck (aka Mamba)
      */
    +
     use XoopsModules\Yogurt;
     use XoopsModules\Yogurt\Common;
     use XoopsModules\Yogurt\Utility;
    @@ -22,7 +23,7 @@
     
     $op = \Xmf\Request::getCmd('op', '');
     
    -$moduleDirName = basename(dirname(__DIR__));
    +$moduleDirName      = basename(dirname(__DIR__));
     $moduleDirNameUpper = mb_strtoupper($moduleDirName);
     
     $helper = Yogurt\Helper::getInstance();
    @@ -53,10 +54,10 @@ function loadSampleData()
     {
         global $xoopsConfig;
     
    -    $moduleDirName = basename(dirname(__DIR__));
    +    $moduleDirName      = basename(dirname(__DIR__));
         $moduleDirNameUpper = mb_strtoupper($moduleDirName);
     
    -    $utility = new Yogurt\Utility();
    +    $utility      = new Yogurt\Utility();
         $configurator = new Common\Configurator();
     
         $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables');
    @@ -78,7 +79,7 @@ function loadSampleData()
         if (is_array($configurator->copyTestFolders) && count($configurator->copyTestFolders) > 0) {
             //        $file = __DIR__ . '/../testdata/images/';
             foreach (array_keys($configurator->copyTestFolders) as $i) {
    -            $src = $configurator->copyTestFolders[$i][0];
    +            $src  = $configurator->copyTestFolders[$i][0];
                 $dest = $configurator->copyTestFolders[$i][1];
                 $utility::rcopy($src, $dest);
             }
    @@ -90,7 +91,7 @@ function saveSampleData()
     {
         global $xoopsConfig;
     
    -    $moduleDirName = basename(dirname(__DIR__));
    +    $moduleDirName      = basename(dirname(__DIR__));
         $moduleDirNameUpper = mb_strtoupper($moduleDirName);
     
         $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables');
    @@ -116,7 +117,7 @@ function saveSampleData()
     
     function exportSchema()
     {
    -    $moduleDirName = basename(dirname(__DIR__));
    +    $moduleDirName      = basename(dirname(__DIR__));
         $moduleDirNameUpper = mb_strtoupper($moduleDirName);
     
         try {
    diff --git a/tribe.php b/tribe.php
    index 220a7f8a..60d66c35 100644
    --- a/tribe.php
    +++ b/tribe.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribe.tpl';
    @@ -30,8 +31,8 @@
     
     $tribe_id = (int)$_GET['tribe_id'];
     $criteria = new \Criteria('tribe_id', $tribe_id);
    -$tribes = $controller->tribesFactory->getObjects($criteria);
    -$tribe = $tribes[0];
    +$tribes   = $controller->tribesFactory->getObjects($criteria);
    +$tribe    = $tribes[0];
     
     /**
      * Render a form with the info of the user
    diff --git a/tribes.php b/tribes.php
    index 4dacd867..24041163 100644
    --- a/tribes.php
    +++ b/tribes.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_tribes.tpl';
    @@ -29,13 +30,13 @@
     $nbSections = $controller->getNumbersSections();
     
     $start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0;
    -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0;
    +$start_my  = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0;
     
     /**
      * All Tribes
      */
     $criteria_tribes = new \Criteria('tribe_id', 0, '>');
    -$nb_tribes = $controller->tribesFactory->getCount($criteria_tribes);
    +$nb_tribes       = $controller->tribesFactory->getCount($criteria_tribes);
     $criteria_tribes->setLimit($xoopsModuleConfig['tribesperpage']);
     $criteria_tribes->setStart($start_all);
     $tribes = $controller->tribesFactory->getTribes($criteria_tribes);
    @@ -43,9 +44,9 @@
     /**
      * My Tribes
      */
    -$mytribes = '';
    +$mytribes          = '';
     $criteria_mytribes = new \Criteria('rel_user_uid', $controller->uidOwner);
    -$nb_mytribes = $controller->reltribeusersFactory->getCount($criteria_mytribes);
    +$nb_mytribes       = $controller->reltribeusersFactory->getCount($criteria_mytribes);
     $criteria_mytribes->setLimit($xoopsModuleConfig['tribesperpage']);
     $criteria_mytribes->setStart($start_my);
     $mytribes = $controller->reltribeusersFactory->getTribes('', $criteria_mytribes, 0);
    @@ -72,10 +73,10 @@
      * Criando a barra de navegao caso tenha muitos amigos
      */
     $barra_navegacao = new \XoopsPageNav($nb_tribes, $xoopsModuleConfig['tribesperpage'], $start_all, 'start_all', 'uid=' . (int)$controller->uidOwner . '&start_my=' . $start_my);
    -$barrinha = $barra_navegacao->renderImageNav(2); //alltribes
    +$barrinha        = $barra_navegacao->renderImageNav(2); //alltribes
     
     $barra_navegacao_my = new \XoopsPageNav($nb_mytribes, $xoopsModuleConfig['tribesperpage'], $start_my, 'start_my', 'uid=' . (int)$controller->uidOwner . '&start_all=' . $start_all);
    -$barrinha_my = $barra_navegacao_my->renderImageNav(2);
    +$barrinha_my        = $barra_navegacao_my->renderImageNav(2);
     
     $maxfilebytes = $xoopsModuleConfig['maxfilesize'];
     
    diff --git a/unsuspenduser.php b/unsuspenduser.php
    index f4bea10f..4072f2e0 100644
    --- a/unsuspenduser.php
    +++ b/unsuspenduser.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     require __DIR__ . '/header.php';
    @@ -29,12 +30,12 @@
      * Creating the factory  loading the picture changing its caption
      */
     $suspensionsFactory = new Yogurt\SuspensionsHandler($xoopsDB);
    -$suspension = $suspensionsFactory->create(false);
    +$suspension         = $suspensionsFactory->create(false);
     $suspension->load($uid);
     
     if ($xoopsUser->isAdmin(1)) {
         $memberHandler = xoops_getHandler('member');
    -    $thisUser = $memberHandler->getUser($uid);
    +    $thisUser      = $memberHandler->getUser($uid);
     
         $thisUser->setVar('email', $suspension->getVar('old_email', 'n'));
         $thisUser->setVar('pass', $suspension->getVar('old_pass', 'n'));
    diff --git a/video_submited.php b/video_submited.php
    index e65e9369..e09d4adf 100644
    --- a/video_submited.php
    +++ b/video_submited.php
    @@ -16,6 +16,7 @@
      * @author       XOOPS Development Team
      * @since
      */
    +
     use XoopsModules\Yogurt;
     
     $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl';
    @@ -45,14 +46,14 @@
         $code = $url;
     } else {
         $position_of_code = mb_strpos($url, 'v=');
    -    $code = mb_substr($url, $position_of_code + 2, 11);
    +    $code             = mb_substr($url, $position_of_code + 2, 11);
     }
     
     $newvideo->setVar('youtube_code', $code);
     if ($albumFactory->insert($newvideo)) {
         $extra_tags['X_OWNER_NAME'] = $xoopsUser->getVar('uname');
    -    $extra_tags['X_OWNER_UID'] = (int)$xoopsUser->getVar('uid');
    -    $notificationHandler = xoops_getHandler('notification');
    +    $extra_tags['X_OWNER_UID']  = (int)$xoopsUser->getVar('uid');
    +    $notificationHandler        = xoops_getHandler('notification');
         $notificationHandler->triggerEvent('video', (int)$xoopsUser->getVar('uid'), 'new_video', $extra_tags);
         redirect_header(XOOPS_URL . '/modules/yogurt/seutubo.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_VIDEOSAVED);
     } else {
    diff --git a/xoops_version.php b/xoops_version.php
    index a35439e7..efaad880 100644
    --- a/xoops_version.php
    +++ b/xoops_version.php
    @@ -20,79 +20,79 @@
     
     // ------------------- Informations ------------------- //
     $modversion = [
    -    'version' => 3.4,
    -    'module_status' => 'Beta 2',
    -    'release_date' => '2020/03/28',
    -    'name' => _MI_YOGURT_MODULE_NAME,
    -    'description' => _MI_YOGURT_MODULEDESC,
    -    'official' => 0,
    +    'version'             => 3.4,
    +    'module_status'       => 'Beta 2',
    +    'release_date'        => '2020/03/28',
    +    'name'                => _MI_YOGURT_MODULE_NAME,
    +    'description'         => _MI_YOGURT_MODULEDESC,
    +    'official'            => 0,
         //1 indicates official XOOPS module supported by XOOPS Dev Team, 0 means 3rd party supported
    -    'author' => 'Marcello Brandao',
    -    'credits' => 'XOOPS Development Team, The ImpressCMS Project, Jquery Lightbox, Komeia, vaughan,',
    -    'author_mail' => 'author-email',
    -    'author_website_url' => 'https://xoops.org',
    +    'author'              => 'Marcello Brandao',
    +    'credits'             => 'XOOPS Development Team, The ImpressCMS Project, Jquery Lightbox, Komeia, vaughan,',
    +    'author_mail'         => 'author-email',
    +    'author_website_url'  => 'https://xoops.org',
         'author_website_name' => 'XOOPS',
    -    'license' => 'GPL 2.0 or later',
    -    'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/',
    -    'help' => 'page=help',
    +    'license'             => 'GPL 2.0 or later',
    +    'license_url'         => 'www.gnu.org/licenses/gpl-2.0.html/',
    +    'help'                => 'page=help',
         // ------------------- Folders & Files -------------------
    -    'release_info' => 'Changelog',
    -    'release_file' => XOOPS_URL . "/modules/$moduleDirName/docs/changelog.txt",
    +    'release_info'        => 'Changelog',
    +    'release_file'        => XOOPS_URL . "/modules/$moduleDirName/docs/changelog.txt",
     
    -    'manual' => 'link to manual file',
    -    'manual_file' => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt",
    +    'manual'              => 'link to manual file',
    +    'manual_file'         => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt",
         // images
    -    'image' => 'assets/images/logoModule.png',
    -    'iconsmall' => 'assets/images/iconsmall.png',
    -    'iconbig' => 'assets/images/iconbig.png',
    -    'dirname' => $moduleDirName,
    -    'modicons16' => 'assets/images/icons/16',
    -    'modicons32' => 'assets/images/icons/32',
    -    'demo_site_url' => 'https://xoops.org',
    -    'demo_site_name' => 'XOOPS Demo Site',
    -    'support_url' => 'https://xoops.org/modules/newbb/viewforum.php?forum=28/',
    -    'support_name' => 'Support Forum',
    -    'submit_bug' => 'https://github.com/XoopsModules25x/' . $moduleDirName . '/issues',
    -    'module_website_url' => 'www.xoops.org',
    +    'image'               => 'assets/images/logoModule.png',
    +    'iconsmall'           => 'assets/images/iconsmall.png',
    +    'iconbig'             => 'assets/images/iconbig.png',
    +    'dirname'             => $moduleDirName,
    +    'modicons16'          => 'assets/images/icons/16',
    +    'modicons32'          => 'assets/images/icons/32',
    +    'demo_site_url'       => 'https://xoops.org',
    +    'demo_site_name'      => 'XOOPS Demo Site',
    +    'support_url'         => 'https://xoops.org/modules/newbb/viewforum.php?forum=28/',
    +    'support_name'        => 'Support Forum',
    +    'submit_bug'          => 'https://github.com/XoopsModules25x/' . $moduleDirName . '/issues',
    +    'module_website_url'  => 'www.xoops.org',
         'module_website_name' => 'XOOPS Project',
         // ------------------- Min Requirements -------------------
    -    'min_php' => '7.1',
    -    'min_xoops' => '2.5.10',
    -    'min_admin' => '1.2',
    -    'min_db' => ['mysql' => '5.5'],
    +    'min_php'             => '7.1',
    +    'min_xoops'           => '2.5.10',
    +    'min_admin'           => '1.2',
    +    'min_db'              => ['mysql' => '5.5'],
         // ------------------- Admin Menu -------------------
    -    'system_menu' => 1,
    -    'hasAdmin' => 1,
    -    'adminindex' => 'admin/index.php',
    -    'adminmenu' => 'admin/menu.php',
    +    'system_menu'         => 1,
    +    'hasAdmin'            => 1,
    +    'adminindex'          => 'admin/index.php',
    +    'adminmenu'           => 'admin/menu.php',
         // ------------------- Main Menu -------------------
    -    'hasMain' => 1,
    -    'sub' => [
    +    'hasMain'             => 1,
    +    'sub'                 => [
             [
                 'name' => _MI_YOGURT_SEARCH,
    -            'url' => 'searchmembers.php',
    +            'url'  => 'searchmembers.php',
             ],
             [
                 'name' => _MI_YOGURT_MYPROFILE,
    -            'url' => 'index.php',
    +            'url'  => 'index.php',
             ],
         ],
     
         // ------------------- Install/Update -------------------
    -    'onInstall' => 'include/oninstall.php',
    -    'onUpdate' => 'include/onupdate.php',
    +    'onInstall'           => 'include/oninstall.php',
    +    'onUpdate'            => 'include/onupdate.php',
         //  'onUninstall'         => 'include/onuninstall.php',
         // -------------------  PayPal ---------------------------
    -    'paypal' => [
    -        'business' => 'xoopsfoundation@gmail.com',
    -        'item_name' => 'Donation : ' . _MI_YOGURT_MODULE_NAME,
    -        'amount' => 0,
    +    'paypal'              => [
    +        'business'      => 'xoopsfoundation@gmail.com',
    +        'item_name'     => 'Donation : ' . _MI_YOGURT_MODULE_NAME,
    +        'amount'        => 0,
             'currency_code' => 'USD',
         ],
         // ------------------- Mysql -----------------------------
    -    'sqlfile' => ['mysql' => 'sql/mysql.sql'],
    +    'sqlfile'             => ['mysql' => 'sql/mysql.sql'],
         // ------------------- Tables ----------------------------
    -    'tables' => [
    +    'tables'              => [
             $moduleDirName . '_' . 'friendpetition',
             $moduleDirName . '_' . 'friendship',
             $moduleDirName . '_' . 'images',
    @@ -117,16 +117,16 @@
     
     // SX Updater/Installer
     $modversion['simpleversion'] = '3.4';
    -$modversion['simplename'] = 'yogurt';
    -$modversion['simpleid'] = 22;
    +$modversion['simplename']    = 'yogurt';
    +$modversion['simpleid']      = 22;
     
     //Adicionado para rodar no about
    -$modversion['developer_website_url'] = 'https://sourceforge.net/projects/galeriayogurt/';
    +$modversion['developer_website_url']  = 'https://sourceforge.net/projects/galeriayogurt/';
     $modversion['developer_website_name'] = 'Sourceforge - galeriayogurt';
    -$modversion['developer_email'] = 'marcello.brandao@gmail.com';
    -$modversion['status_version'] = 'Beta';
    -$modversion['status'] = 'Beta';
    -$modversion['date'] = '2017-11-11';
    +$modversion['developer_email']        = 'marcello.brandao@gmail.com';
    +$modversion['status_version']         = 'Beta';
    +$modversion['status']                 = 'Beta';
    +$modversion['date']                   = '2017-11-11';
     
     $modversion['people']['developers'][] = 'Suico (Dev)';
     $modversion['people']['developers'][] = 'Alfred (Dev)';
    @@ -147,32 +147,32 @@
     
     $modversion['people']['other'][] = 'Komeia (patrocanio)';
     
    -$modversion['demo_site_url'] = 'http://www.marcellobrandao.eti.br';
    -$modversion['demo_site_name'] = 'Marcello Brandao Site';
    -$modversion['support_site_url'] = 'http://sourceforge.net/projects/galeriayogurt/';
    +$modversion['demo_site_url']     = 'http://www.marcellobrandao.eti.br';
    +$modversion['demo_site_name']    = 'Marcello Brandao Site';
    +$modversion['support_site_url']  = 'http://sourceforge.net/projects/galeriayogurt/';
     $modversion['support_site_name'] = 'Sourceforge';
    -$modversion['submit_bug'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988288';
    -$modversion['submit_feature'] = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988291';
    +$modversion['submit_bug']        = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988288';
    +$modversion['submit_feature']    = 'http://sourceforge.net/tracker/?func=add&group_id=204109&atid=988291';
     
     //$modversion['config'][1]['valuetype'] = 'int';
     //can be 'int', 'float', 'textarea' or 'array'. All items with formtype 'multi_xxx' must have the valuetype 'array'
     
     $modversion['config'][] = [
    -    'name' => 'enable_pictures',
    -    'title' => '_MI_YOG_ENABLEPICT_TITLE',
    +    'name'        => 'enable_pictures',
    +    'title'       => '_MI_YOG_ENABLEPICT_TITLE',
         'description' => '_MI_YOG_ENABLEPICT_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'nb_pict',
    -    'title' => '_MI_YOG_NUMBPICT_TITLE',
    +    'name'        => 'nb_pict',
    +    'title'       => '_MI_YOG_NUMBPICT_TITLE',
         'description' => '_MI_YOG_NUMBPICT_DESC',
    -    'default' => 12,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 12,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     /*
    @@ -196,228 +196,228 @@
     */
     
     $modversion['config'][] = [
    -    'name' => 'thumb_width',
    -    'title' => '_MI_YOG_THUMW_TITLE',
    +    'name'        => 'thumb_width',
    +    'title'       => '_MI_YOG_THUMW_TITLE',
         'description' => '_MI_YOG_THUMBW_DESC',
    -    'default' => 125,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 125,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'thumb_height',
    -    'title' => '_MI_YOG_THUMBH_TITLE',
    +    'name'        => 'thumb_height',
    +    'title'       => '_MI_YOG_THUMBH_TITLE',
         'description' => '_MI_YOG_THUMBH_DESC',
    -    'default' => 175,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 175,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'resized_width',
    -    'title' => '_MI_YOG_RESIZEDW_TITLE',
    +    'name'        => 'resized_width',
    +    'title'       => '_MI_YOG_RESIZEDW_TITLE',
         'description' => '_MI_YOG_RESIZEDW_DESC',
    -    'default' => 650,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 650,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'resized_height',
    -    'title' => '_MI_YOG_RESIZEDH_TITLE',
    +    'name'        => 'resized_height',
    +    'title'       => '_MI_YOG_RESIZEDH_TITLE',
         'description' => '_MI_YOG_RESIZEDH_DESC',
    -    'default' => 450,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 450,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'max_original_width',
    -    'title' => '_MI_YOG_ORIGINALW_TITLE',
    +    'name'        => 'max_original_width',
    +    'title'       => '_MI_YOG_ORIGINALW_TITLE',
         'description' => '_MI_YOG_ORIGINALW_DESC',
    -    'default' => 2048,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 2048,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'max_original_height',
    -    'title' => '_MI_YOG_ORIGINALH_TITLE',
    +    'name'        => 'max_original_height',
    +    'title'       => '_MI_YOG_ORIGINALH_TITLE',
         'description' => '_MI_YOG_ORIGINALH_DESC',
    -    'default' => 1600,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 1600,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'maxfilesize',
    -    'title' => '_MI_YOG_MAXFILEBYTES_TITLE',
    +    'name'        => 'maxfilesize',
    +    'title'       => '_MI_YOG_MAXFILEBYTES_TITLE',
         'description' => '_MI_YOG_MAXFILEBYTES_DESC',
    -    'default' => 512000,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 512000,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'picturesperpage',
    -    'title' => '_MI_YOG_PICTURESPERPAGE_TITLE',
    +    'name'        => 'picturesperpage',
    +    'title'       => '_MI_YOG_PICTURESPERPAGE_TITLE',
         'description' => '_MI_YOG_PICTURESPERPAGE_DESC',
    -    'default' => 6,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 6,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'physical_delete',
    -    'title' => '_MI_YOG_DELETEPHYSICAL_TITLE',
    +    'name'        => 'physical_delete',
    +    'title'       => '_MI_YOG_DELETEPHYSICAL_TITLE',
         'description' => '_MI_YOG_DELETEPHYSICAL_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'images_order',
    -    'title' => '_MI_YOG_IMGORDER_TITLE',
    +    'name'        => 'images_order',
    +    'title'       => '_MI_YOG_IMGORDER_TITLE',
         'description' => '_MI_YOG_IMGORDER_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'enable_friends',
    -    'title' => '_MI_YOG_ENABLEFRIENDS_TITLE',
    +    'name'        => 'enable_friends',
    +    'title'       => '_MI_YOG_ENABLEFRIENDS_TITLE',
         'description' => '_MI_YOG_ENABLEFRIENDS_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'friendsperpage',
    -    'title' => '_MI_YOG_FRIENDSPERPAGE_TITLE',
    +    'name'        => 'friendsperpage',
    +    'title'       => '_MI_YOG_FRIENDSPERPAGE_TITLE',
         'description' => '_MI_YOG_FRIENDSPERPAGE_DESC',
    -    'default' => 12,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 12,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'enable_audio',
    -    'title' => '_MI_YOG_ENABLEAUDIO_TITLE',
    +    'name'        => 'enable_audio',
    +    'title'       => '_MI_YOG_ENABLEAUDIO_TITLE',
         'description' => '_MI_YOG_ENABLEAUDIO_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'nb_audio',
    -    'title' => '_MI_YOG_NUMBAUDIO_TITLE',
    +    'name'        => 'nb_audio',
    +    'title'       => '_MI_YOG_NUMBAUDIO_TITLE',
         'description' => '_MI_YOG_NUMBAUDIO_DESC',
    -    'default' => 12,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 12,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'audiosperpage',
    -    'title' => '_MI_YOG_AUDIOSPERPAGE_TITLE',
    +    'name'        => 'audiosperpage',
    +    'title'       => '_MI_YOG_AUDIOSPERPAGE_TITLE',
         'description' => '_MI_YOG_AUDIOSPERPAGE_DESC',
    -    'default' => 20,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 20,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'enable_videos',
    -    'title' => '_MI_YOG_ENABLEVIDEOS_TITLE',
    +    'name'        => 'enable_videos',
    +    'title'       => '_MI_YOG_ENABLEVIDEOS_TITLE',
         'description' => '_MI_YOG_ENABLEVIDEOS_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'videosperpage',
    -    'title' => '_MI_YOG_VIDEOSPERPAGE_TITLE',
    +    'name'        => 'videosperpage',
    +    'title'       => '_MI_YOG_VIDEOSPERPAGE_TITLE',
         'description' => '_MI_YOG_VIDEOSPERPAGE_DESC',
    -    'default' => 6,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 6,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'width_tube',
    -    'title' => '_MI_YOG_TUBEW_TITLE',
    +    'name'        => 'width_tube',
    +    'title'       => '_MI_YOG_TUBEW_TITLE',
         'description' => '_MI_YOG_TUBEW_DESC',
    -    'default' => 450,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 450,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'height_tube',
    -    'title' => '_MI_YOG_TUBEH_TITLE',
    +    'name'        => 'height_tube',
    +    'title'       => '_MI_YOG_TUBEH_TITLE',
         'description' => '_MI_YOG_TUBEH_DESC',
    -    'default' => 350,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 350,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'width_maintube',
    -    'title' => '_MI_YOG_MAINTUBEW_TITLE',
    +    'name'        => 'width_maintube',
    +    'title'       => '_MI_YOG_MAINTUBEW_TITLE',
         'description' => '_MI_YOG_MAINTUBEW_DESC',
    -    'default' => 250,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 250,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'height_maintube',
    -    'title' => '_MI_YOG_MAINTUBEH_TITLE',
    +    'name'        => 'height_maintube',
    +    'title'       => '_MI_YOG_MAINTUBEH_TITLE',
         'description' => '_MI_YOG_MAINTUBEH_DESC',
    -    'default' => 210,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 210,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'enable_tribes',
    -    'title' => '_MI_YOG_ENABLETRIBES_TITLE',
    +    'name'        => 'enable_tribes',
    +    'title'       => '_MI_YOG_ENABLETRIBES_TITLE',
         'description' => '_MI_YOG_ENABLETRIBES_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'tribesperpage',
    -    'title' => '_MI_YOG_TRIBESPERPAGE_TITLE',
    +    'name'        => 'tribesperpage',
    +    'title'       => '_MI_YOG_TRIBESPERPAGE_TITLE',
         'description' => '_MI_YOG_TRIBESPERPAGE_DESC',
    -    'default' => 6,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 6,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'enable_notes',
    -    'title' => '_MI_YOG_ENABLENOTES_TITLE',
    +    'name'        => 'enable_notes',
    +    'title'       => '_MI_YOG_ENABLENOTES_TITLE',
         'description' => '_MI_YOG_ENABLENOTES_DESC',
    -    'default' => 1,
    -    'formtype' => 'yesno',
    -    'valuetype' => 'int',
    +    'default'     => 1,
    +    'formtype'    => 'yesno',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['config'][] = [
    -    'name' => 'Notesperpage',
    -    'title' => '_MI_YOG_NOTESPERPAGE_TITLE',
    +    'name'        => 'Notesperpage',
    +    'title'       => '_MI_YOG_NOTESPERPAGE_TITLE',
         'description' => '_MI_YOG_NOTESPERPAGE_DESC',
    -    'default' => 20,
    -    'formtype' => 'textbox',
    -    'valuetype' => 'int',
    +    'default'     => 20,
    +    'formtype'    => 'textbox',
    +    'valuetype'   => 'int',
     ];
     
     $modversion['templates'] = [
    @@ -443,104 +443,104 @@
     global $xoopsModule;
     if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname']) {
         $moduleHandler = xoops_getHandler('module');
    -    $mod_yogurt = $moduleHandler->getByDirname('yogurt');
    -    $confHandler = xoops_getHandler('config');
    -    $moduleConfig = $confHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid'));
    +    $mod_yogurt    = $moduleHandler->getByDirname('yogurt');
    +    $confHandler   = xoops_getHandler('config');
    +    $moduleConfig  = $confHandler->getConfigsByCat(0, $mod_yogurt->getVar('mid'));
     
         if (1 == $moduleConfig['enable_notes']) {
             $modversion['sub'][3]['name'] = _MI_YOGURT_MYNOTES;
    -        $modversion['sub'][3]['url'] = 'notebook.php';
    +        $modversion['sub'][3]['url']  = 'notebook.php';
         }
         if (1 == $moduleConfig['enable_pictures']) {
             $modversion['sub'][4]['name'] = _MI_YOGURT_MYPICTURES;
    -        $modversion['sub'][4]['url'] = 'album.php';
    +        $modversion['sub'][4]['url']  = 'album.php';
         }
         if (1 == $moduleConfig['enable_audio']) {
             $modversion['sub'][5]['name'] = _MI_YOGURT_MYAUDIOS;
    -        $modversion['sub'][5]['url'] = 'audio.php';
    +        $modversion['sub'][5]['url']  = 'audio.php';
         }
         if (1 == $moduleConfig['enable_videos']) {
             $modversion['sub'][6]['name'] = _MI_YOGURT_MYVIDEOS;
    -        $modversion['sub'][6]['url'] = 'seutubo.php';
    +        $modversion['sub'][6]['url']  = 'seutubo.php';
         }
         if (1 == $moduleConfig['enable_friends']) {
             $modversion['sub'][7]['name'] = _MI_YOGURT_MYFRIENDS;
    -        $modversion['sub'][7]['url'] = 'friends.php';
    +        $modversion['sub'][7]['url']  = 'friends.php';
         }
         if (1 == $moduleConfig['enable_tribes']) {
             $modversion['sub'][8]['name'] = _MI_YOGURT_MYTRIBES;
    -        $modversion['sub'][8]['url'] = 'tribes.php';
    +        $modversion['sub'][8]['url']  = 'tribes.php';
         }
     }
     $modversion['sub'][9]['name'] = _MI_YOGURT_MYCONFIGS;
    -$modversion['sub'][9]['url'] = 'configs.php';
    +$modversion['sub'][9]['url']  = 'configs.php';
     
    -$modversion['hasComments'] = 1;
    +$modversion['hasComments']          = 1;
     $modversion['comments']['itemName'] = 'tribe_id';
     $modversion['comments']['pageName'] = 'tribe.php';
     
     // Search
    -$modversion['hasSearch'] = 0; //disabled for version 3.0 will come back in a next release
    +$modversion['hasSearch']      = 0; //disabled for version 3.0 will come back in a next release
     $modversion['search']['file'] = 'include/search.inc.php';
     $modversion['search']['func'] = 'yogurt_search';
     
     //Notifications
    -$modversion['hasNotification'] = 1;
    -$modversion['notification']['category'][1]['name'] = 'picture';
    -$modversion['notification']['category'][1]['title'] = _MI_YOG_PICTURE_NOTIFYTIT;
    -$modversion['notification']['category'][1]['description'] = _MI_YOG_PICTURE_NOTIFYDSC;
    +$modversion['hasNotification']                               = 1;
    +$modversion['notification']['category'][1]['name']           = 'picture';
    +$modversion['notification']['category'][1]['title']          = _MI_YOG_PICTURE_NOTIFYTIT;
    +$modversion['notification']['category'][1]['description']    = _MI_YOG_PICTURE_NOTIFYDSC;
     $modversion['notification']['category'][1]['subscribe_from'] = 'album.php';
    -$modversion['notification']['category'][1]['item_name'] = 'uid';
    +$modversion['notification']['category'][1]['item_name']      = 'uid';
     $modversion['notification']['category'][1]['allow_bookmark'] = 1;
    -$modversion['notification']['event'][1]['name'] = 'new_picture';
    -$modversion['notification']['event'][1]['category'] = 'picture';
    -$modversion['notification']['event'][1]['title'] = _MI_YOG_PICTURE_NEWPIC_NOTIFY;
    -$modversion['notification']['event'][1]['caption'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYCAP;
    -$modversion['notification']['event'][1]['description'] = _MI_YOG_PICTURE_NEWPOST_NOTIFYDSC;
    -$modversion['notification']['event'][1]['mail_template'] = 'picture_newpic_notify';
    -$modversion['notification']['event'][1]['mail_subject'] = _MI_YOG_PICTURE_NEWPIC_NOTIFYSBJ;
    -
    -$modversion['notification']['category'][2]['name'] = 'video';
    -$modversion['notification']['category'][2]['title'] = _MI_YOG_VIDEO_NOTIFYTIT;
    -$modversion['notification']['category'][2]['description'] = _MI_YOG_VIDEO_NOTIFYDSC;
    +$modversion['notification']['event'][1]['name']              = 'new_picture';
    +$modversion['notification']['event'][1]['category']          = 'picture';
    +$modversion['notification']['event'][1]['title']             = _MI_YOG_PICTURE_NEWPIC_NOTIFY;
    +$modversion['notification']['event'][1]['caption']           = _MI_YOG_PICTURE_NEWPIC_NOTIFYCAP;
    +$modversion['notification']['event'][1]['description']       = _MI_YOG_PICTURE_NEWPOST_NOTIFYDSC;
    +$modversion['notification']['event'][1]['mail_template']     = 'picture_newpic_notify';
    +$modversion['notification']['event'][1]['mail_subject']      = _MI_YOG_PICTURE_NEWPIC_NOTIFYSBJ;
    +
    +$modversion['notification']['category'][2]['name']           = 'video';
    +$modversion['notification']['category'][2]['title']          = _MI_YOG_VIDEO_NOTIFYTIT;
    +$modversion['notification']['category'][2]['description']    = _MI_YOG_VIDEO_NOTIFYDSC;
     $modversion['notification']['category'][2]['subscribe_from'] = 'seutubo.php';
    -$modversion['notification']['category'][2]['item_name'] = 'uid';
    +$modversion['notification']['category'][2]['item_name']      = 'uid';
     $modversion['notification']['category'][2]['allow_bookmark'] = 1;
    -$modversion['notification']['event'][2]['name'] = 'new_video';
    -$modversion['notification']['event'][2]['category'] = 'video';
    -$modversion['notification']['event'][2]['title'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFY;
    -$modversion['notification']['event'][2]['caption'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYCAP;
    -$modversion['notification']['event'][2]['description'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYDSC;
    -$modversion['notification']['event'][2]['mail_template'] = 'video_newvideo_notify';
    -$modversion['notification']['event'][2]['mail_subject'] = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYSBJ;
    -
    -$modversion['notification']['category'][3]['name'] = 'Note';
    -$modversion['notification']['category'][3]['title'] = _MI_YOG_NOTE_NOTIFYTIT;
    -$modversion['notification']['category'][3]['description'] = _MI_YOG_NOTE_NOTIFYDSC;
    +$modversion['notification']['event'][2]['name']              = 'new_video';
    +$modversion['notification']['event'][2]['category']          = 'video';
    +$modversion['notification']['event'][2]['title']             = _MI_YOG_VIDEO_NEWVIDEO_NOTIFY;
    +$modversion['notification']['event'][2]['caption']           = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYCAP;
    +$modversion['notification']['event'][2]['description']       = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYDSC;
    +$modversion['notification']['event'][2]['mail_template']     = 'video_newvideo_notify';
    +$modversion['notification']['event'][2]['mail_subject']      = _MI_YOG_VIDEO_NEWVIDEO_NOTIFYSBJ;
    +
    +$modversion['notification']['category'][3]['name']           = 'Note';
    +$modversion['notification']['category'][3]['title']          = _MI_YOG_NOTE_NOTIFYTIT;
    +$modversion['notification']['category'][3]['description']    = _MI_YOG_NOTE_NOTIFYDSC;
     $modversion['notification']['category'][3]['subscribe_from'] = 'notebook.php';
    -$modversion['notification']['category'][3]['item_name'] = 'uid';
    +$modversion['notification']['category'][3]['item_name']      = 'uid';
     $modversion['notification']['category'][3]['allow_bookmark'] = 1;
    -$modversion['notification']['event'][3]['name'] = 'new_Note';
    -$modversion['notification']['event'][3]['category'] = 'Note';
    -$modversion['notification']['event'][3]['title'] = _MI_YOG_NOTE_NEWNOTE_NOTIFY;
    -$modversion['notification']['event'][3]['caption'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYCAP;
    -$modversion['notification']['event'][3]['description'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYDSC;
    -$modversion['notification']['event'][3]['mail_template'] = 'Note_newNote_notify';
    -$modversion['notification']['event'][3]['mail_subject'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYSBJ;
    -
    -$modversion['notification']['category'][4]['name'] = 'friendship';
    -$modversion['notification']['category'][4]['title'] = _MI_YOG_FRIENDSHIP_NOTIFYTIT;
    -$modversion['notification']['category'][4]['description'] = _MI_YOG_FRIENDSHIP_NOTIFYDSC;
    +$modversion['notification']['event'][3]['name']              = 'new_Note';
    +$modversion['notification']['event'][3]['category']          = 'Note';
    +$modversion['notification']['event'][3]['title']             = _MI_YOG_NOTE_NEWNOTE_NOTIFY;
    +$modversion['notification']['event'][3]['caption']           = _MI_YOG_NOTE_NEWNOTE_NOTIFYCAP;
    +$modversion['notification']['event'][3]['description']       = _MI_YOG_NOTE_NEWNOTE_NOTIFYDSC;
    +$modversion['notification']['event'][3]['mail_template']     = 'Note_newNote_notify';
    +$modversion['notification']['event'][3]['mail_subject']      = _MI_YOG_NOTE_NEWNOTE_NOTIFYSBJ;
    +
    +$modversion['notification']['category'][4]['name']           = 'friendship';
    +$modversion['notification']['category'][4]['title']          = _MI_YOG_FRIENDSHIP_NOTIFYTIT;
    +$modversion['notification']['category'][4]['description']    = _MI_YOG_FRIENDSHIP_NOTIFYDSC;
     $modversion['notification']['category'][4]['subscribe_from'] = 'friends.php';
    -$modversion['notification']['category'][4]['item_name'] = 'uid';
    +$modversion['notification']['category'][4]['item_name']      = 'uid';
     $modversion['notification']['category'][4]['allow_bookmark'] = 0;
    -$modversion['notification']['event'][4]['name'] = 'new_friendship';
    -$modversion['notification']['event'][4]['category'] = 'friendship';
    -$modversion['notification']['event'][4]['title'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFY;
    -$modversion['notification']['event'][4]['caption'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYCAP;
    -$modversion['notification']['event'][4]['description'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYDSC;
    -$modversion['notification']['event'][4]['mail_template'] = 'friendship_newpetition_notify';
    -$modversion['notification']['event'][4]['mail_subject'] = _MI_YOG_FRIEND_NEWPETITION_NOTIFYSBJ;
    +$modversion['notification']['event'][4]['name']              = 'new_friendship';
    +$modversion['notification']['event'][4]['category']          = 'friendship';
    +$modversion['notification']['event'][4]['title']             = _MI_YOG_FRIEND_NEWPETITION_NOTIFY;
    +$modversion['notification']['event'][4]['caption']           = _MI_YOG_FRIEND_NEWPETITION_NOTIFYCAP;
    +$modversion['notification']['event'][4]['description']       = _MI_YOG_FRIEND_NEWPETITION_NOTIFYDSC;
    +$modversion['notification']['event'][4]['mail_template']     = 'friendship_newpetition_notify';
    +$modversion['notification']['event'][4]['mail_subject']      = _MI_YOG_FRIEND_NEWPETITION_NOTIFYSBJ;
     
     $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
     $modversion['notification']['lookup_func'] = 'yogurt_iteminfo';
    @@ -548,21 +548,21 @@
     //$modversion['notification']['tags_func'] = 'yogurt_tags';
     
     $modversion['blocks'][] = [
    -    'file' => 'blocks.php',
    -    'name' => _MI_YOGURT_FRIENDS,
    +    'file'        => 'blocks.php',
    +    'name'        => _MI_YOGURT_FRIENDS,
         'description' => _MI_YOGURT_FRIENDS_DESC,
    -    'show_func' => 'b_yogurt_friends_show',
    -    'options' => '5',
    -    'edit_func' => 'b_yogurt_friends_edit',
    -    'template' => 'yogurt_block_friends.tpl',
    +    'show_func'   => 'b_yogurt_friends_show',
    +    'options'     => '5',
    +    'edit_func'   => 'b_yogurt_friends_edit',
    +    'template'    => 'yogurt_block_friends.tpl',
     ];
     
     $modversion['blocks'][] = [
    -    'file' => 'blocks.php',
    -    'name' => _MI_YOGURT_LAST,
    +    'file'        => 'blocks.php',
    +    'name'        => _MI_YOGURT_LAST,
         'description' => _MI_YOGURT_LAST_DESC,
    -    'show_func' => 'b_yogurt_lastpictures_show',
    -    'options' => '5',
    -    'edit_func' => 'b_yogurt_lastpictures_edit',
    -    'template' => 'yogurt_block_lastpictures.tpl',
    +    'show_func'   => 'b_yogurt_lastpictures_show',
    +    'options'     => '5',
    +    'edit_func'   => 'b_yogurt_lastpictures_edit',
    +    'template'    => 'yogurt_block_lastpictures.tpl',
     ];
    
    From ebc29545cc2377ebfc86a6e2dc67a2358924ecd5 Mon Sep 17 00:00:00 2001
    From: mambax7 
    Date: Mon, 30 Mar 2020 14:58:01 -0400
    Subject: [PATCH 24/43] fix for YogurtController, other fixes
    
    ---
     class/{YogurtControler.php => YogurtController.php} | 0
     comment_delete.php                                  | 2 +-
     comment_edit.php                                    | 2 +-
     comment_post.php                                    | 2 +-
     comment_reply.php                                   | 2 +-
     index.php                                           | 2 +-
     notification_update.php                             | 2 +-
     xoops_version.php                                   | 4 ++--
     8 files changed, 8 insertions(+), 8 deletions(-)
     rename class/{YogurtControler.php => YogurtController.php} (100%)
    
    diff --git a/class/YogurtControler.php b/class/YogurtController.php
    similarity index 100%
    rename from class/YogurtControler.php
    rename to class/YogurtController.php
    diff --git a/comment_delete.php b/comment_delete.php
    index 48ecd28c..80486790 100644
    --- a/comment_delete.php
    +++ b/comment_delete.php
    @@ -16,5 +16,5 @@
      * @author       XOOPS Development Team
      * @since
      */
    -include __DIR__ . '/../../mainfile.php';
    +include dirname(dirname(__DIR__)) . '/mainfile.php';
     include XOOPS_ROOT_PATH . '/include/comment_delete.php';
    diff --git a/comment_edit.php b/comment_edit.php
    index 135ace47..fdea5bd3 100644
    --- a/comment_edit.php
    +++ b/comment_edit.php
    @@ -16,5 +16,5 @@
      * @author       XOOPS Development Team
      * @since
      */
    -include __DIR__ . '/../../mainfile.php';
    +include dirname(dirname(__DIR__)) . '/mainfile.php';
     include XOOPS_ROOT_PATH . '/include/comment_edit.php';
    diff --git a/comment_post.php b/comment_post.php
    index 61fb2a79..9d5447e6 100644
    --- a/comment_post.php
    +++ b/comment_post.php
    @@ -16,5 +16,5 @@
      * @author       XOOPS Development Team
      * @since
      */
    -include __DIR__ . '/../../mainfile.php';
    +include dirname(dirname(__DIR__)) . '/mainfile.php';
     include XOOPS_ROOT_PATH . '/include/comment_post.php';
    diff --git a/comment_reply.php b/comment_reply.php
    index 52a1db74..97b62aeb 100644
    --- a/comment_reply.php
    +++ b/comment_reply.php
    @@ -16,5 +16,5 @@
      * @author       XOOPS Development Team
      * @since
      */
    -include __DIR__ . '/../../mainfile.php';
    +include dirname(dirname(__DIR__)) . '/mainfile.php';
     include XOOPS_ROOT_PATH . '/include/comment_reply.php';
    diff --git a/index.php b/index.php
    index a8c7d14d..92be2bf0 100644
    --- a/index.php
    +++ b/index.php
    @@ -32,7 +32,7 @@
     //    include_once XOOPS_ROOT_PATH . '/language/english/user.php';
     //}
     
    -$controller = new Yogurt\ControllerIndex($xoopsDB, $xoopsUser);
    +$controller = new \XoopsModules\Yogurt\ControllerIndex($xoopsDB, $xoopsUser);
     
     /**
      * Fecthing numbers of tribes friends videos pictures etc...
    diff --git a/notification_update.php b/notification_update.php
    index 0d1f7238..98a02de2 100644
    --- a/notification_update.php
    +++ b/notification_update.php
    @@ -1,4 +1,4 @@
      'include/oninstall.php',
    -    'onUpdate'            => 'include/onupdate.php',
    +//    'onInstall'           => 'include/oninstall.php',
    +//    'onUpdate'            => 'include/onupdate.php',
         //  'onUninstall'         => 'include/onuninstall.php',
         // -------------------  PayPal ---------------------------
         'paypal'              => [
    
    From f46a3e32ce01f2be113b1aa664cf66f84d1b2ef7 Mon Sep 17 00:00:00 2001
    From: mambax7 
    Date: Wed, 1 Apr 2020 01:18:33 -0400
    Subject: [PATCH 25/43] fixes, DB renamed table/fields moved js, css, and
     images to /assets
    
    ---
     album.php                                     |  16 +--
     .../css}/jquery.lightbox-0.3.css              |   0
     {css => assets/css}/jquery.tabs-ie.css        |   0
     {css => assets/css}/jquery.tabs.css           |   0
     {include => assets/css}/yogurt.css            |   0
     assets/images/{scrapbook.gif => notebook.gif} | Bin
     assets/images/{scraps.gif => notes.gif}       | Bin
     {include => assets/js}/jquery.js              |   0
     {include => assets/js}/jquery.lightbox-0.3.js |   0
     {js => assets/js}/jquery.tabs.pack.js         |   0
     {include => assets/js}/yogurt.js              |   0
     audio.php                                     |  14 +--
     class/AudioController.php                     |   2 +-
     class/ControllerConfigs.php                   |   2 +-
     class/ControllerFriends.php                   |   2 +-
     class/ControllerIndex.php                     |   2 +-
     class/ControllerNotes.php                     |   4 +-
     class/ControllerPhotos.php                    |   2 +-
     class/ControllerTribes.php                    |   2 +-
     class/FriendshipHandler.php                   |  20 ++--
     class/Notes.php                               |  14 +--
     class/NotesHandler.php                        |  36 +++----
     class/{Seutubo.php => Video.php}              |  16 +--
     class/VideoController.php                     |   2 +-
     .../{SeutuboHandler.php => VideoHandler.php}  |  98 +++++++++---------
     class/YogurtController.php                    |   6 +-
     config/config.php                             |   2 +-
     configs.php                                   |  16 +--
     delete_scrap.php                              |  10 +-
     delvideo.php                                  |   6 +-
     editdescvideo.php                             |   6 +-
     edittribe.php                                 |  10 +-
     fans.php                                      |  16 +--
     friends.php                                   |  16 +--
     header.php                                    |   2 +-
     images/2abandontribe.gif                      | Bin 117 -> 0 bytes
     images/abandontribe.gif                       | Bin 214 -> 0 bytes
     images/addfriend.jpg                          | Bin 1687 -> 0 bytes
     images/aim.gif                                | Bin 1021 -> 0 bytes
     images/amsn.gif                               | Bin 626 -> 0 bytes
     images/application-certificate.png            | Bin 3442 -> 0 bytes
     images/audio.gif                              | Bin 1104 -> 0 bytes
     images/avatar.gif                             | Bin 156 -> 0 bytes
     images/bio.gif                                | Bin 392 -> 0 bytes
     images/birthday.gif                           | Bin 1050 -> 0 bytes
     images/blank.gif                              | Bin 43 -> 0 bytes
     images/clock.gif                              | Bin 1072 -> 0 bytes
     images/close.gif                              | Bin 222 -> 0 bytes
     images/closelabel.gif                         | Bin 979 -> 0 bytes
     images/comments.gif                           | Bin 420 -> 0 bytes
     images/configs.gif                            | Bin 388 -> 0 bytes
     images/coola.gif                              | Bin 642 -> 0 bytes
     images/coolb.gif                              | Bin 778 -> 0 bytes
     images/coolbw.gif                             | Bin 358 -> 0 bytes
     images/coolc.gif                              | Bin 905 -> 0 bytes
     images/coolcolor.gif                          | Bin 905 -> 0 bytes
     images/dele.gif                               | Bin 994 -> 0 bytes
     images/edit.gif                               | Bin 1037 -> 0 bytes
     images/email.gif                              | Bin 633 -> 0 bytes
     images/evaluate.gif                           | Bin 1136 -> 0 bytes
     images/fans.gif                               | Bin 597 -> 0 bytes
     images/fansbw.gif                             | Bin 390 -> 0 bytes
     images/green.gif                              | Bin 610 -> 0 bytes
     images/green.jpg                              | Bin 582 -> 0 bytes
     images/house.gif                              | Bin 1074 -> 0 bytes
     images/icq.gif                                | Bin 1131 -> 0 bytes
     images/index.html                             |   1 -
     images/interests.gif                          | Bin 607 -> 0 bytes
     images/ishot.gif                              | Bin 1096 -> 0 bytes
     images/left_both.gif                          | Bin 538 -> 0 bytes
     images/lightbox-blank.gif                     | Bin 43 -> 0 bytes
     images/lightbox-btn-close.gif                 | Bin 700 -> 0 bytes
     images/lightbox-btn-next.gif                  | Bin 812 -> 0 bytes
     images/lightbox-btn-prev.gif                  | Bin 832 -> 0 bytes
     images/lightbox-ico-loading.gif               | Bin 6494 -> 0 bytes
     images/lightbox-ico-loading2.gif              | Bin 3990 -> 0 bytes
     images/loading.gif                            | Bin 2530 -> 0 bytes
     images/lock.gif                               | Bin 632 -> 0 bytes
     images/lphoto.gif                             | Bin 1408 -> 0 bytes
     images/mainvideo.gif                          | Bin 1063 -> 0 bytes
     images/makememember.gif                       | Bin 222 -> 0 bytes
     images/mapsgoogle.gif                         | Bin 1583 -> 0 bytes
     images/messagebox_info.gif                    | Bin 1157 -> 0 bytes
     images/mlogo.png                              | Bin 3442 -> 0 bytes
     images/modadminbg.gif                         | Bin 61 -> 0 bytes
     images/next.gif                               | Bin 305 -> 0 bytes
     images/nextlabel.gif                          | Bin 1252 -> 0 bytes
     images/noavatar.gif                           | Bin 5581 -> 0 bytes
     images/nothot.gif                             | Bin 1191 -> 0 bytes
     images/novideo.gif                            | Bin 5249 -> 0 bytes
     images/occ.gif                                | Bin 698 -> 0 bytes
     images/owner.gif                              | Bin 632 -> 0 bytes
     images/people.gif                             | Bin 1521 -> 0 bytes
     images/prev.gif                               | Bin 307 -> 0 bytes
     images/prevlabel.gif                          | Bin 1264 -> 0 bytes
     images/profile.gif                            | Bin 666 -> 0 bytes
     images/rank.gif                               | Bin 225 -> 0 bytes
     images/red.gif                                | Bin 641 -> 0 bytes
     images/right_both.gif                         | Bin 2010 -> 0 bytes
     images/scrapbook.gif                          | Bin 1348 -> 0 bytes
     images/scraps.gif                             | Bin 351 -> 0 bytes
     images/search.png                             | Bin 198 -> 0 bytes
     images/sexya.gif                              | Bin 395 -> 0 bytes
     images/sexyb.gif                              | Bin 504 -> 0 bytes
     images/sexybw.gif                             | Bin 326 -> 0 bytes
     images/sexyc.gif                              | Bin 605 -> 0 bytes
     images/sexycolor.gif                          | Bin 813 -> 0 bytes
     images/signature.gif                          | Bin 533 -> 0 bytes
     images/slogo.png                              | Bin 1305 -> 0 bytes
     images/snlogo.png                             | Bin 318 -> 0 bytes
     images/snlogosmall.png                        | Bin 240 -> 0 bytes
     images/suspend.gif                            | Bin 605 -> 0 bytes
     images/tab.png                                | Bin 1001 -> 0 bytes
     images/toggle.gif                             | Bin 389 -> 0 bytes
     images/transparent.gif                        | Bin 49 -> 0 bytes
     images/tribeowner.jpg                         | Bin 742 -> 0 bytes
     images/tribes.gif                             | Bin 789 -> 0 bytes
     images/tribetemplate.gif                      | Bin 513 -> 0 bytes
     images/tribetemplate.jpg                      | Bin 951 -> 0 bytes
     images/trustya.gif                            | Bin 1070 -> 0 bytes
     images/trustyb.gif                            | Bin 1296 -> 0 bytes
     images/trustybw.gif                           | Bin 331 -> 0 bytes
     images/trustyc.gif                            | Bin 1506 -> 0 bytes
     images/trustycolor.gif                        | Bin 829 -> 0 bytes
     images/unlock.gif                             | Bin 627 -> 0 bytes
     images/url.gif                                | Bin 1151 -> 0 bytes
     images/username.gif                           | Bin 1069 -> 0 bytes
     images/video.gif                              | Bin 1508 -> 0 bytes
     images/ym.gif                                 | Bin 1036 -> 0 bytes
     include/notification.inc.php                  |   8 +-
     include/search.inc.php                        |   4 +-
     index.php                                     |  16 +--
     .../mail_template/scrap_newscrap_notify.tpl   |   2 +-
     .../mail_template/video_newvideo_notify.tpl   |   4 +-
     language/english/main.php                     |   4 +-
     .../mail_template/scrap_newscrap_notify.tpl   |   4 +-
     .../mail_template/video_newvideo_notify.tpl   |   4 +-
     language/german/main.php                      |   4 +-
     .../mail_template/scrap_newscrap_notify.tpl   |   2 +-
     .../mail_template/video_newvideo_notify.tpl   |   4 +-
     language/persian/main.php                     |   4 +-
     .../mail_template/scrap_newscrap_notify.tpl   |   2 +-
     .../mail_template/video_newvideo_notify.tpl   |   4 +-
     language/portuguesebr/main.php                |   4 +-
     mainvideo.php                                 |   6 +-
     makefriends.php                               |   2 +-
     notebook.php                                  |  16 +--
     search_tribe.php                              |  14 +--
     searchmembers.php                             |  14 +--
     sql/mysql.sql                                 |  12 +--
     submit_scrap.php => submitNote.php            |   8 +-
     templates/yogurt_album.tpl                    |  10 +-
     templates/yogurt_audio.tpl                    |   2 +-
     templates/yogurt_configs.tpl                  |   2 +-
     templates/yogurt_edittribe.tpl                |   4 +-
     templates/yogurt_fans.tpl                     |   6 +-
     templates/yogurt_friends.tpl                  |   6 +-
     templates/yogurt_index.tpl                    |  58 +++++------
     templates/yogurt_navbar.tpl                   |  18 ++--
     templates/yogurt_notebook.tpl                 |  12 +--
     templates/yogurt_tribe.tpl                    |  10 +-
     templates/yogurt_tribes.tpl                   |  12 +--
     templates/yogurt_tribes_results.tpl           |   8 +-
     .../{yogurt_seutubo.tpl => yogurt_video.tpl}  |   6 +-
     tribe.php                                     |  16 +--
     tribes.php                                    |  18 ++--
     seutubo.php => video.php                      |  16 +--
     video_submited.php                            |   8 +-
     xoops_version.php                             |  10 +-
     169 files changed, 343 insertions(+), 344 deletions(-)
     rename {include => assets/css}/jquery.lightbox-0.3.css (100%)
     rename {css => assets/css}/jquery.tabs-ie.css (100%)
     rename {css => assets/css}/jquery.tabs.css (100%)
     rename {include => assets/css}/yogurt.css (100%)
     rename assets/images/{scrapbook.gif => notebook.gif} (100%)
     rename assets/images/{scraps.gif => notes.gif} (100%)
     rename {include => assets/js}/jquery.js (100%)
     rename {include => assets/js}/jquery.lightbox-0.3.js (100%)
     rename {js => assets/js}/jquery.tabs.pack.js (100%)
     rename {include => assets/js}/yogurt.js (100%)
     rename class/{Seutubo.php => Video.php} (83%)
     rename class/{SeutuboHandler.php => VideoHandler.php} (72%)
     delete mode 100644 images/2abandontribe.gif
     delete mode 100644 images/abandontribe.gif
     delete mode 100644 images/addfriend.jpg
     delete mode 100644 images/aim.gif
     delete mode 100644 images/amsn.gif
     delete mode 100644 images/application-certificate.png
     delete mode 100644 images/audio.gif
     delete mode 100644 images/avatar.gif
     delete mode 100644 images/bio.gif
     delete mode 100644 images/birthday.gif
     delete mode 100644 images/blank.gif
     delete mode 100644 images/clock.gif
     delete mode 100644 images/close.gif
     delete mode 100644 images/closelabel.gif
     delete mode 100644 images/comments.gif
     delete mode 100644 images/configs.gif
     delete mode 100644 images/coola.gif
     delete mode 100644 images/coolb.gif
     delete mode 100644 images/coolbw.gif
     delete mode 100644 images/coolc.gif
     delete mode 100644 images/coolcolor.gif
     delete mode 100644 images/dele.gif
     delete mode 100644 images/edit.gif
     delete mode 100644 images/email.gif
     delete mode 100644 images/evaluate.gif
     delete mode 100644 images/fans.gif
     delete mode 100644 images/fansbw.gif
     delete mode 100644 images/green.gif
     delete mode 100644 images/green.jpg
     delete mode 100644 images/house.gif
     delete mode 100644 images/icq.gif
     delete mode 100644 images/index.html
     delete mode 100644 images/interests.gif
     delete mode 100644 images/ishot.gif
     delete mode 100644 images/left_both.gif
     delete mode 100644 images/lightbox-blank.gif
     delete mode 100644 images/lightbox-btn-close.gif
     delete mode 100644 images/lightbox-btn-next.gif
     delete mode 100644 images/lightbox-btn-prev.gif
     delete mode 100644 images/lightbox-ico-loading.gif
     delete mode 100644 images/lightbox-ico-loading2.gif
     delete mode 100644 images/loading.gif
     delete mode 100644 images/lock.gif
     delete mode 100644 images/lphoto.gif
     delete mode 100644 images/mainvideo.gif
     delete mode 100644 images/makememember.gif
     delete mode 100644 images/mapsgoogle.gif
     delete mode 100644 images/messagebox_info.gif
     delete mode 100644 images/mlogo.png
     delete mode 100644 images/modadminbg.gif
     delete mode 100644 images/next.gif
     delete mode 100644 images/nextlabel.gif
     delete mode 100644 images/noavatar.gif
     delete mode 100644 images/nothot.gif
     delete mode 100644 images/novideo.gif
     delete mode 100644 images/occ.gif
     delete mode 100644 images/owner.gif
     delete mode 100644 images/people.gif
     delete mode 100644 images/prev.gif
     delete mode 100644 images/prevlabel.gif
     delete mode 100644 images/profile.gif
     delete mode 100644 images/rank.gif
     delete mode 100644 images/red.gif
     delete mode 100644 images/right_both.gif
     delete mode 100644 images/scrapbook.gif
     delete mode 100644 images/scraps.gif
     delete mode 100644 images/search.png
     delete mode 100644 images/sexya.gif
     delete mode 100644 images/sexyb.gif
     delete mode 100644 images/sexybw.gif
     delete mode 100644 images/sexyc.gif
     delete mode 100644 images/sexycolor.gif
     delete mode 100644 images/signature.gif
     delete mode 100644 images/slogo.png
     delete mode 100644 images/snlogo.png
     delete mode 100644 images/snlogosmall.png
     delete mode 100644 images/suspend.gif
     delete mode 100644 images/tab.png
     delete mode 100644 images/toggle.gif
     delete mode 100644 images/transparent.gif
     delete mode 100644 images/tribeowner.jpg
     delete mode 100644 images/tribes.gif
     delete mode 100644 images/tribetemplate.gif
     delete mode 100644 images/tribetemplate.jpg
     delete mode 100644 images/trustya.gif
     delete mode 100644 images/trustyb.gif
     delete mode 100644 images/trustybw.gif
     delete mode 100644 images/trustyc.gif
     delete mode 100644 images/trustycolor.gif
     delete mode 100644 images/unlock.gif
     delete mode 100644 images/url.gif
     delete mode 100644 images/username.gif
     delete mode 100644 images/video.gif
     delete mode 100644 images/ym.gif
     rename submit_scrap.php => submitNote.php (90%)
     rename templates/{yogurt_seutubo.tpl => yogurt_video.tpl} (94%)
     rename seutubo.php => video.php (92%)
    
    diff --git a/album.php b/album.php
    index 4b8d8498..4ca84c7e 100644
    --- a/album.php
    +++ b/album.php
    @@ -101,20 +101,20 @@
     /**
      * Adding to the module js and css of the lightbox and new ones
      */
    -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css');
    -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css');
    +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css');
    +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css');
     // what browser they use if IE then add corrective script.
     if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) {
    -    $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css');
    +    $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css');
     }
     //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js');
    -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js');
    +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js');
     
     /**
      * Criando a barra de navegao caso tenha muitos amigos
    @@ -126,7 +126,7 @@
      * Assigning smarty variables
      */
     //permissions
    -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes'));
    +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes'));
     $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends'));
     $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes'));
     $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures'));
    diff --git a/include/jquery.lightbox-0.3.css b/assets/css/jquery.lightbox-0.3.css
    similarity index 100%
    rename from include/jquery.lightbox-0.3.css
    rename to assets/css/jquery.lightbox-0.3.css
    diff --git a/css/jquery.tabs-ie.css b/assets/css/jquery.tabs-ie.css
    similarity index 100%
    rename from css/jquery.tabs-ie.css
    rename to assets/css/jquery.tabs-ie.css
    diff --git a/css/jquery.tabs.css b/assets/css/jquery.tabs.css
    similarity index 100%
    rename from css/jquery.tabs.css
    rename to assets/css/jquery.tabs.css
    diff --git a/include/yogurt.css b/assets/css/yogurt.css
    similarity index 100%
    rename from include/yogurt.css
    rename to assets/css/yogurt.css
    diff --git a/assets/images/scrapbook.gif b/assets/images/notebook.gif
    similarity index 100%
    rename from assets/images/scrapbook.gif
    rename to assets/images/notebook.gif
    diff --git a/assets/images/scraps.gif b/assets/images/notes.gif
    similarity index 100%
    rename from assets/images/scraps.gif
    rename to assets/images/notes.gif
    diff --git a/include/jquery.js b/assets/js/jquery.js
    similarity index 100%
    rename from include/jquery.js
    rename to assets/js/jquery.js
    diff --git a/include/jquery.lightbox-0.3.js b/assets/js/jquery.lightbox-0.3.js
    similarity index 100%
    rename from include/jquery.lightbox-0.3.js
    rename to assets/js/jquery.lightbox-0.3.js
    diff --git a/js/jquery.tabs.pack.js b/assets/js/jquery.tabs.pack.js
    similarity index 100%
    rename from js/jquery.tabs.pack.js
    rename to assets/js/jquery.tabs.pack.js
    diff --git a/include/yogurt.js b/assets/js/yogurt.js
    similarity index 100%
    rename from include/yogurt.js
    rename to assets/js/yogurt.js
    diff --git a/audio.php b/audio.php
    index 48dc4d10..6b6bc0fa 100644
    --- a/audio.php
    +++ b/audio.php
    @@ -62,20 +62,20 @@
     /**
      * Adding to the module js and css of the lightbox and new ones
      */
    -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css');
    -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css');
    +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css');
    +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css');
     // what browser they use if IE then add corrective script.
     if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) {
    -    $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css');
    +    $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css');
     }
     //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects');
     //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js');
     //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/include/jquery.lightbox-0.3.css');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js');
    -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js');
    +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js');
     
     //meta language names
     $xoopsTpl->assign('lang_meta', _MD_YOGURT_META);
    @@ -85,7 +85,7 @@
     $xoopsTpl->assign('lang_year', _MD_YOGURT_META_YEAR);
     
     //permissions
    -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes'));
    +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes'));
     $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends'));
     $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes'));
     $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures'));
    diff --git a/class/AudioController.php b/class/AudioController.php
    index 2d23ffb1..304f0a82 100644
    --- a/class/AudioController.php
    +++ b/class/AudioController.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/ControllerConfigs.php b/class/ControllerConfigs.php
    index 7b4bfe90..7ff531de 100644
    --- a/class/ControllerConfigs.php
    +++ b/class/ControllerConfigs.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/ControllerFriends.php b/class/ControllerFriends.php
    index dac8adce..7e80d2de 100644
    --- a/class/ControllerFriends.php
    +++ b/class/ControllerFriends.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/ControllerIndex.php b/class/ControllerIndex.php
    index eb2c1590..cb8a4737 100644
    --- a/class/ControllerIndex.php
    +++ b/class/ControllerIndex.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php
    index c25f0fef..3cd6186f 100644
    --- a/class/ControllerNotes.php
    +++ b/class/ControllerNotes.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    @@ -50,7 +50,7 @@ class ControllerNotes extends YogurtController
         //
         //
         //
    -    //      $form = new XoopsThemeForm("",'formNoteNew','submit_Note.php','post',true);
    +    //      $form = new XoopsThemeForm("",'formNoteNew','submitNote.php','post',true);
         //      $fieldNote = new XoopsFormTextArea('','text',_MD_YOGURT_ENTERTEXTNOTE);
         //      $fieldNote->setExtra(' onclick="cleanNoteForm(text,\''._MD_YOGURT_ENTERTEXTNOTE.'\')"');
         //
    diff --git a/class/ControllerPhotos.php b/class/ControllerPhotos.php
    index dc781192..cf875c60 100644
    --- a/class/ControllerPhotos.php
    +++ b/class/ControllerPhotos.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/ControllerTribes.php b/class/ControllerTribes.php
    index ab526bfc..60f48b40 100644
    --- a/class/ControllerTribes.php
    +++ b/class/ControllerTribes.php
    @@ -28,7 +28,7 @@
      */
     //include_once 'class/Image.php';
     //include_once 'class/yogurt_visitors.php';
    -//include_once 'class/Seutubo.php';
    +//include_once 'class/Video.php';
     //include_once 'class/yogurt_audio.php';
     //include_once 'class/Friendpetition.php';
     //include_once 'class/Friendship.php';
    diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php
    index d69669c2..fd920ce5 100644
    --- a/class/FriendshipHandler.php
    +++ b/class/FriendshipHandler.php
    @@ -330,7 +330,7 @@ public function renderFormSubmit($friend)
             }
             $field_friend_name = new \XoopsFormLabel(_MD_YOGURT_FRIENDNAME, $friend->getVar('uname'));
     
    -        $field_friend_fan = new \XoopsFormRadioYN(_MD_YOGURT_FAN, 'fan', $friendship->getVar('fan'), '' . _YES . '', '' . _NO . '');
    +        $field_friend_fan = new \XoopsFormRadioYN(_MD_YOGURT_FAN, 'fan', $friendship->getVar('fan'), '' . _YES . '', '' . _NO . '');
     
             $field_friend_level = new \XoopsFormRadio(_MD_YOGURT_LEVEL, 'level', $friendship->getVar('level'), '
    '); @@ -340,19 +340,19 @@ public function renderFormSubmit($friend) $field_friend_level->addOption('7', _MD_YOGURT_BESTFRIEND); $field_friend_sexy = new \XoopsFormRadio(_MD_YOGURT_SEXY, 'hot', $friendship->getVar('hot')); - $field_friend_sexy->addOption('1', '' . _MD_YOGURT_SEXYNO . ''); - $field_friend_sexy->addOption('2', '' . _MD_YOGURT_SEXYYES . ''); - $field_friend_sexy->addOption('3', '' . _MD_YOGURT_SEXYALOT . ''); + $field_friend_sexy->addOption('1', '' . _MD_YOGURT_SEXYNO . ''); + $field_friend_sexy->addOption('2', '' . _MD_YOGURT_SEXYYES . ''); + $field_friend_sexy->addOption('3', '' . _MD_YOGURT_SEXYALOT . ''); $field_friend_trusty = new \XoopsFormRadio(_MD_YOGURT_TRUSTY, 'trust', $friendship->getVar('trust')); - $field_friend_trusty->addOption('1', '' . _MD_YOGURT_TRUSTYNO . ''); - $field_friend_trusty->addOption('2', '' . _MD_YOGURT_TRUSTYYES . ''); - $field_friend_trusty->addOption('3', '' . _MD_YOGURT_TRUSTYALOT . ''); + $field_friend_trusty->addOption('1', '' . _MD_YOGURT_TRUSTYNO . ''); + $field_friend_trusty->addOption('2', '' . _MD_YOGURT_TRUSTYYES . ''); + $field_friend_trusty->addOption('3', '' . _MD_YOGURT_TRUSTYALOT . ''); $field_friend_cool = new \XoopsFormRadio(_MD_YOGURT_COOL, 'cool', $friendship->getVar('cool')); - $field_friend_cool->addOption('1', '' . _MD_YOGURT_COOLNO . ''); - $field_friend_cool->addOption('2', '' . _MD_YOGURT_COOLYES . ''); - $field_friend_cool->addOption('3', '' . _MD_YOGURT_COOLALOT . ''); + $field_friend_cool->addOption('1', '' . _MD_YOGURT_COOLNO . ''); + $field_friend_cool->addOption('2', '' . _MD_YOGURT_COOLYES . ''); + $field_friend_cool->addOption('3', '' . _MD_YOGURT_COOLALOT . ''); $form->setExtra('enctype="multipart/form-data"'); $button_send = new \XoopsFormButton('', 'submit_button', _MD_YOGURT_UPDATEFRIEND, 'submit'); diff --git a/class/Notes.php b/class/Notes.php index 713bff31..6b0b593b 100644 --- a/class/Notes.php +++ b/class/Notes.php @@ -28,10 +28,10 @@ class Notes extends \XoopsObject public function __construct($id = null) { $this->db = \XoopsDatabaseFactory::getDatabaseConnection(); - $this->initVar('Note_id', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Note_text', XOBJ_DTYPE_TXTAREA, null, false); - $this->initVar('Note_from', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Note_to', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('note_id', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('note_text', XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar('note_from', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('note_to', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('private', XOBJ_DTYPE_INT, null, false, 10); if (!empty($id)) { @@ -50,7 +50,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE note_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -67,7 +67,7 @@ public function load($id) * @param int $start * @return array */ - public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'Note_id', $order = 'ASC', $limit = 0, $start = 0) + public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'note_id', $order = 'ASC', $limit = 0, $start = 0) { $db = \XoopsDatabaseFactory::getDatabaseConnection(); $ret = []; @@ -82,7 +82,7 @@ public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = ' $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT Note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = $myrow['yogurt_Notes_id']; diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 53a82698..3befdffa 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -46,7 +46,7 @@ public function create($isNew = true) */ public function get($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE Note_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE note_id=' . $id; if (!$result = $this->db->query($sql)) { return false; } @@ -88,23 +88,23 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) if ($yogurt_Notes->isNew()) { // ajout/modification d'unNotes $yogurt_Notes = new Notes(); - $format = 'INSERT INTO %s (Note_id, Note_text, Note_from, Note_to, private)'; + $format = 'INSERT INTO %s (note_id, note_text, note_from, note_to, private)'; $format .= 'VALUES (%u, %s, %u, %u, %u)'; $sql = sprintf( $format, $this->db->prefix('yogurt_Notes'), - $Note_id, - $this->db->quoteString($Note_text), - $Note_from, - $Note_to, + $note_id, + $this->db->quoteString($note_text), + $note_from, + $note_to, $private ); $force = true; } else { $format = 'UPDATE %s SET '; - $format .= 'Note_id=%u, Note_text=%s, Note_from=%u, Note_to=%u, private=%u'; - $format .= ' WHERE Note_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $Note_id, $this->db->quoteString($Note_text), $Note_from, $Note_to, $private, $Note_id); + $format .= 'note_id=%u, note_text=%s, note_from=%u, note_to=%u, private=%u'; + $format .= ' WHERE note_id = %u'; + $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $note_id, $this->db->quoteString($note_text), $note_from, $note_to, $private, $note_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -114,10 +114,10 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) if (!$result) { return false; } - if (empty($Note_id)) { - $Note_id = $this->db->getInsertId(); + if (empty($note_id)) { + $note_id = $this->db->getInsertId(); } - $yogurt_Notes->assignVar('Note_id', $Note_id); + $yogurt_Notes->assignVar('note_id', $note_id); return true; } @@ -134,7 +134,7 @@ public function delete(\XoopsObject $yogurt_Notes, $force = false) if (!$yogurt_Notes instanceof Notes) { return false; } - $sql = sprintf('DELETE FROM %s WHERE Note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('Note_id')); + $sql = sprintf('DELETE FROM %s WHERE note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('note_id')); if (false !== $force) { $result = $this->db->queryF($sql); } else { @@ -177,7 +177,7 @@ public function &getObjects($criteria = null, $id_as_key = false) if (!$id_as_key) { $ret[] = &$yogurt_Notes; } else { - $ret[$myrow['Note_id']] = &$yogurt_Notes; + $ret[$myrow['note_id']] = &$yogurt_Notes; } unset($yogurt_Notes); } @@ -234,11 +234,11 @@ public function getNotes($nbNotes, $criteria) { $myts = new \MyTextSanitizer(); $ret = []; - $sql = 'SELECT Note_id, uid, uname, user_avatar, Note_from, Note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); + $sql = 'SELECT note_id, uid, uname, user_avatar, note_from, note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack - $sql .= ' AND uid = Note_from'; + $sql .= ' AND uid = note_from'; if ('' != $criteria->getSort()) { $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); } @@ -253,9 +253,9 @@ public function getNotes($nbNotes, $criteria) $vetor[$i]['uid'] = $myrow['uid']; $vetor[$i]['uname'] = $myrow['uname']; $vetor[$i]['user_avatar'] = $myrow['user_avatar']; - $temptext = $myts->xoopsCodeDecode($myrow['Note_text'], 1); + $temptext = $myts->xoopsCodeDecode($myrow['note_text'], 1); $vetor[$i]['text'] = $myts->nl2Br($temptext); - $vetor[$i]['id'] = $myrow['Note_id']; + $vetor[$i]['id'] = $myrow['note_id']; $i++; } diff --git a/class/Seutubo.php b/class/Video.php similarity index 83% rename from class/Seutubo.php rename to class/Video.php index a92adf02..0cb49924 100644 --- a/class/Seutubo.php +++ b/class/Video.php @@ -18,18 +18,18 @@ include_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** - * Seutubo class. + * Video class. * $this class is responsible for providing data access mechanisms to the data source * of XOOPS user class objects. */ -class Seutubo extends \XoopsObject +class Video extends \XoopsObject { public $db; // constructor /** - * Seutubo constructor. + * Video constructor. * @param null $id */ public function __construct($id = null) @@ -56,7 +56,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_video') . ' WHERE video_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -73,7 +73,7 @@ public function load($id) * @param int $start * @return array */ - public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = 'video_id', $order = 'ASC', $limit = 0, $start = 0) + public function getAllyogurt_videos($criteria = [], $asobject = false, $sort = 'video_id', $order = 'ASC', $limit = 0, $start = 0) { $db = \XoopsDatabaseFactory::getDatabaseConnection(); $ret = []; @@ -88,13 +88,13 @@ public function getAllyogurt_seutubos($criteria = [], $asobject = false, $sort = $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT video_id FROM ' . $db->prefix('yogurt_video') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { - $ret[] = $myrow['yogurt_seutubo_id']; + $ret[] = $myrow['yogurt_video_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_seutubo') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_video') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/VideoController.php b/class/VideoController.php index 6473f3c8..22df96e2 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -28,7 +28,7 @@ */ //include_once 'class/Image.php'; //include_once 'class/yogurt_visitors.php'; -//include_once 'class/Seutubo.php'; +//include_once 'class/Video.php'; //include_once 'class/yogurt_audio.php'; //include_once 'class/Friendpetition.php'; //include_once 'class/Friendship.php'; diff --git a/class/SeutuboHandler.php b/class/VideoHandler.php similarity index 72% rename from class/SeutuboHandler.php rename to class/VideoHandler.php index 9fb6a0ea..cd67db4a 100644 --- a/class/SeutuboHandler.php +++ b/class/VideoHandler.php @@ -10,92 +10,92 @@ } // ------------------------------------------------------------------------- -// ------------------Seutubo user handler class ------------------- +// ------------------Video user handler class ------------------- // ------------------------------------------------------------------------- /** - * yogurt_seutubohandler class. - * This class provides simple mecanisme for Seutubo object + * yogurt_videohandler class. + * This class provides simple mecanisme for Video object */ -class SeutuboHandler extends \XoopsObjectHandler +class VideoHandler extends \XoopsObjectHandler { /** - * create a new Seutubo + * create a new Video * * @param bool $isNew flag the new objects as "new"? - * @return \XoopsObject Seutubo + * @return \XoopsObject Video */ public function create($isNew = true) { - $yogurt_seutubo = new Seutubo(); + $yogurt_video = new Video(); if ($isNew) { - $yogurt_seutubo->setNew(); + $yogurt_video->setNew(); } else { - $yogurt_seutubo->unsetNew(); + $yogurt_video->unsetNew(); } - return $yogurt_seutubo; + return $yogurt_video; } /** - * retrieve a Seutubo + * retrieve a Video * - * @param int $id of the Seutubo - * @return mixed reference to the {@link Seutubo} object, FALSE if failed + * @param int $id of the Video + * @return mixed reference to the {@link Video} object, FALSE if failed */ public function get($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo') . ' WHERE video_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_video') . ' WHERE video_id=' . $id; if (!$result = $this->db->query($sql)) { return false; } $numrows = $this->db->getRowsNum($result); if (1 == $numrows) { - $yogurt_seutubo = new Seutubo(); - $yogurt_seutubo->assignVars($this->db->fetchArray($result)); + $yogurt_video = new Video(); + $yogurt_video->assignVars($this->db->fetchArray($result)); - return $yogurt_seutubo; + return $yogurt_video; } return false; } /** - * insert a new Seutubo in the database + * insert a new Video in the database * - * @param \XoopsObject $yogurt_seutubo reference to the {@link Seutubo} + * @param \XoopsObject $yogurt_video reference to the {@link Video} * object * @param bool $force * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - public function insert(\XoopsObject $yogurt_seutubo, $force = false) + public function insert(\XoopsObject $yogurt_video, $force = false) { global $xoopsConfig; - if (!$yogurt_seutubo instanceof Seutubo) { + if (!$yogurt_video instanceof Video) { return false; } - if (!$yogurt_seutubo->isDirty()) { + if (!$yogurt_video->isDirty()) { return true; } - if (!$yogurt_seutubo->cleanVars()) { + if (!$yogurt_video->cleanVars()) { return false; } - foreach ($yogurt_seutubo->cleanVars as $k => $v) { + foreach ($yogurt_video->cleanVars as $k => $v) { ${$k} = $v; } $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_seutubo->isNew()) { - // ajout/modification d'un Seutubo - $yogurt_seutubo = new Seutubo(); + if ($yogurt_video->isNew()) { + // ajout/modification d'un Video + $yogurt_video = new Video(); $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); + $sql = sprintf($format, $this->db->prefix('yogurt_video'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'video_id=%u, uid_owner=%u, video_desc=%s, youtube_code=%s, main_video=%s'; $format .= ' WHERE video_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_seutubo'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); + $sql = sprintf($format, $this->db->prefix('yogurt_video'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); } if (false !== $force) { $result = $this->db->queryF($sql); @@ -108,24 +108,24 @@ public function insert(\XoopsObject $yogurt_seutubo, $force = false) if (empty($video_id)) { $video_id = $this->db->getInsertId(); } - $yogurt_seutubo->assignVar('video_id', $video_id); + $yogurt_video->assignVar('video_id', $video_id); return true; } /** - * delete a Seutubo from the database + * delete a Video from the database * - * @param \XoopsObject $yogurt_seutubo reference to the Seutubo to delete + * @param \XoopsObject $yogurt_video reference to the Video to delete * @param bool $force * @return bool FALSE if failed. */ - public function delete(\XoopsObject $yogurt_seutubo, $force = false) + public function delete(\XoopsObject $yogurt_video, $force = false) { - if (!$yogurt_seutubo instanceof Seutubo) { + if (!$yogurt_video instanceof Video) { return false; } - $sql = sprintf('DELETE FROM %s WHERE video_id = %u', $this->db->prefix('yogurt_seutubo'), $yogurt_seutubo->getVar('video_id')); + $sql = sprintf('DELETE FROM %s WHERE video_id = %u', $this->db->prefix('yogurt_video'), $yogurt_video->getVar('video_id')); if (false !== $force) { $result = $this->db->queryF($sql); } else { @@ -139,17 +139,17 @@ public function delete(\XoopsObject $yogurt_seutubo, $force = false) } /** - * retrieve yogurt_seutubos from the database + * retrieve yogurt_videos from the database * * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? - * @return array array of {@link Seutubo} objects + * @return array array of {@link Video} objects */ public function &getObjects($criteria = null, $id_as_key = false) { $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_seutubo'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_video'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -163,28 +163,28 @@ public function &getObjects($criteria = null, $id_as_key = false) return $ret; } while (false !== ($myrow = $this->db->fetchArray($result))) { - $yogurt_seutubo = new Seutubo(); - $yogurt_seutubo->assignVars($myrow); + $yogurt_video = new Video(); + $yogurt_video->assignVars($myrow); if (!$id_as_key) { - $ret[] = &$yogurt_seutubo; + $ret[] = &$yogurt_video; } else { - $ret[$myrow['video_id']] = &$yogurt_seutubo; + $ret[$myrow['video_id']] = &$yogurt_video; } - unset($yogurt_seutubo); + unset($yogurt_video); } return $ret; } /** - * count yogurt_seutubos matching a condition + * count yogurt_videos matching a condition * * @param \CriteriaElement $criteria {@link \CriteriaElement} to match - * @return int count of yogurt_seutubos + * @return int count of yogurt_videos */ public function getCount($criteria = null) { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_seutubo'); + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_video'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); } @@ -198,14 +198,14 @@ public function getCount($criteria = null) } /** - * delete yogurt_seutubos matching a set of conditions + * delete yogurt_videos matching a set of conditions * * @param \CriteriaElement $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_seutubo'); + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_video'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); } @@ -286,7 +286,7 @@ public function renderFormEdit($caption, $cod_img, $filename) */ public function unsetAllMainsbyID($uid_owner = null) { - $sql = 'UPDATE ' . $this->db->prefix('yogurt_seutubo') . ' SET main_video=0 WHERE uid_owner=' . $uid_owner; + $sql = 'UPDATE ' . $this->db->prefix('yogurt_video') . ' SET main_video=0 WHERE uid_owner=' . $uid_owner; if (!$result = $this->db->query($sql)) { return false; diff --git a/class/YogurtController.php b/class/YogurtController.php index 423b0c80..9c9c914d 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -28,7 +28,7 @@ */ //include_once 'class/Image.php'; //include_once 'class/yogurt_visitors.php'; -//include_once 'class/Seutubo.php'; +//include_once 'class/Video.php'; //include_once 'class/yogurt_audio.php'; //include_once 'class/Friendpetition.php'; //include_once 'class/Friendship.php'; @@ -232,7 +232,7 @@ public function getNumbersSections() $nbSections['nbAudio'] = $this->audioFactory->getCount($criteriaUidAudio); $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); - $criteriaUidNotes = new \Criteria('Note_to', $this->uidOwner); + $criteriaUidNotes = new \Criteria('note_to', $this->uidOwner); $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); return $nbSections; @@ -246,7 +246,7 @@ public function createFactories() $this->albumFactory = new ImageHandler($this->db); $this->visitorsFactory = new VisitorsHandler($this->db); $this->audioFactory = new AudioHandler($this->db); - $this->videosFactory = new SeutuboHandler($this->db); + $this->videosFactory = new VideoHandler($this->db); $this->petitionsFactory = new FriendpetitionHandler($this->db); $this->friendshipsFactory = new FriendshipHandler($this->db); $this->reltribeusersFactory = new ReltribeuserHandler($this->db); diff --git a/config/config.php b/config/config.php index e8d1d88c..e296b273 100644 --- a/config/config.php +++ b/config/config.php @@ -74,7 +74,7 @@ '/tcpdf', ], - 'renameTables' => [// 'XX_archive' => 'ZZZZ_archive', + 'renameTables' => [ 'yogurt_seutubo' => 'yogurt_video', ], 'moduleStats' => [ // 'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1), diff --git a/configs.php b/configs.php index f9bafa9f..bfba75ec 100644 --- a/configs.php +++ b/configs.php @@ -66,23 +66,23 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/delete_scrap.php b/delete_scrap.php index ec7f580c..644c58fe 100644 --- a/delete_scrap.php +++ b/delete_scrap.php @@ -26,19 +26,19 @@ */ $NotesFactory = new Yogurt\NotesHandler($xoopsDB); -$Note_id = (int)$_POST['Note_id']; +$note_id = (int)$_POST['note_id']; if (1 != $_POST['confirm']) { - xoops_confirm(['Note_id' => $Note_id, 'confirm' => 1], 'delete_Note.php', _MD_YOGURT_ASKCONFIRMNOTEDELETION, _MD_YOGURT_CONFIRMNOTEDELETION); + xoops_confirm(['note_id' => $note_id, 'confirm' => 1], 'delete_Note.php', _MD_YOGURT_ASKCONFIRMNOTEDELETION, _MD_YOGURT_CONFIRMNOTEDELETION); } else { /** * Creating the factory and the criteria to delete the picture * The user must be the owner */ - $criteria_Note_id = new \Criteria('Note_id', $Note_id); + $criteria_note_id = new \Criteria('note_id', $note_id); $uid = (int)$xoopsUser->getVar('uid'); - $criteria_uid = new \Criteria('Note_to', $uid); - $criteria = new \CriteriaCompo($criteria_Note_id); + $criteria_uid = new \Criteria('note_to', $uid); + $criteria = new \CriteriaCompo($criteria_note_id); $criteria->add($criteria_uid); /** diff --git a/delvideo.php b/delvideo.php index be913a5f..b81d9b57 100644 --- a/delvideo.php +++ b/delvideo.php @@ -34,7 +34,7 @@ * Creating the factory and the criteria to delete the picture * The user must be the owner */ - $albumFactory = new Yogurt\SeutuboHandler($xoopsDB); + $albumFactory = new Yogurt\VideoHandler($xoopsDB); $criteria_img = new \Criteria('video_id', $cod_video); $uid = (int)$xoopsUser->getVar('uid'); $criteria_uid = new \Criteria('uid_owner', $uid); @@ -45,9 +45,9 @@ * Try to delete */ if ($albumFactory->deleteAll($criteria)) { - redirect_header('seutubo.php?uid=' . $uid, 2, _MD_YOGURT_VIDEODELETED); + redirect_header('video.php?uid=' . $uid, 2, _MD_YOGURT_VIDEODELETED); } else { - redirect_header('seutubo.php?uid=' . $uid, 2, _MD_YOGURT_NOCACHACA); + redirect_header('video.php?uid=' . $uid, 2, _MD_YOGURT_NOCACHACA); } } diff --git a/editdescvideo.php b/editdescvideo.php index 6707b0e6..b8ff50cc 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -34,7 +34,7 @@ /** * Creating the factory loading the picture changing its caption */ - $videoFactory = new Yogurt\SeutuboHandler($xoopsDB); + $videoFactory = new Yogurt\VideoHandler($xoopsDB); $video = $videoFactory->create(false); $video->load($cod_img); $video->setVar('video_desc', trim(htmlspecialchars($_POST['caption'], ENT_QUOTES | ENT_HTML5))); @@ -44,7 +44,7 @@ */ if ($uid == $video->getVar('uid_owner')) { if ($videoFactory->insert($video)) { - redirect_header('seutubo.php?uid=' . $uid, 2, _MD_YOGURT_DESC_EDITED); + redirect_header('video.php?uid=' . $uid, 2, _MD_YOGURT_DESC_EDITED); } else { redirect_header('index.php?uid=' . $uid, 2, _MD_YOGURT_NOCACHACA); } @@ -54,7 +54,7 @@ * Creating the factory and the criteria to edit the desc of the picture * The user must be the owner */ -$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\VideoHandler($xoopsDB); $criteria_video = new \Criteria('video_id', $cod_img); $criteria_uid = new \Criteria('uid_owner', $uid); $criteria = new \CriteriaCompo($criteria_video); diff --git a/edittribe.php b/edittribe.php index f5f0f8ba..201e687d 100644 --- a/edittribe.php +++ b/edittribe.php @@ -65,7 +65,7 @@ $xoopsTpl->assign('tribe_id', $tribe->getVar('tribe_id')); //permissions - $xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); + $xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -121,12 +121,12 @@ $xoopsTpl->assign('lang_owner', _MD_YOGURT_TRIBEOWNER); } -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } include __DIR__ . '/../../footer.php'; diff --git a/fans.php b/fans.php index 7b877cd1..42d5c591 100644 --- a/fans.php +++ b/fans.php @@ -54,20 +54,20 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); /** * Criando a barra de navegao caso tenha muitos amigos @@ -76,7 +76,7 @@ $navegacao = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/friends.php b/friends.php index 091711b0..b28fb37f 100644 --- a/friends.php +++ b/friends.php @@ -52,20 +52,20 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); /** * Criando a barra de navegao caso tenha muitos amigos @@ -74,7 +74,7 @@ $navegacao = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/header.php b/header.php index 028ee753..f96c5f0c 100644 --- a/header.php +++ b/header.php @@ -35,7 +35,7 @@ $albumFactory = new Yogurt\ImageHandler($xoopsDB); $visitorsFactory = new Yogurt\VisitorsHandler($xoopsDB); -$videosFactory = new Yogurt\SeutuboHandler($xoopsDB); +$videosFactory = new Yogurt\VideoHandler($xoopsDB); $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); diff --git a/images/2abandontribe.gif b/images/2abandontribe.gif deleted file mode 100644 index 6edd386161fdf0b6e51cf3a715af74c53b43275a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmV-*0E+)dNk%w1VLSj70Du4hZEbD;|NkNR1ONvB{{Soi0000y02BZK0!)mLsmtvT zqnxzbi?iOm`wxZzkdYnFcU5+OqCAt>|s?`1}k0V6}(}C-m(OyXEpmIohT{ XS##JUiniRY_X`e-$K+c=Eqk@hzF;% z)z|hXmsOTj$OyC7RT&5g>7_aN7}&UJkthfUhDMl0h6$LNrziAUvjsaFB1?O#VT-$4 Qq07q~5iC4RtWW>|J7c3r^9Dw$8^Kb(o5D4JD zVSrQw>;@2UI9vvfkdZ;iBQ{)74uOzUL@FpKDkvb)$UlKbqLk6fD5R0a`#b3<3gB5CQ`s(z^g2fB;Y!1Oj{p z3@(F^g>H&AXaE9(!eEL}1ne&z27zv<0H`9Xs=GyvVCftfT*45HV)U@Yh}7?IT3J&z z%G5Wm-+aJ7u+av-ISt(8|20kp0tGE$y3#2C3ENl&gn@t)urfY<^@uR`=ruYkHMGvZ z1{}O#Ms-X3#hUT~$0pP8)`I>k@IC!qor8r|CvsZ4?f1S-S}%Lf70&;37~j{{L)M-= zO(P}a`d==aKjN=Og!*WF$_g$yqkBCOC0N%u8G~j2e+71k$4jZ534^#@w(2^3YJ5hH z#e}{wqt5kMDM9}@A&FlrUQoW$R5)0+W#s{lyBlbI=QoeESg0ZO8x}>PbMiQ>i|=Zp zw8FUyPyJ_4=`Lll1BQb?`a{Q}c;N6tAEz6l6xT`ZpKu6CgyyqE^+^>!WQj|h?bsT}7Crn|1^N`W@staxGM?XSEX5jJCn zyWhxJ7FDIQHywBl&o*+M&VM1ZkO}6wrlGil??+0%?HUfbLZxTe&8wUXk(=~AZ-t2% z%G3xZlA3WLH%Zxj+6iD#q6XerKS`9bKs;sW`^3NV^iS7JDdJlUQ; z990!*mn`6v&u_I-F$FpYOs~oNsuR!kGEMJu*zsp1r9WbEHqXgD`RO(XSlf`zi*>ft z8(ESHnyUH)lT0S&(w%Xf9cU8@7+zoWxI<3=G>28<^Mb2pLabYhoTB%*F%h~heIAC< zJB}(1eObggTSTaxz7%`4!RMASOUy?V3KPy%yR?g)nZBiIM|4c&uNMVqOLltcDOB9C zgEnS>sV!DZHgO3TTP?^;ibdWwp7#tyMzi>BTRy8PvwLml%f;nJfo;gN;y~PFvfc&cxU+Rgt$B>?yU0X?*Tk-qogY$d#lkw`zJFB*`|^zFpP={f1(D(!3zR zTVy0oxwl^8)W#E?GNT!+CAZD{>-3p;NZcRYRcmn5Gxc=Q@00Tk6R$p4p(~qc z+oIc2*1k^Ld8SmkLeAhbOBq?Nd?L}JI>zhNR*URAgbvLoCY;Gm?P)2TfiXBD1| zUlIGg?tK#>nTox{K0cIg$?xH-?CKW7O3;SgED=UkBW>oRK*9-^3@^Gpp4pJTrOD)~wP7)!4>O|Nk@Q-e(S)&Jcf^x#!uG`Rf>~ z{+l`kc-PLc>D{_*+qROD3a%ahuV25e9h{fA|E_IDqmt(oF|h#t+N}oB_0FM*!WvUO z@BU-STE*_YP0791ch=#VGiSbk|DI#Uo64S9H7$L7^Dcx&B`aH|i^gA;(f16>Y!sM& zyXVe36&)8|_ZGjDp18`+qGM0gt!FaK`5%^65_j~9#hd@^^Pcja{2ve!BT~BZ`0?Y6 zR-HOmeic3a&zOH|-n>Oj^$+DD>hImV$GYTuZ*T9?rAzsG&v98aXiPf65dFWVrba)h zG$x~V^5p3TK1Gc^vzXWXXE1AZPOBDhsn7ZF-_W~}G3TULc29m$zu%MJ!4Y}dH~*Kv z{oC0;<^TWxz<3x10}=v?KUo;r85$XMK(>SO1Ovw{24+qfje=v-RCQYfVk`>UrizCP z+;BKtkl4s3z9Hkp!4!|9joJY-RtBl|$Z^QCmUTKe__i>+1@VbAHM38(l}mM6ap7RY z1S5f>Fd3&qM>#aLE#5Fp5n|(2S6jxi@}pAAh1MdoKamV=hh*8UcGc)iYVhwjO}TSr zWy7XLGJ5fUOc)amID7FcU8=cJy`)8=&Dmzb#0So76WO`8q|96}K|w~K%z!0;k=1jK zP4O{?M#l}jvSN~cD>?;Ncux}1*~6j0p?Hd4wL;>FOY*~G(i{8cf05iEa89y`k&(d~ E0DR09%K!iX diff --git a/images/amsn.gif b/images/amsn.gif deleted file mode 100644 index 089437f6fd2d86b53cce5e3ab920c13c18f1b434..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmV-&0*(DgNk%w1VG;ll0OkMyIfh)Hw}msb$0wMuE0Ukq*4BZ$#&V>tp2*H&k3)2y zq{P&@LAc3(%?dkn32PucCJ&v(zEaO_tfg_%GkkXoS3rBp-HE-IJ3pu+uOVA z^LVgJiPGM%-{*j;uVIu?JG{_Zq$((yv5Uda$l-iFE4H=3uk=kHam zy3XFcY{}L~tiiv>$d}aJ|Ns900000000000000000000000000A^8LW2LN~gEC2ui z01^NZ000NifOvv~gI`Na8H9>>V}coAT6Z8zi-I^UHDd-C4j5r_iHbNhX;vn6L_9ns zP92LnMX^I_sj6+Ric=C5TW3c+M8Q}Qixv_z5&;Jx7f(A)iwhgEMF3(>5Ia!>2!vxR zTSX!)VjM&Q0z@frWP@1=FbzLU1FIzWPFEm=A8SZ6MxszbNASuHVuPx5$&um$9R>_u zNQ@HY#v&IoJUjp*MT(LbDk#{fgu+Y^A8|%-d7~gpr7T${oY0VjjgS)sDhc|6=Su-Q MC3@%_x+o9;JJ#Pc6951J diff --git a/images/application-certificate.png b/images/application-certificate.png deleted file mode 100644 index b94f2632a72b670e479122167b1a0a716d0aaf63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3442 zcmV-&4UO`NP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3labT3lag+-G2N401Qb5A}R9;?sFG=&CYb^!wi;$EYScZGIm#W z4bamw`~Sc9f3IKnz|VLSALQYVkO%`0dGEOl^zY4T=N9vWz^?<%KEbAp;?*ICy%!7m z%3UYW5fZxu9EeJx0F~ETTAHwgq!1)Ej3~`j2d)PM?LeEOSsf3Uxt7G*@Wk*CtE($%Y-*;mww8(EVXErl3|zXz(Kq+=+O?7VfX$ztvGiV`ZzWjF+aX{IURWPn z75)5kf5gfCZ*cIX|0G&kN;DRutg@PDBtp%`jYLXI@%jDCPK+}%G0w?-uQPJ>3R-J~ z5Uk(S&Xd3KSr)$atw3RLZ~#xkw{u!OID@zM=mlaP*sp|xxI zA_)baHxQumc~m~n{P-waf9WCmFJCrrY~O&*HDLIrq_zAkB+#D<3eo&qPe1MJese$9 zuk;twWw^2msa?GbrTEyRJHfU=+3wZ0Iq`#2uHKabrP#h>!;Sm79EXma!^viFY#Zsl z*P5OpH8#SI#2T~jLf;l3>IL=GinEX@`1^-jo1*?;fD2tGZn#W9s5IuLO3(5KUp=}6 zJa`$%i-YYyzX7npvS4_SBd;BYg%pP4V0u=R-h!8%nWi>Yihw!~Uv$N3v?CcSCJ*Rbj?Baak2N<0>kK|ETnUw|l)#yc(&6#z!&KDN zF1eurC!2MxuN-i^ZrcdQ;q;NSUOZT|ZB4+)Fh)KHQo5aYffp_a=}AcfGrc{uHZ%~C zBD&EhwgL4kBCt2BGg8od_F@m~S~p^tH~yx9w`ar=VlR7vb8iEsy5gOtbV^L^?kFDqj~o5z;I@Ag-ml>3cmL;g zr|G^etZm#-yqC8u3aO-zaUDiF#dn z9uS_CR&Q)4Gd;a|2k;4qnLbME z>hMW{>8-Y=QkYsH7E&0wjF)W$=3?->s{yvw*g!!;0SF1u8gwX3+2$=IGg+QLe%hL_ z3O)OC`p*iQS>X7JYoT77e4{D8KfaKDCN(}1efZ;_5EDa#SlJ9Hg;}uh1w+O1K%h~n zBs!OMr6FzrSDyS9ua0)Fe!y=?!s{9+ZQV$BZ@>QP+vf{owtD42PXCkRR;6cd%L6xg z;vNZSKHjvh;(^_}Ir?AU$54u(5R?Q0gkv!b$A(l2!!BS7maMRnr9_l=Js|~zfN)a_ zRyfL6-a1tn&*sN}RM7u;)#kFdKOVeQEwrrtK(9@*(I*aGotgXeN9q$kzu!-4Y7!v? z+HsKi94eD`Q>zfJRm6>7RqyhE?P)$JKuJloWfR{x@|N|ZbpF`Boc_|R;xf>Es~Tv< zJF>l5-K}BIv9o7YZT-EjH9ak7YzM0-4ejaN?FE*01q8g!z72>_gj_bmg>+uNmDevQ zmFB48^=y?dUO&kz%LBy%Sws+B^5zGSQbO`N%}Gc zYgVabug%|%JB)ksQFr`s_wlee-da|&?TH5;G;(S8V9Jn^i+z2(a`~E0*-A{sn(Rzv zvowPd8I=Xh>?|@jk1scmY3E4#%Sel`J#CaJ&|_A9;VV9W$qNI0dkS~sbb7snvzsIS zNO@Tq6IP*cVPZyT=pD5A-X$Y85{bs^{DIP1f1spA8o>ubp`aa)*8~m2D3Af4@2U>vVf!K`V=%s>wV@5FtjCmXJ#Sa}K7_Kg>j&FOu zBwG69j-5M$*=!D_9h6cir9dm9(FoJi)B61Ro*AumVxVtN`i>H~sa1H%ApMihaT;2m zn)>}O{7FS99P_|CXz!|&A{+^@ch8HtQ(cGtW_0NAmzNXF=7&IFdO4F4jh&{}I$Be^ z7NrBO^@KnOQT*HIlQc9o8>hMt$AB8#bD=vv=KcxYg5x~C6V_^BX} zXzW~N80Je)ed;sek?~n(XH!Mc#XuB-4NY|%I=DZ#kec|Ww^%Q0MV5CMe3_KSn-4zt zXjv#!!nJE7m?o@UQ%=LZ)ud7>QmGWmDNquToIH7AZgS-09w6nB`2Qo2XzZ+&(m1tq z*GJnw@yW;h;YfgoA8Mzn!sPAKhm*7GZJv}w$XyqKt=jZnYL*;+@yTA8^vVvoZww46X zJ^Sp$wcb73wN~ln>;vu?fkb2HeL~1XTI&)agbm_!!AkAVWhReKPyDbSx8ly$uKmTz zK(OrCAN=8SmGkp+>KkAG>hr_zy#CL?_;Tg*p%X|ncK!nJ*WQNYjoGOSr<1e&K@W7! zJL`9Dn%^XZ>?)1LLgS-Xo*o-Ia%j2h%AL}E=}NO)qOr3*(bzd(9pAATi14%65{;cZ ztK&P2yScFb)U^KtrRD{oF8P*`0000bbVXQnWMOn=I%9HWVRU5xGB7bYEif@HF*#H) zG&(RaIx#mZFfckWFp!xHOaK4?C3HntbYx+4WjbwdWNBu305UK!IV~_TEipM%Ff=+a zFgh_fD=;uRFfbR4#2Ekp03UQkSaefwW^{L9a%BKbVPkS{ZDnL>VIW3na%FdKa%*!S UIJIcfcmMzZ07*qoM6N<$f)N0MU;qFB diff --git a/images/audio.gif b/images/audio.gif deleted file mode 100644 index 26f106c6ade5d5dc57380a6143bd04c66a387999..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1104 zcmZ?wbhEHblw*)%c*Xz%7cO6&JAYA5evyxF!0T79EiJ7M9y!+4+oz$bv3AquA3uLT zc=%XRK`}Zep{BZK=FFL*!ooLh-(9w9jiaN}r?204?AmkY%o$#8uCVY(V`F1?7q_&u zw6dz|x~7)CNmCXsSQru-@$A{Ny$23oyMDVMzi`X;T|fmKENpAnZ*p<l4X1M?p?cP?Y(>VfDYKQb=%RS z$6DGud;2CvM@2t;^6dTl_xG+{D=scwvUG{2rlzN-S5#2c(Y;5Vyu9)Xi(}&x_HNzF z&dzRU>(Ef&D8M1$>mLZT4($5@CKP|NFtRfQGw6Wa0g4j__WupRP0hi2+=fn0+}%z} zN=}A)Et99{=^3)JnsQIG(iGsbnl@!Bw`ea9>zrvq_A)M(DibCxY2{`W(ibvVJ%w7Xqsb&-ZX>QV zu|>~Gh5am}n1YLgv^LYW2MuozunMa&aXj3%fQ?y5oab4^go7O1JQ@KE4uXwL>>O%G zVk#~ zaN*D*Hc>gB6;WHnwYnvZqdsUTG_@;)8n_8WE_}G2nL}JlVwJ#yHfCmb#ta6=W=BCs zr5KS12OpjkWYV3XFr%Q6WhnrXTF~;c;kg^(hEo;aL@{z!Ao!`=N$-;Jzf)lT4#{y<%Q=doa3_@!%ITz0qnGhy0G3HPMOZTKl z0-Ou-l1{E%vFcgqimgW!oEX%;HLY45Y$V{U+pyCP&HDI@ Wf;u0YsKcAh7u>XU*EKRQSOWmcz-^xZ diff --git a/images/avatar.gif b/images/avatar.gif deleted file mode 100644 index 089880827fc93e6150fba925d8ba80dbda1fb234..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmZ?wbhEHb6krfw*v!Ddkd}7l%$c;bw1R?y|Ns9_ojP^XrcI9@KW=VrzIX55*RNlX z9zA;V=FP6IE}&W$XWtw!{hv8$=5{|Yfe2EbnDvSyR3W{B^(@a#E G7_0$u-adf< diff --git a/images/bio.gif b/images/bio.gif deleted file mode 100644 index 37cc5a10692217ee936d075c18d16459825e16e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmZ?wbhEHb6k-r!xXQq=s8aU(*XQ>iJ=wPB$e*nY|5h~4oH_H&@#y@5vYR(=uHAC* z*W;o;zkgg@zvTV<_h-(W`G0Bu*ITD&ROJ1CQMqH^ng5T{AFixhTzR6rJlInBo=ut+3F&m_6{E5Mmbr&*3OP@d3|l2{z9FJ20hcJx9TjEG@7HPJ}-X3 zLPk-RW%H)bh>n+(S|_qGeq~|2jF>oc-!49-P4Utas_KV#F)6k3DY7x0IeUK3)idX+ YmH6-7zo+m>LGilRgBSM;yc`*<0U)QuVE_OC diff --git a/images/birthday.gif b/images/birthday.gif deleted file mode 100644 index f70a61669512a505dd02ab3cf73e55b74bcbcde0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1050 zcmZ?wbhEHb6k-r&_|CvkW5M(2%DyA>GkcQUCvQBr_vXh#5e$F7f4Z=1QT?Pt8~qs0 zcdA{!^<>Ghf6sgS_CNmrVD8lS?u=8T6#hTkyT49$PkZq9*EfzHz0$q)+wEg(|KC}B zZ9&M{8sYcv-!BMa*pb2T?(x;l-FeI7xNaX@^k=HVu|kGp8zwK=fA45h?Y{f}Uwrws z_vpRXD_8&j|NqU6ecxZ6nG!6tGnfDI^(#kn7@m1buBi6@dH?ppSh=(7+n4OSexTE0 zS1QB1-~TtB{dnruyZh%)ot?YjXrj>n&v);f+Hzr%-SxNsA1_+;?*8fD-hBTbZTkQJ z+w=t8OS4n|zc{=#hV$r>s;OJAec!)reWuvYukZKW{;|JEVEy?Y>jM}*K7acEh6f1jTBP5gg<)&3%he?MO~*zio*dhYS8DF-TaZqEtY zpT%%=>y!g$@BM#v?%{ZCk@&=R z(4|S)Vatq}#~8b3>Ml!hF!<0hQ_QPLE+bhv6d=gGp)NsaUPgPi_I?r>s~ zR*w}b);L(v-C@PNgX7a7hGP$p#HJbOZG6hzz{Ptd;Xxu(8xwPoGf28 zijJ{J*%Yq|S-8NtK}TUu+HnMa2@^UAC=ye-t! ziPM~-5HxQQd6@@?hyt%Eig-Yp?+Xz~Gk@h@(U+co;Mtz-2@MbN^}FK)IYCAU@=u~8 ztJ+GAwwS`=^Z6NMx^|GIH~fNOIN=>kW+;Ty%WCyj8g*e%`V-8J*VEvr=gjJX#Wul@ zA@SzA9vDn}QDhk+kc*ad9iL`W%3<2T%F?ER+&P}orO^twlDWmO95|+74bW=<08G&~ zrZ=tW_HLC6Y8ymtJWWH(Ox8zHT9=}97~`u4 zjFUn+W7g0zjs_($OuJxHyOTvzh2_E&ruYR-%H>L4zGn_8jFnU#qkk&9c@{MS={i`( zKpl5`YFb?}unLSia^FT&&ahmGW>Wb8;Xfk7R}xu6vsiKC2n-8XHTt?9e(T&$?3-Bx zLAqGdCruOG!zz{(?V3>EuM@4TXlg!BizV_**0<1t$xNDpHzmt0WB+Xe{pTMQa5Gt& z*+6-a=e~dc2?z%u3tIvXXXgw#((tjq-eCu<&P6Ubj}w}oNMM@ zptL3t9;RO#t(c&kazBFa6thRk=MSf@$8*eiZ%GyzxqaH!cA?$boL%g3a|qGPKRG?_ zHHTg1>Pbr1n%@o14|0t479$=uw)Ph@oqy}{BZ$yV^QN9S4}691^@w!jt1`SXz~@*m zJ<7eL$SUJma13FMYe`JKw}o?PElij?#ET6iE+^uyKBYzvmspf0oG}aRaqQ)iKZt8D zg!*A8VAnjny4WRBPO^8nO~6JOn8?M)nOfDuCKOa2wer5?=B^Y{j$dZ5=_E+S_Hs}} T9~7&UI5QMq?cj?B5F!6RHx8Gi diff --git a/images/close.gif b/images/close.gif deleted file mode 100644 index ca517b6ab36816a651016d4c14b84475a2ff296b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmZ?wbhEHblwy!#*v!dLU0r?R#ECg`=6w0`WyXvdd-v{5O-;Rb?_N|?)c^ng88Cq2 zPZmZ722KVYkPOHS29|CE&&p+cCFFxY^Ug_A@OZAuD(NTfIVisb5Vz8{T8r- z^6NM+vy6$kz^*ngxS~q0wWK{St4pU>yxxhiq+g|bq8*z^|ExAQ9kT_KVE z)6+9$%9N0hkg%|@J9q8`1qGcvc``6CFd`x%G&JWG1!QZ}p`}_Crt5>gn{ra_R z*|PBP@I{Lj`S|$w`}?P*rG5YY{qEhnXU?2SNJyxzu3ors;h#T$K79Ca@7}$foSdy& zxBmY9d+OAwXV0EJb?Q__MaApauf4s!A3S&vA0NMS=g#~0?{C?%rLC>4pr9Z*Ir-_+ zr;{d4>gecLxpHM*Uf%TS)ARH5uU@^{*Vp&5E2E;KQc_ZUeSM3Ii__E7r%jvI-roNB@nb(fzs$_c+qZ95RaO1} z|Nq~=e++a1ia%Mv_UM2}P@FKZ|8IzCYHn$5Ywzgn>h9_7>+gx3Gn5iiIZY<+?`^k#V9jLtyr*r!J=422f09{b+Ju)CUT+TQ$(XUHpFrqp3WW>wX1uv zuMxADYt*_`D!j~cc9U4RqaSdy#4<#mnaaTWAexn73fF5^{TRmAubUT3M$0pEhL|XZa-W~L|(gBwDDiyC{R^)5V?SdhX{^V3U3;)26b z9`PG&9vg+2LK~Ub)t*kN@Dpm%WzyoDVKHUWf+~JK$+ZDZ@~kR1)Kp$5Zt9+<`%Y)- z>yw)=g|fzKY2BzS@eXpHy5ookQ(^-%AM<|&o|T%JuT^(X?uuf%wX|uMuC&0ET*U<& zn5MV|N-Q);aBAjTtM<^<-0=N0@0#5*3?I(E@i^2b=>KSu3P#TbT%XyyED9)8M!}zkkRC?kPTh mHXNSne@Ka2Tq>lLlg+!}=2PuWCXYMo(tpiJ>u+RWum%8KFq1q0 diff --git a/images/comments.gif b/images/comments.gif deleted file mode 100644 index ec85a160311c77b358eb309df7dcdc9e43746c65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 420 zcmZ?wbhEHb6k-r!xXQo~)3x*AtIunX+-Y8R`uv?&U%vmEviVZU>?6C*Jbe4<`@{_w z{{R1f6Xs>swDf*nRHtx!bQ}x^_K$^Q~dY381kI)BuV< zSs2+FG#GS1hJpOVz;^IJmx7aykf!96BF!5tLQ_|KQRL8>I`KdX)2k|B-baJ{ET!OsP5-O}&BJ52$IRYX=EKD3t zvO>+AivF=4^n`VFbYnV-LJ0E{v`t1Air~juu|3CZL_x1PwPI>Zu%A@Z+PrjbGcz5fS z&pr3Qwch=9?$oi_SAJFB`!@aB=Y{7#c3%0OefR6!GjAI%ea*W0W$Nj7oo7GgT>G@_ z*wf-GUy^TpYCiXR=Yg~3=YG_j{?vK=eaO{M#iw5-oqIQF-{atOAD8aDn0oS+{iV<0 zXWmsEe7beZ&Y%--oKJtq-TowV$G!TsS98|iZ&-bm5=R!#CQTMi5#23i8epDc{*3<(T6AWJ}T!oYsNA)$$tPe{ei zM4nSbgtM8Gbs`tPssuZ`oRyWntgbLS6T_lKEUFgHzOKQB+S+RT>|6^)_0;sNU1QAG zYAYzHOYkTwD_A*tMw_dtY01fHD@&YK(9?E~G*H&kl8{i45LGy=tmhM9rmUtcC@0Fr zC3;TF$o=^xL3V9ZWq$S7pPe?GSrGQ9u~SNmZ^i5eW=?)>W2HGa3>_JoyCswi7&boi zoGN1Pq9Y-&Amt=8n~}!JLySIr8ZHepE^JV6Xy#U2myoH+!NjE;w8CYh;9<|{svInu Sp;-&tr|HK<=ISOWm83?niC diff --git a/images/coolb.gif b/images/coolb.gif deleted file mode 100644 index a8b11c375e3143edcc51c42cd6b42ee2cae30624..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmZ?wbhEHbRAAs|c*el+|NsA=|NnpZ^Y7l@|1W?3`|$1G^*?_feE;+9nV-LJ0E{v`t1Air~juu|3CZL_x1PwPI>Zu%A@Z+PrjbGcz5fS z&pr3Qwch=9?$oi_SAJFB`!@aB=Y{7#c3%0OefR6!GjAI%ea*W0W$Nj7oo7GgT>G@_ z*wf-GUy^TpYCiXR=Yg~3=YG_j{?vK=eaO{M#iw5-oqIQF-{atOAD8aDn0oS+{iV<0 zXWmsEe7beZ&Y%--oKJtq-TowV$G!TsS98|iZ&-bm5=R!#CQTMi5#23i8epDc{*3<(T6AWJ}T!odE&A)$$tPe{ei zM4nSbgtMu?rLCi@r!Rq(lXVsszp4Z~yPTDkzU+)ytaIiqShPe|SD2lNVapa4RSRcd z*WeACwr<<8YmcF}wi-V>*Je>YH9c$Bn4`x}o@O|E{$h;zF>M6}bqOA2Wd$oo&*;0y z9z1&T?8Pf{H8m|cIc;T$uL^qF&YLc5ZughB7yieP)@bO|%Ecq$kg$Sb(H#zPpA7~j z9Dz!%-4YvbNF*k?u<(nDXsl@PZ|zZ5@|@+ea?(=v=?1wUx(gCqdj23nM!N7lRH+7-R+m%m09rj?99I62?oGH@9ZaF%J#jR?5X8mFy8SXZ2CB-1{?q z*ta$ZSO^GkbvQA4NDB3Os1`r45$QkKbUfw~ZY$Ygvdef+YkD|ybc(Ns+J6c%J)um%8uHnV-LJ0E{v`t1Air~juu|3CZL_x1PwPI>Zu%A@Z+PrjbGcz5fS z&pr3Qwch=9?$oi_SAJFB`!@aB=Y{7#c3%0OefR6!GjAI%ea*W0W$Nj7oo7GgT>G@_ z*wf-GUy^TpYCiXR=Yg~3=YG_j{?vK=eaO{M#iw5-oqIQF-{atOAD8aDn0oS+{iV<0 zXWmsEe7beZ&Y%--oKJtq-TowV$G!TsS98|iZ&-bm5=R!#CQTMi5#23i8epDc{*3<(T6AWJ}T!odE&A)$$tPe{ei zM4nSbgtMu?rLCi@r>{R@VtZ$IZ!;(B0xo`433hflD=U3j*7*w;FI~QJ_1XojiarX#ng(MtcU~*;^V07P+(DXFz z++5pwHrXhV<$m+*8rf2^l3O|j1#LnC7A!dACTi4|u(HbZ^|f{Jhx@j6g=&YdmwR@g zYwJhDLye-QZZ;N;qH88>EPem%?(Ohn@w?RCJi23(aEj6$hC*Rc3W8>e7jOl+>kdC&a;E4FK2{ybb^W diff --git a/images/coolcolor.gif b/images/coolcolor.gif deleted file mode 100644 index d92d36772ea2873d2d8a8364e24040342707c836..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 905 zcmZ?wbhEHbG+^Loc*elsUABDdmYw#OK0BZOaQMUT*;jsTz4AF~?&(SU9zXr~zw^rX zhj(vPPgvSEe|y8FuesZw+m5I-FdO+$=4GX@9uv0 zbJ?+{sV84$-TZR=`~Rme-V~pHRloLX&iebARg>1=`#WL!vJc<>bsm4e_07-lGw-@S z|DS&C^R<_MW`6pA{p+8d2hIkacysR5v8kuu&3^X%==)zu=iaS)^FQa>r*kj&H0Cs6O8l%R)TKz#JA zJNF(qJbLo%#qGQIA3lEiJnD9^u&{(ioN=1Z1|yZ$zM9)VellxJSm4<5``2G?iwzGP zRXmnR7#gLrarFo*`K&zX!0py6W7{O+c`4;sudKZir{$!BQze6zEO0PnY;EIYOm}IR z_$2MzT-$m!*(j0ae)H@a*;2HU*(OP{^kft~bUN&&>20C1vdZ-JwRQ1_`?hw4YKO0P zdv>5}>c@!=Q#57M3=TGk>U3-@egEw4?edfHyFA`Jx_Wwg!+jMyr=Y~9CCyVb!ZYs( z6fALh!ZBGp{@k9OpPyftW_bR>nVZIpJOLRZADyIG8TExj3SK^XT>9qb*8J!9?n-aV zxfPf5_}bm04Z=!tEgm!MY`vz5*+}RV@Won{a$eh*{ao&^^^ey##anI)FdgJnF|+Yl z!L;mnqspu6+w0})>;C@!x$(JN&8Lg$@^$?+6ArTazfox7;j&3^WU!A}q|nUgq@ma< prg!5(v!GwZL)HF-k4~%%Jp#;~DziEkb?L-CO6tmYoDm%L_E32xcq{m3F%f@1=j@mp!tqEp^ z3)JP;D+z7Xl3k#uy3?f4CPHJ$T(&9g%EqKmYzx_d|2hS9W6W?1Vnq@P4u7{a`0}&ehyyY5tGV{uitBBhmDKlHvap<9}(UKhv%LWm)~tv%M4Uay>HOYINwm z$bge&#n)02ZWrahNc8=l?ernf^J9_k|3at#W$yp0z5mzw|E~{xR9(s27ms=Wdb++B>Zac7S*||Nt z-p-!>Xz#9eaVL4?n(p`{nh^pU&rr|NQ#(@83U$ zQGh=L{xc~4WMSlD_|KpNQV7Zu3>^Cz{&W60p7!8?UIGu7OmbT5K?AR{4KEBnoSto( zV#1MgnB^3|kSNMY#(k{XmDV~4C&|%E{#eq9K0M{yG=NEP0|)nG**%b*;JI>C*joa z1qEjhIymy|G>&Q5@Zr4Mb$L}Gi67G$kM@Wu@$uA5JlxE}$ZXh<(ZI0T Tfls7FYY)Tmm6@%Kj11NQ1@Kny diff --git a/images/edit.gif b/images/edit.gif deleted file mode 100644 index c32abeb7b99aff2ca108388d77e51c05367a96fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1037 zcmeH`>raw<0DxZ=EvSyHtCeVDw?M1ukI6HJR2;?3>Pj2r8%IC;Vdipaegnjb^ufy z>*a1tKFUtiEk~a&KvgtMlTK<=U~aLo?hGQ>j&QDw2`eTPCtNM($679sa0)O`Nb|JB zx9rGg25`;Ceq~e1qxI_GBehTbdZIz)6RA+K z3YEOZ{?nq(nnC3oeUsWR)u1vhChH>P?{O)dXofKvjJN907DMu-4r}Yi+x5885K|fP z4lDM?jCGmAA1pELCtTZ0bPWNctTIq{$1ANJG>KrH!KBxH>~$K=HjB;iWnkE0|Jq{> z>%YWc8__d>!wvus1H%yUafCG4ajO#>a=L7e*x*RSGzu(kFg)tBA-K&=3?O*FoA~M_ z?FcdAAspVM(@%_BEN+`6*!L-9HBJVDE>CFOKjjHTkpSinkYhi|z+}`nk@QZI<6+Vp zBK=V?8A${q#6*+~2i&1ZJo1b96(?dzA`y)wP!a$D{pEiJ0JJ9TMnE%xT4^&lERwJs}VBNzO#n< zWdiyBqZ}_Qmq*nteOfe+cBS|pedWH!J^R=7@tO;-Z>g@NtmF%FHXNHd+;O^JURt4b fi(et>kM9<@&6Vo94U4wTqB3^Wt}4*6pv}Jl1G3rt diff --git a/images/email.gif b/images/email.gif deleted file mode 100644 index 453b24c8b653861969e18fb400bae1868ce540f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 633 zcmZ?wbhEHb6k-r$c*elMV0(Pei$60?eVR3EbM(w7r%&IoZN2~Q-G_-wZ|yyK;mMO% zTrroweSY7%{K3`7KUS~Zz3bfT2M^xv+jnWp$&1N-=cev>Dpzph$B#dE?%Y{(`Qx>3 z{|lBp)62TNb?>zuJI((n@G>dNh|NsB+^FOnXzTLI!V(Of`v)AA1U3~5FkAE4< zo;`c^?)&%e_wGIa{{H>7d*83T`+W1})2K=JfByfkQ*m?u+rKt#kMF(ze&WRKbKn1a z^gdjC?Bj(Cw|C!sv;Nw*;ecgNhbF@h1x-J3|tK4#;p&oG`Fo zYe;HpZfVk!^J?vC;tKGIX6S2yGM9(P(NWRc+e>ic z>}DP>K5b0{8=EN>7J5QH&3sDQ^73}7UbY8j1Q<7ITFV<;Gq4k7w^_gbVvEE|l5;bgl!0-{1d}H2NfJRtb~6<`FEr}A3rGY` QT%fL~!N)Jb%fes{0C=w`JOBUy diff --git a/images/evaluate.gif b/images/evaluate.gif deleted file mode 100644 index 7e40fd02ec52854df71545e36ffac282c72f345e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1136 zcmc)J{WBYO9Ki9fhszXea~`(pbW0sKTGn-Tn_hLYcGaOOv{gmcg)%{VNb5Wo^>j_D zp1TBrhF3>*2r1vTg$79!dDl_>~$i~v_~%OSB*awmuFUc z@;C9`rE9VY&Yh=_t~UCSj`b~Nx#aCK)WJ>gX@JOS@HMbhuM*0xSBNX{Tk_0ymZ2mKCLc8ztF$hdNEPe;rg*7Q~4?BirD_Lo^O__JV8mTo`xFi=sqCDe6>= zu0fZmxsgP73~Lso@phlizBylJUa*R?#iS9Xd{(WF6r3hh>=H}h_ZLmVf!#y}uo`nC zn81HYpZN=J@u3BrX=7KMGxiQcwy*GL16Z`fxuOXW!?F6mul7LjqZicdrhnokHqIFv z5;^B~>GjJwizOPHYE3}J{KYh(A8#IR^r1u{-0nYkp~g_6CGaN-%GJJ75Mwt~ zLhvbqLG=Q$)sDCBo}>s|T3TjJU9Xr*9)P6uIYb>Iq%>cq@xYz`(HN9?{e}zWzooQo z(*-x{yQkPYNW623_Y!7--2)yCn(%}X-DbeVJVSn>PkJCQvm1!)^>dYmi_np)f+(RQ zt)4{WK*_LIg33Hp1eKHN{SfIzX`X{m_&s za|lM^-jNJ6whi1VY7!qJ+HvRWZQDjTHSaK0OWw6B0U_;r8=zI}By{>0w{3bVN#OkEaC8Mr+)lruebR|(QQpO9QESPyX zrWSHB^5K*%tDNx~^JERyF(^YPUysU|ZjgSwFW?)KwZOc>AYH!4gK%NA>0wtI;W>dE zhv_U7*cxO-<7LNxD08cFC-3=FcGt+M2a6l)(4o;)m;z>0$Re%eQUT_qG*#+j;UDgA z7d~o?N&CEQMPqpC^v^oh<%6j{Usop79(WQM$8q2mNbL}l>=`ap=-c@P<5$zP9eXoP zjYQgQK}~mqi~CorL4-rTsg?)M;IgpxU#1&aC3Dcd50%!;eEdZNslFLYGlTXO*=w1u Py*pZ&Np|FZEIRQYg-tPG diff --git a/images/fans.gif b/images/fans.gif deleted file mode 100644 index 37fd96a824c56092e1a353b1328812547f0910cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 597 zcmZ?wbhEHb6k-r!c*Xz%&+cCNa86~%1le6ROmFV=&BQ2T%-Q~f6xDKC67<}oLTMp{KkQ{ zIFlKYfs1Iii{{NqOXu8avzM#_!!v4L_J1{Hh|F_C#C(YNE zOI%pU|LMh*kI$wT*fCBoi@mZ@@8fmv{xrkcdAe(xOn-d+`167P|No8i>XZKeow9mL z+pF6L_O#0#SX#TJNaEPpZ{(sFnw?q=?ad4PXjZpl_!pP2$%Af->5fmp3?3)@= zo0?l%+uA#tgt~j;G<$klCJ4paOG!_jG(n%$foo>-gm524uY~XkEe7t1ZgNfG>jzPv4d7OK&DdeMdwqLwLYjI%slb;J$5k|T7Zx@QSFN=8at z6bPKSP)H%n$XZ@r+c`wx(OVv7Yi~9-a~TPXiT)E?^n-Lt5)L#lcS^=^O^b9{+{VSw d%^=h8$>EWbG)IL)mqTLX5f_bMAubjMYXG_(_^$u} diff --git a/images/fansbw.gif b/images/fansbw.gif deleted file mode 100644 index 6779ed128234a601db5415919fd6a170dc8a0271..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 390 zcmV;10eSvMNk%w1VG;lm0M!5h|NsB``uh3#`SbJh@bK{M?d|OB?Cb06>FMd`=jZ0; z=H=z(g$;rsb$j8UW#>U3Q#l^(L#KOYD!NI}6z`(!1zrMb{y}iA> zyu7-)y1BWzxVX5tx3{yiv$3(UtgNi4sHmr>r=g*tkB^W4|Nj60000000000000000 z00000A^8LW2LL$$EC2ui01^Na000J~z?^VMEE3{xqz<9K|s zLukN7aKHjk;)T-zsW1gc$Ym;(Kt!0tuvi=r3=kI^9w|0N11TE`2L}lZ4-*zAG6Y&1 zDGv$^4iOeHBTHHU9~lh~ks~HiVE_Us6%iB^6&x=DqOAuk5gjrzAsI3Wxk>;RA|)-2 kFe@z>#W_nOGZ#2ZI2tu6(MudO5Kt30B+*Id=tMyPJC=~W`v3p{ diff --git a/images/green.gif b/images/green.gif deleted file mode 100644 index e2d1b6c07eacd7fa5606da58a23e6c76676ee043..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 610 zcmV-o0-gOwNk%w1VH5xq0OkMy2zdvk$d6^ZVQ0D@xyraf$pDMeQQYC&O0WT>z@%fv zKr5*UXv9sQ)tZ5~f2Hql>gwu@*>F3i0BhbJTh|H8*2=EmrBRtKdaGl*@rsJkKW)Ef z;`QRb=CY&ZgKW_|jpJRp&#q$07k1$RvsN z8kpLHtK^bm*AnRT=-ThttHP_o=emNmV^PBfc+WRv*&lJtQ((9lb>SqF=~TAoq_p9( zfyjJ$;x)0^pK;Gg!uFD>#hLH&?smg;wce$c)LlWl0AJq*qTP`ad<1a4CoZr8YRy2Z z?sS&na?{?-gs*L;=819GHbm1yQ!VGTPEMD6Mz~{Vn+&nqH z0DRp?40&SBi%)77YT9gd`RwCNUdAgK2PwN)~rGLq#VJf=_D- z7K9vAHEA7bTnhjRc@_*hac(UwAahAaJ{5yj7zir`D-;t^Q6qL+A{PgSWK;w}^M;L%CJ2%2fPhHN5++QV wgponTfDK1g2K0D9g-#YDl=6h|l7U8+7a;}B$e|%X%0Xj7yqrn1W}!d;JDYbKp#T5? diff --git a/images/green.jpg b/images/green.jpg deleted file mode 100644 index b927e5f5cebbce484ceb7d639eb0d7912b7ba0f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 582 zcmex=i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JK^0|PSy3Sebp2a2l+FfcMRvoNy2WtkY6Syend5P)#dK>*)#S2v@9IN;x^5xPlb+KQf zQa84)+_WS7j~bUxNb>G^Tao*>r4z!-E;rNQM*}2zM$oE!)qzK hI|m-`7c84`_}m}gCMBgN%@)7O{*0|YY~ufK0sw11u@3+M diff --git a/images/house.gif b/images/house.gif deleted file mode 100644 index ece7ac824f57106a0f21eb16831adbec06e41e48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1074 zcmZ?wbhEHb6k-r!_|CwPmX@}5?bV61H^d(uoIqCL~xNJ$Ll~|Np5Ik}hAk{N(DYh@Vsu zdTC|;j=P&4y?wa1%eiKH)s`7eIhzt^&YZcfzxKqOxTzVz@87@w`0e|%OFPS>ypPOC zNLU;8@W!Kxrtt-#j^gi6{^Zosc($#tUTHU{W`}XL~k0;kJAD$BU@#)RJ7>m%3pv?Z%IeAVOc5mLk zcE{@*N6yTP-_;*=bV~BYwbkXvbH0CnzpKu9N3+$MDyyE(o_F`p&dV~|+vC;0vFF9T zTW8LkdGY$=={eD--yDyh9dTn*_0fBKXYQO@v9jdw^r*JBwtX#5msb}bTG4oTLD9a0 zN8j8%`T6CYci;cF?626~6MW~{*ZjFTdnSfoyLK(LCoy+_(#vc6QddVmy!~)>o%iX5 zsh|IReEjAIFaQ}w0aZgl@h1x-J3~K%4#-qco?zhk&mhk!qw(RSa1)1Ml%lhm*A!k( z!9{`1&(BJ$hhA_Ixxsp(+os4VY~yA1BzJY4J$ot+YMfzriWMj;e57(-nqR_T%1uGF z3C+UH7ay$rxvXcNX0Y6hpPSMzws80Vd9c#yNOz#4dETGENzaZm>W1IAvSL#E#6Yf~ zO^S4%fO=$gpVUvwoxv9YC-vHTs6fumDXpK3H)-i(9G z4I7RyaFuH~u_}ry_9`|oFfQcf)DsmDYB<=^$azsg%zV*g)=q9VT@w{fA@EL7y}``|Ifsf~%nsjFw-;ncGN4$fQ=9E?l-I7RKwo#A(AR5D|CmSjup+_3TQ I;syq50PQe-p8x;= diff --git a/images/icq.gif b/images/icq.gif deleted file mode 100644 index d5a5848110f0202dfee9cd7339682d334707898f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1131 zcmdUu{Zo<$9KgR1$V8C02Lv_WFmN(8aaw^bPbC!>S@_b-V|Q}Cq;7SVIgzOgHSuN4 z3BIfs>dpa6)0Hn=i_`A0!k32ATB*BhGhI!s-L&1T<$id!{)~P8fzN$@_@tyJOQdQP zPba~=vX=GJ`QPi>fq>*{7<5X6$E*L3~h#bZnt;=Ue0prI_hM)#QP8KBTbNe zPuM-nifE(;U3ZJ#1le%7rOy&F0h*o)dLB*dV5VEr3-EyG-+=Q4TT&^3K~UfjVT{24 zBK|&uj<`nlTatq3A;3o0{E}5>EbFv&=Cv|}wSwiRzb-o2%718{^S~a49k*HeRyEXv zzllw6b|3Fx^ZE%NTT7z8^?!eXU4NrGXa+=QLi2kV1TB*BA}DeRe2RTC8?#RhoGiyh z+aE!NRfBXOO%_(}XnMjX;x~h!m)+9J(qdP^&}(QLXq|pI%`phtxNWFQjs7(6I8bkQP7YIPChKbQlNGEfh6F zF3x@L4@kQnyZ0v)o5ZMga85fZ?Fd|h99<6b2?*@8%9T{%8h8(o&}le-#k}@>P4dX? z1M^{}Rj&G6wXMmw%3fA|u1bc(?ax>TF>2w@GIA?$^SC9rDAEu@(m)L!%{x!qvq2Hf zLNEp)KZ5T(u=>FZ1CM^dad6H#%P*A2%#lOykVy3iua~rQiR3i}(!arW!?yDU5FN0x zveIYoJJxdiz!ri35&zX3GtrQ+@OUAz*|VyrT7|QNFEKb>q#ul|3cH4Q0osR+(ubsM z94Mnm_!B}-dydvxiT@}2|HFUnhPcB`2!E6E<_RFW!u@QE+AViM)wGon89`RbwW-%ycT# zSJ*U7&b%40LD(!bkU8BiUD$^0!H&52Ls_DHK0_$_8d&muB9FGfSXU`!Xgd|nqKbRk z4iU!RqI5kYAF+zRyqK-0?_IkU&u;R&n&|pU`AwEiR2mzBiQgs@(Ofr`PwrH@Z&*cD z@mK;PLsg0*ehKmv6Dl2X0`Cl&B9vjRaV@{APQK*R61OC+yL-^Y*T17EiB4%SE4ud; zptYyluM%p5ZFCM3_WTROzi=}E diff --git a/images/index.html b/images/index.html deleted file mode 100644 index 990cbd60..00000000 --- a/images/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/images/interests.gif b/images/interests.gif deleted file mode 100644 index 28b32407b6babde5a68cfa1df161a6d1bc074279..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 607 zcmZ?wbhEHb6k-r!c*ejGm}qq2?7lUt7nfBgZ_j7Adi(B#c!gI>7?#eiT3M}C;i_@} z(UYTl7al!#F0VXx%H)YNO5)zXf4^#qszc&?VWYGjp69geNP`edVKF{gR^u; zl*X;gd#_%-cK+nn3)jx?pD4XFO=rjEdDkx@KYn=U#<@fDGwjT;vuD??oV#{z_lXmSZr{B8|NsBXC)VFPxA(|_ zwX-KoICJLA=Jm5L9NfQu-`WMmT5n%H-n)DIslAKtKKPhgpckEHx@v9%PzwV!fZ|UU zMs|h_1|5)Lpg3V*-_wxM)ZFau65P_+6vF6iCm+UW-qkE_f+h_{%ZLaSqwN`jQ33w`?omkxcoGx+!@?8~_{+-%`uj?| z9PkO0wQ)WcJAXmCYIu;lzqIt^1%g`sDeA2D@k|Fag!IHr9Ib4(FHw-Z_^5%G$ynh5 z!_%WI6GS8v_82T^U|J!nV4>o{aO?=5V6;Q1M8dKjAzp6=3kSxY)6D$*a~OO?I2fz} DYvv1< diff --git a/images/ishot.gif b/images/ishot.gif deleted file mode 100644 index f7ea93487a30300f7c48928e6a7f419207fe70d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1096 zcmWlUYfMuI7>2)ddRpj((snJDt}Um9LZJnZ2!xAHT4huQv7jUyLB+T+=VhrIQ^K4p zwWz^HK_s#ZQbdg`xOEF=EX&*hoD3;gW)Qh-D>58SR50qs@W(fO^Za@KJ#YTT*E6$r z*g*?p0Qdqw;M^y;2XMlQ1%MCEVK(4rfVXv+2>APEe0l@V0N#?|pF6M&PzC4#>;hbx z#*blnbR{l!qXd?N@8i4&e*&}umH>`~>P!m49h|6<$CmQF-g-}wU*Ex5jzQe4xg{Dg!LvQiH+QWumrKml-wyx6f%*qCW_KXC#6XOy(yJX z8C%rKzm>5A1`Sueus~ehkdf9%kWvlRtWHAArj(BJ^wF@GHIAAFnk5wpTIF$P`}#1^ z(6pW^5CCMwXTE0Lc2NS<#ixM{$?>cNLO*V zrofn7Ot+j|LD9wrZ$ZDUDgLU(=Gfq@~7Y}r@s1wv2tyWPF(_K^lhlDDYt+EFoW zW9rXtC&LvPJ-eLWgWwCJ>iD%v`8L-ZOnuAcLa%#emFBh5)NiA%)bHeG+kEapir9^+ zp1__ex0`xJlB;y~&$H`(XJwB-IsDP z$R`v_<8K{|waZ|0fXf^Kz384LGN#mt1jHNY^)k6HSZv@|KyV$%D{ccv^pS{)n0I~7 z7bxf2wke)oVl!(rtF40GXSpozOB-8Dr5U3N`Q@WJD~D`2z-DA=-*lElQeLN^Hw|ub zRL;fT{BgPWY_wXv~|o(Y1MMiSM*TbHGgq+7nnKkI{{=&08(CA`wG# x!bSF6>o1~mHdj^T1|yN|pV%Ny@A486Nw8>SvX7Ap&ckzM4hmI~f zzH-a{V<)$tKC%A%*_{V3oVt4X(#0FMk6b%<=lZ>y4<9_fd*;RcE6*RjeE0g+hbM2J zy`Q3_rlu^w!~CB?)j?tc^8y!XZON}Asy_uh9QS|*wS zOT6bB@p_47U0z|kJZkN#t*fuBk39H~$GdFJ%|%HUr-fEudl|JocjK|WUemLqcI141 zbXPk(KYm~7cCK%~zO8?Fpyl~3-JT!s9v T=d_E({SezI^%Y*|R54p4`8G z|IVE|w{G3Ke*OB@t5+{wx^(*V=@TbT?Ay0*`}XZywrtt7Y18`k>sPE;v3T*~dGqGY zo;`cov}qG3PVDdR@9F7jZ*OmEYHDa`sI9FnD=RB5E-oxA%*)Hm%*;$rPftlnNlHqJ zkB^Uyjg5+m3Jnbn4h{|o2=Mds^Y-@k^z?Ldb7LR`6o0ZXurvH;&;cm~`H6w;ze7WT zhmKVLi6uoRbFAiHSg}QNM$~#2#^;SaIV^5XhYKa-WLTaw7EPSeoxUZ&W*tAf%&o4( zmMs}FnZ=U&t@`p#;`)5z0}*FgxG7?Q+eP>#}Q0kG{s^ou20;n;V<17z*6xlW|Jw?=bOR#PEpA zg=KOFx5Rw`%jtY|_3ZS` zqUjnN13nacHVT_2ml!nlJA2OW%MmP8S=ga0=sH=)An?>j$~+u1KUln%@oJ3-U|ygRY{{;{vyg#@ zVe7)XGmJPB4>%ce-gMSF@xfy;(;UM9kqL%E%RL+UjM8k(gB06(gljgeIR7Z|k07_Y Yz?%8?E)08>7@u6ee}4b|UkVJ?0I^^iLI3~& diff --git a/images/lightbox-btn-next.gif b/images/lightbox-btn-next.gif deleted file mode 100644 index a0d4fcf84a784f2cf44c33084145dde5df294ccf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 812 zcmZ?wbhEHbv}aIYc*el+|NsBLfB*je{rl(7pWnZK|N8ao=g*%%e*F0U{rk6X-@bnR z`sK@)&!0bk_Uze{Cr=(ddi3DIgM0Vx-MMq;#*G`-u3fuy>C%M@7tWnKck0xs6DLj_ zJ9g~Qp+g4_9N4pG&#qm&wr$(CWy_Y$n>TOVxN-gZ^=sFzUA=ns%9SgZFJHcN>C(lE z7tftLclPYrGiT16IB{Zse}8XpZ+CZhdwY9pYio0Jb7Ny;LqkJdU0qdGRYgTbSy@?0 zNl8ILL0(>7PEJl%R#rwvMp{~0N=iynQc^-fLR?&2OiWBvR8&MnL|9l@NJvOfP*6ZX zfS;eAudlDSx3{OKr@OnmtE;QCvop}+41)kD{$ycfX9#A{0l5VfCk*WW8-jxwT3XxM zJ370%dpeqXCrq3)dCJsj(`U?_HG9t7dGi-6T(o$}(q+q6EMSyU6K`dbQDR_IP*vNm z&M%^|u7yignomt{TLh9X-vlT%qa~3Xe4)wGVP;i|rWZ3pVTZ!3`iIq!%NnqiVmI=~4yG?*UBuy@#qi_9lOv%EOFWqjwm)IFQ?j)3`1T=zfmcO{foI3W6sLtd zS4F+)nC;}rU*j;#AyW5g3x|3eXP|{qRNj;|3pfM diff --git a/images/lightbox-btn-prev.gif b/images/lightbox-btn-prev.gif deleted file mode 100644 index 040ee5992f7fdb9b51907cb4ba1c5570b1b5482a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 832 zcmZ?wbhEHbv}aIYc*el+|NsBLfB*je{rl(7pFe*5`1bAFmoHyFefsp_!-se8-o1MD z>gCIq&!0bk`t<4J$B!RAe0cx<{kwPX-oAbN)~#DNZrr$b?b?+qS1w$*aPHi>GiT16 zK7IP+$&<&AA3u8Z=;6bM4<0Ta{2P*ix)3mxNzb8`Sa(^n>T09oLRGG&6qJ`%9JS+CQRt>@9*vHZEbCBZf^0EX>c(&&|!v&d$!v%uG#9O-@cuN=iydNQjGz zi;0Peii(PehzJV{3keAc4h{|s4D|Q+_x1Jl_V)Jl^mKQ3cXD!aaBu(y1q0oI;!hSv zc7{j>9gxkSIALJ_-@wq++|t_C-qG3B78%*yKVf2j-=wM2rq7r;YxbPE^X4yDxM=Z` zrOTGDSUHZ{$*`cIU*V9G=mkL*$3~&B9F~NQE=O7f+$T8{d|+|! z5LB^I==tcv%)lM$(xcU&+%-wnv&x6z08`gQRsV((28G1VNlI>g4%W9mc+UCN{rKLQV#k0fcFk=e`pVK=5riUkZTAtTQ6isw#WRUmZ3z(a9R-j$e ze3FRFDrSywC%q{a3<^!By0Zf_LL_n(8yB!Rulm4I*~32ZbaR4DVcG)ssl5F2B6c2< z?&fr4Oo*`z)H=|_wuV)6!iF%%R#s*epBZ+t2Ny7lSgg8L*Lk3Uk?9ck4?hLV?=DPC dE8_S6+w=SThsUSq`|tm!>h(?3l#7MI8UW1vMEU># diff --git a/images/lightbox-ico-loading.gif b/images/lightbox-ico-loading.gif deleted file mode 100644 index ffcb5622b8c2d86b3eaf3d840a881edb8434e3d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6494 zcmajkcTiJ#*9Y);a|_-C2vrb-fQWPfmm0~0TpFIL08e;b=Q~OXZ2y9_GTveBQwd&`Q)7MJ@*%5)9=*}xhi9nG4C*# zFJHc3Fc?);)vZ@LoxZfR)YH>LCX>Z}-)$J|=^EAS zi2V#=(5+91eZd_wvbHkRw=hyxP{i)odP{EWx%Jh`7!3ATwzj$76^Bi0I@MSAfwE46 z_+A5iqExnU8}-M2nYapq!EU=oC1Lsb0A)=)Tg%f-JAe%?GGK?*iI+L@X3lij=01c+ zkoU7)-ON@GGwrZ}rl`J6`t;ijf~J*#ex&4{kZ6?Zf`JhLId?Q6F%3=GbIK<(5d*0M zpmn@C2eb#dex+O~U(x`AL4;W;TTG~{PqR(0YT{65g78hvY8<1@2h0mOS~xU5G15G7 zcX;Z)5X^eO#~5PuJianJ@n|vedfohT&TPrT$jbVC$a?n0YK8U6$L060UVnP0l8I!T z>UM-V+x7~i7xyF)_8y^|G?W5@g zg!n4Wu(bRhB56h9;4?jv0EL$|H`Nd|&MV79)Xd$8Kl+Ml#iqD4fD zF`dgvpTNOi!<>#qNR#!9Q~+wMmNYC0D%o71LMMz5UJe#M?R&qba{0x|n>Trj>+EwMSU>UPeVF_BsgyX{`m--#Jyt8|EeD60I@5raIKpf2 zhev;^z(Jq6!3L!CP6qMizOOdGf46afD!d2u=v9KXW+z(- zICjFW1Z!bf!R_^@pdYg@dWAX2E0osqzKy{Fa@yCMuM;_k>TTm;j>8wbpq zJPf~*zYsvzT$BOOc~JSh3?Lf`vuE*8fM_pJnDC>XD>LD zetcbgW#jGqo7uPT-hBG;`Ok`CzklZcyc0}*Evheo@W?n1GK+h^_R60&wfSF7u-i?x z&CfsjMG)J-*5k&OXrG{`L_ynxfi;6Nhl(GB*j?0{!tv7!s_Kv20MYJJ!((14rwDp3 zo~8E{+!YrFsmJNFIa+QYmZ)}07JChFd|j?bz(Eagb5-bp1{8wZZO{I|E7k`F z4AA-7D?7V_c{+%_@Ywmmq1i_rcXv&2FFabBJH%7*%7ivB@R+dner;pdhYufr{rubS zUocoy*o0Zcievj%lZ0>c18(>D+x)Oixwx}k4`xdZ5)kW`P9V$OsU_TbY~a3=O)7`o z!ikryZBLOR8#g3ZQb*oc%pUG7@_2~yl~&3;YEuBQ$3|_z{COSf4yP%Nomim_S*ZR5 z=pjHlMv{w=Gg6YX)`4T?<6X>yBXtk%6%Ndx@xiq0!>4S5=BU~*=B~E zGQ#xQ>paHTPMw#P{?6@c764C;_g(U$FxHZxNLCbS4f`O*+c_mR58R1CuTr>~t66j?YE?Rg(^z`KtL2Sr@ ztH!#VdHHy#k@skoeK=W>*R$es6JJ7A?Ck1@c>G|FkhXi@PV`5>%2m?*|10u>Y$MnL& z`C@SimJ%^C!4Bzh0@glW3Dydn1xM(Ds@M}bK1cX7WI=4TdQ>KN1yQ`wm|?+_tpqf- z{J;)1`q&>hIlu+>4jCRF=XIW{z9$&0@#x9;!=a^TOQjZz&sQ3kpT2&xzVY_mPwzi$ ze*EbDysvrOTj#Eoj0tyzHvJ%shyUwOLCM98CF2n^< zl%I3D5HbS}JQ%gByq}g@w7$^uj`#j8g* zmhNogUC-lP*y_>H$)lLf>JtoA8X8k+Y@M1Km1-7h%$~h78rtnS&JLAMUtLi4o~EZR zo7GJ9tYMz9+TOaXgZIasdpG}6e1JS(W0Y;X!-s7SHp9OQFG?q}(iV*JC2*lt*0rhn zGYZ0n{Xsb;{77?%07tE0P1z)0p)RzjSh6GkfLj(Zc{4`Ub#rLp`-*D?$f^W()ck4c zfZrYb;ZJ;#Dy%hW;G}0 z*&2%WSbOrUjube%oMEprb7@3)j`0&RyE(Gj^m?S}-LeW({9j^p{ODJSo!cee{9S^+ zD7}Z2GDot7ig$nC<|xmV{$i9{$)ZRnmoeo=@IwVm)tv=6OhgaNj;IJtRI*+eI@G7h zd7~T3VW)!%aG)&5Bw1K5d<0556&aAE^>*)ZuV`Tq0i5Fk{N1VX>_CLp0m}^2q^#_y zJP!H%2s)2bZt)H7>jedcd6iW_jcYjEj?dqh@A&5h z#YAk!Utx)EC-}ULV9b4`$cj>IDDF&icXo!Fs7##gent&)wmlz9ixz~DIJH171RJ4t2m$httzX_% z^mOiJGcE`VC>4dIY_a6ag&1T4^vpClD7SX6D;8@BUIFwot;-I>-PxE1#hN;`%d!nB z{a2dBH1N~IwU`e7M{xh*jgyZs_Z|f4&s$+D+GHN&ElDQ91Y5yLo%^N5|Q8y65SZmB~B0x{>5B7j(_z#Mt_`URBgNZ$wNhivsjUgeO@Wx0e33Q?@bjsT!IWH(Xd5YQPwoyM+&6K5MrF9bPlApg zxIBQ)v7|fD*||}ve&A3EY0l?KAuzV|A{-6t5z+CRefE8w1FACioiyoQj|pAeRs4un z)>jIS?G%5@i1sgk^uj+VR=db@*#0%%2!GkgAMR?;bABx3!w-6#7}Su-9W8lIOwOj~ z^e$NR2(r0gJr$V&=?hHO8W9hQsr+=53*RRyUaF@q{169woP=Y1zvBr9_nt;TjcDq3 z9@+eq^auc?Cy%~|M;xu6BYjgnJ|l%?r~bU{Cf+-1e28h)IHxaf^$2_r~lR)e}GJc`ak_-zeeHw z*lo~HY!ZZNB^Qjjh`B{qT{Y^|b3~Q)qJ)1Dc?h1v0`ABn(Ib0L-Nn zY<2}-RcUnTH4GDDTx;A=etb7vh{B9ad!+A&o7md^J^@dBjS(<2b;$t2=HiC-jD(J4 zPtcp!X2hVHgwC$M#r0#MmdG!wW4I}5vr`XyQL}>_I$2{!qIT_~3_i~{2{Qb;ZWFd+ zY`ZI49sAer_yZ$?fsMDAqp=pKGM}ZuMXI8*hI~Sth081T`rU@)g}W|-18MrEpx}66 z8FN^go?%=W^tiuu3dQmaj|FlDai4{QqHJOby82;0N0T`Mw?M#igcG_a0Q`xgJjpp* z#~n7gB{!( zHT24!7#LfHxf&xFWUgfd9cEM&GO*_L{w1Y4#u-(y z-mzKjL$2kX1(-?{sq>g5;ktZ6z)O>t?oLOcG&cuPo5q&bc)+}-PE2dQce-xiVTZVu z+uXwqWC;CD%(X^H9cr_keAlA4kQbmKeq<)|YjALHr+_4BTsf2~tI+be$Yzbfv9gGTlA*$hv2K)taKgxJ{R#Txdj3&hCG z-#kmyvq`L)LNyhy;tjJ*I-*DL< zQq5#6S#G{tT$5UV#U`9A{&kV$-Cp_Y|5AA^iQsQ7+-uRtVaci3CD6WgYe1L*TNc+y zqz?NwM@|dkq|Z->Lf$!6om{ao6)bq56 zwm!?U?R%eoFXSY+DQ>E{ykSYmXnnNf&;@O<9SWhce+8>njae0i*%j8z%7&Z?J~)?U10U!1%`N+B?;1!cmv{uZoZxa` z$C`ql))?30z&n$~MW4q8^BpJO_CJ3g9OL_X@A^jmOlWc9%IWSnwt9)L)6T!W{_XeI zTNeTgS1M77P^N}=Z`;$m7|`!12WVLJT;Qb5_c4Eg60%R#oIPw{W-Qq|84UQu6uY!;(g>s_YW_Epafps=1Mh%cyRIx7x8DVf*^@r!q!0G%>~QWLXb^2s@8AAH8K! zBvx-_^hwnzWodwX%tI~;h2yNeyz$1m077wb;(%;&p#%lpi^^JbF!J2t0&H$TSyT>q zRZ>lfa3cq+dgOVR{D!28Sm216wEYWqtK`Crj^i%nVZ=pPmFC zvO}|8@bm78z_UNjKf%zC?0No5`{g=$W9FBiT8N7yb`w{%_#uS$^T%VZ!ekCnk>>;@ WhyDwH9&2X-jsQmUkAFS>eEc6*E2)D3 diff --git a/images/lightbox-ico-loading2.gif b/images/lightbox-ico-loading2.gif deleted file mode 100644 index 4f1429c06cb2ffd2910b038d06b01a4b3ee00a21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3990 zcmc(ii&s-uzQ^}DoRCdCfs+@{2qzC9JmfV50|Yn;0TOvMYNFP5G$^&`*bcT_Yp>ds z$4LkwKzN9>LRWa$My&&SZI#xcyp6R^(bkb#+XC7SUADd0)^*W4o!+!-*1hfg19$%g zzqLR6^ZovInXXikTTKEIdnV6%`Q?!R2zp!ot{WHjBlA5Hc8ye;_FMe?6j~R#lZ4HWsV&C0S`1K}cX2(L;>E z0!EPf^I$(?0?ePxz-puIjs|C=tI6Hmj5siewm2X+f&*=6Oe*&X9hRb`lqrMY1#Cf(pd*rt(P;Mn55)}p-j}- z0Iz=FM7YZJHjOmSi5V-s{6m=^@8Wgf05cuG>%0^V99pq{wy4nSUu8D#f3hJ$Wq!ZQZAQHY-_=I>R^! zBHVIjFtURe5wqG$S^Bb|oR)IL12vNtJcphGN|)4<%AhJn@c@damBN)oD(QltyEqVQ@`GUH~N;N-E(klV)kr88gvN6A^_p!W4IvoeilBO)kTccE_a=Qj|a)M8xTEDZ{V*l_Y-)Xj>SjZ4G^=z6i4vov#jzz!BDGrnM(zGY% zoArVaB&6H4iQ&TAK8(Jr*bsP+XySoK*emxeY-!e*@$&3{tmBJFbogSu1*>{7uFh*1 zdB6py(X~4~bz{{trJxPN2)+07CrX()-V3|Ww~db43s;Dmo#@q4sPz+;6Ej|EJm7st zVJr{+#54F-Yd`2S+fb)=!&6#j7o&=wyR~9w8^+sh(R6&!ZKyUb>LLO>orc~02M2gN< z5SOg`Vx=&~0n@8&fv2FN#ASlW2;xGmb*P6R?2z7)AoDi>V@9Z0zZg3zE6V1hW|KWk zTu|lTQD1$DcSvW-j?@8FFcC@AKAD}$Y?G*W=?@sc(4W#E+~13dg-IBi!a!tX^^_B$ zYL1wy_n7g#7V>hn>Yg89Zy;N4{%KuD_^xhtf$V;t42}8(yWz}-)Rktb<8J);=430o z_?uTV6sPJ20E|_9d9e1mfnr9eOkjL?2IHq?*FUA%Fk$U=M9IF`3_wQuw!Pt2?ed4j{AWi3$K;e30~+_NKp z#A5YR9qHSD7=!obKK`#YXl$HR)_5Y;BcM zua*ijbyj`BYOD$H3T;%(>rwJTr8G=P(Us|a4j}m6s*W8%U~~pa0*s>`j`bAlB_W;C zoa9C^gS3TJS=)y%JT0T_g4`!-BF{TjO*UiC*K-s%j)HJ&G#4yrLSyBJrl-!o(dk2p zv_pyo^)$1jABUZfC!6ijnr`Vs%VMmJm-n1mF~5;OqbhvP#2Bx2!5&ilR9YBr zgQS8mpYbx24iTIkcY-#5_&&Ygqc?L(=DGms^m>1Y2k4={?U|n_V>gbFUeoTRu?CUR z?OFNr_$Aj(H(I-Nt%hU0Mekovcw!J3B~h?ewAO(W^T(^c5!RbZ+G8W=JNq@LRx|qF z?EWjk0&@geIF9(WkEHbaMx6l=7(@0wYjFCn` zz(~;A)}^{ejB3$m#(>-pn29=DMLOOn%`e!LO+MuW%(%C`Sk%4{4$6v%oGt#L84D8? zY`_hCb1W!93B&T33bmnF$?8{_RYXWgOYqfWzINbT{m}K1hjIZ1H`ae*uc!E^SDH*f ztA5fy(cPU&h_LuF+lKJr%*Xo-e1^g1ovS04##fQbJjy;b=8&sOefn(vELCg|iZebt zmU&m}2{d;w;o)9KU^vy8fuL6N#bhSOQ#Ucw5-laYwD85IMWeVE*50SRdMUIW4nGD*;TYNN>122z{5QKytLh5O3~#ty^v z3t$K^2!--;IW;BH9Ps$KU>t@=)qb~QdGS+n6_)Weg$8}31Kj<$PpR!%=#!u9)Iu)6 zVm7{xEevO>1+PDL_#d^4gU}tU9u8S8UN+P0n52aF`78U^oxYINl(ia;U9WpjnT!O0biseY|;EV&`u!?aNL#Dl# z)jqhrediP&PfPP&**tAEEKIcdfJLI~xF9rB5#LHn1$fe)i%Zn+id&ODIX3KR^jfN$ ziCr0%w0P+J^S+Q8e;elNAX93>Hzx^vrb%1^59oen;J-qoL4&=~sA%n&_5Vax^%BqT7 z{uMjm=IZ1`2PQ7FQo?f%Jf%Q}cU)Cg=yG@`X_SchqytQ3rBAmb9~}emoY>pgIiBnc z{fy_IHzxyxm8{8_aIkq{VvgA)x~W3rUQ(P84^ANf-!SJVT6w6T0#lt?@UpB#lJwl| z`mw3=$rZauY6}=w*pTEoazhOh?qr?f44W1)W~()_mbkB)up9&!B+X;BBA9Xr52WAZ z<`VEOQ8720xkH4>oK&CsxUOYY9mnZM=u3^kYtp}-zp~;F(FTV{vM=;q(#q5s9PupT zW&Y^vS|6qM zGo5UzPw}wN34&vayM$k@M{Vu|+T}6Lj?c6R?+64-R~I!6n^HRoF1mPxUd45+OWxBJ zNT!3vKAO$d@{LbQmq?6|o9YY(&HCl>V7Ait+f+q=Ta8E%Vh{WatQa?%-Pqje0z`U# zJUr5C1N{854BXDdKyO1w0AqT9ADKeJ6U`_)8h^tG@w0ZFGRD`;l;)8W&2hy6124I; zs3bmigd;D=;*K^k;H@LA(cF)kzIfG!A{XooB04tW_&1$cWM)B8ep2jR9zU?ZzhITk z>D6{tr#MmZ=0VLO9bEM%XZGzmoBEydOqcXpwHv_`Vq!u+o=pS6aaMP?!W?LjPJ^|k zHc3>*lc`?gtjq?zSDGlt-YO<1WlH$k0vYT7p2&oK{Qvo*NcTozljFBuJqkY1Ow%+!PfCk!9dZL@0| ugHC`uo8wV_x3+X6|7OrLL8p0^RYivJpb&iOLz9SoC}SdhUciMQ|9=4VbK6p?cF>G=h0@JhTLdf!(gIdN1QeV+L;)2XD9^zNN@xod zwcvQjRvj8}y3J)yFv=3A2@i*l5Fc|hs2f3R;^QAN{$aL%*eO}IEP(~izxV$0$@lmB zp0hT=YKq8{00}@xHO(cjNl%Njq^=3k8whNA8mRstISPn@&imc_Tf_3@%d4xaj~qF2 z`t<3uXU|@|c=5`WE2E>Mw{G3KfB*i(#Kf~_&tAQH_4e)C>6t?woVxLBCtLOMhuB(t zGPLP@xf$T%5Zyz3iOuKI^?SO*zNFJ?wrL@=YKNznIpw!L(PPjKYQ7%}eBCama_c91pIJ1~(b1Kal`fZSz8V+OJY|r^QHxE6+WMoDB(^~{XdW=!#+uo_ zaF>U{k0Hho~yN%NrSyV`soxiBvd>cj#}5&$KDA)3{S^?ffCPkeDi5Vo>T8sy}Wj_Hf}N$J0Hz& zv|)_<-f+~-Hi-jgzIkG5vY*T|>7-8J0U*@$d8~ScFqA)f4R7yaDBs3j(<2>@V?*ZD zy6{Vy+~KLc_m5He=9(fsy~0c&4a-*{&i)i(02j`@8?In8dBM!Y(Znu4jtn@VMj|y5 zrTNa5ki}vtEiGN(#07>Rk#HaVI5ZB4@@yk%765mBN(yieTXgm{oK}vXn!h0oZG3gj;>>W?MbZnG6Q_cX~h&<^+R)8g9 zSd!4lZEm4K#ma0{aTpMHv%wr`1VF@rrKl5H7Hyn$;=;nh3JVMEcKbqhXnqO(3z}-# zu=v1OV7q%OY`*dVI>Y}97i4s2yl$S zmSto?fO|=u8h;vSPKY2zqaEs;LlhJgv~%aqwzjtUie_4FUNiT>r-& zOO#{4cBb6f^ zov;AUp?UAne>@_GHz5+(221Xlve$OHK)tvvi!~l<%)zr4PhU@ z(CY^us$O5!${6Pje5gy?*WtA2j>{<;$_PvVQNKa&69IX)a|Fw5>C&=WQ6s37gabVh SjHs`-`=fdj^ILtus=om5Wbpz3 diff --git a/images/lock.gif b/images/lock.gif deleted file mode 100644 index e7c87613040a6ddc18929eb09549078e07393aff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 632 zcmZ?wbhEHboXg9oo4Z@sn0>Cxkt*SG0@{q*eHy^;?{89rX}{r_Rf z)vH(kz9_zTuJihO{vXe#yf~=-{{8z8S2Mq#Wq9{^*W+^~zn-;zy{Po*TI`*};a?tf zpE+~p$7SieckjNtKmFxChM$)iK3%l@cFX_M?S>b7`To3`^5cHSpBK$<&w4&TYX0}G z@%Ot4H+EXz-0N}l=+W2v7@l7#|M{f;%N6JEUtV9|DE99f!@oD3_s+IFz0&>T+1x)* za_{Z+`f{)S)e*%nHzNK$4t)0P*`0fj|GZiC`84O#Z44i8lzutM@b6Xi_a~j-?@jsl zZp!TgK{t2X{CU-R;K1PzmxHgZ7k&Ti@b_yR@6HE*{rdI)|NjgF3KV~`FtRg*GU$L@ z0g4j__Nxt{O`(Fa+}yGb&E2664uTT|`+9o0C-u$X?$MK#?QWHoZg$Y)4(So(W)y5% zIBSZuURUV4DWMxTJ1*TO?Z*--Vs6eWcl4MXFB5N|t|iy`3m2U%btFCcZ>Zk7Z7C%X z;4LNP@x<(z8NZr}i;1rCd&7_J>gq=N`fqeyUD^NgxLfHdIDBZl%fKn*qmlB#xl2&_ z`whc`4uwa#L`~IvBqAoTb!!IKbUa{K^yF}d3D*J-fus{HQU?ByiZ3X+_KS1$Ou6DQ Xfun(utstbqaZAQUE{il4CI)K&#jOfC diff --git a/images/lphoto.gif b/images/lphoto.gif deleted file mode 100644 index 14aa1e8f75ff7f10705ff6197c72b572cc8f0b17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1408 zcmZ?wbhEHblw*)%_|5laV=?B40*u8M z{PFDBv-L-=M@B{-J96OirHgAeZcWW^u!?HQYh7MdRW)hx&dHn3PM$nDEiFw}KkEDU z@6}Vb&R?|bz}efkUVT}2?unF?6puzobj3V1-p z#giKv+mh;+&)ITz;?lzmJQmwd-xX5#ow@gV_kuk<$^rlX|G)q4`?GuZ_U_$#^yty+ z*RO5ey0xdL=i19JOO`CDnzn1s)}z_&>ki!ekW)M7%;OKMcc0&U^6u%Yj|zIXbj{xM z@y)ZKltxZ54?F+t4aaZKTe$J$#k;Z9i~OPsBeFZo8Yk4Y^iNs7zoKcTmw$dueGAY! zaNLd(1VTXZCkrDx!(0X(kUCJFVBq-AV9hDxv0=f%W)5MwBhBs$4>$3A+)%N?V3Dg> zgoe|Wj^~Z;{gRqRDHcnXoK&oE(yKApl+rd`a>|J*KNF7kHStIM>BuNLDa7Yc%hftF zvBRq|V#9;VlZyS9mj^U@J>9_K&)zI6cYxu@)YVhgC(J+85Ovw-pcX%aY}9TszBw+P z^H$7l<_Mgo8LXyws$gn@s93{1j=D*y0j(^$EC)V1s+?u>@oS6vAB^}#3MstL1D^D z-cBadyfrs2B)fZP*ZDkX=gvzg@)Tz-IK;`w(qni?V(OiXM|h%KK6proM5s;>4K2xV z5HKP9#?r?V__=5Uu)U}4iLFl3Yqe>Y``qv0S+^_*D8a}9AY+T9O`hihhLP3DTIl^K?yL{c8hwSpLe6KIaC%ro0-Y)xQ)#2^c7S+e(kBB`v iF5l=k!D*M~pO43PX>O6`aAmua{eJI{q*Vb94AuZv8x-{b diff --git a/images/mainvideo.gif b/images/mainvideo.gif deleted file mode 100644 index 3b43c654a34fe17df8b0bf569a94137c2ee900dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1063 zcmZ?wbhEHb6k!ly_|CwvgN30zHTk6g!^yQP`}Nho1TgHjQodH0e1?JHp;PfNzRsxrT8;_un={BKiP=i_wQ%W8+F*d_tC zlg7fo5AEMqnDfF)@U%MHpY`*#G5_@5x~KalOe zF+*=*{&K&;b&2`5~ z;H5L~CUK7c5o~v?xo(4x^%@-ilbDaD$3Hb-TVtjD%Z%%L zuJ8YF>DvMfCrl*vSLHvOH)#($&@r5Uo;M1%45NUSA)xq^g^``1i$Mou z2`Eo6aQtTw<&=4GxM`*+mj_SGiGYjk8i6)jJd<8HIJe1LWXv#1=bNv_q!uGmv5=L| zJnz60&QDE;`X+X@9Pw06?-FBAKGv|~WAc(#tInW|i<=fYw{z(~IM9=r)Yvg6dDW61 zMeNI_C~JizEO2!0o8!ciAmk*Z)+1$@|KflJW3YmVNx{VgjgS@o(ITcR7#vI5+ypp{ z6?#%0FK1OyU}|5JX}I{r347mZDlZj3I8U}HJH(S!;o&Q5>(0aBBhc14UAajrO)+^1 zgQN~~XG(>@vu>U?f2LZ^z@#G%VjdSRI810>$fwN{bKrqd0H>TZuhWeL3B`s3wy|t^ V4<9ahd%%dBy@Ex4zkvdSH2`?uB**{& diff --git a/images/makememember.gif b/images/makememember.gif deleted file mode 100644 index 47d9d96968766a9b1b9bd14a0430989c6f97499e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmV<403rWJNk%w1VNd`R0FeLy%*@O)Gcy1H0RR90A^8LW2LJ;AEC2ui08juF00087 zl#i*)?GI0wwAzca-n^R*hT@oga{T!ZxTIC)_a~+W zBovlsST{EaSs3=k#>c2*v{)!;d1)7Dktn9tqzTHnIT8`A YyX%|8^(%bRJ8XOrk*vJTtWW>|JMQgffB*mh diff --git a/images/mapsgoogle.gif b/images/mapsgoogle.gif deleted file mode 100644 index 216594457aaef038cb21bfa83b8a285cc068d35e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1583 zcmZ?wbhEHb3}E1A_|Cv^|6ibz z|NnplkUC@h|NsA)GiNf4g3%D5AOsYDvVe8#fJjiDVCVSHP|qRbv0=f%W)5Mkm=gsL z_~gwM9$a8#Jj5q%Q4w<_u&JF@+`J&6g(0xrO~$U~#f3!0rQC9s1y4RGCZ+WWTb3-b zImmp7Q^vfAX?8KQn%g-V?J7Pj$aG}ylU3385Kw4f;*r;^vDqVOy109a zWmd`ug-JD zTEroz82D?$3g*T9jkY`-HW!#1?>1VpO!~qZ$igBgA*ZrIA%uZZMnlGDMW?b$M~}Hf z%z+Jwjx936G7dKwnDV^#%`Rc4EMh4I3l6w2@=H%CaPrbFRT0bJkqJ1+&8E=cz%LM%exQ^sB;a7F zt;~nR>Gm61BK`T7Zg64{<2k{^t+eHO6B{o>0Rx+C!2*W5$4|u_tGP}%F!&oEoq9M` zW?I?-Ms^d63yeGw%O5i8D=5rzUiETAGe>x4ND~92zyoG(p&kVXX08nhj?6Lz8yfk| zWCRXyiP$`7EKCq8P;%9Dyb{c3&JxMUyvVddv88ra+W~HqJr@phUoFhI5;C=wC7OXh zW&txdH6I!nCh-D&DeQB>DLA;3RW7LX?|+B84!mkVoF{tS zo3+GY+oP|{Rd%T?%q*2b0uBsub^?rCMkf*uF<3J+H1G=MG&nL%Xfn9T!rRdKD5)^g z5*V1m?50c*3KUpcGHW7-X4Z1P%2z4*d&5_TH1WyCnoVU@4r(~ae*EQ=SI%9! zZX!M#&00P>3OxB56=1RE*~K)`<6mOk)F-?-e5#3)p(#*>QFR)hZJX-Sqc>Gq-t+tZ z-ExUD{bFiMvP{-X5CDleryCJHy!&0}r8%)c|>J)gZP&(>Q%Kjx^uT}?8L?u4-2QA)=b&fJn!7O zYme6)dzLcgN<`)I4`2V7R2A;plx&2%FS6``~d(NTusA9r~BWG^)FW$d$ z&uzz=?H6yqdjH{*M#c`!oV}i{XBY0gEt$SWzvRgA8*f|JKCNGR%P(hE&g4Dwx7>)S z-PFC}%9gXQ-hKRb@7brUId^W{eWqG^^yHO?^;36b_a13oda-2YS^3zFzyAE6wC3QF(J6n%F{QTwH^4&LNQ+8RU z&QXb4>R+~Q_PTT7-AA{beAc+^YWv)MiBm2{wI4Zq>wRLw#{d8SYvdoAz2(lAPhTAx z4j83v4(hpf?b@^I1(!RQT(GS_qh50O$k{uZCENYm&)s|Wy?D;G$;*!Z{Pl0j)_X_q zy_ZSbs+_jPs(4pm&A!YT*VQuDF5Pt}YvRfKPhM@^d#+^q$s-q@cona0UiHwq;bcJW z?Cs}YpSkj|a>l`#8!pRb?gQG+Fbb#?0*XIb7}*&nGU$NJ1LX+@j{gkGoFWy=1m$GJ zbaa9?CN4PK=*TtU#HB~a`+57%2o!z{P-x~1w|nx@@ssl;{{9t9Dl!t>XUgkFd7MyA zJlximu;PrQM+TDwNBFuBOXn{E0ShxZcmy=u4s*!{u>Q1AW?Xeu+jW5p*QHkWIqM62 zBqlC&WbWTw(Dmo#BPW*0$`X%eaX6H_&QNaF*ucop(9Os%a)Lu`@&dMt#%l9Y9GYCZ zL_`9%{cv=cxk>nN`V5nbk4nwyb}AfSDjjBR5#w`l&uBb2%Xq$wO4$(Mf-r&GfMM{Ab_B6`zKOk{r4q9o8W!91{JZrcQ|EG5^ZNMZND z9;;x3_L)KI$2!$?q}+lYtnia%Os<;nMNzSbfl)bRL6ftdg#nvD!<`Sun(`AaFbc$L zToe?GOPJ8XE0I>ws2EpbGJ!E}N@}Ypx6Xs3esX+E8l;t61Q?keH7*1?FjxZsi}Rpm diff --git a/images/mlogo.png b/images/mlogo.png deleted file mode 100644 index 6844b0be00db31a75d1fdf677d842baef1cc2d97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3442 zcmZ`+XEYm**AAi~C`GNBrG#3wN5yUvRg@Y@i`YS9?-{E~%^zZwQbN_9txeHXTC22H zQM*>{3WC3Wd_TPBo_n8j$8+yF_kOx@Mh5p8z+7Me0Kfo;=@?(4^gpG!a%s&ek7F+Z z=%o2j69A}9rX$->U;6xZFyn^+K#(v1fQ<$KPA)^(-vEH`C2<`E0H|aE0PG&GS{~iK zOkA;ja9;;-@lOicOVchRv>q^oHvmA#{7)&q&4iHw0D3rFNAody_ItLo2RFf&5I!Rt zEcK!fj?(nhyaw=0iH61Ahukv|+Nencvx>%-3yDaIcoN~n44A>Kj1UjE)pw*QW3xVo z)@SCEqRO#i>2F~-MfbtF%>24(!nDi)-39(X-t55xgFdT0^tfp85x^}OKXYG(;ZfPs zi_W9)YU`t}p#T=XrTL^38Y;%X?PmIe?E#lnw*9ECYN`QfcS*v+cY)Y;cDfUyrO5C# z=2js03%x=>#yAq0QxjdxBqW~z888J^fq+{YxkU&b#;j&s@6=B34$~qIV>pFOR3-;z z;;n&IGuJ731g^>cB2w)V_Xb7siybkMJ~D6@x1{4{gfSgmf}y^QysEZXnjHqiP+or9 z`I$>eT@x;D-sau<0{zpL-Vw#4{i()OGIro~e(ix(f%`3suhRl3u$2Yhlj~<>@9^IK zGk1?2{Dlw_sVB!)R8g0M7SbB{l&GWkVE6d!t3iUS?47~>&}vz)Lom`cnyF%LY%r~J z7s1wXSgB#-v6LvIjwiM>=z`uI$b_1Sc% zlXd_4{dS8Si$D8&3KbXZtv7yT@9L-#tfo)%*;26rU8}w(*!h`Yf4=o?yyHV2uE=ku z(HBYZw}L|J@?_#-GSoI7N~UTset>52V)d-TAZdj(OQy?fruf0PgC{!@^Zfpdewa!V-?&k{QkAxs)Wx9HC!(4^( z5bAEGu-ANgX4fj;39BnU@Uwjt0*$@WV9dIw?4ozmuQJaq-}odigDK^97Kz|Mana(G zA9jy7WKG?JTX80~=$gyadtqpu~HHse$LFZKxb z$_^Uj90$wPA$`7LLy@#Ti%6QIBO2Re*&63C`f1|p=9%EtQgMzmxa-GLW|BP&{QB1p zZtDBd`QR$l=}+)(u)YX4RAHm*@l9Ild_|^$y}-xN zAu{s%A4N@e>_(J&C8y+_6codiotbp50h$AJ56ZDX;J`sh6vM zTWgMuf1UbpEWSQPlyn;VB=^lZ3QK1x;`Tvbww5sy?B0e&mhCtB>`$!!~?h+j*;;5Tq3R#b~(7(vFydQk7vaQ6o zSc*&0Cr1PI1wI=ZUK5paY8*0hWvD&$qlEz~4}*WGOx49tNjl>CYIO}K*q-~v^-nr~ zwvTt0j6AB^6K4GVH0f(EFj-y^xIqt1A2_RSi_ za#`cy;J>zv8%RalEXDsain<4jN05bTobw2)0A9~q_S!Q2%YXcFB`TsXHQcN8LU~1L zmsTCG8P_$+alccTpsfh&6gv#9PbmugyVK?2=(VJRnf9CI0PWR}qNlGAJmE@K1!4rA z_iY6{A*GPy-0-z_qRYh_5jH!0*GP0^q%LiG)r+p#irMO4zx^*(eM{FmBq}gJjoLEb zi-XIGbMw-BsHT6kW;;DlgY->Sg>kf9!Npuz-=>ue^xw$AK8Xvm4B}4Os2e`(y~5gZM>? zcP+Ha4Ji`sQ13_y6PAZEhmsawGqGq#SxnMHVh}Yu)Y^S}8U>Hagj6zp@d9oD^L#Q} zb&_9oSeHBO;|3Q5GXwK??>t|hUZt~Z3R>1MxJX+x!#lZsp;8Q7;H7nf&NfsnM9j1* zpIFZkjN%KJ(t(uGc6aCr&mV((BvD{oMa_SBope7n0qSV1hY6jT6488C#gt=cg%JLD z_#)u@O5J;P-ZoQ-hKe(d>W6hBB3G^QvQH20ud_fq=L}t3m<51So+-!NVrhORj!JDFn6 z+N)f6?$TPtU5Brr65_L7VKthnAkk}93PBQ z;)%!oV!R)Z=-s81Dea~Nztmh$oSw=^Jg~%+Z%2+F5-$_ zm77-^<-L{Cvx~cXkf^^XRn2dNpw=pg3GVy_e+wYFE&^Q_xLZ|FBG+eTU02L0KU?%K zS>4D9ePf{XcL+1t08e_l=KaOR@JI`5lT|T0tQGP_L2toxC-$uiMv&QByTC=h!}QKa zUsniX8~|0fTpg@+7c*5d8MZcPU8_4X(>#qxX5%3ZX3vkzh43r$#VN|m1~r2ybnF}+ z|M*mKbPT_18^t8O3BN z#boDI*vS{z%NjLIy6CW-S=jt-Xm~#zRcJ8Sf6*tXJ-R+u@EjJ1;AAl?^suqLhyKme za6EfUP=Pt_(*`->8#270SeL6Cq*YkJlROS&=z-wYp4*^ut{jI%jEs!vtK{*FA^oo& zY^}B5m;)iPs}U0k3%~J^VRrZKfD!_4?DjG8+~lZ|EKhO|?hrzrEG6ZsMom7uiswl; zhTt`BzZsz!9UVO(ALnyc`q~z_8=fRFe<(8z=;uF68}#HtzRo#0lOn@)A>8|2s_5-^ z={LD)Yy5{^Hk(++o;&*d-pR~l`MMITfeKPiV@}K~`JsX|X=TGxRUJla&^#hfucpb# zDcmS+VI*L=etH+G8lVE#1`k5Z8Zq_tH7NqwIiZG>%MJozB)?2z2_aeXDC?|>2`19e_r;wUjbikjnT|(3?*kI947QhOW!br|u#g zolJCx`!rZ186Ns_t9(#@pOQl=d2b=*s*CgI2+2V4 zzZV;e8keyWMU9wKU)>F~b@N(U;^kjXC0z(!_OHnJrqt*?et%khx1T_shhby+TuR@4 zT-q9qP3u4QY%i1O{`iqnV!$=vc==**<=bfZs!||bR`YGX7I%scP1xe^AC;=*elwk; zAAXLS1f1%>S5uQ;MlW-JU0pq*)?N-jZtXmZsf)CWZ^8kG)J`{h8)wy~8_m|1H>v(` zMCjP9hH8D*Ms6?*L^CY-bn9&mIS3~k7?NxF-Y*RPs5VYq+4ouTU3A z9^+CkKaE>Hx)wh6Ha-q2c3uvb0FaTsqbwnPN8*n1V`(`RX=#-^O1Ceqw6x<$2>$;N zFz)uwj)DI_fjyy@^OC^#Z-R-tqmRFhmjmFTjh&Y}#=+j%hX08x3^_Uzfy z-`{`y`0>ih%JA^;|6ssC3Q+vX!pOiNz@P)t1hSKXb)5o>ZA#|6j8)4XzuH%zbG{_^ ze#N@?HShl)xWpjPqbSpNWWf$5g^5iJ#;z51ye%s;6Sk^#+;U&|yQhtj`_twE4q>S* z6($>Ajz?_AECtI&rbV$QXQd@_u@!PB@-r|NMs_n7#0DiY*Q87>El*)8ab)Renc&FW zoK@`FTbtv+1^-4^K=?3=9lhv0}y5t5@&ezkl%H!9Rcg{P^)>;>3wtwrq)w zjlFm8UUPGERaI4EW8C&ZHSy^-E z&h_{AU$<`EzJ2?8dU||)ecRgFo;-Q-@ZrPj*RQWxv*z{d*M|=uc5-rxh={1Gt1B)p zuB@z_J$v@!$B%Pza=v`|^8f#TV`F26Q9$<)Q2fcl$iUFdpaZfQlqVQC{xh)i3b|}p zaIl#}SS#j)z{3M=0?J-X){18#t4FnV&ADwPmY8kM^qRBa+Ss;jowc>(u6Q{856unO7XG0CH04+qke}t=kX<#j~4ncHM_B}aGWghWz=*1$MI;5Ihzn` zR>+M+2LUH}Nrf;O8HEK5*-SzOS8gh?H%&OlI4R-5V@A)8?M)0{K5SZi?8BqustgAU z4W70%>8X6NvjF;niDfctr^2SjR(=JxPU-N@Kg|kk4K@aj0`s0W2=G_6C~$~~mQ0YZ z_~ZFtzJjxXVl#JDU_&dLOqZiOr_+IkwphCb3~r9UHhw$ABFy#3ot1^n;2plyNipC^UIEhaZT~vzNUB)wYI*+ok{85 z#-p8(@9*z~goK@UGLdBxva6o((xb)2#o5%z-{R=bwUef+y~?I($;;fae+`gj7L%B= zwUJBs=+3f-FV@%QxVpu^!qo57tJTfC`uqIO)8B|)6Pc5SopBPhgc;x9?z^p%jFhdc zuD!*cVZFc8(zR;heH^++~vQLFz(m1_~gaCy}gKD z81Crcnw_(xfJ(&1*RF&z<+gaOvcKHOn7xV&qNTotTNAalwZ@`Uq^7owWg(1?nZBD@ zn{5&1=I^w(%-!DRwTUU7b0Ei^GS;PGyS>i;-J;IU->;f_|K+~b)!)d;+yC9Jh+!et zt#+iW!mX{XoO(;8rKSJv(Ere!nshP4wWOPdV5WjX)yJlhm#_ccwdu~G#-dugmP_jD z^#9eIta}fmbP<(l694bkxspV%f+6t6k>=*+-rnB8jv2k0WTAOKn3Il=X)MmQdX<~B z>%N7vj5^89*w3tEzQfI`lVYBxv;W__lxi6N)~3|Dkc?s)|IU=&$Elf_nY^HQ$F-aA z@%6ff4ZWL8|K`Tardj{jtGkUVri@vmdojL@4aKQ_tFFa>Ru+SKY2??EYT?D2|MA+k>GoYvOXe_STw-_^CY#P;|3y{T{6s%6crTj9l$t%f?RicICY zd9Ss^&#r65#?P*yhs3(A)w+AerDMXfjkua}rg<6l-@C7aDW;5Is)a+ij4-2pIrYzz ztbZYrl%w^+hP<3n#Fi?9TNu2QLI3H_n{ODqmr&rda-x1py{d!O$h5+Y4BE}KnRGXa zZb6)QJOBUxA^8LW2LS&7EC2ui0DS2{`iFJz=5Gei)Ki{m6%szN5USl@-*toedg-av1%17)?{5b z>6kmWkEgrVMwvaC3Iz(aYS~_O3-{G4xjI-WTWqC|K7Fft?hVO+1{5fM{{m*~mJV0L zh!-ofWlNc3eK3AZ_E_1DYde`W2X2e?^QKL#6e~-Rfb^=n@bs?M$N=Ai*OxJ8-YnQE zS1MG}Jh&=M#nByU~BxM7T3^DKwCss{(BzQ^s2N*fzIO#!@RLXOSDW<>yhmOiv(g##r zCKQb_VjYpp0d}Z3=6?OfhC-TZvgziVafWjUH^f+yz#e%X^h*j#^?3veDT;|-nTEnL zBa~9&fyX6p${7wfa3saXkCp!a6Af2NDRoyJNu($!ek^JLs$a0cBEyqIlp04IaLReX z1)C(p3Z=3B)66ADB~$BCR5Vefk%N|bnXtnSQEVZ29Gh%7;Vf~~tFbb`hE~;HyNW&G zppk2*-MZEvJ>ZI4YPraof-bYk#6dx-_&PFSI9^zbXgDgKg+ zM?LjC0SCI56g2{@4l=+8E?6yGEde~>0P!*R5UJ~mEmlZR6;+(V@er-F!T|>$KjDH4 z;S}`=v_S5m%V1dtQfLS1 zopf?~EU~C=v{j_EU1BrO$X*`Q*O*}j?v@*{`zN9F-S_9d^s0&~wbasyE3Tl^3i8UE za{xBapuAc$0VJ~I^aqqgV0`6MhdR)K4)&=oE#zq2^8#=V zGck!3^VpvTZ`XnU9itSTBVYkpguqUyBYh1_-ZHSEmH@nNIP^<|lJ2J#TFm2y8PwqQ zEH@7WXpaoO6XCA^4oJRQIN*c~%tq?4;g=O0%t6rehJ`Fx2N7Tbhd9*X{(NYFL;wH) z1N`3K5NJeotN|U_P+}{Z=segx0|Mglk2x?w$17qnhdShe9xDKiAPVsjj~E{s(4fFI z%;1nSxXc#X$Q>^!fe~@M%mwO5$vbLMk1;C+7(*yV6Fi~`s;I#r3wcO%xF!+tD-j=h zz>ob*Q3PC|WF;-BK}=5Ki+=2z4?bA~QToFlYcS**PMJyv@j(J=_?m05!G&hVQkHbQ zBOc9w$y<=&i(vF#JbciECiIdYzYOLu?Qo7~IL<+P2*3hD_nJ>Q^PSL)rZn$ZfneY= zjNJ5Q4Z!LD4>Ww|0q2k)6rVAM2!-we23W)*-s#ME+HsyZtbiu(**7qNp_`s6=Q)kp z12TxI3drDsLKn)=XF_wHI>f;^?CHBA>B%^Ot0}r8C=LEN9N+C zx7g_yta??fmQ<@lwcZ!Jnjifz0uVi*X^CvQfNfb16JH4ITG={MlD-wLcbo%VL8pc> zkTp;A8$&;c)C3#~Rbe5q2{-~oSw!7W#dN;G11?pVqKm$K4 zK)vj(l$Uw{h(9cXj{BVheYwlp%YHY%&eVirx2xVKMvEX&6~{=wa0A6oc)`Riu7h7& z*hbvo#KL_;86*(kXbso~nrNmQPJChyD;UHL#_V^yO5+;{Hxe_I--Z9N2MMGh#v<); zjXk{J;o3K_Y&CI@x61|=5BVVU`^Fqbs$?45_{Q{oa$x7s)EecyZo;wnL)X(q@j*D=yYKmrnUUUHo09O%`GAjo+x$SRM));aw7(SiPQplQ6_ zNRT$s1hMHczOV?Z`uWkIp0uca+=wseLIM`XG?66$E=0|-)O{l zO$_T^LweML9fLVlJrL-9V;!!&>=}H`>_5}F)L*y-qKPe#RYG7L&~B}xo6T)X3)a#t zzO@9(umxbuA+RA{Ew{NnhY;gHy3`)XfEQ2>v+Q$D86%pq#OcSAb{8H0gOLqed}B|2Ga>a-Z$h` z$Ym#T0LDPx8`y*CM1Taxn|uasc>N0YSOxZp1ctl{o@g0)6<839YkP#HMHUS*Dqf7vo}bQ zZSVVa7~l6tionAE^9k~UUj#rH z=uf};*U$d;mq9hb--98runkZMq5bU7K_&3Ne) z1z3OuAs~V6Hw_e!15+>s6tIIiFn^#R0E5s1-7tXk5d~ck0wtJ$|M!0apn^ys22i*S z47h%kFbpvmgF--q>PG=WfB{{QgF6_86z~BhAOu(d3WFd3(og~*7!wqr1uu||cirY{EEkOYWh=7C82FeJEbjXCG=!B+tic&C*Qc#G1_=?yV0v}L_ zw0MgcpatNVi@Ep#I>?K?Xb4gO1Z^;kC&2(+FbsMq2I{Dc%NUBzc!w$&ji^YCFnER8 zNQ;K(1p+yc0tt>y646c7at`H(wU0#eWhgMbAm=Mh~{e|k6wEI^O-$c&?y zg86ugpums)7=!-^kcQ}uwrG$DsgN+KhzU_yJN$jx$M|~98m(N$dNutk3pG+_?VA* zxR2DBmP$#GUeJ_InUHZgmvu>(Rq2p;*$fWZ1vqI48$kiv5SrUy0bxm)WOYdN06CCM>5?xwnNnGqbvXqwK$DrNnNbh|9Z7l+(F|X?haUNnLW!ECsE;LymaW;C zu^EoD36)d%0k(;QIXDHnxtn+i1S}v87by{ZAetKgIGDz1m?Eiws;QVKnUt^T1#Rh; zPZ^hTNtu;-onV-qyNLxp8Ey`-2WKdn#W|M8d7i0BlFK=bt*Mr;`J9m{nbJw0^=Y3u zh@W^#0UO|xMF5-&;U%CTnn*yN0&1R3h@R=Wn#{?bwCJ8KDVy;blha9^)oGpf8HN-p z4PnUw&rlzTAfCx+ngcqb1!|zI`2s|mq5}Dz(CMHG`JylyqY_$VycX$VMwlRgOo z8k!J%APwSKoFI9arD&iBilA6Pq%UBk0|}o>8kH{^qqq5_jA)fzu!3R91pJv0&?BDP z0F*yUl**}|{b;5Ox}r(yqD<<%o}l2P=IN)W zD4IiBq$!G|Ejpiv>ZXc%o#r@`IUoiq2!xV~XAiLl-5{Ql=!qL}k3brx(#V>w*q)Ec zqD#u8OaXUA0Yo{9|L2K{P^k-%r~LS?K!BVL%bbD= zv5>i~wMnt3YO&xd1W?$j0t$3iO zh9)Sp%et|isB;WaWc-MRU&^!Ax|n4Ossx#``YNN}inJEn1tn;LF*~jTu!Nqt3t6gX z62OmQP_<^ct0s%0_iB(t8=+qdwicU#8X1pFd$vw{uFtv)Zd=bd&j14a2)HCGw`A&y*ebM)%cM^VxvC4fG0?iM`?|0T zyBJuxl^dFSn4AIIwC-xNTq$qQfUwjEx_79nCTg?l>}VC4*3CIV2Idwh1Gkzf6I)!K!gZ^zX=<<;!C<} zxwQuQqUbBYu4}*`?2uzecS}>ix_G=K(gRr#!ORab)y8Rf%Qe4AuT*bNhkav8^au5Y7K$lF4kbW!#K#T=n zOt$m8gwBem0iej03&SG$#PnLPi~Gh?*}*C>$CzBl4!OFVyvJIcz<(UbV++Rf3yL6s zuJ}v4!(hQ`+^a?^$+J8Ks%y)){JPA$%Tvk6Jxs#Cj0Hk$ySO{EEr6~R&<#=`#9*qL z#>>X#ORCTu%?^3T4+*{1oC7Z^j^4PBo?8W-Lv@*MdV~h}dunWj6(7Ec!C|SC0EX%V@$qW6w)m+cHc+V0& z(fK@$4jjfnu)UD~*8{SE%qN(}>D;_@+Ds7JkILFDPy|J= z4bqU?AOHfp5QB*D+uab{!HtN-UEIcf+{i85!TsBa5QDq0+aQqJTx#32{iw0++KTXh z?cf9rFaVOOP}og9!Ox&_Wxxxl-2mvF-s-*H?A_k({oe2$-|{`*-OUT%-2>|-+6B=J zd=LN0$0DyllA|HzQDo*J1c)?+5S>Y5v!U`}_Z?0kK;c-s!+?hISZY`&^E#fQs zz-VfPmXgytQ}ZMBa@hog&YDefdMf!{;&P^7>2&9gtv_SWU+_Hl#3dYzip~@ODzE_n z!nE?+zsKgb&n>L}GPdZKPNunA4?f%kbE-o{O}zv2$1a%Fwa+JBIV@v~BU8&orB5pE zjX0go|C;_s&^OQ!7VtsHd*}C00M;qtOJ#C}@|^1Yg^QQeC6_f2P=YUAqa_t#PDRkWQ4viNI|9J@ge?AB!-KQ$|TXj2R?KpOy<{22?zkJ z&|xVa&_mf<6-X$Z&Ii$~Xg0E|YCkD}{SX1b8wBzrSJ{B=8cGKC2f~sH9EOdXPzh=B zpHTsBrplJHBn^J8kTwn1U>b;Qr3Q}UVASpm&gR|LULJ(77&)}aAS1Deotma{804L9 zq=5YGNk3Ib5mvL;uY+$;&?WEf;et3xI?flnqpw?#BUKW^4%jsoo$~UQ7#?mkSqCH- zZzt0PLqeBFo!%>h;+b$8-izaD8`hU=gj@JAi4AADv0f-vQNGonOLrx*A{b)LwWE@5 zN>m>O;-J;tYt({C>u@XDjKs_Jf&)B2Da}>Uc69YYB!bk%qKVX7O(>4eX2@dA+-nbf z^+&4QoU08F`(9(=o>Fu7$7_OG_kM}Twe8aRdKrsnxPrP;xb{?m^b?9K9&VKi+~_+^ zLL(2m-JS4aGoQfK#Hx;6D4g6EU<7I2UW~OFPNc;ZB>6Qme5d*N^7U# z@24CH{R0n;BBjw#*xffjQek~Ijgx3*DzlH!2(p&Z88-LZfGXjsU~XeYA0Se4RUW~N b#uj75`k(e*I4;Ct@)71c&}J1H1=#-rZ4R>| diff --git a/images/novideo.gif b/images/novideo.gif deleted file mode 100644 index b739ae3c492628cfd8415c9f8f4ea98f783d92cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5249 zcmW-kX*`r|8^-Us?|T+oCLtLzDO=?+Az|d16j`FFWLJZptktBl(~#^jMcFk9S(332 zgN7no8cX(NlCo>kLMX4^|8*YM`8&TJ$A|N}PMR2L>o~OnPl3+>u(`Rpv9Z3oy1ufq z^8Nca{#X8&FF(F~`LejUxUjG=zomuwxw-lIt!r*}cB^I=wlwpX`RTtbeg6D;YU<Lqh`tZ zl@%2YOeXuq3s!M)aX~?OZf_Nk&FdN=jZ@YHCu_)1;)NgoMX&adFYnX;Bdo z;eUw^3Q7nL4D$62x_L9|hPStuSE%dd%g)Zec6Q$O_V%{6E;cq-&z*BRd)D*p*|TTP z*qWNU7#o|MJZViN5_NP8)YbJg)YVl~RFsu96%-WY<>mM6QN`o&a$6-Qx7Bvb$;ryf z;&3==X$2`MDV(^ZxVX5Om>6~o(XE3O6&2mKg{Y{A2v+znB0|DKTL=mY3J3^b{vv=u zV=!nm`mfL^6bgw%!Y~X$5D0<@1OoWK`FnoB2sCgTIJh+ee=`Blo3xOyJK=XDBK-ZS zu~hf?1p564iAfJ1C3~i(rKiRD`2}W2KD`s1_bk7lu&6NTMG3RCtURZ(s+v_(Tl2g= znBCCWlvm!|Qj*;k$nJdG^^V*5s<-G(e|h^*NB8L1_(b1_f`O?Q!_#dObMp%klV4tc z>Yw@EzPPgbj{jkK;Kxh=DA<=+!Z>EI{`$wa6}1sgBq(ZnDVaWO;3D$w*r+!3$w@bf zNXOSHXLh|wj6NIU;C~>e_5Pq~gl^lRT=RzqZ>(Kc5x#sXRm0t&&P4oK*B!mUwQ!_n zDmT(FIwWmv)~zw8;gR~4HE|Eibjw#(m2)DVR>hywmS%PN2W(2In{OW6x?CkaT&zAM zcr#u7>L`(hc=!H%@_R>pj~}S1^j5V|4jmFzJnuL9p~7E6qwAxM*Ho*wL1dOgp?YCQ z^kI!9nV%YN-ONwITES~nkE(RrbGJlvv=+2Eq4PPxf`_f^Yi`}192@cFPrv(D>}A}l z_R{Dm?TINsFW3%JF_`JnQTPTNx08DF@sA}^k75dHDZG4X)w?Kej^rkC4R zT4?{7`zG6Y7CgG(v+-+1j*5sl!VBLq=fb!`Qpt-9sXg2}c86!!in$AwIZZ};VSTdw z`?IGX1?<*EKZ%N^+sMag=V_Y;|CEh-OqMB=bn(I)C_lM(ZOYGi6L(5$$Y{^h*udnu z^y^h}f!p+r_sSUWcYl&d(W=>TrNvy}5&orQp8rKUWj!C#i~$y#7>wN;ehMRaS7b^iYvrH%`qCQ&VrvkBiqgmCv{? z7|@oR{3yH7Kx%w;(wYz=xIgGg{9JC%vnO^1g>}o)ad}bRf<@0p4olBH7Jsnc9rtJ^ z#;An*U{7(yBiUi{6MrA&`D-Ea#OyMb)#O4sw@`PnruXMyVbL$u{OPQgo;gKEXaup1 z^(ifOsiC)wHCyz`gI(-4W`uE%@Aw?!(eNLCo-c(x9<)8I33ZUU=@}%cQ&N0?*sS1% z@R0>V?e=7uLptKt4wlcGyVe|w+s5Zg_pN>=E;lGnJE)s%f_3Vp{MwD>mWeQ2UQ@wv z(6<`hBUjYb|IM0RYJU86Xu1^D8_Vz1BzEw7dUaKOx-OfJ&9aZ(h`rT+$k)rG{6eyj zRnn`joczs;#|wiOu*!ba#x<#m zi3Viv8?~26*%|JwrF!`+zZKm(U;h1g5yP;SA4px^{@go`^cZ!J*MM>+gGnfNh0JK|eT5ZNc(la!q9{IRTn0chaM<>zSt%i6zlcc3dNbq0tdWvepw2kWpph}YKDZ#vToeIN)g^@a+dtMN<8|9yP3dP*!#;g|Il8=f(sPgOY%Fg zp;lF85cTH1@1x2lGv~|V*L$a=w1-SiM-Y;-7s3d4YtqHisBWR`ZXVnW@AAVVVv-nW zXB9IvR}AhhVhH?GaQwnrSMp0ZPcG7=%SpOC$;)#@T}dHYsg(x5y`ymOILX|$#~Y5# z_$aD3{gxZLBYaZERi~}yZkXiFs1pXfD8Xo*7lxAp8ide=N7m*77EEZb8_noQ8X`EL z zK?1h#UVAtEFRAcsvNShO@LPd>l!s|S`#?ceTT*_I{m%!FN|gC{*erZEc#r}HwUiWJ zx%CujL<7b00p#A+=ag3XIBB4CZi<|Jy`NQOkN#NFL= zeCa#;gUfi#5aTQ*cz$oAumdMFBZ30|Lk``svD2=5xKc>@sH(?#Gsl-zR;eNq3lssO z{mu72For_<{tvAVb)uwt<_c#`85<_`oDnR`qXp^Up`9{~kL4wbcP^}1&RSI0_Em<_ zib=-t|5>wFdb5^3OCs^Bea|s?wM{`q`naH{CbSa>6&{}_ZQ}r_mCT|WzeXl{K~^nf zQA+D@;|+urP}yhgw(V6!?qTqrX&V8kf6SbOp6)E(fe96+aBT*&DXph~=_nH~yB&{h zD)+}P(;VlWl^V5M#$;0mr5C`i7xCo>QkV&<8wjaZUZBS;n%Pj-le8Xb{F{AY0^&4~_ap{Z@xmckN0 zbq?qT25>AHP03Yrn2kmMmW^-afwmkEs~vX8s0*4;WzFY}BJ$C>hAhYqQ>JP1H zmqkD5K*DVQ*ZtipbfBEuTxMTQttp+HQqkYL}xxhiRc5^_eSO7mv;#;?q!m zvY;d!!au6CE+umv9Y$~YnxN!A^##==JwUtF>e48pIpO^-@B)HkO+x6A?@SI*P#QGt zuG=C!MndRJv68v!>gd~{$n4m|4UHn+oZm}d^udPe0R9`bpveKox&g^xdlYt6>D2pQ zZj@KDl4`#lM}?RB(XRJyP&WQdlTeZz;Kh{bhiAUKsZjMB+q+iK!cOE1>)YKV^|IvK zH!81b@DVtA=&mSm^CSXkLqlRg9Ucf`fvv}%vL7(7gv1VttR4w`i!@!&11BR~kW9o8 z!X_lXWued-R=O3U(Sc0MGh{H2u!*nZRS` z0TXS2q74`fLPvlIV`BiKAWqGMpI#N-*mw6_tL0S1wF6|}@_9g-b6fS<8U58eZc-66 zOa#D37;+&H54fg8cn(Hzd7Ayc!Pjl9eH4&}4A5uLTZ|SNz={;XU%f3A#ZZn?TIvV(SKDVJx7?fDLG&%Q;pDSTS9^ zm`ymg6yu{(d7Bjp9wJ4cso@QN_t<^_#|EBz6FwdV8*{^32RDWB5_cwZuFgyPSYwd} zTxbac^I1Vh$oB^Q?xCm&DCRvwF1#_AU`mbq$P%*K=j^S0y^CdC_?~hUNDywLf3r!b zbMt?Qj+^s^)G0ygTLAu%M8fQLl|?!)-|kI-@E zTu8|+Oo@dsB*QX8_p4|ZJ8bBRhS%q8950YizIY6U3#(IOl-&@Een7o)qNUFLr-KkB zKh~@@Q9o5^03BVTob=X@zWL*lBMIe4#+ccLYYZU_@vsE>p|{F?%^}D*Kh~r5p`*W$ zlS(vd=+eHStFEa@k<27@EN~?nrs^ce6>Q$K_7C?n*)k(B&>wT9CC=i!v!T0}vAd9G zbjm{|K$ekmeJI6S2e6I~bBaoNV3PXK76T|eauGP6uHp*%AYJe{79~YFDiL5Ja@^CN z?TRy?ARtDpA`pL`pH|6Bh76NJhi+KYoiB1xFBw7=^AeSx-5a zXuC2Oja;pVtfXA*wTJ{A*T@QfqIlA+n;EKC4K_hfqIuS<`skZz>g-2f^^ z0NT%gqLv1kGgG8I{DI+3m_$!-RZbht&)Q>(xn%oDa^TFI zSvuF;6i_B7M!NZ%<-_`GPs2!lRsPqlsK`r9k(0wP0S}zk1)d5dpB>ISYnpr5Kfxlv z{{$n~!4zX)=SR_{Twv^7q@g zBrV01wn6OYzF2Qdpa3Ob*WADDzh;l$eX?t|>apg7KGLiK%^}uo#seJh}k`P<2ZzibQQG9g0{Dddw zm?!cYxxzFMqic^cTd%mwEps71C$CqC;84YOm1Nwta|EO#rNFMJ(vetYMW}EpsQ?&%R{Nz_2e7MyMyf;Bt7$k^7?Blj&x#0SMWwT1*qf}l z5mx*VamSYb6~?vdcz#ML8Gr>X}y6j)UcZl$}{SR)4@G_ z^cwr+#>mS*?3b=mfCUBq;d$?+GN^?I7093@EfHpLgk&1U^cuw-8YP1or7{|&>l$VB z8s+hz=GOM7!uuSWjHpe@8BNEruo}Nnl?tL{!X?R|@ysRy;)4nRkj;8UJZNi11ub~c zq}DMs8PsHQq@I zNswNn>7Wr0o-~4X^FbwS;;fzjQb&tCvqgoB(6|YnbO3iVAu}FqhK1$%pb-I%%4m(L zYmFOijo)ac%d|bvYm4`SiFif2CCT;~ z9PK;d*k=^nXPnt*8r-K(1qs3J3QVY)0&n-g1aNxtgFtN_dNUg;YS*U1)oh4yr9a1UI4^iOKXbV7%5Y~o zs0kq7@!-;t{vI6MR`-r&R$p5`(mevok|1pgbeaaKaM;@T{t{2fh~KNvudVw%%9S1K zIXc$oIQHIbNQ(vy*N=^kjg4G^DvEk)4~*BW*S+arOY_mYDNtK1MC6b2e~;G**H?Is z{S2O1&7AmYKD41)Ux}LlwoPbadGH0E77wxRiHI2+{%4H0?GF#T`-50Rqg)-YKem0t Nd`Ob@IgOt57O_Tv3aej=u;^y$Sz1P0Jzj1%JB|n98ey1u&jY?vk>h1K{ z-Ri~5=ANXrT5G41oXZa{etw9z#L3&7q|*QY|F5{#C_;kdjFh$rAZCu4 zzR=Ltb%nQOcCx#`-c@O&4J>=q*y}k`la`~yRArma)91aw$Ph7erKP=jf}~PkkKf_& zl%>ukL5k()@`8`AAv%mZOn|De-$7WM_xSxhRGRMZ_h(#000000000000000A^8LW2LO8jEC2ui z01^Na000O7fO~?24J$@QLk)wAgF8Mq9wa0!LL6$0f<7ErHd-tY5Lj3x9E=H2SRNW` z16l|OBw9BKgDqfmXmxc*G#(xUzE59kfXI5DCv g5Ctn2FucJe$N&#AGiGd=^MWoT2XG{qpc@DPJM7#w1^@s6 diff --git a/images/owner.gif b/images/owner.gif deleted file mode 100644 index 2058e727a1acb91c596ce862e2c16539aefb8226..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 632 zcmZ?wbhEHb6k-r!c*elc$H=g4+qNCyftPjVK0STBuef-l2=C*y%WpcHZnH32Xk_#` z()E91;deE`gGY|MymIALjPJ`YUr%>;PvGZ2tSs^0Uh``~!l^?CelM81H!ttMmGW12 z!>5N1-kme!fvMUiZ_m|2Jo7o(|NsAg)63>|P3e9m@%{VvzkK)pRbk41PqTBH($~Yi zj-9)(&fERl{hPOSWxmzs-RkT3ks5G&-+cbFZ}IJT)+8SMc{Nv&Zi|)|1X*G{q^&I6C0m9>;LyM{+I0g zIxG5re#~xZ;m600ozs@PZLR$;%zg?Z_RN_xw@j2DcQ<_8xn--A;2}-vgT8luwQLZ za!@ZTbGK{l>}plY5KlCBbq%rZ=?o(3?0%=v4oWEv50VCa2I3LwM+2`*aL`cq6V9l4^hGG- Ng_44sFe?*-H2|V+7u^5= diff --git a/images/people.gif b/images/people.gif deleted file mode 100644 index dd90fd0fe1c9a91e995bc0062fcdc17496f92ec5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1521 zcmV`~nExdWaj`pwpZ|Y0!!5ZS+bZ$aoO?D(LRlp>P`e`&QG5(UCE=Pmz35@R?+IGMl!?$ zPTE4Etp9D^|8Q`rqvMR?Yf?I>V*izB-rn8^y$2*x|H?~6|K0{(L__I51eD=+T5Rcw zOGjGNH=CP|R#uTnmjCAF=FH6hW@ct()i?jZq{YR=|I7d{!!Lx+W-Bw@$lS;vg}Dxd zB}z>GtjDbXr!Map7+JtYooj5Al#`Lyl+u}(#_6i~VVegC@#PDQe0asTUyivP8HGj9L(iV_ee_Kl5>*2c>2 z002>{|KC0}|9D`5fqky7pylWPuDt(H$RIX0ru3+S%^74oXef|F4xFuo+}~ zWA2G}Fcuh3v)_=fov|Cu&d-2jcfi}Yw{I(q*L z3-2{Ui85C4|Hi!OUs?ZP03=EJxjsJhCIG&alo`7VXlIT8;@e}jU5(s!Sh@fIu6bgP z|No=_w5znhLUAryZ^cX0Bq$Fw`ywG z^wM(JNP2pDnVFg4P*8D&^67wpP*8RMb^uu1OYhd!D10gO-{1cL07iHJ{~a9vrfW`L z|Nr*{@NrE4s!2{>bNd`+fB{2|8VvtPFe_3-n8bN{iYzPAYSE7wXPO}T;jU7z7b+FdShA2@5j!`? zl_4hU){MI|(A=v84X#L%3%|sjw?v(jT{CW>S==E@08nvNsv~Bn;5$9!$gx~P>!ORY$KY(_40cJ|H zuRIV$P?MuhiX5v1B{Z9Kq6HCsP%ha2$4545WC#LIJ0u8p$w<L!=Q2%MV(1gaN6zp#dSDOk_tL XI#l4tY72q!GdV^{^bXSk1q1*)_XghB diff --git a/images/prev.gif b/images/prev.gif deleted file mode 100644 index aefa804ab4417b3c3e27733ffd8f07603fa41f99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 307 zcmZ?wbhEHb)Me0RI3mEXapT6Mq@*ujzU1cSUb=MY?%lgBEiEr!zC3>X_^es8mM&dd zSy{Pf&z}DN{_ybd|6ssC3Q+vX!pOiNz@P)t1hSKXb;ASYzLd;)FE|}DU++`mK3|f1 zzhd3{n)m+?D6Cbe;bdSuzG#LMk4yl2Q>2x|qCkeymLqPG(T6T`^K#5+VzJz%Ah!E8 z!;Xj@>twq&2Q1iO&6DTkSI!*l!%)u1Q026EfN*V=QJuUx%$ P{l?8({6^Qb6&b7n50-It diff --git a/images/prevlabel.gif b/images/prevlabel.gif deleted file mode 100644 index 51a31c2fd7829eb95c071b4ba1d82863a723f5a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1264 zcmZ?wbhEHbv}aIY_}3Q5cJJQ3V8Md>_wP41H#<2wd3$@u#>PfPMHLklWo2dU+qZAR zgb7ooOgVGr%#R;GmMmEk6cm)2ntJTmu_H&09-@kvaTeoii{{4A*d5MXMnVFeau3YKs>)X0@>)yS47cE-! z>eZ{cbLZ~dxid60bk?j{%a$$s`0?ZS@84IgT6N*Vg`S?C6DLlrSg~UD>eWd}No{Ry zo}Qi&5fPg=Z+`gjp`)W?VPWC<^XE^WK3!Z~{Qmv>@bK_=@813Y|KHfym|+yqI0O`b zvM@3*bTa6G>;dHo29Ey>f}AoQ8x|aF<`C90nW1s}-j^R+5pxE3c=EPF>qF}*uMm`(1lNtsE&J(Pa1h33E zupm>2y`$?uz=8!nJvJRW5(X&`j&QP;UhrWsn9#tfti6bfKxUoPGg6n0iPgWs91pJ3q@95mJWd!P8X9U z4IGv>3L7RK^KC-j=Pf$n^uHy(fAlT3m7{nlD5pc^P zhe1JD$<{{U2pfaIf~C{scvRR~7OYfx=4vj$aA0P}Jjus1__rn;W+*sj$-t4g;b#CN dr>mBt=sn;c>n(W z!HZ8S7oT1@Z&~)l&0Tw+b63>guyEj-Nh1XY09ZPu_K|IJRc(mJ8>v96fR7?YpnD7p*w3@92Za&-$j$`Tzfa z)U?xcmad(3?B(X|dzP-*yypD73zx5Lzy7{v_0^WG4`$AsdH&JIPv3qWIe6^aHA-x!x+c~ia%Kx*%@*ebU+4x;)H?ydqYlBbBnHpLrZ5@j;1b`rcrlS zB&Vk(mxQM6BpDWQ+rV%xbFC{g zzKoF)%22bbdGIkILA=^bC!#~>aC;w5be+VEpbaP5RGRyA0wq#=1sMF7$y5kDX`RT> zsl*{*c7gF+_}eyPp?6N$?Q8-+|g*8KRDl6WbxmqXbP`Db7?U=0B1%tucE diff --git a/images/rank.gif b/images/rank.gif deleted file mode 100644 index ba96e7aca764835fab4678b89153409246f22949..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmZ?wbhEHb6k-r!IKsfdV0>oV+23dH{(1K9-+{}2zW@4v%aeC0MtZ0Q2fcl$j%_ZpaaqZvXg-|PC=zFC39ZJs&zT9_hl=b zckGea5xBZ>BSX_sJ<$jb2Ckz5q5>KWEQf+zCUZ*kvL$nIipVgx1PV?KOTEA0#>^NA k0cLl{ZyGX(_O<@AwGes6Sjty!Zdp*s%AekyuE<~w0BVa&1k;5D(R2y;zhmCk*5$8t`ME#(*o6MP2LJ#6|Fi|mlYIZnZO4jk z|E2=v-roP%0QmRt>VW{tg;my+2>i`s`M6U5)_ecGWBx(uxMPS0ex1NYRQ1{k>56!&2hU(EGw9|J#(xi)jC~A^*j5|GhEJfkoS# zVEMR5|I~%Yj(7k6{{R30000000000000000000000000000000A^8LW2LN^eEC2ui z02BZe000NxfOdj|goTEOb^%|AjA}d`28@SI7$PK+g&{{aY!f?}gKcy@Jq-?^b}1!2 zA|hFG2%uF?VjNQ*Vo#V{Fhw35HAOi;5|TbGSVh1EMQ90(4hkP11;8T*15_!8J3uT* zNNKhe1LYfs0vBNGT}f9e@K7d~ga|G=3=C@#4HO{%P@n)PgaQW+84(t2S+XSIKM+Cc z43a=#%orsLXwWcYM&p8qUOw50!-Ppj8d6@URH;G3M<_S!#CRYijF2H@$gJ48;!K7N bCx{R!6UELB2uPDEMY^Nuj!38u1p)v&WEwc# diff --git a/images/right_both.gif b/images/right_both.gif deleted file mode 100644 index 00d822f7d731f984808248f89389af2402183c8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2010 zcmV<02PODNNk%w1VUPhV0mJ|R_V)Jg@9*O5?B?d?+vn%l<>k}i;ojcf&EDSF*x1P1 z+r-z`z}3~d&(F5c&#%hLs>a5r#l@w)y_~(hwY9aEy1JCOxU8(KkfEV@lapClSyEC` zFiA-+KtKQh0RR90A^8La6aXIpEC2ui0FVJJ0RRR6peK%GX`X1Ru59bRa4gSsZQppV z@AUTxz@TtQEE2%@3V;w39t4t;l$Dm3n3(w6(UkxVgH!yuH4^z`?@9#Kp$P$jQpf%+0^93l5JHkOtP**xB0K+}+;a z;Njxqr-hzKqe`7hwW`&tST`zVs*`8duVBN99ZPoT)}~&|s$I*r zty`;SyFPtOx31m0ct^%{3N^3azkmZ%-J4dh;lqd%vm`uMvE#>(6Ep4`xw7TUYbRsg z%(*k%rDz*_9!y!`Pbskqf0*ueY*AQHLGLa&V8l!?%>0}RxVn+`STsWqhF6*J^T03-NT=MTt5B# zz3t=QZ(BeA|Fn^(8h`}O=3jvba&}<0_8;>PTjpHJ*uPjB2jgVw-NJ2xpun z&PgYTcHYTho_b=)XP*@Q2`Geu4$5Gmh9Zb)q699==zoqrx?iM{-bZPr^IeMRdzx;# zUZ_zDaDc zavqCpoysnYXS2@k32n4~PD^e7pw?bXXtvrO%5ArbehY4+;*JYxx#muaZn~DP%WkIb zzRPL6@_tHhy`tWWZ>jq3i)z3At_pC#u8z1I!3na8uxAP{tl+>7#|Lr5%{5H1Wfor? zS;iVa#&O3IP7JbeACG)k$tGJUa>~1*%<^9@zpUZPG8;&9&9TLdb6q;`{8rCCw*_?2 zH>O5(z6O_fbaz89Jyz3BhXr-i&)rP*!%63OwR2N%{aMyt7mQ=r*L6*{RFm z?e^Pn$1V5VaQgtj-FWA%_uhQ>?f2h+2QK*Fgcol3;fN=$_~MK=?)c-78$JL98-Nk{ z<(Ox#`R1H=?)m4SXCA=+=mTirLFlNbuKMb%x9x zhB(Y23~Q*v9{TWy9^@eqhe*UC3Q&kfOrjE(cs?XD@rh83qV=38#VT6yiB!Cz7Pt7r zEOPOSVBFyWT^PpyGMW*EUOb~3*Z9CRvhj^@JmMH_7{@x=@qTW+qaOEIzC7~rkAU2s z9|K9qLPl?phD;jAR@kDalHzk&>3oBp5NN$xdF8lb#GE6hSGke0U0We9Pp%U)uTm%a>U8|Ns@V$Kkl#!My)iK)zH zo)DSNjAs3yDa~rakDAuZrund`&2EN|o8Am3_rNL6a$b*|=1iyb(5cRL{%!ygq@z3M zxlLx$^PcsDCkOG#Px7&|pWgf@K(#5*fm*Ym29+j46Y9)`GE|ukeW)=bDp6rlw4%Pe zC`NUu(T&>wvZEfAB}hZ+%8`;(l_ou@DO0LaQL?n9o_r}xH7V1XTC%1#l_XAc>d2k) zRFOXYsUd?Z)J58}sPiN$Qvaybr9SegPEBW1qiV;gQgxD0y=pkEs#P{}wX2uRDp<4m z)v=bbtY+P$SkoF!w6b-JZhh+~*DBX!#>drZu7)}@~PY)nHdTAGr!v^PC1YIUmG)%LWt zt_3P=V>{H@($=W@G~sPmYTMm1wYR=~YHrCG+|dqKp2e-?W|N!2ex_LU!g s^LtJC^0$in{V)FfD`38wx4?G{FoOL_-~}sD!4CdrgCktT8ioJ>J1<5x@c;k- diff --git a/images/scrapbook.gif b/images/scrapbook.gif deleted file mode 100644 index 065d16479a8bcaa35082e5d20647512edec46389..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1348 zcmeH`{Zra?0DwQBiB3)CaN5r47j35Hl`oYpTk*1~?R07GF0ZU%e0>(CU zIzVwV#McmC<_kmdZKzBHEnk@oWg_AW;0sf5Os41d?e-t^2lV{>{Pf&CQJ+MHA5ZZD zM}QT8oZQ^*f$=&ncZ~y<`)<$Qr5Z+CXZ}27H7>#vM^s|oP%UY5S;?VOwjPbj*%`3@ z?E2M|o_l>8Q!R}*GaqZ|TU%QT3kzHhQ&9FBY{*+$(QEIq`k4Wnvr-K&60XVXx!W*5 zCeq1xJ1vN37Sl}IwOw7~1I0s`OeSw(5ARt76!L)J_$N8QC}uPc=_v-l;6##LR_ZH7Vf z@Ue1Wb-Hhk9l&esSgA&D&J8OiZLt2^r>p9P(ayc~er5a37Z&sLB~`DWsreRZx;}S* z*SfA`tGZdsQ~j1@g=VmBqs9)N^096kceG4v2UwdF&b3kQ^Q-2htxuNZ``gofy`B1* zVQoKWSKg~Gb(^kF7uOdxx3p;FL-3;rotUlZEShY(Vww@~n7QRQa`rbx)-AnBGrlp% z)$8?2rBXe=EE0+42e@NnV|_xQUMU>qvn=cSjS3)Yu3c2iltRw)4xni%lnbloM+9{h zY)N-Bhed^TN!{gn@cK11@6#P!7d#U_D!J2Cd=55Td?ELLwpb3sF!-PUPyoAYi$H-2 z5ctx4`2?_sL4<>6G`|`jn0(qJX(R)><(h0+4OZ}%Bs6<;G|QftB0Y1=X$^1Uru|*$ zAMd(5i*jX!2Bos!%`e8EawI_)Qv~&f%FtvUqz!qJ&!!|a#2j2jopOtcsf|4G*Ljz+ zV%I9;aX}_T^StnW)}Al6$oX}z2fR{`tbZ^;U(!9WBfbRAM}N3FP>9PkR7nm$84oOr zUVc%XXtl|nR2+zYGnt^EI(oRA4Qk^&(+A9g7Rh$o*8}u_nD-QmQemywG@}W77 zGFldV*>Ok3Toc#Yo(Yc?$1mld^otJ3lwX#S5K_l5qlbVx%kC)|3H@YC zxZ)7v=_5PFs=g#U6m8MgT>mO44SyhlWhT0~W-?BaG82&!d+%0k>gRSfP&C>zZ&vE^ zV@ELXezh=Ym|=_gRYCaOh$dh?NBmQvFOtl_w+KT3sI0U`Kyc^ijE z;IbAGHnBkp6qJEM4wWSyjw4}we*qHbFb@j#u+JWof=p0j1kwQ=~_OwQ}4+Bv*?n^3MK- W3 zA|fJLSy})8{{R30A^8LW2LK)bEC2ui02lxm000HtpeK%GX`X1RuB_)I-NkViL}e_q z5zK-7hyx>G(4;IF9}v-KHWvvo z2Tnj)rvVNf7>g1Q0#0bVX@~;_ts)u)3$UEN1`dlO2E|*)Y7P+(1pap x5Uk5101F2K6a@h5>k0(~8V3gfBn#^t1rQGr^8NA>TTn>o*P@`ogD64(06TrAfI9#H diff --git a/images/search.png b/images/search.png deleted file mode 100644 index b0688bf5a5fcdb6b0250229a91c231ac03d7ce30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%*9TgAsieWw;%dH0CL#^d_r9R zgF$G`*Bqb-XMsm#F#`j)5C}6~x?A@LC@5dz8c`CQpH@#-gMo#zopr0Ag7>5&!@I diff --git a/images/sexya.gif b/images/sexya.gif deleted file mode 100644 index d48a49345bb8a76437395ea0664a2eba284e1cff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmV;60d)RHNk%w1VGsZi0M!5h{`mO)@9+NU>GsD-{1b**#Fkl_}JL})Y16R z(ErTL{maGj$;to4!vDj+_`<^Q!NK~zy!^bo|GTySwz2=Tv--8Q@wT@At*!R1uK%s2 z?X0Z-rKR$tqx7Ml|D2TnnVImLoBx%Q=a`uPkdE(^lJby@|BH+6j*S0_hvbis|Ad6? zh=%`xed&aP|9pGnetzqFc>i>B-+FrJb#eb~Y~E;SFq{A06XrvzB~W` diff --git a/images/sexyb.gif b/images/sexyb.gif deleted file mode 100644 index d7e94f6b13c370219f2698cba84a80070f50ffc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 504 zcmVGsD-{1b**#Fkl_}JL})Y16R z(ErTL{maGj$;to4!vDj+_`<^Q!NK~zy!^bo|GTySwz2=Tv--8Q@wT@At*!R1uK%s2 z?X0Z-rKR$tqx7Ml|D2TnnVImLoBx%Q=a`uPkdE(^lJby@|BH+6j*S0_hvbis|Ad6? zh=%`xed&aP|9pGnetzqFc>i>B-+FrJb#eb~Y~E;S`Xc0g{(7XVyfLg~SdO95e>-?D;e3P$3aG937H$sne%H002AA75Zra diff --git a/images/sexybw.gif b/images/sexybw.gif deleted file mode 100644 index 6ccdbd0031fc5de2a20f521af065303e127a0838..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 326 zcmZ?wbhEHbG++>5*v!DNe*OAq&z{}8ckkM@YiG`!dH??XfddD=fB$~u$dUj5|8Lv2 z4M;K|0mYvzjO+~D3_2h&kQodtp9@ZUuHI{Lz4+9^qXr@(&l{C2XWkd-%U0lKazA}U zLAJ=@Hq)HEgR`&lZFlIC(6HdPliFgr!gPM%L6ekPr_3nH@3)H04n{FY^5`z$&NBYZ z(`H`n`9)#D4(VQ#>e}GI2BxOOj4Gv?&aTEDuD*Vyj=Zj^Q+ua(&zwDFW|Q5Vh0H8W zEG&x?mM&kpdcw?gEbO6n3oY9jWVW?$3T58C)p6g{od@N&R_|Ns$iby`YWuR~jOQ=* zoVj{kgo&ei*)A5bdk>Z$d@TBu@!<<`*7aVs5+7E5V*K)v<+J2LHV)lij6cK$n(Z5; WRDO6^Bq|GsD-{1b**#Fkl_}JL})Y16R z(ErTL{maGj$;to4!vDj+_`<^Q!NK~zy!^bo|GTySwz2=Tv--8Q@wT@At*!R1uK%s2 z?X0Z-rKR$tqx7Ml|D2TnnVImLoBx%Q=a`uPkdE(^lJby@|BH+6j*S0_hvbis|Ad6? zh=%`xed&aP|9pGnetzqFc>i>B-+FrJb#eb~Y~E;SogSM`%W?*>1R;eon93Z*g-183qOi1`;108VL^%2PqtchKP!c zj*ya+hlz`gkC7Y>3kwz&84C;#3n8u@3^$~vsH&{4A+WNgr>U#0udx>f6dA@Hr??{} z3^~Ka$H}hC&CkXe$QH`XIT{Dp9pTf&N0B1Pu(@EnCO}#*7UwRy>SIkD^748X-zlNbqCE03tLz2*J>W ziy1C5nAjlzrAn6lT*8z|)8@*0mM>$@6wpI}h!YPsz*uSn1ce$o6bLbjR4G%ZP^A_< znsh0Qrca|1!B9g)g|8b-@K_O`2wAge)v|S4_N=p1aL^c_C>n~2LS*(e2g({ diff --git a/images/sexycolor.gif b/images/sexycolor.gif deleted file mode 100644 index 4f6abb0c75e62e92732845ad0078927065d6e86b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmZ?wbhEHbG++>5c*ekR$;s*Mnl;a7%=mly=*yO-|G7Co?%%(ck@4Z+!4I=%|8K1Q zKXc~a_wWBt==->B+ozK!UsqTBy>jt-P|*FVs{c!u{_kx6e|Z1@wQK)x+xX+jlNY6h z|7)uM@80@p@#6neC;z*B)J01=l?%*=50sYzn3rnx3v71zo;yT5|@`ZmABQG)e#gEGqq+sa_q#ZGv_W`x^n#F>9glAGAbDun3#wgFpC** zzY}3*fAZ|bt2ghsKYV)n{N?Mn?;m~qao}N-BiHi}l^F&HjvQ!W7v2?p zbA+Yeys><|oL`JNN-xGL*|}4g#mT1EYx1hlHBk$_LcP9Zhp}-+L_{12X>1bW>e71= zp~$>8YMbrdLsPx4zq_?9|M9u0j4p0WqGEnI5its^?7V6Y97a76hRMe#sEXUosrcA- ztY2BUXn`VQ+j;d829ARZ1TrtL2;E#3`>Uk!%IauwqYuo7c=-fWY#ffouIIwGSU_$yb&-5KHU%s!au9T81&xmxkGBscjvS8p; z`Tzev$h(6KDE?$&WM}YW&;hv%6ekSqMGbyU%`JX%vYG;|-S*6i4lLa*+@@9xylj)2 z+{N9jeOzZXsd5_n8apns)%A36Qd`96!OtKsxX6#)#l>4;2a|yetB~F-Eh8=q9wn(o r(h`=!COag}>{LWW_S=}N>+En=*6`Bb;m4uvq4ms9jPH$KBZD;nHzk>R diff --git a/images/slogo.png b/images/slogo.png deleted file mode 100644 index ac14a84a261fd6efed835eddcea4d67ba92259c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1305 zcmZ`&eKga19R7AAnUchznwLdIicvY+lw%ksW`z*LWOLnY)67LvmYam4E}46en|oc# z$tf=_@0NMF?huh1jp|HpU8DAby@lOhf8IatIp5Fooagy|p7Z(q^C=(_{I|pQzyJW- z@d3VPAdZ3R*w)PuBFh^{5a}ghgRuZKl^Cs&^&xG0KHy9+0GAE`z_|v17P2`10FaIZ zKoSoCrUC$q)XI+2C!mjRVo(@Pr_(JiN^TYvT#d6YNOIye)vvFwT?jJkFLqvj;;nA+ z`P|@DmF{#apFKG_DHe+tc;RY6?0Qe=Glv$eS8o&;HY zgt#$E)f20H7Q50-TIG{8y|Ic;lA_sL)`*ohddZrw@+Pdb!AshRl{aG*PrMZncE%_= zqvah@vi3-M2lUP@cR|j%m6c_=T&_|nwOW-_DosgAfp!-Ph0x}9F@nR8*u*+R2nAjr zrm0^=!YO}Wa6{iJ01}3&0a0lH7@2;pO%rdftU;y$3m=R#c)w|v9x$EC9DWVJ=52Ui zY*=JpcLm$0+RJRff7^E93*`hI$A3N&$ab7luRnYBHp}jo`=KJ=7^fP z@Q|UiPbE`ZhZ?H3+?p`IcYMsS;Nc^sD@$IF4_M}1wEsm@V?E6`0`5}ct3sEYQi;v5 zKQ>k$Qn2273_5wb=kIWtF=exLtE5JRf}wNcqzIkv-n)L`qdd56k~o@T!4wJ@Xen{D zw3V(}g>Um8^(Z4<;x8}uwGQbkdiFK4^P9`|mCOu0d6^drS83l6*hot-`X#|Q#nU8> zxcGy6-D>gHHge8~$`dG4O|89)bzxVZ`?vv*L}%N|L{?bmS3i9^iV9$GlDHdObu3MIP6tK6GlCFc8w**l;6AO<87>lw#3|- z5e%ICXf@!Q4}U z$v@vu=~313y*#);Wf!-k&|2>eZiwfyHd<0N{ExJVwH(~r`z%DN@5VO^M*4E;p7P7ksqAOr zB3X%K76o&jNr4EsAzjf&kgi8u(P7AA7$g$oigJPwiKLEa*ZwC!Vp#0(_)mM@S2Qq09po*^6@9Je3(KLB!h0(?ST z|NsA=mX^lI$OsfjpT7MAkm4-xh%9Dc;1&X5#!GkW{s0BVN?apKoQqNuOEUBG6hbm{ zQyB~m^^MH*4a~QmFAW8%kO!#<&QB{TPb^Ah@J&oE%Fj(r$xKvm%PdMQ&o9a@R4k&5hYdJb16CZmJN1y=x{!AQ2krKj%{9Qbol@P diff --git a/images/snlogosmall.png b/images/snlogosmall.png deleted file mode 100644 index 8559a4ce851060cff11ef0ef1266fddc4364d346..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^{2;;WK8y@v XD@4@{(yR@Eni)J@{an^LB{Ts5Q0GNR diff --git a/images/suspend.gif b/images/suspend.gif deleted file mode 100644 index c23471f81e06b115678508501aa2b60a86d4914d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmZ?wbhEHb6k!lyc*ekR%g}J&-a{w$EPAom;X!KZvuDq~EnWI_#*7Q@?vIZi{c>ma z&DpbGSXlgdRQC1Iq4)3K|6pKvzi;2m^76;$xBl=Elj@_ne%5#>fBvK5zZ{^?%CCFT};Yxq9`}vmKxIs9n5t z>G8^y|7~smMnwF0bLZCOGZ&XG{r~^}zJ2@tx3&GBIrGi=^Y6EAeW#=I_etCTS8IMx zp8PT^>up!pZ7;8{wzmIw?|yP^|9=mUdy$d!Y$CR59IEzglbQupotjKc{FTh+gviVA`vrS27zoHO zXK}OA(NS#jWLd6m?x<@W;v>T2)$GgP%Fk_Q9N=sss@)>%D%Zlw%E``dBV^j;D%K>c zB`4;}x;#Y7i1mf|n-(osea6qttcFa?mY@0ML|!-~aZXUSh$(2={{E1amT-qjfWk?p oP9@nCfmsuhSh!qYhgj&aq#R%qm^90yYJy|rzUc-lS(q5C0aY;Vy8r+H diff --git a/images/tab.png b/images/tab.png deleted file mode 100644 index c7b602145c8f25788a31be1e6539605c31640558..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1001 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!PjD~;$y7$2bRfl&?&#~tz_78O`%fY(kgt&J z5#-CjP^HGe(9pub@Czu^@PdJ%)PRBERRRNp)eHs(@q#(K0&Rd2bpbvhuK)l4fA{TY zQR`%z(CnC^hPuAlQs&)$D~ z@b3G~S6}YE`+eut=hGLi`DfJFgy$SNcilcTYte?iOV(}goVjf3(oJi3A6vKkpi6wo z^*axqynMg!^p%XNjy*@uZ9R5j-I0qP@r5V5@7V)g!kFak?!wT)D(eB{a29w(7Bet# zeE?xbr!^)(H#4x8c>21sKV}qWVGz1rar!0$0~3plnP%0 z>rqD0gAf142RvjvQ@@Be@Ot@ufv~dKaRoO*L%&O~#WWrYvFUbelK zV`gmpGUe=)FkbyB-!@0&{$6c(>)UI62B7*PyY{I`TfLfDxy5uMHn4!n1Wph;;h+$h zY*Ib`s4FVQ)VFx;f~?Bo?1W3}-bozs6?k%2S;HcrPa(gR0ixWAfqR;H#pKjYK4MG} zbH6kwcFkgUzn_m^b%x#BRoV6-avRsC_YEa| zUvDUjChO`>YzvLpW-bggL3Y~Pvv+`cSMT1Wx_GwkN}1CsZ%>(R+BaiO?9F>V5v&pG zH*jsR*<6+?9hvy{beQX*rmMWyq;(=%Q~$5|^Xw`k#GMekf&N2hghXuWFSULqvb`$a z`NY;gdMfMXEWgd(UYj`Ke!JL7sGEWMtV)=xjeVz`G>Y7Cr|thf_J~UE?TTyifE+A_ zqFA$fu^mI46Sq>}g34H65|JozjVN(0N=+=u%+FH@$;?e-mZE6L%}>cptHiBA zyyu7{P=h?khT#0PlJdl&R0iL~|zCrtr?dpfJzxWUHx3v IIVCg!0D=IRegFUf diff --git a/images/toggle.gif b/images/toggle.gif deleted file mode 100644 index 547b92cf9af8b56ef48e6ce5814e6a972fcccbeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 389 zcmV;00eb#NNk%w1VG;lm0M!5h|NsB~|Ns5|{{8;{`~3d(`Tg|w{O$Gp>hk;G>-gB{ z_|fS6+UE7p=lsv+`^)A0(Bk&TZ8QzoWJOsz2%p><$S&Nk+$NFwBd}g-)gkSqNu=^cq46t}@G6w>DwOXjlkX{$@Fz?kAG(0000000000 z00000A^8LV2LS&7EC2ui01^Na000J}K!9*aEEA-TC2cN4m~IdLAt#1II?#BcyL j9~#cj(9RvoF)SPx*xA|}EHOe3E;Qof^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<2nn-^D2f_7Dk-ZNv5Tu32LTm}pqc?v4-yqbF&Qj+i-Cuk5$FJB zK?ZwUy?0h8{&aX}hU%^@SGWDLy54s)Zo-u{9q%Pl``jazwCF^~c*ry>JzzL4 z_^#Hy?iJtk7u~h-KIa3yD_3vtZjJS5y;Q*Eb5yDK#@j^cjXJAD9a$=WIS1^x^PB6n zuQ|W^iqNfQZ*M$4Vsv`9#OHr&l8?Wg-y_$y;y=UnIpHxEVidOB-0QqwBt)dfNLwoI z?!?saL#ufvg)%c8=i!qmv(@_O{KM?je}<2rexDCFJ{#=*pCKmoaM8OTPwX8}{_gI$ zq9c{H-f3@Q?&7|dfLp5{FFz9)dgbmi&t<)y9GCd+?t2)!yF*3nqy#%t|D|c~cD}SO zF_|(=N=iyH>%r2gJC1y+V6%I>pwEHrXx79PkelQ<}AM2Tc=&CyEtBl)gPZeOT1~Bhpc?In)9(!_g8QD y{_{!~msEA?u31fec2-dllO%!*tpgpnjB4gE*nYX}sO)QU!Q`?pGmxtPe-i-2g$YOi diff --git a/images/tribes.gif b/images/tribes.gif deleted file mode 100644 index 895b901ffa9496a030e3e818ccaf6124585efbda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 789 zcmZ?wbhEHb6lRcMc*Xz%=eKSxtf|>(Y#iq7JagtuV=Jp?&z}9ie_u;cabkUaQBhG^ zTH3yS`~Ls`f9={eVF`(Yk&#DhYuBz_yT7Z;DKK!tgb8QPocaF!dstxLR(JQ>t}Zry z{+;RRSy@^4@84H9G~7~G_y75GDP`sFH*Q!sIILK);@H%w2lMid9zELE*Z1!2+pv_B zFfT7{ZEX$?j;p(NEuS=LgSB-^QPJL+Gt;A@yu7@&Zr$42+8W{IrKqX7pr_}!k56P| zq?DA@zSPvcWo7mG`6lY>0s;a~PEMAVmd3`$6PlX#PMM;hps=I4dAo&0b#=9&qGD7~ z&>la(1E!{T4jhPZbi{HnNZ}A*HAAUYN0iR}mGgclxb}ja; z+xd9Z^jx*Wc(?Fq@>%fm@y^!V!p*=Qrff%wjo>>! z{1Q7D4w-oHvYIw^Of`7NrXwy`)FDuKT49tL$gk?Ble*x* R0SgxCX*oR}DjEU|)&MB6`pN(R diff --git a/images/tribetemplate.gif b/images/tribetemplate.gif deleted file mode 100644 index c04da6904d8b190799bdc8c3936ecb3f142b8752..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513 zcmV+c0{;C+Nk%w1VSNBl0K@QiD6OrnnVFeTP*6BHINRIXAt53E|Nj6000000 z000000000000000A^8LW2LKrWEC2ui0DS;Z000I5U?z%+Fa&5Sq-^WHa4gSsZ3mPx z?%5+5jMHsMEEHItoQ<2EpnspCq;#XDsA;FE ztX-?Eu$3vXv|6vVxSF%Myd$^0u)n~p!o#S=#-zx}pv%mh0xOZvvCh<&*4LBS+K$}a zjNjmf;^U&b=Aq^3eCzC{=i3*BJ!6k`h{6D}T z$iWc6P|M6H$iO7X$SlbC{|JL5$f+RLA^;mB3o|=V%20rTk%^g=jg^@dCdtgo$Rx%l zm^S4Ri;$vO%VuE_x6(sOPK}~QflZ5mT0~F`0_y^a3L+a15xvF0!^{YD2D2c8J;U!i zmu#ZK(?uqg#x9+?Hea2yOhR4n;ud{Q)w!O_LnB4+`1$_u))8(|uKn1P_kevZd&j)b zvls#@I^SC^V5Jskwf9kJpKr6~=ln}G)%&+ zJj)e!WvOee)Rt5{6uDUEyDvwiVB>HNXN5NV8n# zw~Fd(-Y8&n_*e72vi%Jr2aserm&uiEm1R#-NNxYhzUOT{gJuJgtgw&G%PcFtBMzte zU-4Jo`o|EAB*~yQqw>;~64{Q%Y4TU(K5zZQunbw&*WmNg6)&s>nRV<}*gntx!RUi5 zJ1g9cmOg&-`lzK!P~_#XlI>6CAHLU;+LO$2pS$7Px`N-= z{3E!Y^Y2ah+CVMN-O7DabS__7<^JvD(@WlebygKQe-^OHS)4t~uJ+=+1b#6TPY8#jyCvUFSlp%ICLLl4diJJGxdGCELmCNe8FP@DXFMjf3p~6reK3NJL8+m062sxiP3058V zQDflzZU5DOgqwyWw6f6C<(Uyql}9ag2f0-t#M!jDTim`9(251l@pSvYw8fUh;RdF6 zox3tDM07p6x_zl9_(?~Vd-`Mh*tZk1vx`^Ah>WgN(TK!o75mw^3SAeRX0Q&N^e!B8 zjlRCFfv585&U|KnKE*QV<6gX@m;01NaVaE|3y4w_+Yq+&_?0Br?RpZgdthj=YzeN~~jB3bJvIlIG@r@%WcSh!g` zE{R$jDSFZ#*OM1KSU`F#W;%NLxP=W}RGg-u9qdYm@s~z4e>iiEs+Q8NHvl~f&5vMH z59wSa#DKXhandBT6uctkw?r?SXo_(dvb5cSY)24!>Z7H-Mze5A@g@vMR4Za@~r_*f1mkn>O9` zep(%<8}wQjYnLX0mk05>hD!@0X`1I?rWKeb5fV9T;=pePUkDA; z^{dCkExjd96LP7t{Q2fD?c$MAlKRf!xo+?#&Si>=Ru-e`(;a28s1LEoQ637a@l*VGXaL61nz7R0 zj_Ym4Z7%SVIxpgvZT4-YklCnz^jvq(>_5>OPiG$BnW#KO_Kh%zB5hs0}R5~ z?%#(0{6SN_aZ=u?dURF)exF%yYB~xG8UUx_RfYDvc!Zu8CuL)VsS$972}go8T&D6~ z;=feP=c+YsY^nqqJRJuXv4q>zU@lB|-f(lEs;am5EC8m7xEl`(QkGJy| z#ycRaQKdT1iEbTXFy19G3hg@CSapGO!x7{_rdu}$ z80t4oR00A0XYozT`Tj>U0-BnQmOj`rSepW7m4=z$o{&^67n9!9{bo0_cb%4mbp*=$x<61H{p2U^>5fu4_x`9RrM-%NnGPwS>3Bgp& zX*mji-!&@cQ2aqk);e(OS&~G+IIg@x_07&+S(jAnsy9BY>_F|1TI0DlGI>Fx@2MTmVu=vERl%{ev)sLDNQ+Sq(vMbS_D!`!RU&1W;KLZg3V zl1R^^otyK5R;Aq$+ zIFgsO3+ea_zZ_frPA@jB!CJGNa+$|^bsB86N;tcoUv>Deo}r1lMn*WkPgs)zcSLMY zb*)R!2^raQ6TkJsz_I1YWjCyVM;3>2*)Uvt^6FW?z%bXc`JI%&bMZtf7QMYO%)irb zzIAJX6w}W{hkhpeTZ|IPxK~jZ8*Obr#YSuX(2EK_C7D7ujN?c`jHmi0U68I zZ1nsnvLl6JnjPGQF?^>LNnR_qPzl9DoP9@#`wO(V7>X?wMDi>`4g`=rR?@+tkmE&x zdyC=!7Fc90BuI(G6D(k`$VHAf$B6uh$cs`(zXhi;k!(dY~KoG8o!j(`kP_0<)wfo&> zw`9a%B|s>0tE!sqh708DRh@mW1hNG|e+7Xlg9C+!iHL@b7cPI50}3b}ln9oX zk_wxhnHP)(D4C}orKgOkqz0y`uCSM}tdg`Cx1+hXtQHk00JgLl!2`porpB?!nadim zE&$X3o?Z*m$ko>p+SS&XJ-RNe3IgM%<)`QA1M4X5J*%Y#=o2Tj_4o7ou=XL`Tu=Za d;6Q>QL>w%bu%W|;5F<*QNU@^Dix?vS06SD1mRtY; diff --git a/images/trustyc.gif b/images/trustyc.gif deleted file mode 100644 index 61f5c6c51b9e107e1ee91049103b6e4688888b65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1506 zcmV<81s(cFNk%w1VK4v?0QUd@y;cI*rIqiV0rS3F$97H4jsW=Z_UyGM{_~yk-T=dM z0^y%(*pVLk-BJJl=**b__Rj$D(ZBKHCi3GY`|8frZ~(7T8}hz;`{H@sp?}VXYUZo} z@yP)C?g8hVLf3^W_~D`H%f-cv8R)Gf^0-C*-8#%>0P?(a|N6JNaUj-r9{S&M|Lq{} zyd&(kA@0!-%#IWJ*i_VhPW|{Q-FFz@!W_(*Gynhh_}Xmk*DU||jog|S|NqSIyb=H1 z0l9J)y=wsf{}c7diM4AP+na#ej2F<1a`(?j*Q_+jfFAPAZSb}L<*9wLV;bwu%=Xp* z+nEE}jS|$40O-R5(1aM*V*6ta`!DRU7v;O=R(~lYG zlpf4{MfA>c{M$_b%@6)sg_$ zlMny=jO@KQ_1^&h*#*^}0N$Jj!(|27gGt?%6YS2#|NpiB{HE{T&j0WC`qKs7c^S-l zN!*4?@5N-+mKwfV0?dj9@wP7g-%#-0Gu@?z(2N$|lo`*0ANREY;esFSr2zllYwXd} z|H1(L^!nq28s)2j>6stuw=?OlChXTPw`(8i$Ogb;1=xlKtx_SpVix?>73!Qh#&l2S zoJz@iQ2+n`A^8LW2LS&7EC2ui05AX$000R80RIWx6roR*I(3L`OSDO#!+)C+Z97<} zN;HNK2TCM{&|-v!4`=1dw(kNbP8U3=C^Rc%p=?}E2oaKUC6r(E)Z%LUHczEv8S3UjH$X36xPJjfq(O=rH3UkejX^-i46gyL1PRIp$uWXp z(v(oP%x#MkL8?f22F(pYH59y*Y?-zV-YXq#Ry4Y|LfNSBiegs&u z1TOq|dGlS-&3*Y3Wgdw z$cF+^l)(;&75LJ_GkmZx%rMPtumc}H_#lUYF2X3|Fs|6xLyk*?XpAvF&ghC9(hP}5 zkre==4WhpeUn`W-^T%%;;i+1wa(w zj5FWBfCdMxtg{XqPv}w#sG^d;YAOVWob~|(uEIKMsV_WnNC=yZ69*!5a z{euN63?#s=yYM2?jS)coGYb*@BoHSs zF*Cm;5kSBKVZren9(Mq8600zbQwU-#0tzVh_~QgfI8CDsG&5U~39uPKGz}~~gW@yL I0tEyBJKXdL#{d8T diff --git a/images/trustycolor.gif b/images/trustycolor.gif deleted file mode 100644 index bbcd9ff124a6183ee1e91e9ddd8d3e6a2fb5ee3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 829 zcmV-D1H$}ANk%w1VJZL=0OkMytyTc&$Gh;q0NtDb?!8pglzaB+=k>xm|L>3W;Q+a9 z70{PC|Nq0zXAJqj3A@C*Y7E|M#}JZvg-0Jm0!E*lHE^$b;jiCic4- z|J@q7VgUdD>igWM@!&1iZWH+0ciyi6_04wkr3KrxAHio6_s|;BjT**yD*yQ;`}Y{- zs~XO91ONZu=$0?RWE1DE4gA_V(tIQS=4bZg0OFu@_r?JC$8OuRFZ$+{#cKfn`v>jJ zz5CHE|I7f`g8;{P4#jdK`{jn`rvSxb0RQCx=c_rbQxV*GBfo11|M`^o?dRjL0M}^% z_rzP*oH75#4*k;-;-h%^w*by^Cg_tI_0(to?rpko1Mk+o|JMNj-~iW|c>n+L|LO(b zo_O`v3;*O9|HAcA1iT~$9^v;FFY7_te8R)Mg)Nlahm^;Q~ z6aL{s)OjlEvoPI$D(1BS&weWZ|Nj6000000000000000000000A^8LW2LO2hEC2ui z04e|!000O7fO&#VHyBS(7-3CDGag@=iYjazmw86O`HadbYJo1LGbql}uI zo}i+tPdP6hv>q>P4XInPv$eOmg1fS{wz#8BN>B_G6a;F_3?x=f$jZ#l(9+b&%gxUe z(bH5{Ob7^AK_W~+SFH=IH9|?p`4W4r*knqajO;6iB3$kn=C#z=8)8 zE^H`}ph1KR<-qyz2F;oob1cYMvVlw$BO5z@3^}so$&?;JiX>?g9PShaTH>b2@spkld(DN-g% z2Pa3G;zDo&W$OiKGaFM_bhzmL-u&}`+fS}Q(Pp4kp`Za0Os8zFe{Tj~*8$Ej17@>l9@87|P z7jNXlH*n#^jSDj1r40`rCklj~MBO@e?UV9!zn*=2`19z~t6$H)z5Dm@oXg9oo4Z@sn0>BqCV*SG1ufB*j5y^;?{8SdV_`|*p#kA5FWyp8wtBT`vx*f4G|Y({@ZWq5q9b7`To3F_5Z_?Kd+|zxS#R%tmpHi z=6~-RfB*9O``v^aJFRc-^*DO;=<9t9&##pKd{Y1Aiu12$t=Bh-{kz8S?@i~uvn@}r zbpLshdvCATmwWZEjwpV)5%KSF;In7XKA+}%x{cxEjnXeC8GbyQ^6ypkzjsr8~7Djf45C$EPLqKuD zz1D)HCMpn4t8uy@N;2NiQd3u>%*YVvEm?gGDNP+4MtxbTlsT@aSe}XOIYRWM`Fh OXl7fwpxIS{!5RSWcmR3; diff --git a/images/url.gif b/images/url.gif deleted file mode 100644 index 3577a2daa15aa85361d5c25b398c53d2ea94cc59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1151 zcmciB?K9g40KoB7W2JXhb=Eq&b!vTZtKLROTV9aOb2Ib&Fx(`vxK!eVkf5HDG--qg z$q>~jm3T}M`7tVlAdyAlF^`faXg!_Mv+3Hsu4=3+4hRh?W_UER4o&s7qu=Vj6G zh#}KJ!5Ff|pi8DD7Er3thJN@kkWHkr7mS%g1V?6wi;b&PKkU;9X7`oB%<(&LLe-oq zZ8Ae35GZ&1GDK=pCqep3lBuDWDhRZ-rbPY%tgK9XG+s2X46hEFn^oYZR(dzN2iuzw z;SuAn$7aku0gG595;>`Tg&Jnl|0pVXOleRs%Pftpa<0g-5dU0GCX@L*zU(h?^IKtL zTWY#8e|${btyGklDp5Hotnej~QP`*+)9tGwanN`F9FAMK(LFIc$8+3+iK0~@Yoh#q zQB3rcSr(fmc_ZMO>q->)>;qu(^~&I)kjiR~E3NnQ^M@MY*d;t50`i7*J^EV3)@(5e zAF@Q_bOIQ$ggTtvvENbGOG5IKVk^5Cmig=)Y`=*WpiKkB;$JP8)YQ}zSX$n~3+>+E zgzh;Ojm@7%k!Ey4s}aUZs*#gv+7TQDw|8u+Q!r%H^5cL1<|!EAg*C=4ex)ceYxbAH0( z@xDRd7Efpha&(V&h{n%Fn<*rDAznp{7T#s#+it6**izIgi|c1SITb zqv{Qi1*m2$Qo5C=+n)x^nz)iC<&L_9Qi>MO{btQiZ%O5u&1(nx#NO2yTnvtYE1lMy zoScCEudaLmpE?6t19^S|KRp4mI{}T@Z_e7C8HgRl*?)XSQ%I-{l81*&H(kDob4##? zA2GjRoF_DgU+_VMbwq-l3vIljoaHxZFMow(DJA#2-EhmODN%yW9+2C&1bNU zQ1Kn@ECXJ~aBBs3{UF46Fh8K&=@-AeG7XQfBLydUxbmZ1k|3D#O(D(QPd~<?ebGkvb zf!wIV2#>%9TW{Ch#~w%0&)Es%3GuMiHW?k{TYl@FujL%k_PPPe3AB=1Z#mSb=SH>5 zpSq`wx_GUV&r*H5(ALy-uPJElHB>>Nhfik6g>0qE_a5m)>esgo!$+r>@WtY6H)nUq zr6RxKl;ZlZvp&lh)Pndxv~% z&aX@Yl7J8ZkmPcBn~d!6?^Yxd4u>OK8{zO)WOF67xgFft4uwL&^^MilHF8b2vJxZ% zbAiBGFo3W6-Q)|%_hNig1Exiji!edjp7GUdw3tMnwR@c0RSe@tj zurVj5v0(Ekwz!3I+~$dpp$|1XNrYiEFXE`$ggT6ZCP7doVe$8VDp4Y$*4Q$oG zhz6d6v}Q8z41x?w$fbtNv(HUIC2d)Ce_ctl&puMkTGeXIKJx@qaaHPh zl?pS>^vTus=^2A!8ktlWP4d6N3A0p&j8AA$8Pzs^O)Aq%WO}WXEg9G8q<<+TJ)l?% zif2I(92G($kyr$RB2X+6fx;a{LLoRZsuT!>qXOaZsCsBb!GETf57YbkQxk)GX17q!s^(yntYokOyY;^y|DvDV_|R{q$%oc^YAF12EqnkS%U@ESkt zxqXaTf3oM-M9xn@XYB#TkNaA_fA?`sQrnf}t}6-c-zEO}Z7S{S>>eX!t17(M+eK&|^<=6;#}%_+dPE3Rojui%|ME27G}Xi7dvtEv(f-MjzV zp_0ReR}U1aFYo`Q@QY|?!^^R!n7=ioPEq&fo{7HLlwSX7N8b5@qi>W&-EMy+zpS*C zfk(ys5wEMcx|oH$dE_$xdSh`~?47y`)kyU*>I25n9~AE=oKB5yISB8oP(AB;_3gr% z{!Fx}KCU69J1=qh_bNl?$Mr<%ApXzDp7$6R8P#R3^6XFQtZ6BAjE#gt*OMA=)~3@k o&a}UTqo-Nd5_5hImt@uME{)2#J8@_Cr4ora?L+~ELIIBa2XBu}0ssI2 diff --git a/images/video.gif b/images/video.gif deleted file mode 100644 index bd7f7531ea7c1fb1218ed5acf9ffad372276826b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1508 zcmeH`?NibR0LOnI&k8|mAqxYfp`CTNWLx2EK#0bA&>l8zEFr0LLTEY)6bto-^Z=$F zExl=?pkYo2ruk4T5Rpi7T1wZ$DO=XLU0t>;SJxd|`y2Lh-xr^k-xr_nebct`H*ONg z09^Z#Po6yKe-KJYNGL1UdT-B_)%G|hU#Uw= z^Yac4js#Y%rhX!B?(ZMz>gtLw91Dd)qVlGg7*az+!`^*jp{jLeX2xvpdj9;m-g-|U z5a{%E-Q5F%Qg4;zuE*n9T6)c5v4(~Q$s$K_adBN!XCN@$Jm5Zb=+Kexlx=NoI2_KP z*YDextyWi#kKgtC{n6qZZ{NP#wQILRaf+L7D$#cooa{MfnoLSc0ztk1!BVx+^ts|@ zd+(JR%dk*bJooHvU*Gjo#bKFDdC}%Pefo#_`DY^0VGIT{7YfbJK0c!@+k3Rr<8~Hl zTLOWZ>(|FTo?qxvZ&Q=S=ezT*thl5^f2FUl(`u=1woAcF`}a$2gWii5uM`z&ckawi zIXYHYAkP(lbN;;fgtEZl@XF;Cr#fa+@+_`LA^&_RRppgRr4Gl>APANpFQHK>-QA8C zFBZqgXU?5#)a#8WPSkp)7jkkGdR_ToZ}&z?t5A3V>g7I4VNeA@-bUy+gCYK zwX*0R!~f3pKmJPt)Hg5)5~v0e-{5H(_kITla9yzp0E9O?{9lo+HKf;-3r5&&csdeO27`M5f&$At62)_(T%-Xn;= zi9}nm4OND8VQH7wybf`4-5vbqoryA$-HgyjsSuPmFA0;)SVnuUfpm_(C;7`P0w24+ zzNL{TR0kp01dY9hyg@{d#Nh99+}P-AnX^b@(8M{mVn73|yn0Z9j6<+Bnuz18h?B^i znh6~OYNcoZhK7J3G6pDaLa~qvg|3w?XnCcJM@CU`K~7ls$1pJmDtt)QM6Zjd=%@&* z2m)KrI>5myjM+MpLh0hfLX|;ixHf{uhwPGMxDE6?R3?V@BO#2iJ$-_`d@~UbLf)u+ z&T#&=iLar82z+KNjTdx=X(X%>qBIc?=0@GDff_y~I!9NRV3;nP@*SWYu|jC&fw5Ak}cGc$8}tx!U%t4$ob5!6PMX c2s}o}gCWB4Y>EbcZ72xYlFnF{$p(`D28#X!;s5{u diff --git a/images/ym.gif b/images/ym.gif deleted file mode 100644 index fe1dc1099b2f1a44cb4a21c503fa8d9fdd96905d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1036 zcmZ?wbhEHb6k-r!_|Cwvf{VemW5uuIs_o0Ok7s#&dU){5w%PZ0#cf~Obs%ANQ|1*58^Zxbv$hSrHzt1RrpOXCg`nu2AW`|B#T=3-l`{U8|lA>2> zy07O}|KG0i|G(C|dvgE(r~U7UdmJeE@15(v8l5lK&b}^jc)6_Y|9|sG@hbP~9Nt|$ zdBu(4`I>3}-=Fw-LGsg)4PWmEJ@1Nt+Zgc3jeFwu`0ux*|KC*neqrDD7pJ~W&H3~7 znQPCgQ?Y6f{e}KKcl`g3kV&9C!NBp7L7h{^ zBjCYIS(d_@h#eaqEO7|9#iO&Cp;^Se=$g)=g-05MHNz4FLKZ$~lH;3P5_7|8ISZS; zmdqhTj_9DD%PrDV9loTnE*TEwP<+MwO>Fi|cVB%{ssZlt|$l}|~;Q!;wMuR68&g<9) z{P7HFoWSnp-1Mhs5=&!;{ET{o7Y#4c=NW3xT5{o%$6*%6N%hBmCMi1$Ix;BiSvhG- l!(8i>LuXzXJ!!b&$=Y#ZhSAca9ru}AXYAP6nBc%*4FK9VhX?=w diff --git a/include/notification.inc.php b/include/notification.inc.php index 8d4c5166..f28fd1a2 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -68,22 +68,22 @@ function yogurt_iteminfo($category, $item_id) $owner = new \XoopsUser(); $identifier = $owner::getUnameFromId($result_array['uid_owner']); $item['name'] = $identifier . "'s Videos"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/seutubo.php?uid=' . $result_array['uid_owner']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/video.php?uid=' . $result_array['uid_owner']; return $item; } if ('Note' == $category) { - $sql = 'SELECT Note_id, Note_from, Note_to, Note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE Note_from = ' . $item_id . ' LIMIT 1'; + $sql = 'SELECT note_id, note_from, note_to, note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE note_from = ' . $item_id . ' LIMIT 1'; $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** * Let's get the user name of the owner of the album */ $owner = new \XoopsUser(); - $identifier = $owner::getUnameFromId($result_array['Note_from']); + $identifier = $owner::getUnameFromId($result_array['note_from']); $item['name'] = $identifier . "'s Notes"; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['Note_from']; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/notebook.php?uid=' . $result_array['note_from']; return $item; } diff --git a/include/search.inc.php b/include/search.inc.php index 825e4e21..14ab687c 100644 --- a/include/search.inc.php +++ b/include/search.inc.php @@ -70,7 +70,7 @@ function yogurt_search($queryarray, $andor, $limit, $offset, $userid) while (false !== ($myrow = $xoopsDB->fetchArray($result))) { if (0 != $userid) { if ($limit > 5) { - $ret[$i]['image'] = "images/search.png'>
    " . '
    " . ' '; } } else { - $ret[$i]['image'] = "images/search.png'>
    " . "
    " . "addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); // -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions $xoopsTpl->assign('allow_friends', $controller->checkPrivilege('friends')); -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilege('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilege('Notes')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilege('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilege('pictures')); $xoopsTpl->assign('allow_videos', $controller->checkPrivilege('videos')); diff --git a/language/english/mail_template/scrap_newscrap_notify.tpl b/language/english/mail_template/scrap_newscrap_notify.tpl index 86d92058..9136f7a0 100644 --- a/language/english/mail_template/scrap_newscrap_notify.tpl +++ b/language/english/mail_template/scrap_newscrap_notify.tpl @@ -3,7 +3,7 @@ Hi {X_UNAME}, You've asked to be notified when {X_OWNER_NAME} receives a new Note in their Notebook, well they've just received one. Check their Notebook here: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} If you don't want to receive anymore of these notifications, please change your subscription here: {X_UNSUBSCRIBE_URL} diff --git a/language/english/mail_template/video_newvideo_notify.tpl b/language/english/mail_template/video_newvideo_notify.tpl index 483a211d..291a2e96 100644 --- a/language/english/mail_template/video_newvideo_notify.tpl +++ b/language/english/mail_template/video_newvideo_notify.tpl @@ -3,7 +3,7 @@ Hi {X_UNAME}, You've asked to be notified when {X_OWNER_NAME} submits a new video to their profile, well they've just submitted one. Check their videos here: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} If you don't want to receive anymore of these notifications, please change your subscription here: -{X_UNSUBSCRIBE_URL} \ No newline at end of file +{X_UNSUBSCRIBE_URL} diff --git a/language/english/main.php b/language/english/main.php index 67e9ad71..c5dee8be 100644 --- a/language/english/main.php +++ b/language/english/main.php @@ -118,7 +118,7 @@ //mainvideo.php define('_MD_YOGURT_SETMAINVIDEO', 'This video is selected on your front page from now on'); -//seutubo.php +//video.php define('_MD_YOGURT_YOUTUBECODE', 'YouTube code or URL'); define('_MD_YOGURT_ADDVIDEO', 'Add video'); define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Add favourite videos'); @@ -196,7 +196,7 @@ define('_MD_YOGURT_UNDERLINE', 'underline'); define('_MD_YOGURT_NONOTESYET', 'No Notes created in this Notebook yet'); -//submit_Note.php +//submitNote.php define('_MD_YOGURT_NOTE_SENT', 'Thanks for participating, Note sent'); //delete_Note.php diff --git a/language/german/mail_template/scrap_newscrap_notify.tpl b/language/german/mail_template/scrap_newscrap_notify.tpl index 2fa7608e..235d558d 100644 --- a/language/german/mail_template/scrap_newscrap_notify.tpl +++ b/language/german/mail_template/scrap_newscrap_notify.tpl @@ -3,10 +3,10 @@ Hallo {X_UNAME}, Du wolltest benachrichtigt werden wenn {X_OWNER_NAME} einen neuen Eintrag im Gästebuch erhält. Besuche das Gästebuch hier: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} Willst Du keine weiteren Benachrichtigungen erhalten, ändere bitte deine Benachrichtigungseinstellungen hier: {X_UNSUBSCRIBE_URL} Viel Spaß noch -wünscht das Team von {X_SITEURL} \ No newline at end of file +wünscht das Team von {X_SITEURL} diff --git a/language/german/mail_template/video_newvideo_notify.tpl b/language/german/mail_template/video_newvideo_notify.tpl index 8bccd734..cab31fae 100644 --- a/language/german/mail_template/video_newvideo_notify.tpl +++ b/language/german/mail_template/video_newvideo_notify.tpl @@ -3,10 +3,10 @@ Hallo {X_UNAME}, Du wolltest benachrichtigt werden wenn {X_OWNER_NAME} ein neues Video in seinem Profil veröffentlicht. Hier kannst Du das Video ansehen: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} Willst Du keine weiteren Benachrichtigungen erhalten, ändere bitte deine Benachrichtigungseinstellungen hier: {X_UNSUBSCRIBE_URL} Viel Spaß noch -wünscht das Team von {X_SITEURL} \ No newline at end of file +wünscht das Team von {X_SITEURL} diff --git a/language/german/main.php b/language/german/main.php index 1602a443..e35f7b5b 100644 --- a/language/german/main.php +++ b/language/german/main.php @@ -118,7 +118,7 @@ //mainvideo.php define('_MD_YOGURT_SETMAINVIDEO', 'Dieses Video erscheint ab sofort auf deiner Profilseite'); -//seutubo.php +//video.php define('_MD_YOGURT_YOUTUBECODE', 'YouTube-Link oder URL'); define('_MD_YOGURT_ADDVIDEO', 'Video hinzufügen'); define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Bevorzugtes Video hinzufügen'); @@ -196,7 +196,7 @@ define('_MD_YOGURT_UNDERLINE', 'Unterstrichen'); define('_MD_YOGURT_NONOTESYET', 'Keine Gästebucheinträge vorhanden, hier kannst Du noch erster sein!'); -//submit_Note.php +//submitNote.php define('_MD_YOGURT_NOTE_SENT', 'Danke für die Teilnahme, Gästebucheintrag wurde gesendet'); //delete_Note.php diff --git a/language/persian/mail_template/scrap_newscrap_notify.tpl b/language/persian/mail_template/scrap_newscrap_notify.tpl index 86d92058..9136f7a0 100644 --- a/language/persian/mail_template/scrap_newscrap_notify.tpl +++ b/language/persian/mail_template/scrap_newscrap_notify.tpl @@ -3,7 +3,7 @@ Hi {X_UNAME}, You've asked to be notified when {X_OWNER_NAME} receives a new Note in their Notebook, well they've just received one. Check their Notebook here: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} If you don't want to receive anymore of these notifications, please change your subscription here: {X_UNSUBSCRIBE_URL} diff --git a/language/persian/mail_template/video_newvideo_notify.tpl b/language/persian/mail_template/video_newvideo_notify.tpl index 483a211d..291a2e96 100644 --- a/language/persian/mail_template/video_newvideo_notify.tpl +++ b/language/persian/mail_template/video_newvideo_notify.tpl @@ -3,7 +3,7 @@ Hi {X_UNAME}, You've asked to be notified when {X_OWNER_NAME} submits a new video to their profile, well they've just submitted one. Check their videos here: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} If you don't want to receive anymore of these notifications, please change your subscription here: -{X_UNSUBSCRIBE_URL} \ No newline at end of file +{X_UNSUBSCRIBE_URL} diff --git a/language/persian/main.php b/language/persian/main.php index 6e16b372..5da1ff51 100644 --- a/language/persian/main.php +++ b/language/persian/main.php @@ -118,7 +118,7 @@ //mainvideo.php define('_MD_YOGURT_SETMAINVIDEO', 'This video is selected on your front page from now on'); -//seutubo.php +//video.php define('_MD_YOGURT_YOUTUBECODE', 'YouTube code or URL'); define('_MD_YOGURT_ADDVIDEO', 'Add video'); define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Add favourite videos'); @@ -196,7 +196,7 @@ define('_MD_YOGURT_UNDERLINE', 'underline'); define('_MD_YOGURT_NONOTESYET', 'No Notes created in this Notebook yet'); -//submit_Note.php +//submitNote.php define('_MD_YOGURT_NOTE_SENT', 'Thanks for participating, Note sent'); //delete_Note.php diff --git a/language/portuguesebr/mail_template/scrap_newscrap_notify.tpl b/language/portuguesebr/mail_template/scrap_newscrap_notify.tpl index a0f356d5..3f74e298 100644 --- a/language/portuguesebr/mail_template/scrap_newscrap_notify.tpl +++ b/language/portuguesebr/mail_template/scrap_newscrap_notify.tpl @@ -3,7 +3,7 @@ Olá {X_UNAME}, Você pediu para ser avisado quando {X_OWNER_NAME} receber um novo recado em sua Note, assim que tiver recebido pelo menos uma. Confira aqui os seus Notebook: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} Se você não quer mais receber este aviso, queira mudar sua inscrição aqui: {X_UNSUBSCRIBE_URL} diff --git a/language/portuguesebr/mail_template/video_newvideo_notify.tpl b/language/portuguesebr/mail_template/video_newvideo_notify.tpl index b3ff287a..369adca2 100644 --- a/language/portuguesebr/mail_template/video_newvideo_notify.tpl +++ b/language/portuguesebr/mail_template/video_newvideo_notify.tpl @@ -3,7 +3,7 @@ Olá {X_UNAME}, Você pediu para ser avisado quando {X_OWNER_NAME} apresentar um novo vídeo no seu perfil, assim que tiver apresentado pelo menos um. Confira aqui os seus vídeos: -{X_SITEURL}/modules/yogurt/seutubo.php?uid={X_OWNER_UID} +{X_SITEURL}/modules/yogurt/video.php?uid={X_OWNER_UID} Se você não quer mais receber este aviso, queira mudar sua inscrição aqui: -{X_UNSUBSCRIBE_URL} \ No newline at end of file +{X_UNSUBSCRIBE_URL} diff --git a/language/portuguesebr/main.php b/language/portuguesebr/main.php index 6a0e19e4..8a05db8d 100644 --- a/language/portuguesebr/main.php +++ b/language/portuguesebr/main.php @@ -133,7 +133,7 @@ //mainvideo.php define('_MD_YOGURT_SETMAINVIDEO', 'This video is selected on your front page from now on'); //GibaPhp -//seutubo.php +//video.php define('_MD_YOGURT_YOUTUBECODE', 'Código do YouTube ou URL'); //GibaPhp define('_MD_YOGURT_ADDVIDEO', 'Incluir video'); //GibaPhp define('_MD_YOGURT_ADDFAVORITEVIDEOS', 'Adicione seus vídeos favoritos'); //GibaPhp @@ -211,7 +211,7 @@ define('_MD_YOGURT_UNDERLINE', 'Sublinhar'); //GibaPhp define('_MD_YOGURT_NONOTESYET', 'Nenhum Recado foi criado ainda neste Note'); //GibaPhp -//submit_Note.php +//submitNote.php define('_MD_YOGURT_NOTE_SENT', 'Obrigado pela sua participação, Note enviado'); //GibaPhp //delete_Note.php diff --git a/mainvideo.php b/mainvideo.php index de044a89..ca93f22f 100644 --- a/mainvideo.php +++ b/mainvideo.php @@ -30,7 +30,7 @@ /** * Creating the factory loading the video changing its caption */ -$videoFactory = new Yogurt\SeutuboHandler($xoopsDB); +$videoFactory = new Yogurt\VideoHandler($xoopsDB); $video = $videoFactory->create(false); $video->load($cod_img); $video->setVar('main_video', 1); @@ -42,9 +42,9 @@ if ($uid == $video->getVar('uid_owner')) { if ($videoFactory->unsetAllMainsbyID($uid)) { if ($videoFactory->insert($video)) { - redirect_header('seutubo.php', 2, _MD_YOGURT_SETMAINVIDEO); + redirect_header('video.php', 2, _MD_YOGURT_SETMAINVIDEO); } else { - redirect_header('seutubo.php', 2, _MD_YOGURT_NOCACHACA); + redirect_header('video.php', 2, _MD_YOGURT_NOCACHACA); } } else { echo 'nao deu certo'; diff --git a/makefriends.php b/makefriends.php index efd8d484..72e7c79b 100644 --- a/makefriends.php +++ b/makefriends.php @@ -62,7 +62,7 @@ } else { if (0 == $friendship_level) { $friendpetitionFactory->deleteAll($criteria); - redirect_header(XOOPS_URL . '/modules/yogurt/seutubo.php?uid=' . $uid, 3, _MD_YOGURT_FRIENDSHIPNOTACCEPTED); + redirect_header(XOOPS_URL . '/modules/yogurt/video.php?uid=' . $uid, 3, _MD_YOGURT_FRIENDSHIPNOTACCEPTED); } redirect_header(XOOPS_URL . '/modules/yogurt/index.php?uid=' . $uid, 3, _MD_YOGURT_NOCACHACA); } diff --git a/notebook.php b/notebook.php index d68dca10..d0efd0d7 100644 --- a/notebook.php +++ b/notebook.php @@ -26,30 +26,30 @@ $nbSections = $controller->getNumbersSections(); //$controller->renderFormNewPost($xoopsTpl); -$criteria_uid = new \Criteria('Note_to', $controller->uidOwner); +$criteria_uid = new \Criteria('note_to', $controller->uidOwner); $criteria_uid->setOrder('DESC'); $criteria_uid->setSort('date'); /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/search_tribe.php b/search_tribe.php index a4e01f25..6bf076e3 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -54,15 +54,15 @@ $i++; } -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/js/jquery.tabs.pack.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.tabs.pack.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); /** * Criando a barra de navegao caso tenha muitos amigos @@ -71,7 +71,7 @@ $barrinha = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/searchmembers.php b/searchmembers.php index f222de39..ac6a68c5 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -447,23 +447,23 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/sql/mysql.sql b/sql/mysql.sql index 82412182..86b5ae89 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -36,7 +36,7 @@ CREATE TABLE `yogurt_visitors` ( ) ENGINE = MyISAM; -CREATE TABLE `yogurt_seutubo` ( +CREATE TABLE `yogurt_video` ( `video_id` INT(11) NOT NULL AUTO_INCREMENT, `uid_owner` INT(11) NOT NULL, `video_desc` TEXT NOT NULL, @@ -75,13 +75,13 @@ CREATE TABLE `yogurt_tribes` ( ENGINE = MyISAM; CREATE TABLE `yogurt_notes` ( - `Note_id` INT(11) NOT NULL AUTO_INCREMENT, - `Note_text` TEXT NOT NULL, - `Note_from` INT(11) NOT NULL, - `Note_to` INT(11) NOT NULL, + `note_id` INT(11) NOT NULL AUTO_INCREMENT, + `note_text` TEXT NOT NULL, + `note_from` INT(11) NOT NULL, + `note_to` INT(11) NOT NULL, `private` TINYINT(1) NOT NULL, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`Note_id`) + PRIMARY KEY (`note_id`) ) ENGINE = MyISAM; diff --git a/submit_scrap.php b/submitNote.php similarity index 90% rename from submit_scrap.php rename to submitNote.php index 5af573fc..e8e0779b 100644 --- a/submit_scrap.php +++ b/submitNote.php @@ -40,12 +40,12 @@ $myts = MyTextSanitizer::getInstance(); $Notebook_uid = $_POST['uid']; -$Note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1); +$note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1); $mainform = (!empty($_POST['mainform'])) ? 1 : 0; $Note = $NotesFactory->create(); -$Note->setVar('Note_text', $Note_text); -$Note->setVar('Note_from', $xoopsUser->getVar('uid')); -$Note->setVar('Note_to', $Notebook_uid); +$Note->setVar('note_text', $note_text); +$Note->setVar('note_from', $xoopsUser->getVar('uid')); +$Note->setVar('note_to', $Notebook_uid); $NotesFactory->insert($Note); $extra_tags['X_OWNER_NAME'] = $xoopsUser::getUnameFromId($Notebook_uid); $extra_tags['X_OWNER_UID'] = $Notebook_uid; diff --git a/templates/yogurt_album.tpl b/templates/yogurt_album.tpl index 6bc2708f..376d53d7 100644 --- a/templates/yogurt_album.tpl +++ b/templates/yogurt_album.tpl @@ -30,27 +30,27 @@
    <{$token}> - +
    <{$token}> - +
    <{$token}> - +
    <{$token}> <{ if $pics_array[i].private == 1}> - + <{else}> - + <{ /if }>
    <{ if ($pics_array[i].private == 1) }> diff --git a/templates/yogurt_audio.tpl b/templates/yogurt_audio.tpl index 5bce0ea3..c1bae026 100644 --- a/templates/yogurt_audio.tpl +++ b/templates/yogurt_audio.tpl @@ -76,7 +76,7 @@
    <{$token}> - +
    diff --git a/templates/yogurt_configs.tpl b/templates/yogurt_configs.tpl index 9c05a657..7465eb66 100644 --- a/templates/yogurt_configs.tpl +++ b/templates/yogurt_configs.tpl @@ -34,7 +34,7 @@

    checked="checked"<{/if}>>


    <{ /if }> -<{ if $allow_Notes!=-1 }> +<{ if $allow_notes!=-1 }>
    <{$lang_configNotes}> diff --git a/templates/yogurt_edittribe.tpl b/templates/yogurt_edittribe.tpl index 39e90ce3..dd9a4607 100644 --- a/templates/yogurt_edittribe.tpl +++ b/templates/yogurt_edittribe.tpl @@ -98,12 +98,12 @@

    <{if $tribe_members[i].isOwner }> - <{$lang_owner}> + <{$lang_owner}> <{else}>
    - +
    <{ /if }> diff --git a/templates/yogurt_fans.tpl b/templates/yogurt_fans.tpl index 82738e09..fe970f89 100644 --- a/templates/yogurt_fans.tpl +++ b/templates/yogurt_fans.tpl @@ -6,14 +6,14 @@ <{section name=i loop=$friends}>
    "> -

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    +

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    <{if $isOwner }>
    - +
    - +
    diff --git a/templates/yogurt_friends.tpl b/templates/yogurt_friends.tpl index e8a21cfb..c91893e2 100644 --- a/templates/yogurt_friends.tpl +++ b/templates/yogurt_friends.tpl @@ -4,14 +4,14 @@ <{if $lang_nofriendsyet==""}> <{section name=i loop=$friends}> diff --git a/templates/yogurt_index.tpl b/templates/yogurt_index.tpl index 92471f3f..e961a67b 100644 --- a/templates/yogurt_index.tpl +++ b/templates/yogurt_index.tpl @@ -39,7 +39,7 @@
    <{$lang_askusertobefriend}> -<{$token}> +<{$token}>
    @@ -47,12 +47,12 @@ <{ /if }> <{ if $allow_friends }>
    -

    <{$lang_fans}> ( <{$nb_fans}> ) -| <{$lang_trusty}>

      

    +

    <{$lang_fans}> ( <{$nb_fans}> ) +| <{$lang_trusty}>

      

    -| <{$lang_cool}>

      

    +| <{$lang_cool}>

      

    -| <{$lang_sexy}>

      

    +| <{$lang_sexy}>

      

    <{/if}> @@ -67,7 +67,7 @@ <{if $avatar_url!="" && $avatar_url!="blank.gif" }> <{ else }> - + <{if $isOwner}>

    <{$lang_selectavatar}> @@ -101,28 +101,28 @@ <{ if $allow_profile_general==1}>

    -

    <{$lang_detailsinfo}> <{ if $isOwner==1 }> <{/if}>

    -

    <{$lang_uname}>:<{$user_uname}>

    -

    <{$lang_realname}>:<{$user_realname}>

    -

    <{$lang_location}>:<{$user_location}>

    -

    <{$lang_occupation}>:<{$user_occupation}>

    -

    <{$lang_interest}>:<{$user_interest}>

    -

    <{$lang_extrainfo}>:

    +

    <{$lang_detailsinfo}> <{ if $isOwner==1 }> <{/if}>

    +

    <{$lang_uname}>:<{$user_uname}>

    +

    <{$lang_realname}>:<{$user_realname}>

    +

    <{$lang_location}>:<{$user_location}>

    +

    <{$lang_occupation}>:<{$user_occupation}>

    +

    <{$lang_interest}>:<{$user_interest}>

    +

    <{$lang_extrainfo}>:

    <{$user_extrainfo}>

    <{ /if }> <{ if $allow_profile_contact==1}>
    -

    <{$lang_contactinfo}> <{ if $isOwner==1 }> <{/if}>

    -

    <{$lang_website}>:<{$user_websiteurl}>

    -

    <{$lang_email}>:<{ mailto address=$user_email encode="javascript"}>

    +

    <{$lang_contactinfo}> <{ if $isOwner==1 }> <{/if}>

    +

    <{$lang_website}>:<{$user_websiteurl}>

    +

    <{$lang_email}>:<{ mailto address=$user_email encode="javascript"}>

    <{ if $isanonym!=1 && $isOwner!=1 }> -

    <{$lang_privmsg}>:Send Private Message to suico

    +

    <{$lang_privmsg}>:Send Private Message to suico

    <{ /if }> -

    <{$lang_icq}>:<{$user_icq}>

    -

    <{$lang_aim}>:<{$user_aim}>

    -

    <{$lang_yim}>:<{$user_yim}>

    -

    <{$lang_msnm}>:<{$user_msnm}>

    +

    <{$lang_icq}>:<{$user_icq}>

    +

    <{$lang_aim}>:<{$user_aim}>

    +

    <{$lang_yim}>:<{$user_yim}>

    +

    <{$lang_msnm}>:<{$user_msnm}>

    <{ /if }> @@ -131,11 +131,11 @@ <{ if $allow_profile_stats}>

    <{$lang_statistics}>

    -

    <{$lang_membersince}>:<{$user_joindate}>

    -

    <{$lang_rank}>:<{$user_rankimage}> <{$user_ranktitle}>

    -

    <{$lang_posts}>:<{$user_posts}>

    -

    <{$lang_lastlogin}>:<{$user_lastlogin}>

    -

    <{$lang_signature}>:

    +

    <{$lang_membersince}>:<{$user_joindate}>

    +

    <{$lang_rank}>:<{$user_rankimage}> <{$user_ranktitle}>

    +

    <{$lang_posts}>:<{$user_posts}>

    +

    <{$lang_lastlogin}>:<{$user_lastlogin}>

    +

    <{$lang_signature}>:

    <{$user_signature}>

    @@ -150,7 +150,7 @@

    - + <{$module.name}>

    @@ -198,7 +198,7 @@ <{$mainvideodesc}>

    <{ else }> - + <{if $isOwner}>

    <{$lang_selectmainvideo}> @@ -219,7 +219,7 @@ <{if $nb_friends==0}>

    <{$lang_nofriendsyet}>

    <{ /if }> <{section name=i loop=$friends}> <{/section}>

    diff --git a/templates/yogurt_navbar.tpl b/templates/yogurt_navbar.tpl index 6e5defd4..7e864777 100644 --- a/templates/yogurt_navbar.tpl +++ b/templates/yogurt_navbar.tpl @@ -24,22 +24,22 @@ <{$section_name}>

    - <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}> + <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}>

    diff --git a/templates/yogurt_notebook.tpl b/templates/yogurt_notebook.tpl index c180b5c6..ffce7194 100644 --- a/templates/yogurt_notebook.tpl +++ b/templates/yogurt_notebook.tpl @@ -2,7 +2,7 @@ <{ if $isanonym!=1 }>
    -
    +

    <{$token}> @@ -31,25 +31,25 @@

     <{$Notes[i].uname}>

    - <{ if $Notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> + <{ if $Notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> <{ if $isOwner==1}>

    - - + +

    <{ /if}>
    -

    <{$section_name}> +

    <{$section_name}>  <{$Notes[i].text}>

    <{ if $isOwner==1}>
    -
    diff --git a/templates/yogurt_tribe.tpl b/templates/yogurt_tribe.tpl index 8584b984..45f8602b 100644 --- a/templates/yogurt_tribe.tpl +++ b/templates/yogurt_tribe.tpl @@ -13,11 +13,11 @@ <{ if $isanonym!=1 }> <{if $memberOfTribe ==1}> - +
    <{ else}>
    - +
    <{/if}> <{/if}>

    @@ -29,17 +29,17 @@
    ">

    <{$tribe_members[i].uname}> -<{if $tribe_owneruid==$tribe_members[i].uid}><{$lang_owner}><{/if}> +<{if $tribe_owneruid==$tribe_members[i].uid}><{$lang_owner}><{/if}>

    - <{ if $tribe_members[i].avatar=="blank.gif"}><{else}> <{/if}> + <{ if $tribe_members[i].avatar=="blank.gif"}><{else}> <{/if}> <{if $tribe_owneruid==$useruid}>

    - +
    <{/if}>

    diff --git a/templates/yogurt_tribes.tpl b/templates/yogurt_tribes.tpl index 5b45a475..980fdf0b 100644 --- a/templates/yogurt_tribes.tpl +++ b/templates/yogurt_tribes.tpl @@ -90,11 +90,11 @@ function xoopsFormValidate_form_tribe() { myform = window.document.form_tribe; i <{if $isOwner }>
    - +
    <{if $xoops_userid == $mytribes[i].uid }>
    - <{$lang_owner}> + <{$lang_owner}>
    <{ /if }> <{ /if }> @@ -135,20 +135,20 @@ function xoopsFormValidate_form_tribe() { myform = window.document.form_tribe; i <{if $isOwner }>
    - +
    <{if $xoops_userid == $tribes[j].uid }>
    - +
    - +
    - <{$lang_owner}> + <{$lang_owner}>
    <{ /if }> diff --git a/templates/yogurt_tribes_results.tpl b/templates/yogurt_tribes_results.tpl index 03f0b006..fdc65c05 100644 --- a/templates/yogurt_tribes_results.tpl +++ b/templates/yogurt_tribes_results.tpl @@ -47,20 +47,20 @@ <{if $isOwner }>
    - +
    <{if $xoops_userid == $tribes[j].uid }>
    - +
    - +
    - <{$lang_owner}> + <{$lang_owner}>
    <{ /if }> diff --git a/templates/yogurt_seutubo.tpl b/templates/yogurt_video.tpl similarity index 94% rename from templates/yogurt_seutubo.tpl rename to templates/yogurt_video.tpl index 807f2ee7..80afd831 100644 --- a/templates/yogurt_seutubo.tpl +++ b/templates/yogurt_video.tpl @@ -68,17 +68,17 @@ function xoopsFormValidate_form_videos() { myform = window.document.form_videos;
    <{$token}> - +
    <{$token}> - +
    <{$token}> - +
    <{ /if}>
    diff --git a/tribe.php b/tribe.php index 60d66c35..e9a86502 100644 --- a/tribe.php +++ b/tribe.php @@ -68,7 +68,7 @@ $xoopsTpl->assign('lang_desctribe', _MD_YOGURT_TRIBE_DESC); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -115,20 +115,20 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); include_once XOOPS_ROOT_PATH . '/include/comment_view.php'; diff --git a/tribes.php b/tribes.php index 24041163..e51a2c5e 100644 --- a/tribes.php +++ b/tribes.php @@ -54,23 +54,23 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.lightbox-0.3.css'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); /** - * Criando a barra de navegao caso tenha muitos amigos + * Creating the navigation bar if you have a lot of friends */ $barra_navegacao = new \XoopsPageNav($nb_tribes, $xoopsModuleConfig['tribesperpage'], $start_all, 'start_all', 'uid=' . (int)$controller->uidOwner . '&start_my=' . $start_my); $barrinha = $barra_navegacao->renderImageNav(2); //alltribes @@ -81,7 +81,7 @@ $maxfilebytes = $xoopsModuleConfig['maxfilesize']; //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/seutubo.php b/video.php similarity index 92% rename from seutubo.php rename to video.php index 4e40d187..d2058da1 100644 --- a/seutubo.php +++ b/video.php @@ -19,7 +19,7 @@ use XoopsModules\Yogurt; -$GLOBALS['xoopsOption']['template_main'] = 'yogurt_seutubo.tpl'; +$GLOBALS['xoopsOption']['template_main'] = 'yogurt_video.tpl'; require __DIR__ . '/header.php'; $controller = new Yogurt\VideoController($xoopsDB, $xoopsUser); @@ -55,23 +55,23 @@ /** * Adding to the module js and css of the lightbox and new ones */ -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css'); -$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); +$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { - $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/css/jquery.tabs-ie.css'); + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/prototype.js'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/scriptaculous.js?load=effects'); //$xoTheme->addScript(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/js/lightbox.js'); //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/include/jquery.lightbox-0.3.css'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/jquery.lightbox-0.3.js'); -$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); +$xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_Notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); diff --git a/video_submited.php b/video_submited.php index e09d4adf..1153fd7e 100644 --- a/video_submited.php +++ b/video_submited.php @@ -22,12 +22,12 @@ $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; require __DIR__ . '/header.php'; -//include_once __DIR__ . '/class/Seutubo.php'; +//include_once __DIR__ . '/class/Video.php'; /** * Factory of pictures created */ -$albumFactory = new Yogurt\SeutuboHandler($xoopsDB); +$albumFactory = new Yogurt\VideoHandler($xoopsDB); $url = $_POST['codigo']; @@ -55,9 +55,9 @@ $extra_tags['X_OWNER_UID'] = (int)$xoopsUser->getVar('uid'); $notificationHandler = xoops_getHandler('notification'); $notificationHandler->triggerEvent('video', (int)$xoopsUser->getVar('uid'), 'new_video', $extra_tags); - redirect_header(XOOPS_URL . '/modules/yogurt/seutubo.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_VIDEOSAVED); + redirect_header(XOOPS_URL . '/modules/yogurt/video.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_VIDEOSAVED); } else { - redirect_header(XOOPS_URL . '/modules/yogurt/seutubo.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_NOCACHACA); + redirect_header(XOOPS_URL . '/modules/yogurt/video.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_NOCACHACA); } include __DIR__ . '/../../footer.php'; diff --git a/xoops_version.php b/xoops_version.php index 1bf60161..b55bea85 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -97,7 +97,7 @@ $moduleDirName . '_' . 'friendship', $moduleDirName . '_' . 'images', $moduleDirName . '_' . 'visitors', - $moduleDirName . '_' . 'seutubo', + $moduleDirName . '_' . 'video', $moduleDirName . '_' . 'reltribeuser', $moduleDirName . '_' . 'tribes', $moduleDirName . '_' . 'notes', @@ -426,7 +426,7 @@ ['file' => 'yogurt_friends.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATEFRIENDSDESC], ['file' => 'yogurt_notebook.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATENOTEBOOKDESC], ['file' => 'yogurt_audio.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATEAUDIODESC], - ['file' => 'yogurt_seutubo.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATESEUTUBODESC], + ['file' => 'yogurt_video.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATESEUTUBODESC], ['file' => 'yogurt_album.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATEALBUMDESC], ['file' => 'yogurt_tribes.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATETRIBESDESC], ['file' => 'yogurt_configs.tpl', 'description' => _MI_YOG_PICTURE_TEMPLATECONFIGSDESC], @@ -461,7 +461,7 @@ } if (1 == $moduleConfig['enable_videos']) { $modversion['sub'][6]['name'] = _MI_YOGURT_MYVIDEOS; - $modversion['sub'][6]['url'] = 'seutubo.php'; + $modversion['sub'][6]['url'] = 'video.php'; } if (1 == $moduleConfig['enable_friends']) { $modversion['sub'][7]['name'] = _MI_YOGURT_MYFRIENDS; @@ -503,7 +503,7 @@ $modversion['notification']['category'][2]['name'] = 'video'; $modversion['notification']['category'][2]['title'] = _MI_YOG_VIDEO_NOTIFYTIT; $modversion['notification']['category'][2]['description'] = _MI_YOG_VIDEO_NOTIFYDSC; -$modversion['notification']['category'][2]['subscribe_from'] = 'seutubo.php'; +$modversion['notification']['category'][2]['subscribe_from'] = 'video.php'; $modversion['notification']['category'][2]['item_name'] = 'uid'; $modversion['notification']['category'][2]['allow_bookmark'] = 1; $modversion['notification']['event'][2]['name'] = 'new_video'; @@ -525,7 +525,7 @@ $modversion['notification']['event'][3]['title'] = _MI_YOG_NOTE_NEWNOTE_NOTIFY; $modversion['notification']['event'][3]['caption'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYCAP; $modversion['notification']['event'][3]['description'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYDSC; -$modversion['notification']['event'][3]['mail_template'] = 'Note_newNote_notify'; +$modversion['notification']['event'][3]['mail_template'] = 'note_newnote_notify'; $modversion['notification']['event'][3]['mail_subject'] = _MI_YOG_NOTE_NEWNOTE_NOTIFYSBJ; $modversion['notification']['category'][4]['name'] = 'friendship'; From 35f0743a0ab8ba28754e87800a0b9e9e75408d64 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 01:35:58 -0400 Subject: [PATCH 26/43] cosmetics --- abandontribe.php | 2 +- admin/index.php | 4 +- admin/main.php | 2 +- album.php | 4 +- audio.php | 2 +- avatar.php | 2 +- becomemembertribe.php | 8 +-- blocks/blocks.php | 4 +- class/Audio.php | 4 +- class/AudioController.php | 32 +++++------ class/AudioHandler.php | 4 +- class/Configs.php | 2 +- class/ConfigsHandler.php | 2 +- class/ControllerConfigs.php | 32 +++++------ class/ControllerFriends.php | 32 +++++------ class/ControllerIndex.php | 32 +++++------ class/ControllerNotes.php | 32 +++++------ class/ControllerPhotos.php | 32 +++++------ class/ControllerTribes.php | 32 +++++------ class/Friendpetition.php | 2 +- class/FriendpetitionHandler.php | 2 +- class/Friendship.php | 10 ++-- class/FriendshipHandler.php | 10 ++-- class/Image.php | 6 +-- class/ImageHandler.php | 6 +-- class/Ishot.php | 2 +- class/IshotHandler.php | 2 +- class/Notes.php | 4 +- class/NotesHandler.php | 4 +- class/Reltribeuser.php | 2 +- class/ReltribeuserHandler.php | 2 +- class/Suspensions.php | 2 +- class/SuspensionsHandler.php | 2 +- class/Tribes.php | 10 ++-- class/TribesHandler.php | 2 +- class/Video.php | 8 +-- class/VideoController.php | 32 +++++------ class/Visitors.php | 2 +- class/VisitorsHandler.php | 2 +- class/YogurtController.php | 36 ++++++------- class/common/breadcrumb.php | 2 +- comment_delete.php | 2 +- comment_edit.php | 2 +- comment_new.php | 2 +- comment_post.php | 2 +- comment_reply.php | 2 +- configs.php | 2 +- delaudio.php | 2 +- delete_scrap.php | 2 +- delete_tribe.php | 2 +- delfriendship.php | 2 +- delpicture.php | 2 +- delvideo.php | 2 +- editdesc.php | 2 +- editdescvideo.php | 2 +- editfriendship.php | 2 +- edittribe.php | 2 +- edituser.php | 44 +++++++-------- fans.php | 2 +- friends.php | 2 +- header.php | 2 +- index.php | 8 +-- ishot.php | 2 +- kickfromtribe.php | 2 +- language/english/help/helpheader.tpl | 2 +- mainvideo.php | 2 +- makefriends.php | 6 +-- notebook.php | 2 +- notification_update.php | 2 +- preloads/autoloader.php | 2 +- private.php | 4 +- search.php | 12 ++--- search_tribe.php | 2 +- searchmembers.php | 12 ++--- submit.php | 8 +-- submitNote.php | 4 +- submit_configs.php | 2 +- submit_friendpetition.php | 4 +- submit_tribe.php | 8 +-- submitaudio.php | 4 +- suspend.php | 4 +- templates/yogurt_album.tpl | 10 ++-- templates/yogurt_audio.tpl | 2 +- templates/yogurt_configs.tpl | 80 ++++++++++++++-------------- templates/yogurt_edittribe.tpl | 4 +- templates/yogurt_fans.tpl | 4 +- templates/yogurt_friends.tpl | 4 +- templates/yogurt_index.tpl | 2 +- templates/yogurt_navbar.tpl | 6 +-- templates/yogurt_notebook.tpl | 2 +- templates/yogurt_notifications.tpl | 2 +- templates/yogurt_searchform.tpl | 2 +- templates/yogurt_searchresults.tpl | 2 +- templates/yogurt_tribe.tpl | 6 +-- templates/yogurt_tribes.tpl | 8 +-- templates/yogurt_tribes_results.tpl | 8 +-- templates/yogurt_video.tpl | 6 +-- testdata/index.php | 2 +- tribe.php | 4 +- tribes.php | 2 +- unsuspenduser.php | 2 +- video.php | 2 +- video_submited.php | 4 +- 103 files changed, 376 insertions(+), 376 deletions(-) diff --git a/abandontribe.php b/abandontribe.php index 99bec7d0..d90548b4 100644 --- a/abandontribe.php +++ b/abandontribe.php @@ -55,4 +55,4 @@ redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/admin/index.php b/admin/index.php index 1b086e15..2f5bf23f 100644 --- a/admin/index.php +++ b/admin/index.php @@ -21,7 +21,7 @@ xoops_cp_header(); $adminObject = \Xmf\Module\Admin::getInstance(); -//$configurator = include __DIR__ . '/../include/config.php'; +//$configurator = require dirname(__DIR__) . '/include/config.php'; //foreach (array_keys($configurator->uploadFolders) as $i) { // $utility::createFolder($configurator->uploadFolders[$i]); // $adminObject->addConfigBoxLine($configurator->uploadFolders[$i], 'folder'); @@ -78,7 +78,7 @@ //------------- Test Data ---------------------------- //if ($publisher->getConfig('displaySampleButton')) { // xoops_loadLanguage('admin/modulesadmin', 'system'); -// require_once __DIR__ . '/../testdata/index.php'; +// require_once dirname(__DIR__) . '/testdata/index.php'; // $adminObject->addItemButton(_AM_SYSTEM_MODULES_INSTALL_TESTDATA, '__DIR__ . /../../testdata/index.php?op=load', 'add'); // $adminObject->displayButton('left', ''); //} diff --git a/admin/main.php b/admin/main.php index 2781341c..9e4dc74d 100644 --- a/admin/main.php +++ b/admin/main.php @@ -69,7 +69,7 @@ function about() $moduleHandler = xoops_getHandler('module'); $modulo = $moduleHandler->getByDirname('yogurt'); echo "
    -getInfo('dirname') . '/' . $modulo->getInfo('image') . "' alt='Yogurt' style='float: left; margin-right: 10px;'/> +getInfo('dirname') . '/' . $modulo->getInfo('image') . "' alt='Yogurt' style='float: left; margin-right: 10px;'>
    " . $modulo->getInfo('name') . ' ' . $modulo->getInfo('version') . "
    diff --git a/album.php b/album.php index 4ca84c7e..3e9ccade 100644 --- a/album.php +++ b/album.php @@ -185,6 +185,6 @@ $xoopsTpl->assign('lang_setprivate', _MD_YOGURT_PRIVATIZE); $xoopsTpl->assign('lang_unsetprivate', _MD_YOGURT_UNPRIVATIZE); -include XOOPS_ROOT_PATH . '/include/comment_view.php'; +require XOOPS_ROOT_PATH . '/include/comment_view.php'; -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/audio.php b/audio.php index 6b6bc0fa..a66b46d2 100644 --- a/audio.php +++ b/audio.php @@ -147,4 +147,4 @@ //Videos NAvBAr $xoopsTpl->assign('pageNav', $pageNav); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/avatar.php b/avatar.php index fbb81729..fa2d4355 100644 --- a/avatar.php +++ b/avatar.php @@ -56,4 +56,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/becomemembertribe.php b/becomemembertribe.php index 481f68b8..b55d1a09 100644 --- a/becomemembertribe.php +++ b/becomemembertribe.php @@ -21,9 +21,9 @@ require __DIR__ . '/header.php'; -//include_once __DIR__ . '/class/Friendpetition.php'; -//include_once __DIR__ . '/class/Reltribeuser.php'; -//include_once __DIR__ . '/class/Tribes.php'; +//require_once __DIR__ . '/class/Friendpetition.php'; +//require_once __DIR__ . '/class/Reltribeuser.php'; +//require_once __DIR__ . '/class/Tribes.php'; /** * Factories of tribes... testing for zend editor @@ -51,4 +51,4 @@ redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERALREADY); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/blocks/blocks.php b/blocks/blocks.php index 61652e36..b1ca6e0e 100644 --- a/blocks/blocks.php +++ b/blocks/blocks.php @@ -23,8 +23,8 @@ exit(); } //include_once(XOOPS_ROOT_PATH."/class/criteria.php"); -//include_once XOOPS_ROOT_PATH . '/modules/yogurt/class/Friendship.php'; -//include_once XOOPS_ROOT_PATH . '/modules/yogurt/class/Image.php'; +//require_once XOOPS_ROOT_PATH . '/modules/yogurt/class/Friendship.php'; +//require_once XOOPS_ROOT_PATH . '/modules/yogurt/class/Image.php'; /** * @param $options diff --git a/class/Audio.php b/class/Audio.php index 771a2d60..4ddab378 100644 --- a/class/Audio.php +++ b/class/Audio.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; /** * Audio class. diff --git a/class/AudioController.php b/class/AudioController.php index 304f0a82..58bd84d7 100644 --- a/class/AudioController.php +++ b/class/AudioController.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/AudioHandler.php b/class/AudioHandler.php index 044e9640..05811b64 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; // ------------------------------------------------------------------------- // ------------------yogurt_audio user handler class ------------------- diff --git a/class/Configs.php b/class/Configs.php index 2cd8fcc3..19b5a297 100644 --- a/class/Configs.php +++ b/class/Configs.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Configs class. diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index 590ec77d..a6454058 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Configs user handler class ------------------- diff --git a/class/ControllerConfigs.php b/class/ControllerConfigs.php index 7ff531de..69b89611 100644 --- a/class/ControllerConfigs.php +++ b/class/ControllerConfigs.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerFriends.php b/class/ControllerFriends.php index 7e80d2de..f98541af 100644 --- a/class/ControllerFriends.php +++ b/class/ControllerFriends.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerIndex.php b/class/ControllerIndex.php index cb8a4737..c4a1a0f8 100644 --- a/class/ControllerIndex.php +++ b/class/ControllerIndex.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index 3cd6186f..85d10b62 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerPhotos.php b/class/ControllerPhotos.php index cf875c60..bcab526b 100644 --- a/class/ControllerPhotos.php +++ b/class/ControllerPhotos.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/ControllerTribes.php b/class/ControllerTribes.php index 60f48b40..0582c3ff 100644 --- a/class/ControllerTribes.php +++ b/class/ControllerTribes.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/Friendpetition.php b/class/Friendpetition.php index d1271f54..30f0fa65 100644 --- a/class/Friendpetition.php +++ b/class/Friendpetition.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Friendpetition class. diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index 1f467caa..830e684b 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Friendpetition user handler class ------------------- diff --git a/class/Friendship.php b/class/Friendship.php index 2c2f6599..5c26aa82 100644 --- a/class/Friendship.php +++ b/class/Friendship.php @@ -7,14 +7,14 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Friendship class. diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index fd920ce5..752b07cd 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -7,14 +7,14 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Friendship user handler class ------------------- diff --git a/class/Image.php b/class/Image.php index 801ba9f0..9db23780 100644 --- a/class/Image.php +++ b/class/Image.php @@ -30,9 +30,9 @@ /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; /** * Image class. diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 23e6e0f0..238fd7ec 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -30,9 +30,9 @@ /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; // ------------------------------------------------------------------------- // ------------------Image user handler class ------------------- diff --git a/class/Ishot.php b/class/Ishot.php index d40eb44d..2204d79f 100644 --- a/class/Ishot.php +++ b/class/Ishot.php @@ -22,7 +22,7 @@ if (!defined('XOOPS_ROOT_PATH')) { exit(); } -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Ishot class. diff --git a/class/IshotHandler.php b/class/IshotHandler.php index adfa4e7d..53e23bba 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -22,7 +22,7 @@ if (!defined('XOOPS_ROOT_PATH')) { exit(); } -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Ishot user handler class ------------------- diff --git a/class/Notes.php b/class/Notes.php index 6b0b593b..ef7f5af7 100644 --- a/class/Notes.php +++ b/class/Notes.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; /** * Notes class. diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 3befdffa..289483f0 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -7,8 +7,8 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php'; // ------------------------------------------------------------------------- // ------------------Notes user handler class ------------------- diff --git a/class/Reltribeuser.php b/class/Reltribeuser.php index 5a8f3366..a0d5dde0 100644 --- a/class/Reltribeuser.php +++ b/class/Reltribeuser.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Reltribeuser class. diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index 0c2bc6d2..548dab59 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Reltribeuser user handler class ------------------- diff --git a/class/Suspensions.php b/class/Suspensions.php index 55186261..8c52a9a1 100644 --- a/class/Suspensions.php +++ b/class/Suspensions.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Suspensions class. diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index 934ae21f..c5e1156a 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Suspensions user handler class ------------------- diff --git a/class/Tribes.php b/class/Tribes.php index 308e119c..ae7de603 100644 --- a/class/Tribes.php +++ b/class/Tribes.php @@ -12,11 +12,11 @@ /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Tribes class. diff --git a/class/TribesHandler.php b/class/TribesHandler.php index 43acd146..c1f761e3 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -303,7 +303,7 @@ public function renderFormEdit($tribe, $maxbytes) $field_oldpicture = new \XoopsFormLabel(_MD_YOGURT_TRIBE_IMAGE, ''); - $field_maintainimage = new \XoopsFormLabel(_MD_YOGURT_MAINTAINOLDIMAGE, ""); + $field_maintainimage = new \XoopsFormLabel(_MD_YOGURT_MAINTAINOLDIMAGE, ""); $form->addElement($field_oldpicture); $form->addElement($field_maintainimage); diff --git a/class/Video.php b/class/Video.php index 0cb49924..faf51bc2 100644 --- a/class/Video.php +++ b/class/Video.php @@ -12,10 +12,10 @@ /** * Includes of form objects and uploader */ -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/uploader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Video class. diff --git a/class/VideoController.php b/class/VideoController.php index 22df96e2..a8a8a1ec 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** diff --git a/class/Visitors.php b/class/Visitors.php index 0b90672e..d9c4baf0 100644 --- a/class/Visitors.php +++ b/class/Visitors.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; /** * Visitors class. diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index 0a41cfa2..072e6266 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -7,7 +7,7 @@ // Author: Bruno Barthez // // ----------------------------------------------------------------- // -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; // ------------------------------------------------------------------------- // ------------------Yogurt\Visitors user handler class ------------------- diff --git a/class/YogurtController.php b/class/YogurtController.php index 9c9c914d..555203b9 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -19,26 +19,26 @@ * @author XOOPS Development Team * @since */ -include_once XOOPS_ROOT_PATH . '/kernel/object.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/criteria.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; +require_once XOOPS_ROOT_PATH . '/kernel/object.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/criteria.php'; +require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; /** * Module classes */ -//include_once 'class/Image.php'; -//include_once 'class/yogurt_visitors.php'; -//include_once 'class/Video.php'; -//include_once 'class/yogurt_audio.php'; -//include_once 'class/Friendpetition.php'; -//include_once 'class/Friendship.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; -//include_once 'class/Notes.php'; -//include_once 'class/Configs.php'; -//include_once 'class/Suspensions.php'; +//require_once __DIR__ . '/Image.php'; +//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Video.php'; +//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Friendpetition.php'; +//require_once __DIR__ . '/Friendship.php'; +//require_once __DIR__ . '/Reltribeuser.php'; +//require_once __DIR__ . '/Tribes.php'; +//require_once __DIR__ . '/Notes.php'; +//require_once __DIR__ . '/Configs.php'; +//require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - include_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/class.Id3v1.php'; } /** @@ -73,10 +73,10 @@ class YogurtController extends \XoopsObject /** * Constructor * - * @param $db + * @param \XoopsDatabase $db * @param $user */ - public function __construct($db, $user) + public function __construct(\XoopsDatabase $db, $user) { $this->db = $db; $this->user = $user; diff --git a/class/common/breadcrumb.php b/class/common/breadcrumb.php index 720b20c6..44fa9dc4 100644 --- a/class/common/breadcrumb.php +++ b/class/common/breadcrumb.php @@ -31,7 +31,7 @@ use XoopsModules\Yogurt; use XoopsModules\Yogurt\Common; -defined('XOOPS_ROOT_PATH') || exit('XOOPS Root Path not defined'); +defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); /** * Class Breadcrumb diff --git a/comment_delete.php b/comment_delete.php index 80486790..648ab702 100644 --- a/comment_delete.php +++ b/comment_delete.php @@ -17,4 +17,4 @@ * @since */ include dirname(dirname(__DIR__)) . '/mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_delete.php'; +require XOOPS_ROOT_PATH . '/include/comment_delete.php'; diff --git a/comment_edit.php b/comment_edit.php index fdea5bd3..54cdace1 100644 --- a/comment_edit.php +++ b/comment_edit.php @@ -17,4 +17,4 @@ * @since */ include dirname(dirname(__DIR__)) . '/mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_edit.php'; +require XOOPS_ROOT_PATH . '/include/comment_edit.php'; diff --git a/comment_new.php b/comment_new.php index 34c892ca..dabb9a98 100644 --- a/comment_new.php +++ b/comment_new.php @@ -38,5 +38,5 @@ $com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0; if ($com_itemid > 0) { $com_replytitle = _MD_YOGURT_TRIBES . ': ' . $tribe->getVar('tribe_title'); - include XOOPS_ROOT_PATH . '/include/comment_new.php'; + require XOOPS_ROOT_PATH . '/include/comment_new.php'; } diff --git a/comment_post.php b/comment_post.php index 9d5447e6..ada777bf 100644 --- a/comment_post.php +++ b/comment_post.php @@ -17,4 +17,4 @@ * @since */ include dirname(dirname(__DIR__)) . '/mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_post.php'; +require XOOPS_ROOT_PATH . '/include/comment_post.php'; diff --git a/comment_reply.php b/comment_reply.php index 97b62aeb..ff3af247 100644 --- a/comment_reply.php +++ b/comment_reply.php @@ -17,4 +17,4 @@ * @since */ include dirname(dirname(__DIR__)) . '/mainfile.php'; -include XOOPS_ROOT_PATH . '/include/comment_reply.php'; +require XOOPS_ROOT_PATH . '/include/comment_reply.php'; diff --git a/configs.php b/configs.php index bfba75ec..775da211 100644 --- a/configs.php +++ b/configs.php @@ -148,4 +148,4 @@ //xoopsToken $xoopsTpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delaudio.php b/delaudio.php index 27417e47..deebf5fa 100644 --- a/delaudio.php +++ b/delaudio.php @@ -57,4 +57,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delete_scrap.php b/delete_scrap.php index 644c58fe..3c6ff873 100644 --- a/delete_scrap.php +++ b/delete_scrap.php @@ -53,4 +53,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delete_tribe.php b/delete_tribe.php index fb1be31a..45a3fc2f 100644 --- a/delete_tribe.php +++ b/delete_tribe.php @@ -56,4 +56,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delfriendship.php b/delfriendship.php index 976c30c2..0ff75332 100644 --- a/delfriendship.php +++ b/delfriendship.php @@ -50,4 +50,4 @@ redirect_header('friends.php', 3, _MD_YOGURT_FRIENDSHIPTERMINATED); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delpicture.php b/delpicture.php index 28e8892e..87795812 100644 --- a/delpicture.php +++ b/delpicture.php @@ -66,4 +66,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delvideo.php b/delvideo.php index b81d9b57..e2ba5d28 100644 --- a/delvideo.php +++ b/delvideo.php @@ -51,4 +51,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editdesc.php b/editdesc.php index e6274487..bda3d1ab 100644 --- a/editdesc.php +++ b/editdesc.php @@ -72,4 +72,4 @@ $url = XOOPS_URL . '/uploads/thumb_' . $url; $albumFactory->renderFormEdit($caption, $cod_img, $url); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editdescvideo.php b/editdescvideo.php index b8ff50cc..ebc78483 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -72,4 +72,4 @@ $albumFactory->renderFormEdit($caption, $cod_img, $url); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editfriendship.php b/editfriendship.php index c4747f08..4f5d093d 100644 --- a/editfriendship.php +++ b/editfriendship.php @@ -55,4 +55,4 @@ $friendshipFactory->renderFormSubmit($friend); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/edittribe.php b/edittribe.php index 201e687d..317d0bd0 100644 --- a/edittribe.php +++ b/edittribe.php @@ -129,4 +129,4 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/edituser.php b/edituser.php index 328b1e25..72009f98 100644 --- a/edituser.php +++ b/edituser.php @@ -18,14 +18,14 @@ */ require __DIR__ . '/header.php'; -//include_once __DIR__ . '/../../mainfile.php'; -//if (!@ include_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/user.php') { -// include_once XOOPS_ROOT_PATH . '/language/english/user.php'; +//require_once dirname(dirname(__DIR__)) . '/mainfile.php'; +//if (!@ require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/user.php') { +// require_once XOOPS_ROOT_PATH . '/language/english/user.php'; //} -include_once __DIR__ . '/../../class/pagenav.php'; +require_once dirname(dirname(__DIR__)) . '/class/pagenav.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; +require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; if (!is_object($xoopsUser)) { redirect_header('index.php', 3, _US_NOEDITRIGHT); @@ -98,7 +98,7 @@ } } if (count($errors) > 0) { - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; echo '
    '; foreach ($errors as $er) { echo '' . $er . '
    '; @@ -156,9 +156,9 @@ setcookie($xoopsConfig['usercookie']); } if (!$memberHandler->insertUser($edituser)) { - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; echo $edituser->getHtmlErrors(); - include XOOPS_ROOT_PATH . '/footer.php'; + require XOOPS_ROOT_PATH . '/footer.php'; } else { redirect_header('index.php?uid=' . $uid, 1, _US_PROFUPDATED); } @@ -167,8 +167,8 @@ } if ('editprofile' == $op) { - include_once XOOPS_ROOT_PATH . '/header.php'; - include_once XOOPS_ROOT_PATH . '/include/comment_constants.php'; + require_once XOOPS_ROOT_PATH . '/header.php'; + require_once XOOPS_ROOT_PATH . '/include/comment_constants.php'; $uid = (int)$xoopsUser->getVar('uid'); echo '' . _US_PROFILE . ' »» ' . _US_EDITPROFILE . '

    '; $form = new \XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php', 'post', true); @@ -215,7 +215,7 @@ $occupation_text = new \XoopsFormText(_US_OCCUPATION, 'user_occ', 30, 100, $xoopsUser->getVar('user_occ', 'E')); $interest_text = new \XoopsFormText(_US_INTEREST, 'user_intrest', 30, 150, $xoopsUser->getVar('user_intrest', 'E')); $sig_tray = new \XoopsFormElementTray(_US_SIGNATURE, '
    '); - include_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; + require_once XOOPS_ROOT_PATH . '/include/xoopscodes.php'; $sig_tarea = new \XoopsFormDhtmlTextArea('', 'user_sig', $xoopsUser->getVar('user_sig', 'E')); $sig_tray->addElement($sig_tarea); $sig_cbox_value = $xoopsUser->getVar('attachsig') ? 1 : 0; @@ -228,8 +228,8 @@ $uorder_select->addOptionArray([XOOPS_COMMENT_OLD1ST => _OLDESTFIRST, XOOPS_COMMENT_NEW1ST => _NEWESTFIRST]); // RMV-NOTIFY // TODO: add this to admin user-edit functions... - include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php'; - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; + require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php'; + require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; $notify_method_select = new \XoopsFormSelect(_NOT_NOTIFYMETHOD, 'notify_method', $xoopsUser->getVar('notify_method')); $notify_method_select->addOptionArray([XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL]); $notify_mode_select = new \XoopsFormSelect(_NOT_NOTIFYMODE, 'notify_mode', $xoopsUser->getVar('notify_mode')); @@ -278,11 +278,11 @@ $form->setRequired($email_text); } $form->display(); - include XOOPS_ROOT_PATH . '/footer.php'; + require XOOPS_ROOT_PATH . '/footer.php'; } if ('avatarform' == $op) { - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; $uid = (int)$xoopsUser->getVar('uid'); echo '' . _US_PROFILE . ' »» ' . _US_UPLOADMYAVATAR . '

    '; $oldavatar = $xoopsUser->getVar('user_avatar'); @@ -291,7 +291,7 @@ echo '
    '; } if (1 == $xoopsConfigUser['avatar_allow_upload'] && $xoopsUser->getVar('posts') >= $xoopsConfigUser['avatar_minposts']) { - include_once __DIR__ . '/class/xoopsformloader.php'; + require_once __DIR__ . '/class/xoopsformloader.php'; $form = new \XoopsThemeForm(_US_UPLOADMYAVATAR, 'uploadavatar', 'edituser.php', 'post', true); $form->setExtra('enctype="multipart/form-data"'); $form->addElement(new \XoopsFormLabel(_US_MAXPIXEL, $xoopsConfigUser['avatar_width'] . ' x ' . $xoopsConfigUser['avatar_height'])); @@ -319,7 +319,7 @@ $form2->addElement(new \XoopsFormHidden('op', 'avatarchoose')); $form2->addElement(new \XoopsFormButton('', 'submit2', _SUBMIT, 'submit')); $form2->display(); - include XOOPS_ROOT_PATH . '/footer.php'; + require XOOPS_ROOT_PATH . '/footer.php'; } if ('avatarupload' == $op) { @@ -338,7 +338,7 @@ redirect_header('index.php', 3, _US_NOEDITRIGHT); } if (1 == $xoopsConfigUser['avatar_allow_upload'] && $xoopsUser->getVar('posts') >= $xoopsConfigUser['avatar_minposts']) { - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; + require_once XOOPS_ROOT_PATH . '/class/uploader.php'; $uploader = new \XoopsMediaUploader(XOOPS_UPLOAD_PATH, ['image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'], $xoopsConfigUser['avatar_maxsize'], $xoopsConfigUser['avatar_width'], $xoopsConfigUser['avatar_height']); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix('cavt'); @@ -371,9 +371,9 @@ } } } - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; echo $uploader->getErrors(); - include XOOPS_ROOT_PATH . '/footer.php'; + require XOOPS_ROOT_PATH . '/footer.php'; } } @@ -406,9 +406,9 @@ $xoopsUser->setVar('user_avatar', $user_avatar); $memberHandler = xoops_getHandler('member'); if (!$memberHandler->insertUser($xoopsUser)) { - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; echo $xoopsUser->getHtmlErrors(); - include XOOPS_ROOT_PATH . '/footer.php'; + require XOOPS_ROOT_PATH . '/footer.php'; exit(); } if ($oldavatar && preg_match('/^cavt/', mb_strtolower($oldavatar))) { diff --git a/fans.php b/fans.php index 42d5c591..db9a883c 100644 --- a/fans.php +++ b/fans.php @@ -128,4 +128,4 @@ $xoopsTpl->assign('lang_delete', _MD_YOGURT_DELETE); $xoopsTpl->assign('lang_evaluate', _MD_YOGURT_FRIENDSHIPCONFIGS); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/friends.php b/friends.php index b28fb37f..f30460ff 100644 --- a/friends.php +++ b/friends.php @@ -126,4 +126,4 @@ $xoopsTpl->assign('lang_delete', _MD_YOGURT_DELETE); $xoopsTpl->assign('lang_evaluate', _MD_YOGURT_FRIENDSHIPCONFIGS); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/header.php b/header.php index f96c5f0c..e0312c62 100644 --- a/header.php +++ b/header.php @@ -2,7 +2,7 @@ use XoopsModules\Yogurt; -include __DIR__ . '/preloads/autoloader.php'; +require __DIR__ . '/preloads/autoloader.php'; require dirname(dirname(__DIR__)) . '/mainfile.php'; require XOOPS_ROOT_PATH . '/header.php'; diff --git a/index.php b/index.php index 22deff37..75b6f548 100644 --- a/index.php +++ b/index.php @@ -27,9 +27,9 @@ $helper->loadLanguage('user'); -//include_once 'class/yogurt_controller.php'; -//if (!@ include_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/user.php') { -// include_once XOOPS_ROOT_PATH . '/language/english/user.php'; +//require_once __DIR__ . '/class/yogurt_controller.php'; +//if (!@ require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/user.php') { +// require_once XOOPS_ROOT_PATH . '/language/english/user.php'; //} $controller = new \XoopsModules\Yogurt\ControllerIndex($xoopsDB, $xoopsUser); @@ -404,4 +404,4 @@ /** * Closing the page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/ishot.php b/ishot.php index b43bf7c9..a2342dd4 100644 --- a/ishot.php +++ b/ishot.php @@ -67,4 +67,4 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_ALREADYVOTED); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/kickfromtribe.php b/kickfromtribe.php index 6a313130..e5dc3304 100644 --- a/kickfromtribe.php +++ b/kickfromtribe.php @@ -54,4 +54,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/language/english/help/helpheader.tpl b/language/english/help/helpheader.tpl index e072cd89..03009c77 100644 --- a/language/english/help/helpheader.tpl +++ b/language/english/help/helpheader.tpl @@ -2,5 +2,5 @@ <{$smarty.const._MI_YOGURT_NAME}> <{$smarty.const._MI_YOGURT_BACK_2_ADMIN}> <{$smarty.const._MI_YOGURT_NAME}> + alt="<{$smarty.const._MI_YOGURT_BACK_2_ADMIN}> <{$smarty.const._MI_YOGURT_NAME}>"> diff --git a/mainvideo.php b/mainvideo.php index ca93f22f..40414d71 100644 --- a/mainvideo.php +++ b/mainvideo.php @@ -51,4 +51,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/makefriends.php b/makefriends.php index 72e7c79b..dd8ffaa7 100644 --- a/makefriends.php +++ b/makefriends.php @@ -22,8 +22,8 @@ $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; require __DIR__ . '/header.php'; -//include_once __DIR__ . '/class/Friendpetition.php'; -//include_once __DIR__ . '/class/Friendship.php'; +//require_once __DIR__ . '/class/Friendpetition.php'; +//require_once __DIR__ . '/class/Friendship.php'; /** * Factory of petitions created @@ -70,4 +70,4 @@ redirect_header(XOOPS_URL . '/modules/yogurt/index.php?uid=' . $uid, 3, _MD_YOGURT_NOCACHACA); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/notebook.php b/notebook.php index d0efd0d7..e3df7a86 100644 --- a/notebook.php +++ b/notebook.php @@ -103,4 +103,4 @@ $xoopsTpl->assign('lang_tribes', _MD_YOGURT_TRIBES); $xoopsTpl->assign('lang_configs', _MD_YOGURT_CONFIGSTITLE); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/notification_update.php b/notification_update.php index 98a02de2..7e5c8b9e 100644 --- a/notification_update.php +++ b/notification_update.php @@ -1,4 +1,4 @@ check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); @@ -53,4 +53,4 @@ } } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/search.php b/search.php index f17a4032..9be3a1f8 100644 --- a/search.php +++ b/search.php @@ -26,7 +26,7 @@ case 'search': $xoopsOption['cache_group'] = implode('', $groups); $GLOBALS['xoopsOption']['template_main'] = 'yogurt_search.tpl'; - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; // Dynamic fields $profileHandler = xoops_getModuleHandler('profile'); @@ -36,7 +36,7 @@ $gpermHandler = xoops_getHandler('groupperm'); $searchable_fields = $gpermHandler->getItemIds('smartprofile_search', $groups, $xoopsModule->getVar('mid')); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $searchform = new \XoopsThemeForm('', 'searchform', 'search.php', 'post'); $name_tray = new \XoopsFormElementTray(_PROFILE_MA_DISPLAYNAME); @@ -106,7 +106,7 @@ case 'timezone': $element = new \XoopsFormSelect($fields[$i]->getVar('field_title'), $fields[$i]->getVar('field_name'), null, 6, true); - include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; + require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; $element->addOptionArray(\XoopsLists::getTimeZoneList()); $searchform->addElement($element); unset($element); @@ -139,7 +139,7 @@ break; case 'results': $GLOBALS['xoopsOption']['template_main'] = 'smartprofile_results.tpl'; - include_once XOOPS_ROOT_PATH . '/header.php'; + require_once XOOPS_ROOT_PATH . '/header.php'; $memberHandler = xoops_getHandler('member'); // Dynamic fields @@ -387,10 +387,10 @@ if (isset($search_url)) { $args = implode('&', $search_url); } - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; $nav = new \XoopsPageNav($total_users, $limit, $start, 'start', $args); $xoopsTpl->assign('nav', $nav->renderNav(5)); } break; } -include XOOPS_ROOT_PATH . '/footer.php'; +require XOOPS_ROOT_PATH . '/footer.php'; diff --git a/search_tribe.php b/search_tribe.php index 6bf076e3..0bbad90a 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -144,4 +144,4 @@ $xoopsTpl->assign('lang_searchtribe', _MD_YOGURT_TRIBE_SEARCH); $xoopsTpl->assign('lang_tribekeyword', _MD_YOGURT_TRIBE_SEARCHKEYWORD); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/searchmembers.php b/searchmembers.php index ac6a68c5..93661f68 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -3,7 +3,7 @@ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // -// // +// // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // @@ -35,7 +35,7 @@ if (isset($_POST['op']) && 'submit' == $_POST['op']) { $op = 'submit'; } -//include_once __DIR__ . '/class/yogurt_controller.php'; +//require_once __DIR__ . '/class/yogurt_controller.php'; $controller = new Yogurt\ControllerIndex($xoopsDB, $xoopsUser); /** @@ -45,10 +45,10 @@ if ('form' == $op) { $GLOBALS['xoopsOption']['template_main'] = 'yogurt_searchform.tpl'; - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; $memberHandler = xoops_getHandler('member'); $total = $memberHandler->getUserCount(new \Criteria('level', 0, '>')); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; $uname_text = new \XoopsFormText('', 'user_uname', 30, 60); $uname_match = new \XoopsFormSelectMatchOption('', 'user_uname_match'); $uname_tray = new \XoopsFormElementTray(_MD_YOGURT_UNAME, ' '); @@ -139,7 +139,7 @@ if ('submit' == $op) { $GLOBALS['xoopsOption']['template_main'] = 'yogurt_searchresults.tpl'; - include XOOPS_ROOT_PATH . '/header.php'; + require XOOPS_ROOT_PATH . '/header.php'; $iamadmin = $xoopsUserIsAdmin; $myts = MyTextSanitizer::getInstance(); $criteria = new \CriteriaCompo(); @@ -498,4 +498,4 @@ $xoopsTpl->assign('lang_tribes', _MD_YOGURT_TRIBES); $xoopsTpl->assign('lang_configs', _MD_YOGURT_CONFIGSTITLE); -include_once XOOPS_ROOT_PATH . '/footer.php'; +require_once XOOPS_ROOT_PATH . '/footer.php'; diff --git a/submit.php b/submit.php index 46b9bb0f..205343d1 100644 --- a/submit.php +++ b/submit.php @@ -22,14 +22,14 @@ /** * Xoops header ... */ -include_once '../../mainfile.php'; +require_once dirname(dirname(__DIR__)) . '/mainfile.php'; $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; -include_once '../../header.php'; +require_once dirname(dirname(__DIR__)) . '/header.php'; /** * Modules class includes */ -//include_once 'class/Image.php'; +//require_once __DIR__ . '/class/Image.php'; /** * Factory of pictures created @@ -82,4 +82,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/submitNote.php b/submitNote.php index e8e0779b..295b40f9 100644 --- a/submitNote.php +++ b/submitNote.php @@ -24,7 +24,7 @@ /** * Modules class includes */ -//include_once 'class/Notes.php'; +//require_once __DIR__ . '/class/Notes.php'; /** * Factories of tribes @@ -60,4 +60,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/submit_configs.php b/submit_configs.php index 17337b03..6e4c3d20 100644 --- a/submit_configs.php +++ b/submit_configs.php @@ -102,4 +102,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/submit_friendpetition.php b/submit_friendpetition.php index 93439030..fd4ef758 100644 --- a/submit_friendpetition.php +++ b/submit_friendpetition.php @@ -25,7 +25,7 @@ /** * Modules class includes */ -//include_once 'class/Friendpetition.php'; +//require_once __DIR__ . '/class/Friendpetition.php'; /** * Factory of petitions created @@ -77,4 +77,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/submit_tribe.php b/submit_tribe.php index 5c193ee1..6c23f459 100644 --- a/submit_tribe.php +++ b/submit_tribe.php @@ -24,9 +24,9 @@ /** * Modules class includes */ -//include_once 'class/Friendpetition.php'; -//include_once 'class/Reltribeuser.php'; -//include_once 'class/Tribes.php'; +//require_once __DIR__ . '/class/Friendpetition.php'; +//require_once __DIR__ . '/class/Reltribeuser.php'; +//require_once __DIR__ . '/class/Tribes.php'; /** * Factories of tribes @@ -72,4 +72,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/submitaudio.php b/submitaudio.php index d966c75f..bfe2f2e0 100644 --- a/submitaudio.php +++ b/submitaudio.php @@ -28,7 +28,7 @@ /** * Modules class includes */ -//include_once 'class/Audio.php'; +//require_once __DIR__ . '/class/Audio.php'; /** * Factory of pictures created @@ -77,4 +77,4 @@ /** * Close page */ -include '../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/suspend.php b/suspend.php index 7537eeea..fca57cf1 100644 --- a/suspend.php +++ b/suspend.php @@ -21,7 +21,7 @@ require __DIR__ . '/header.php'; // -//include_once __DIR__ . '/class/yogurt_suspensions.php'; +//require_once __DIR__ . '/class/Suspensions.php'; if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 5, _MD_YOGURT_TOKENEXPIRED); @@ -57,4 +57,4 @@ redirect_header('index.php?uid=' . $uid, 300, _MD_YOGURT_USERSUSPENDED); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/templates/yogurt_album.tpl b/templates/yogurt_album.tpl index 376d53d7..1fe557f6 100644 --- a/templates/yogurt_album.tpl +++ b/templates/yogurt_album.tpl @@ -30,27 +30,27 @@
    <{$token}> - +
    <{$token}> - +
    <{$token}> - +
    <{$token}> <{ if $pics_array[i].private == 1}> - + <{else}> - + <{ /if }>
    <{ if ($pics_array[i].private == 1) }> diff --git a/templates/yogurt_audio.tpl b/templates/yogurt_audio.tpl index c1bae026..5314784a 100644 --- a/templates/yogurt_audio.tpl +++ b/templates/yogurt_audio.tpl @@ -76,7 +76,7 @@
    <{$token}> - +
    diff --git a/templates/yogurt_configs.tpl b/templates/yogurt_configs.tpl index 7465eb66..b09decd5 100644 --- a/templates/yogurt_configs.tpl +++ b/templates/yogurt_configs.tpl @@ -10,95 +10,95 @@
    <{$lang_configpictures}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }><{ if $allow_videos!=-1 }>
    <{$lang_configvideos}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }><{ if $allow_tribes!=-1 }>
    <{$lang_configtribes}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }> <{ if $allow_notes!=-1 }>
    <{$lang_configNotes}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }><{ if $allow_friends!=-1 }>
    <{$lang_configfriends}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }>
    <{$lang_configprofilecontact}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{$lang_configprofilegeneral}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{$lang_configprofilestats}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ if $allow_audios!=-1 }>
    <{$lang_configaudio}> -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    -

    checked="checked"<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>

    +

    checked<{/if}>>


    <{ /if }> diff --git a/templates/yogurt_edittribe.tpl b/templates/yogurt_edittribe.tpl index dd9a4607..ba2db39a 100644 --- a/templates/yogurt_edittribe.tpl +++ b/templates/yogurt_edittribe.tpl @@ -24,7 +24,7 @@ * - +

    @@ -103,7 +103,7 @@
    - +
    <{ /if }> diff --git a/templates/yogurt_fans.tpl b/templates/yogurt_fans.tpl index fe970f89..e01d17f4 100644 --- a/templates/yogurt_fans.tpl +++ b/templates/yogurt_fans.tpl @@ -9,11 +9,11 @@

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    <{if $isOwner }>
    - +
    - +
    diff --git a/templates/yogurt_friends.tpl b/templates/yogurt_friends.tpl index c91893e2..c7900b00 100644 --- a/templates/yogurt_friends.tpl +++ b/templates/yogurt_friends.tpl @@ -7,11 +7,11 @@

    <{ if $friends[i].user_avatar=="blank.gif" }> <{ else }> <{/if}><{$friends[i].uname}>

    <{if $isOwner }>
    - +
    - +
    <{ /if }>
    diff --git a/templates/yogurt_index.tpl b/templates/yogurt_index.tpl index e961a67b..11b93c06 100644 --- a/templates/yogurt_index.tpl +++ b/templates/yogurt_index.tpl @@ -39,7 +39,7 @@
    <{$lang_askusertobefriend}> -<{$token}> +<{$token}>
    diff --git a/templates/yogurt_navbar.tpl b/templates/yogurt_navbar.tpl index 7e864777..00f2764b 100644 --- a/templates/yogurt_navbar.tpl +++ b/templates/yogurt_navbar.tpl @@ -3,9 +3,9 @@ <{ if $isSuspended==0 }>
    <{$token}> -
    <{ else }> <{$lang_suspended}> +<{ else }> <{$lang_suspended}>
    <{$token}> -
    <{/if}>
    <{/if}> +<{/if}>
    <{/if}>

    - <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}> + <{if $isOwner}>::<{$lang_mysection}><{else}><{$owner_uname}>::<{$section_name}><{/if}><{ if $isWebmaster==1 }><{$lang_suspensionadmin}><{/if}>

    diff --git a/templates/yogurt_notebook.tpl b/templates/yogurt_notebook.tpl index ffce7194..9da3d23d 100644 --- a/templates/yogurt_notebook.tpl +++ b/templates/yogurt_notebook.tpl @@ -51,7 +51,7 @@
    - + <{$token}>
    diff --git a/templates/yogurt_notifications.tpl b/templates/yogurt_notifications.tpl index 7377e21b..9acc8fec 100644 --- a/templates/yogurt_notifications.tpl +++ b/templates/yogurt_notifications.tpl @@ -19,7 +19,7 @@ <{counter assign=index}> - checked="checked"<{/if}>> + checked<{/if}>> <{$event.caption}> diff --git a/templates/yogurt_searchform.tpl b/templates/yogurt_searchform.tpl index 528fba2c..1f065555 100644 --- a/templates/yogurt_searchform.tpl +++ b/templates/yogurt_searchform.tpl @@ -8,7 +8,7 @@
    <{foreach item=element from=$searchform.elements}> - <{if $element.hidden != true}> + <{if $element.hidden !== true}>
    <{$element.body}>
    diff --git a/templates/yogurt_searchresults.tpl b/templates/yogurt_searchresults.tpl index 1dc4a05b..06f2e0eb 100644 --- a/templates/yogurt_searchresults.tpl +++ b/templates/yogurt_searchresults.tpl @@ -7,7 +7,7 @@ <{$lang_avatar}><{$lang_username}><{$lang_realname}> <{section name=i loop=$users}> - <{$users[i].avatar}><{$users[i].name}>
    <{if $is_admin == true}><{$users[i].adminlink}><{/if}><{$users[i].realname}> + <{$users[i].avatar}><{$users[i].name}>
    <{if $is_admin === true}><{$users[i].adminlink}><{/if}><{$users[i].realname}> <{/section}>
    diff --git a/templates/yogurt_tribe.tpl b/templates/yogurt_tribe.tpl index 45f8602b..f474bd53 100644 --- a/templates/yogurt_tribe.tpl +++ b/templates/yogurt_tribe.tpl @@ -13,11 +13,11 @@ <{ if $isanonym!=1 }> <{if $memberOfTribe ==1}> - + <{ else}>
    - +
    <{/if}> <{/if}>

    @@ -39,7 +39,7 @@
    - +
    <{/if}>

    diff --git a/templates/yogurt_tribes.tpl b/templates/yogurt_tribes.tpl index 980fdf0b..f56adfbd 100644 --- a/templates/yogurt_tribes.tpl +++ b/templates/yogurt_tribes.tpl @@ -90,7 +90,7 @@ function xoopsFormValidate_form_tribe() { myform = window.document.form_tribe; i <{if $isOwner }>
    - +
    <{if $xoops_userid == $mytribes[i].uid }>
    @@ -135,17 +135,17 @@ function xoopsFormValidate_form_tribe() { myform = window.document.form_tribe; i <{if $isOwner }> - +
    <{if $xoops_userid == $tribes[j].uid }>
    - +
    - +
    <{$lang_owner}> diff --git a/templates/yogurt_tribes_results.tpl b/templates/yogurt_tribes_results.tpl index fdc65c05..f721bdd1 100644 --- a/templates/yogurt_tribes_results.tpl +++ b/templates/yogurt_tribes_results.tpl @@ -1,4 +1,4 @@ -<{if $xoops_isuser == true}> +<{if $xoops_isuser === true}> <{include file="db:yogurt_navbar.tpl"}> <{/if}> @@ -47,17 +47,17 @@ <{if $isOwner }> - +
    <{if $xoops_userid == $tribes[j].uid }>
    - +
    - +
    <{$lang_owner}> diff --git a/templates/yogurt_video.tpl b/templates/yogurt_video.tpl index 80afd831..4421d885 100644 --- a/templates/yogurt_video.tpl +++ b/templates/yogurt_video.tpl @@ -68,17 +68,17 @@ function xoopsFormValidate_form_videos() { myform = window.document.form_videos; <{$token}> - +
    <{$token}> - +
    <{$token}> - +
    <{ /if}>
    diff --git a/testdata/index.php b/testdata/index.php index 220b215f..aa4bd649 100644 --- a/testdata/index.php +++ b/testdata/index.php @@ -77,7 +77,7 @@ function loadSampleData() // --- COPY test folder files --------------- if (is_array($configurator->copyTestFolders) && count($configurator->copyTestFolders) > 0) { - // $file = __DIR__ . '/../testdata/images/'; + // $file = dirname(__DIR__) . '/testdata/images/'; foreach (array_keys($configurator->copyTestFolders) as $i) { $src = $configurator->copyTestFolders[$i][0]; $dest = $configurator->copyTestFolders[$i][1]; diff --git a/tribe.php b/tribe.php index e9a86502..eaa54e8e 100644 --- a/tribe.php +++ b/tribe.php @@ -130,6 +130,6 @@ $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.lightbox-0.3.js'); $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); -include_once XOOPS_ROOT_PATH . '/include/comment_view.php'; +require_once XOOPS_ROOT_PATH . '/include/comment_view.php'; -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/tribes.php b/tribes.php index e51a2c5e..0d537722 100644 --- a/tribes.php +++ b/tribes.php @@ -151,4 +151,4 @@ $xoopsTpl->assign('lang_searchtribe', _MD_YOGURT_TRIBE_SEARCH); $xoopsTpl->assign('lang_tribekeyword', _MD_YOGURT_TRIBE_SEARCHKEYWORD); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/unsuspenduser.php b/unsuspenduser.php index 4072f2e0..02416e1e 100644 --- a/unsuspenduser.php +++ b/unsuspenduser.php @@ -52,4 +52,4 @@ redirect_header('index.php?uid=' . $uid, 3, _MD_YOGURT_USERUNSUSPENDED); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/video.php b/video.php index d2058da1..2a7745e7 100644 --- a/video.php +++ b/video.php @@ -130,4 +130,4 @@ //Videos NAvBAr $xoopsTpl->assign('pageNav', $pageNav); -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/video_submited.php b/video_submited.php index 1153fd7e..ed54de77 100644 --- a/video_submited.php +++ b/video_submited.php @@ -22,7 +22,7 @@ $GLOBALS['xoopsOption']['template_main'] = 'yogurt_index.tpl'; require __DIR__ . '/header.php'; -//include_once __DIR__ . '/class/Video.php'; +//require_once __DIR__ . '/class/Video.php'; /** * Factory of pictures created @@ -60,4 +60,4 @@ redirect_header(XOOPS_URL . '/modules/yogurt/video.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_NOCACHACA); } -include __DIR__ . '/../../footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; From a4e86fbdbe13c9549cce10b710d993d19b3a0e87 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 01:47:21 -0400 Subject: [PATCH 27/43] null check --- class/common/FileChecker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/common/FileChecker.php b/class/common/FileChecker.php index 0f282b05..350484cd 100644 --- a/class/common/FileChecker.php +++ b/class/common/FileChecker.php @@ -39,10 +39,10 @@ class FileChecker /** * @param string $file_path * @param string|null $original_file_path - * @param string $redirectFile + * @param string|null $redirectFile * @return bool|string */ - public static function getFileStatus($file_path, $original_file_path, $redirectFile) + public static function getFileStatus($file_path, $original_file_path = null, $redirectFile = null) { global $pathIcon16; From fd6e404b43eef5d94a4329b19c9e6a1ade94e247 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 01:47:59 -0400 Subject: [PATCH 28/43] Unnecessary boolean check --- class/AudioHandler.php | 4 ++-- class/ConfigsHandler.php | 4 ++-- class/FriendpetitionHandler.php | 4 ++-- class/FriendshipHandler.php | 4 ++-- class/ImageHandler.php | 4 ++-- class/IshotHandler.php | 4 ++-- class/NotesHandler.php | 4 ++-- class/ReltribeuserHandler.php | 4 ++-- class/SuspensionsHandler.php | 4 ++-- class/TribesHandler.php | 4 ++-- class/VideoHandler.php | 4 ++-- class/VisitorsHandler.php | 6 +++--- class/common/ModuleFeedback.php | 2 +- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/class/AudioHandler.php b/class/AudioHandler.php index 05811b64..0cc09880 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -98,7 +98,7 @@ public function insert(\XoopsObject $yogurtAudio, $force = false) $format .= ' WHERE audio_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_audio'), $audio_id, $this->db->quoteString($title), $this->db->quoteString($author), $this->db->quoteString($url), $uid_owner, $now, $now, $audio_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -127,7 +127,7 @@ public function delete(\XoopsObject $yogurtAudio, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE audio_id = %u', $this->db->prefix('yogurt_audio'), $yogurtAudio->getVar('audio_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index a6454058..eb0833eb 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -134,7 +134,7 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) $config_id ); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -163,7 +163,7 @@ public function delete(\XoopsObject $yogurt_configs, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE config_id = %u', $this->db->prefix('yogurt_configs'), $yogurt_configs->getVar('config_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index 830e684b..443da565 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $yogurt_friendpetition, $force = false) $format .= ' WHERE friendpet_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_friendpetition'), $friendpet_id, $petitioner_uid, $petioned_uid, $friendpet_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $yogurt_friendpetition, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE friendpet_id = %u', $this->db->prefix('yogurt_friendpetition'), $yogurt_friendpetition->getVar('friendpet_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index 752b07cd..1c7c5d45 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -104,7 +104,7 @@ public function insert(\XoopsObject $yogurt_friendship, $force = false) $format .= ' WHERE friendship_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_friendship'), $friendship_id, $friend1_uid, $friend2_uid, $level, $hot, $trust, $cool, $fan, $friendship_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -133,7 +133,7 @@ public function delete(\XoopsObject $yogurt_friendship, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE friendship_id = %u', $this->db->prefix('yogurt_friendship'), $yogurt_friendship->getVar('friendship_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 238fd7ec..2f9e4cd6 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -131,7 +131,7 @@ public function insert(\XoopsObject $yogurt_images, $force = false) $format .= ' WHERE cod_img = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_images'), $cod_img, $this->db->quoteString($title), $now, $now, $this->db->quoteString($uid_owner), $this->db->quoteString($url), $this->db->quoteString($private), $cod_img); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -160,7 +160,7 @@ public function delete(\XoopsObject $yogurt_images, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE cod_img = %u', $this->db->prefix('yogurt_images'), $yogurt_images->getVar('cod_img')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/IshotHandler.php b/class/IshotHandler.php index 53e23bba..8d9cbc38 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -112,7 +112,7 @@ public function insert(\XoopsObject $yogurt_ishot, $force = false) $format .= ' WHERE cod_ishot = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_ishot'), $cod_ishot, $uid_voter, $uid_voted, $ishot, $this->db->quoteString($date), $cod_ishot); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_ishot, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE cod_ishot = %u', $this->db->prefix('yogurt_ishot'), $yogurt_ishot->getVar('cod_ishot')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 289483f0..3b16ac48 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -106,7 +106,7 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) $format .= ' WHERE note_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $note_id, $this->db->quoteString($note_text), $note_from, $note_to, $private, $note_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -135,7 +135,7 @@ public function delete(\XoopsObject $yogurt_Notes, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('note_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index 548dab59..6a5b49ef 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $yogurt_reltribeuser, $force = false) $format .= ' WHERE rel_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_reltribeuser'), $rel_id, $rel_tribe_id, $rel_user_uid, $rel_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $yogurt_reltribeuser, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE rel_id = %u', $this->db->prefix('yogurt_reltribeuser'), $yogurt_reltribeuser->getVar('rel_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index c5e1156a..1580b550 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $suspensions, $force = false) $format .= ' WHERE uid = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_suspensions'), $uid, $this->db->quoteString($old_pass), $this->db->quoteString($old_email), $this->db->quoteString($old_signature), $suspension_time, $uid); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $suspensions, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE uid = %u', $this->db->prefix('yogurt_suspensions'), $suspensions->getVar('uid')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/TribesHandler.php b/class/TribesHandler.php index c1f761e3..d14de41f 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $yogurt_tribes, $force = false) $format .= ' WHERE tribe_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_tribes'), $tribe_id, $owner_uid, $this->db->quoteString($tribe_title), $this->db->quoteString($tribe_desc), $this->db->quoteString($tribe_img), $tribe_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $yogurt_tribes, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE tribe_id = %u', $this->db->prefix('yogurt_tribes'), $yogurt_tribes->getVar('tribe_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/VideoHandler.php b/class/VideoHandler.php index cd67db4a..2dfad1ee 100644 --- a/class/VideoHandler.php +++ b/class/VideoHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $yogurt_video, $force = false) $format .= ' WHERE video_id = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_video'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video), $video_id); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $yogurt_video, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE video_id = %u', $this->db->prefix('yogurt_video'), $yogurt_video->getVar('video_id')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index 072e6266..1ce61f66 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -97,7 +97,7 @@ public function insert(\XoopsObject $yogurt_visitors, $force = false) $format .= ' WHERE cod_visit = %u'; $sql = sprintf($format, $this->db->prefix('yogurt_visitors'), $cod_visit, $uid_owner, $uid_visitor, $this->db->quoteString($uname_visitor), $cod_visit); } - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -126,7 +126,7 @@ public function delete(\XoopsObject $yogurt_visitors, $force = false) return false; } $sql = sprintf('DELETE FROM %s WHERE cod_visit = %u', $this->db->prefix('yogurt_visitors'), $yogurt_visitors->getVar('cod_visit')); - if (false !== $force) { + if ($force) { $result = $this->db->queryF($sql); } else { $result = $this->db->query($sql); @@ -210,7 +210,7 @@ public function deleteAll($criteria = null, $force = false) if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); } - if (false !== $force) { + if ($force) { if (!$result = $this->db->queryF($sql)) { return false; } diff --git a/class/common/ModuleFeedback.php b/class/common/ModuleFeedback.php index 8aaeddae..cbe89b6c 100644 --- a/class/common/ModuleFeedback.php +++ b/class/common/ModuleFeedback.php @@ -64,7 +64,7 @@ public static function getInstance() */ public function getFormFeedback($action = false) { - if (false === $action) { + if (!$action) { $action = $_SERVER['REQUEST_URI']; } $moduleDirName = basename(dirname(dirname(__DIR__))); From d5c209f29abd7bfa160f47c5d128003290791b04 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 01:55:13 -0400 Subject: [PATCH 29/43] Non-optimal regular expression --- album.php | 2 +- audio.php | 2 +- configs.php | 2 +- edittribe.php | 2 +- edituser.php | 4 ++-- fans.php | 2 +- friends.php | 2 +- index.php | 2 +- notebook.php | 2 +- search_tribe.php | 2 +- searchmembers.php | 2 +- tribe.php | 2 +- tribes.php | 2 +- video.php | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/album.php b/album.php index 3e9ccade..a8567f14 100644 --- a/album.php +++ b/album.php @@ -104,7 +104,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/audio.php b/audio.php index a66b46d2..77642d9d 100644 --- a/audio.php +++ b/audio.php @@ -65,7 +65,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/configs.php b/configs.php index 775da211..be00ab90 100644 --- a/configs.php +++ b/configs.php @@ -69,7 +69,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/edittribe.php b/edittribe.php index 317d0bd0..e8e1fc62 100644 --- a/edittribe.php +++ b/edittribe.php @@ -125,7 +125,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } diff --git a/edituser.php b/edituser.php index 72009f98..517ce554 100644 --- a/edituser.php +++ b/edituser.php @@ -354,7 +354,7 @@ @unlink($uploader->getSavedDestination()); } else { $oldavatar = $xoopsUser->getVar('user_avatar'); - if (!empty($oldavatar) && preg_match('/^cavt/', mb_strtolower($oldavatar))) { + if (!empty($oldavatar) && 0 === strpos(mb_strtolower($oldavatar), "cavt")) { $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); @@ -411,7 +411,7 @@ require XOOPS_ROOT_PATH . '/footer.php'; exit(); } - if ($oldavatar && preg_match('/^cavt/', mb_strtolower($oldavatar))) { + if ($oldavatar && 0 === strpos(mb_strtolower($oldavatar), "cavt")) { $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); diff --git a/fans.php b/fans.php index db9a883c..8d41710c 100644 --- a/fans.php +++ b/fans.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/friends.php b/friends.php index f30460ff..e03fbead 100644 --- a/friends.php +++ b/friends.php @@ -55,7 +55,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/index.php b/index.php index 75b6f548..1d96e82e 100644 --- a/index.php +++ b/index.php @@ -144,7 +144,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/notebook.php b/notebook.php index e3df7a86..6fc0d749 100644 --- a/notebook.php +++ b/notebook.php @@ -36,7 +36,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/search_tribe.php b/search_tribe.php index 0bbad90a..6a724941 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); diff --git a/searchmembers.php b/searchmembers.php index 93661f68..f4bacaca 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -450,7 +450,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/tribe.php b/tribe.php index eaa54e8e..defdf931 100644 --- a/tribe.php +++ b/tribe.php @@ -118,7 +118,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/tribes.php b/tribes.php index 0d537722..206bd45d 100644 --- a/tribes.php +++ b/tribes.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/video.php b/video.php index 2a7745e7..0a27c1ec 100644 --- a/video.php +++ b/video.php @@ -58,7 +58,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (preg_match('/msie/', mb_strtolower($_SERVER['HTTP_USER_AGENT']))) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); From 70f120e48854226eb54aef530b27dcd664e5be0d Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 01:57:21 -0400 Subject: [PATCH 30/43] Class autoloading correctness --- class/AudioController.php | 2 +- class/ControllerConfigs.php | 2 +- class/ControllerFriends.php | 2 +- class/ControllerIndex.php | 2 +- class/ControllerNotes.php | 2 +- class/ControllerPhotos.php | 2 +- class/ControllerTribes.php | 2 +- class/{class.Id3v1.php => Id3v1.php} | 0 class/VideoController.php | 2 +- class/YogurtController.php | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename class/{class.Id3v1.php => Id3v1.php} (100%) diff --git a/class/AudioController.php b/class/AudioController.php index 58bd84d7..da27a610 100644 --- a/class/AudioController.php +++ b/class/AudioController.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerConfigs.php b/class/ControllerConfigs.php index 69b89611..9fef5dde 100644 --- a/class/ControllerConfigs.php +++ b/class/ControllerConfigs.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerFriends.php b/class/ControllerFriends.php index f98541af..8daef6dc 100644 --- a/class/ControllerFriends.php +++ b/class/ControllerFriends.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerIndex.php b/class/ControllerIndex.php index c4a1a0f8..adffd322 100644 --- a/class/ControllerIndex.php +++ b/class/ControllerIndex.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index 85d10b62..2a30dc05 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerPhotos.php b/class/ControllerPhotos.php index bcab526b..e0e23dae 100644 --- a/class/ControllerPhotos.php +++ b/class/ControllerPhotos.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/ControllerTribes.php b/class/ControllerTribes.php index 0582c3ff..20a8d729 100644 --- a/class/ControllerTribes.php +++ b/class/ControllerTribes.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/class.Id3v1.php b/class/Id3v1.php similarity index 100% rename from class/class.Id3v1.php rename to class/Id3v1.php diff --git a/class/VideoController.php b/class/VideoController.php index a8a8a1ec..fe2cf2b2 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** diff --git a/class/YogurtController.php b/class/YogurtController.php index 555203b9..6a036971 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -38,7 +38,7 @@ //require_once __DIR__ . '/Configs.php'; //require_once __DIR__ . '/Suspensions.php'; if (str_replace('.', '', PHP_VERSION) > 499) { - require_once __DIR__ . '/class.Id3v1.php'; + require_once __DIR__ . '/Id3v1.php'; } /** From 92438262f11b8498d33ba3493962b349b9ab1768 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 04:44:41 -0400 Subject: [PATCH 31/43] converting to \Xmf\Request --- abandontribe.php | 2 +- album.php | 2 +- audio.php | 2 +- becomemembertribe.php | 2 +- class/YogurtController.php | 6 +++--- comment_new.php | 2 +- delete_scrap.php | 2 +- delete_tribe.php | 2 +- delfriendship.php | 2 +- editdesc.php | 2 +- editdescvideo.php | 4 ++-- editfriendship.php | 6 +++--- edittribe.php | 4 ++-- edituser.php | 6 +++--- fans.php | 2 +- friends.php | 2 +- header.php | 4 ++-- index.php | 2 +- ishot.php | 4 ++-- kickfromtribe.php | 4 ++-- mainvideo.php | 2 +- makefriends.php | 4 ++-- private.php | 2 +- search.php | 2 +- search_tribe.php | 4 ++-- searchmembers.php | 6 +++--- suspend.php | 2 +- tribe.php | 2 +- tribes.php | 4 ++-- unsuspenduser.php | 2 +- video.php | 2 +- 31 files changed, 47 insertions(+), 47 deletions(-) diff --git a/abandontribe.php b/abandontribe.php index d90548b4..44a21ae0 100644 --- a/abandontribe.php +++ b/abandontribe.php @@ -31,7 +31,7 @@ /** * Receiving info from get parameters */ -$reltribeuser_id = (int)$_POST['reltribe_id']; +$reltribeuser_id = \Xmf\Request::getInt('reltribe_id', 0, 'POST'); if (!isset($_POST['confirm']) || 1 != $_POST['confirm']) { xoops_confirm(['reltribe_id' => $reltribeuser_id, 'confirm' => 1], 'abandontribe.php', _MD_YOGURT_ASKCONFIRMABANDONTRIBE, _MD_YOGURT_CONFIRMABANDON); } else { diff --git a/album.php b/album.php index a8567f14..b25b5052 100644 --- a/album.php +++ b/album.php @@ -33,7 +33,7 @@ * This variable define the beggining of the navigation must b * setted here so all calls to database will take this into account */ -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Filter for search pictures in database diff --git a/audio.php b/audio.php index 77642d9d..8f9ecaa1 100644 --- a/audio.php +++ b/audio.php @@ -29,7 +29,7 @@ */ $nbSections = $controller->getNumbersSections(); -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Criteria for Audio diff --git a/becomemembertribe.php b/becomemembertribe.php index b55d1a09..fcf02396 100644 --- a/becomemembertribe.php +++ b/becomemembertribe.php @@ -31,7 +31,7 @@ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); $tribesFactory = new Yogurt\TribesHandler($xoopsDB); -$tribe_id = (int)$_POST['tribe_id']; +$tribe_id = \Xmf\Request::getInt('tribe_id', 0, 'POST'); $uid = (int)$xoopsUser->getVar('uid'); $criteria_uid = new \Criteria('rel_user_uid', $uid); diff --git a/class/YogurtController.php b/class/YogurtController.php index 6a036971..8921107d 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -140,7 +140,7 @@ public function getPermissions() */ if (!empty($_GET['uid'])) { $memberHandler = xoops_getHandler('member'); - $user = $memberHandler->getUser((int)$_GET['uid']); + $user = $memberHandler->getUser(\Xmf\Request::getInt('uid', 0, 'GET')); if (!is_object($user)) { redirect_header('index.php', 3, _MD_YOGURT_USERDOESNTEXIST); } @@ -155,7 +155,7 @@ public function getPermissions() $this->isUser = 0; if (!empty($_GET['uid'])) { - $this->uidOwner = (int)$_GET['uid']; + $this->uidOwner = \Xmf\Request::getInt('uid', 0, 'GET'); } else { $this->uidOwner = 1; $this->isOwner = 0; @@ -165,7 +165,7 @@ public function getPermissions() $this->isUser = 1; if (!empty($_GET['uid'])) { - $this->uidOwner = (int)$_GET['uid']; + $this->uidOwner = \Xmf\Request::getInt('uid', 0, 'GET'); $this->isOwner = ($this->user->getVar('uid') == (int)$_GET['uid']) ? 1 : 0; } else { $this->uidOwner = $this->user->getVar('uid'); diff --git a/comment_new.php b/comment_new.php index dabb9a98..236c661c 100644 --- a/comment_new.php +++ b/comment_new.php @@ -35,7 +35,7 @@ $tribes = $controller->tribesFactory->getObjects($criteria); $tribe = $tribes[0]; -$com_itemid = isset($_GET['com_itemid']) ? (int)$_GET['com_itemid'] : 0; +$com_itemid = \Xmf\Request::getInt('com_itemid', 0, 'GET'); if ($com_itemid > 0) { $com_replytitle = _MD_YOGURT_TRIBES . ': ' . $tribe->getVar('tribe_title'); require XOOPS_ROOT_PATH . '/include/comment_new.php'; diff --git a/delete_scrap.php b/delete_scrap.php index 3c6ff873..d16fabc7 100644 --- a/delete_scrap.php +++ b/delete_scrap.php @@ -26,7 +26,7 @@ */ $NotesFactory = new Yogurt\NotesHandler($xoopsDB); -$note_id = (int)$_POST['note_id']; +$note_id = \Xmf\Request::getInt('note_id', 0, 'POST'); if (1 != $_POST['confirm']) { xoops_confirm(['note_id' => $note_id, 'confirm' => 1], 'delete_Note.php', _MD_YOGURT_ASKCONFIRMNOTEDELETION, _MD_YOGURT_CONFIRMNOTEDELETION); diff --git a/delete_tribe.php b/delete_tribe.php index 45a3fc2f..4f76ac68 100644 --- a/delete_tribe.php +++ b/delete_tribe.php @@ -27,7 +27,7 @@ $reltribeuserFactory = new Yogurt\ReltribeuserHandler($xoopsDB); $tribesFactory = new Yogurt\TribesHandler($xoopsDB); -$tribe_id = (int)$_POST['tribe_id']; +$tribe_id = \Xmf\Request::getInt('tribe_id', 0, 'POST'); if (!isset($_POST['confirm']) || 1 != $_POST['confirm']) { xoops_confirm(['tribe_id' => $tribe_id, 'confirm' => 1], 'delete_tribe.php', _MD_YOGURT_ASKCONFIRMTRIBEDELETION, _MD_YOGURT_CONFIRMTRIBEDELETION); diff --git a/delfriendship.php b/delfriendship.php index 0ff75332..d0fd2823 100644 --- a/delfriendship.php +++ b/delfriendship.php @@ -29,7 +29,7 @@ /** * Getting the uid of the user which user want to ask to be friend */ -$friend1_uid = (int)$_POST['friend_uid']; +$friend1_uid = \Xmf\Request::getInt('friend_uid', 0, 'POST'); $friend2_uid = (int)$xoopsUser->getVar('uid'); $criteria_friend1 = new \Criteria('friend1_uid', $friend1_uid); diff --git a/editdesc.php b/editdesc.php index bda3d1ab..d4ce7486 100644 --- a/editdesc.php +++ b/editdesc.php @@ -26,7 +26,7 @@ } $cod_img = $_POST['cod_img']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$marker = \Xmf\Request::getInt('marker', 0, 'POST'); $uid = (int)$xoopsUser->getVar('uid'); if (1 == $marker) { diff --git a/editdescvideo.php b/editdescvideo.php index ebc78483..6af440c0 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -25,8 +25,8 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } -$cod_img = (int)$_POST['video_id']; -$marker = (int)$_POST['marker']; +$cod_img = \Xmf\Request::getInt('video_id', 0, 'POST'); +$marker = \Xmf\Request::getInt('marker', 0, 'POST'); $uid = (int)$xoopsUser->getVar('uid'); diff --git a/editfriendship.php b/editfriendship.php index 4f5d093d..423717a9 100644 --- a/editfriendship.php +++ b/editfriendship.php @@ -26,8 +26,8 @@ } $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$friend2_uid = (int)$_POST['friend_uid']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$friend2_uid = \Xmf\Request::getInt('friend_uid', 0, 'POST'); +$marker = \Xmf\Request::getInt('marker', 0, 'POST'); $friend = new \XoopsUser($friend2_uid); @@ -37,7 +37,7 @@ $sexy = $_POST['hot']; $trusty = $_POST['trust']; $fan = $_POST['fan']; - $friendship_id = (int)$_POST['friendship_id']; + $friendship_id = \Xmf\Request::getInt('friendship_id', 0, 'POST'); $criteria = new \Criteria('friendship_id', $friendship_id); $friendships = $friendshipFactory->getObjects($criteria); diff --git a/edittribe.php b/edittribe.php index e8e1fc62..1a4ee991 100644 --- a/edittribe.php +++ b/edittribe.php @@ -29,8 +29,8 @@ */ $nbSections = $controller->getNumbersSections(); -$tribe_id = (int)$_POST['tribe_id']; -$marker = (!empty($_POST['marker'])) ? (int)$_POST['marker'] : 0; +$tribe_id = \Xmf\Request::getInt('tribe_id', 0, 'POST'); +$marker = \Xmf\Request::getInt('marker', 0, 'POST'); $criteria = new \Criteria('tribe_id', $tribe_id); $tribes = $controller->tribesFactory->getObjects($criteria); $tribe = $tribes[0]; diff --git a/edituser.php b/edituser.php index 517ce554..68534fbc 100644 --- a/edituser.php +++ b/edituser.php @@ -66,7 +66,7 @@ } $uid = 0; if (!empty($_POST['uid'])) { - $uid = (int)$_POST['uid']; + $uid = \Xmf\Request::getInt('uid', 0, 'POST'); } if (empty($uid) || $xoopsUser->getVar('uid') != $uid) { redirect_header('index.php', 3, _US_NOEDITRIGHT); @@ -332,7 +332,7 @@ $xoops_upload_file = $_POST['xoops_upload_file']; } if (!empty($_POST['uid'])) { - $uid = (int)$_POST['uid']; + $uid = \Xmf\Request::getInt('uid', 0, 'POST'); } if (empty($uid) || $xoopsUser->getVar('uid') != $uid) { redirect_header('index.php', 3, _US_NOEDITRIGHT); @@ -383,7 +383,7 @@ } $uid = 0; if (!empty($_POST['uid'])) { - $uid = (int)$_POST['uid']; + $uid = \Xmf\Request::getInt('uid', 0, 'POST'); } if (empty($uid) || $xoopsUser->getVar('uid') != $uid) { redirect_header('index.php', 3, _US_NOEDITRIGHT); diff --git a/fans.php b/fans.php index 8d41710c..ecc2f1df 100644 --- a/fans.php +++ b/fans.php @@ -28,7 +28,7 @@ */ $nbSections = $controller->getNumbersSections(); -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Friends diff --git a/friends.php b/friends.php index e03fbead..2cf7ffad 100644 --- a/friends.php +++ b/friends.php @@ -29,7 +29,7 @@ */ $nbSections = $controller->getNumbersSections(); -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Friends diff --git a/header.php b/header.php index e0312c62..4e2c69b4 100644 --- a/header.php +++ b/header.php @@ -50,7 +50,7 @@ if (empty($xoopsUser)) { $isanonym = 1; if (isset($_GET['uid'])) { - $uid_owner = (int)$_GET['uid']; + $uid_owner = \Xmf\Request::getInt('uid', 0, 'GET'); } else { $uid_owner = 1; $isOwner = 0; @@ -58,7 +58,7 @@ } else { $isanonym = 0; if (isset($_GET['uid'])) { - $uid_owner = (int)$_GET['uid']; + $uid_owner = \Xmf\Request::getInt('uid', 0, 'GET'); $isOwner = ($xoopsUser->getVar('uid') == $uid_owner) ? 1 : 0; } else { $uid_owner = (int)$xoopsUser->getVar('uid'); diff --git a/index.php b/index.php index 1d96e82e..1a3a7379 100644 --- a/index.php +++ b/index.php @@ -43,7 +43,7 @@ * This variable define the beggining of the navigation must b * setted here so all calls to database will take this into account */ -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Filter for new friend petition diff --git a/ishot.php b/ishot.php index a2342dd4..5b27622b 100644 --- a/ishot.php +++ b/ishot.php @@ -27,8 +27,8 @@ */ $ishotFactory = new Yogurt\IshotHandler($xoopsDB); -$uid_voted = (int)$_POST['uid_voted']; -$ishot = (int)$_POST['ishot']; +$uid_voted = \Xmf\Request::getInt('uid_voted', 0, 'POST'); +$ishot = \Xmf\Request::getInt('ishot', 0, 'POST'); $uid_voter = (int)$xoopsUser->getVar('uid'); if (!$GLOBALS['xoopsSecurity']->check()) { diff --git a/kickfromtribe.php b/kickfromtribe.php index e5dc3304..ac301864 100644 --- a/kickfromtribe.php +++ b/kickfromtribe.php @@ -21,8 +21,8 @@ require __DIR__ . '/header.php'; -$tribe_id = (int)$_POST['tribe_id']; -$rel_user_uid = (int)$_POST['rel_user_uid']; +$tribe_id = \Xmf\Request::getInt('tribe_id', 0, 'POST'); +$rel_user_uid = \Xmf\Request::getInt('rel_user_uid', 0, 'POST'); if (1 != $_POST['confirm']) { xoops_confirm(['rel_user_uid' => $rel_user_uid, 'tribe_id' => $tribe_id, 'confirm' => 1], 'kickfromtribe.php', _MD_YOGURT_ASKCONFIRMKICKFROMTRIBE, _MD_YOGURT_CONFIRMKICK); diff --git a/mainvideo.php b/mainvideo.php index 40414d71..2892ffe4 100644 --- a/mainvideo.php +++ b/mainvideo.php @@ -25,7 +25,7 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } -$cod_img = (int)$_POST['video_id']; +$cod_img = \Xmf\Request::getInt('video_id', 0, 'POST'); /** * Creating the factory loading the video changing its caption diff --git a/makefriends.php b/makefriends.php index dd8ffaa7..f2fefaea 100644 --- a/makefriends.php +++ b/makefriends.php @@ -31,8 +31,8 @@ $friendpetitionFactory = new Yogurt\FriendpetitionHandler($xoopsDB); $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); -$petition_id = (int)$_POST['petition_id']; -$friendship_level = (int)$_POST['level']; +$petition_id = \Xmf\Request::getInt('petition_id', 0, 'POST'); +$friendship_level = \Xmf\Request::getInt('level', 0, 'POST'); $uid = (int)$xoopsUser->getVar('uid'); if (!$GLOBALS['xoopsSecurity']->check()) { diff --git a/private.php b/private.php index 00be41e5..7f4e0551 100644 --- a/private.php +++ b/private.php @@ -35,7 +35,7 @@ $pictureFactory = new Yogurt\ImageHandler($xoopsDB); $picture = $pictureFactory->create(false); $picture->load($cod_img); -$picture->setVar('private', (int)$_POST['private']); +$picture->setVar('private', \Xmf\Request::getInt('private', 0, 'POST')); /** * Verifying who's the owner to allow changes diff --git a/search.php b/search.php index 9be3a1f8..beaca22a 100644 --- a/search.php +++ b/search.php @@ -348,7 +348,7 @@ $limit = isset($_REQUEST['limit']) && (int)$_REQUEST['limit'] > 0 ? (int)$_REQUEST['limit'] : 20; $criteria->setLimit($limit); - $start = isset($_REQUEST['start']) ? (int)$_REQUEST['start'] : 0; + $start = \Xmf\Request::getInt('start', 0, 'REQUEST'); $criteria->setStart($start); //Get users based on criteria diff --git a/search_tribe.php b/search_tribe.php index 6a724941..c7bda110 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -29,8 +29,8 @@ */ $nbSections = $controller->getNumbersSections(); -$start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0; -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; +$start_all = \Xmf\Request::getInt('start_all', 0, 'GET'); +$start_my = \Xmf\Request::getInt('start_my', 0, 'GET'); $tribe_keyword = trim(htmlspecialchars($_GET['tribe_keyword'], ENT_QUOTES | ENT_HTML5)); /** diff --git a/searchmembers.php b/searchmembers.php index f4bacaca..afccfac7 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -300,7 +300,7 @@ } } if (!empty($_POST['user_reg_less']) && is_numeric($_POST['user_reg_less'])) { - $f_user_reg_less = (int)$_POST['user_reg_less']; + $f_user_reg_less = \Xmf\Request::getInt('user_reg_less', 0, 'POST'); $time = time() - (60 * 60 * 24 * $f_user_reg_less); if ($time > 0) { $criteria->add(new \Criteria('user_regdate', $time, '>')); @@ -319,12 +319,12 @@ if (isset($_POST['user_order']) && 'DESC' == $_POST['user_order']) { $order = 'DESC'; } - $limit = (!empty($_POST['limit'])) ? (int)$_POST['limit'] : 20; + $limit = \Xmf\Request::getInt('limit', 20, 'POST'); if (0 == $limit || $limit > 50) { $limit = 50; } - $start = (!empty($_POST['start'])) ? (int)$_POST['start'] : 0; + $start = \Xmf\Request::getInt('start', 0, 'POST'); $memberHandler = xoops_getHandler('member'); $total = $memberHandler->getUserCount($criteria); $xoopsTpl->assign('lang_search', _MD_YOGURT_SEARCH); diff --git a/suspend.php b/suspend.php index fca57cf1..44f949b1 100644 --- a/suspend.php +++ b/suspend.php @@ -27,7 +27,7 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 5, _MD_YOGURT_TOKENEXPIRED); } -$uid = (int)$_POST['uid']; +$uid = \Xmf\Request::getInt('uid', 0, 'POST'); /** * Creating the factory loading the picture changing its caption */ diff --git a/tribe.php b/tribe.php index defdf931..07881ff2 100644 --- a/tribe.php +++ b/tribe.php @@ -29,7 +29,7 @@ */ $nbSections = $controller->getNumbersSections(); -$tribe_id = (int)$_GET['tribe_id']; +$tribe_id = \Xmf\Request::getInt('tribe_id', 0, 'GET'); $criteria = new \Criteria('tribe_id', $tribe_id); $tribes = $controller->tribesFactory->getObjects($criteria); $tribe = $tribes[0]; diff --git a/tribes.php b/tribes.php index 206bd45d..4913cb7c 100644 --- a/tribes.php +++ b/tribes.php @@ -29,8 +29,8 @@ */ $nbSections = $controller->getNumbersSections(); -$start_all = isset($_GET['start_all']) ? (int)$_GET['start_all'] : 0; -$start_my = isset($_GET['start_my']) ? (int)$_GET['start_my'] : 0; +$start_all = \Xmf\Request::getInt('start_all', 0, 'GET'); +$start_my = \Xmf\Request::getInt('start_my', 0, 'GET'); /** * All Tribes diff --git a/unsuspenduser.php b/unsuspenduser.php index 02416e1e..6ff465f8 100644 --- a/unsuspenduser.php +++ b/unsuspenduser.php @@ -25,7 +25,7 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_TOKENEXPIRED); } -$uid = (int)$_POST['uid']; +$uid = \Xmf\Request::getInt('uid', 0, 'POST'); /** * Creating the factory loading the picture changing its caption */ diff --git a/video.php b/video.php index 0a27c1ec..ab19c989 100644 --- a/video.php +++ b/video.php @@ -29,7 +29,7 @@ */ $nbSections = $controller->getNumbersSections(); -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; +$start = \Xmf\Request::getInt('start', 0, 'GET'); /** * Criteria for Videos From e7ebf7017b1df0e045de0716565b8d3dbe31d4b7 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:07:40 -0400 Subject: [PATCH 32/43] cosmetics --- abandontribe.php | 2 +- album.php | 6 +- audio.php | 6 +- avatar.php | 2 +- becomemembertribe.php | 2 +- class/AudioController.php | 4 +- class/Configs.php | 2 +- class/ConfigsHandler.php | 8 +- class/ControllerConfigs.php | 4 +- class/ControllerFriends.php | 4 +- class/ControllerIndex.php | 4 +- class/ControllerNotes.php | 16 ++-- class/ControllerPhotos.php | 4 +- class/ControllerTribes.php | 4 +- class/Notes.php | 10 +-- class/NotesHandler.php | 74 +++++++++---------- class/VideoController.php | 4 +- class/VideoHandler.php | 10 +-- class/YogurtController.php | 12 +-- class/common/FileChecker.php | 2 +- config/config.php | 3 +- configs.php | 14 ++-- delaudio.php | 2 +- delete_scrap.php => delete_note.php | 8 +- delete_tribe.php | 2 +- delfriendship.php | 2 +- delpicture.php | 2 +- delvideo.php | 2 +- editdesc.php | 2 +- editdescvideo.php | 2 +- editfriendship.php | 4 +- edittribe.php | 6 +- edituser.php | 2 +- fans.php | 6 +- friends.php | 6 +- include/notification.inc.php | 2 +- index.php | 4 +- ishot.php | 2 +- kickfromtribe.php | 2 +- ...rap_notify.tpl => note_newnote_notify.tpl} | 0 ...rap_notify.tpl => note_newnote_notify.tpl} | 0 ...rap_notify.tpl => note_newnote_notify.tpl} | 0 ...rap_notify.tpl => note_newnote_notify.tpl} | 0 mainvideo.php | 2 +- makefriends.php | 2 +- notebook.php | 10 +-- preloads/autoloader.php | 2 +- private.php | 2 +- search_tribe.php | 12 +-- searchmembers.php | 4 +- submitNote.php | 6 +- submit_configs.php | 6 +- suspend.php | 2 +- templates/yogurt_navbar.tpl | 2 +- templates/yogurt_notebook.tpl | 20 ++--- tribe.php | 6 +- tribes.php | 6 +- unsuspenduser.php | 2 +- video.php | 6 +- video_submited.php | 2 +- xoops_version.php | 4 +- 61 files changed, 175 insertions(+), 174 deletions(-) rename delete_scrap.php => delete_note.php (88%) rename language/english/mail_template/{scrap_newscrap_notify.tpl => note_newnote_notify.tpl} (100%) rename language/german/mail_template/{scrap_newscrap_notify.tpl => note_newnote_notify.tpl} (100%) rename language/persian/mail_template/{scrap_newscrap_notify.tpl => note_newnote_notify.tpl} (100%) rename language/portuguesebr/mail_template/{scrap_newscrap_notify.tpl => note_newnote_notify.tpl} (100%) diff --git a/abandontribe.php b/abandontribe.php index 44a21ae0..ccc7129c 100644 --- a/abandontribe.php +++ b/abandontribe.php @@ -55,4 +55,4 @@ redirect_header('tribes.php', 1, _MD_YOGURT_NOCACHACA); } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/album.php b/album.php index b25b5052..09e8fda0 100644 --- a/album.php +++ b/album.php @@ -126,7 +126,7 @@ * Assigning smarty variables */ //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -142,7 +142,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -187,4 +187,4 @@ require XOOPS_ROOT_PATH . '/include/comment_view.php'; -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/audio.php b/audio.php index 8f9ecaa1..3f74b963 100644 --- a/audio.php +++ b/audio.php @@ -85,7 +85,7 @@ $xoopsTpl->assign('lang_year', _MD_YOGURT_META_YEAR); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -102,7 +102,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -147,4 +147,4 @@ //Videos NAvBAr $xoopsTpl->assign('pageNav', $pageNav); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/avatar.php b/avatar.php index fa2d4355..c1dc8e14 100644 --- a/avatar.php +++ b/avatar.php @@ -56,4 +56,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/becomemembertribe.php b/becomemembertribe.php index fcf02396..64e2615e 100644 --- a/becomemembertribe.php +++ b/becomemembertribe.php @@ -51,4 +51,4 @@ redirect_header('tribes.php', 1, _MD_YOGURT_YOUAREMEMBERALREADY); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/class/AudioController.php b/class/AudioController.php index da27a610..2791ac82 100644 --- a/class/AudioController.php +++ b/class/AudioController.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/Configs.php b/class/Configs.php index 19b5a297..df91d1fd 100644 --- a/class/Configs.php +++ b/class/Configs.php @@ -33,7 +33,7 @@ public function __construct($id = null) $this->initVar('audio', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('videos', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('tribes', XOBJ_DTYPE_INT, null, false, 10); - $this->initVar('Notes', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('notes', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('friends', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('profile_contact', XOBJ_DTYPE_INT, null, false, 10); $this->initVar('profile_general', XOBJ_DTYPE_INT, null, false, 10); diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index eb0833eb..9e3a3386 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -87,7 +87,7 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) if ($yogurt_configs->isNew()) { // ajout/modification d'un Configs $yogurt_configs = new Configs(); - $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, Notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; + $format = 'INSERT INTO %s (config_id, config_uid, pictures, audio, videos, tribes, notes, friends, profile_contact, profile_general, profile_stats, suspension, backup_password, backup_email, end_suspension)'; $format .= 'VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %s)'; $sql = sprintf( $format, @@ -98,7 +98,7 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) $audio, $videos, $tribes, - $Notes, + $notes, $friends, $profile_contact, $profile_general, @@ -111,7 +111,7 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) $force = true; } else { $format = 'UPDATE %s SET '; - $format .= 'config_id=%u, config_uid=%u, pictures=%u, audio=%u, videos=%u, tribes=%u, Notes=%u, friends=%u, profile_contact=%u, profile_general=%u, profile_stats=%u, suspension=%u, backup_password=%s, backup_email=%s, end_suspension=%s'; + $format .= 'config_id=%u, config_uid=%u, pictures=%u, audio=%u, videos=%u, tribes=%u, notes=%u, friends=%u, profile_contact=%u, profile_general=%u, profile_stats=%u, suspension=%u, backup_password=%s, backup_email=%s, end_suspension=%s'; $format .= ' WHERE config_id = %u'; $sql = sprintf( $format, @@ -122,7 +122,7 @@ public function insert(\XoopsObject $yogurt_configs, $force = false) $audio, $videos, $tribes, - $Notes, + $notes, $friends, $profile_contact, $profile_general, diff --git a/class/ControllerConfigs.php b/class/ControllerConfigs.php index 9fef5dde..428f75cf 100644 --- a/class/ControllerConfigs.php +++ b/class/ControllerConfigs.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/ControllerFriends.php b/class/ControllerFriends.php index 8daef6dc..508238cb 100644 --- a/class/ControllerFriends.php +++ b/class/ControllerFriends.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/ControllerIndex.php b/class/ControllerIndex.php index adffd322..00574ca3 100644 --- a/class/ControllerIndex.php +++ b/class/ControllerIndex.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index 2a30dc05..dc5022da 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; @@ -68,15 +68,15 @@ class ControllerNotes extends YogurtController // } /** - * @param $nb_Notes + * @param $nb_notes * @param $criteria * @return bool */ - public function fecthNotes($nb_Notes, $criteria) + public function fetchNotes($nb_notes, $criteria) { - $Notes = $this->NotesFactory->getNotes($nb_Notes, $criteria); - if ($Notes) { - return $Notes; + $notes = $this->notesFactory->getNotes($nb_notes, $criteria); + if ($notes) { + return $notes; } return false; @@ -104,7 +104,7 @@ public function checkPrivilege($privilegeType = '') if (1 == $this->configsFactory->getCount($criteria)) { $configs = $this->configsFactory->getObjects($criteria); - $config = $configs[0]->getVar('Notes'); + $config = $configs[0]->getVar('notes'); if (!$this->checkPrivilegeLevel($config)) { redirect_header('index.php?uid=' . $this->owner->getVar('uid'), 10, _MD_YOGURT_NOPRIVILEGE); diff --git a/class/ControllerPhotos.php b/class/ControllerPhotos.php index e0e23dae..b38acd23 100644 --- a/class/ControllerPhotos.php +++ b/class/ControllerPhotos.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/ControllerTribes.php b/class/ControllerTribes.php index 20a8d729..0dcc1774 100644 --- a/class/ControllerTribes.php +++ b/class/ControllerTribes.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/Notes.php b/class/Notes.php index ef7f5af7..ddd47b8c 100644 --- a/class/Notes.php +++ b/class/Notes.php @@ -50,7 +50,7 @@ public function __construct($id = null) */ public function load($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE note_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_notes') . ' WHERE note_id=' . $id; $myrow = $this->db->fetchArray($this->db->query($sql)); $this->assignVars($myrow); if (!$myrow) { @@ -67,7 +67,7 @@ public function load($id) * @param int $start * @return array */ - public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = 'note_id', $order = 'ASC', $limit = 0, $start = 0) + public function getAllyogurt_Notes($criteria = [], $asobject = false, $sort = 'note_id', $order = 'ASC', $limit = 0, $start = 0) { $db = \XoopsDatabaseFactory::getDatabaseConnection(); $ret = []; @@ -82,13 +82,13 @@ public function getAllyogurt_Notess($criteria = [], $asobject = false, $sort = ' $where_query = ' WHERE ' . $criteria; } if (!$asobject) { - $sql = 'SELECT note_id FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT note_id FROM ' . $db->prefix('yogurt_notes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { - $ret[] = $myrow['yogurt_Notes_id']; + $ret[] = $myrow['yogurt_notes_id']; } } else { - $sql = 'SELECT * FROM ' . $db->prefix('yogurt_Notes') . "$where_query ORDER BY $sort $order"; + $sql = 'SELECT * FROM ' . $db->prefix('yogurt_notes') . "$where_query ORDER BY $sort $order"; $result = $db->query($sql, $limit, $start); while (false !== ($myrow = $db->fetchArray($result))) { $ret[] = new self($myrow); diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 3b16ac48..57636193 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -15,7 +15,7 @@ // ------------------------------------------------------------------------- /** - * yogurt_Noteshandler class. + * NotesHandler class. * This class provides simple mecanisme forNotes object */ class NotesHandler extends \XoopsObjectHandler @@ -28,14 +28,14 @@ class NotesHandler extends \XoopsObjectHandler */ public function create($isNew = true) { - $yogurt_Notes = new Notes(); + $yogurt_notes = new Notes(); if ($isNew) { - $yogurt_Notes->setNew(); + $yogurt_notes->setNew(); } else { - $yogurt_Notes->unsetNew(); + $yogurt_notes->unsetNew(); } - return $yogurt_Notes; + return $yogurt_notes; } /** @@ -46,16 +46,16 @@ public function create($isNew = true) */ public function get($id) { - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes') . ' WHERE note_id=' . $id; + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_notes') . ' WHERE note_id=' . $id; if (!$result = $this->db->query($sql)) { return false; } $numrows = $this->db->getRowsNum($result); if (1 == $numrows) { - $yogurt_Notes = new Notes(); - $yogurt_Notes->assignVars($this->db->fetchArray($result)); + $yogurt_notes = new Notes(); + $yogurt_notes->assignVars($this->db->fetchArray($result)); - return $yogurt_Notes; + return $yogurt_notes; } return false; @@ -64,35 +64,35 @@ public function get($id) /** * insert a new Notes in the database * - * @param \XoopsObject $yogurt_Notes reference to the {@linkNotes} + * @param \XoopsObject $yogurt_notes reference to the {@linkNotes} * object * @param bool $force * @return bool FALSE if failed, TRUE if already present and unchanged or successful */ - public function insert(\XoopsObject $yogurt_Notes, $force = false) + public function insert(\XoopsObject $yogurt_notes, $force = false) { global $xoopsConfig; - if (!$yogurt_Notes instanceof Notes) { + if (!$yogurt_notes instanceof Notes) { return false; } - if (!$yogurt_Notes->isDirty()) { + if (!$yogurt_notes->isDirty()) { return true; } - if (!$yogurt_Notes->cleanVars()) { + if (!$yogurt_notes->cleanVars()) { return false; } - foreach ($yogurt_Notes->cleanVars as $k => $v) { + foreach ($yogurt_notes->cleanVars as $k => $v) { ${$k} = $v; } $now = 'date_add(now(), interval ' . $xoopsConfig['server_TZ'] . ' hour)'; - if ($yogurt_Notes->isNew()) { + if ($yogurt_notes->isNew()) { // ajout/modification d'unNotes - $yogurt_Notes = new Notes(); + $yogurt_notes = new Notes(); $format = 'INSERT INTO %s (note_id, note_text, note_from, note_to, private)'; $format .= 'VALUES (%u, %s, %u, %u, %u)'; $sql = sprintf( $format, - $this->db->prefix('yogurt_Notes'), + $this->db->prefix('yogurt_notes'), $note_id, $this->db->quoteString($note_text), $note_from, @@ -104,7 +104,7 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) $format = 'UPDATE %s SET '; $format .= 'note_id=%u, note_text=%s, note_from=%u, note_to=%u, private=%u'; $format .= ' WHERE note_id = %u'; - $sql = sprintf($format, $this->db->prefix('yogurt_Notes'), $note_id, $this->db->quoteString($note_text), $note_from, $note_to, $private, $note_id); + $sql = sprintf($format, $this->db->prefix('yogurt_notes'), $note_id, $this->db->quoteString($note_text), $note_from, $note_to, $private, $note_id); } if ($force) { $result = $this->db->queryF($sql); @@ -117,7 +117,7 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) if (empty($note_id)) { $note_id = $this->db->getInsertId(); } - $yogurt_Notes->assignVar('note_id', $note_id); + $yogurt_notes->assignVar('note_id', $note_id); return true; } @@ -125,16 +125,16 @@ public function insert(\XoopsObject $yogurt_Notes, $force = false) /** * delete aNotes from the database * - * @param \XoopsObject $yogurt_Notes reference to theNotes to delete + * @param \XoopsObject $yogurt_notes reference to theNotes to delete * @param bool $force * @return bool FALSE if failed. */ - public function delete(\XoopsObject $yogurt_Notes, $force = false) + public function delete(\XoopsObject $yogurt_notes, $force = false) { - if (!$yogurt_Notes instanceof Notes) { + if (!$yogurt_notes instanceof Notes) { return false; } - $sql = sprintf('DELETE FROM %s WHERE note_id = %u', $this->db->prefix('yogurt_Notes'), $yogurt_Notes->getVar('note_id')); + $sql = sprintf('DELETE FROM %s WHERE note_id = %u', $this->db->prefix('yogurt_notes'), $yogurt_notes->getVar('note_id')); if ($force) { $result = $this->db->queryF($sql); } else { @@ -148,7 +148,7 @@ public function delete(\XoopsObject $yogurt_Notes, $force = false) } /** - * retrieve yogurt_Notess from the database + * retrieve yogurt_notes from the database * * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? @@ -158,7 +158,7 @@ public function &getObjects($criteria = null, $id_as_key = false) { $ret = []; $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_Notes'); + $sql = 'SELECT * FROM ' . $this->db->prefix('yogurt_notes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); if ('' != $criteria->getSort()) { @@ -172,28 +172,28 @@ public function &getObjects($criteria = null, $id_as_key = false) return $ret; } while (false !== ($myrow = $this->db->fetchArray($result))) { - $yogurt_Notes = new Notes(); - $yogurt_Notes->assignVars($myrow); + $yogurt_notes = new Notes(); + $yogurt_notes->assignVars($myrow); if (!$id_as_key) { - $ret[] = &$yogurt_Notes; + $ret[] = &$yogurt_notes; } else { - $ret[$myrow['note_id']] = &$yogurt_Notes; + $ret[$myrow['note_id']] = &$yogurt_notes; } - unset($yogurt_Notes); + unset($yogurt_notes); } return $ret; } /** - * count yogurt_Notess matching a condition + * count yogurt_notes matching a condition * * @param \XoopsObject $criteria {@link CriteriaElement} to match - * @return int count of yogurt_Notess + * @return int count of yogurt_notes */ public function getCount($criteria = null) { - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_Notes'); + $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('yogurt_notes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); } @@ -207,14 +207,14 @@ public function getCount($criteria = null) } /** - * delete yogurt_Notess matching a set of conditions + * delete yogurt_notes matching a set of conditions * * @param \XoopsObject $criteria {@link CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) { - $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_Notes'); + $sql = 'DELETE FROM ' . $this->db->prefix('yogurt_notes'); if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); } @@ -234,7 +234,7 @@ public function getNotes($nbNotes, $criteria) { $myts = new \MyTextSanitizer(); $ret = []; - $sql = 'SELECT note_id, uid, uname, user_avatar, note_from, note_text FROM ' . $this->db->prefix('yogurt_Notes') . ', ' . $this->db->prefix('users'); + $sql = 'SELECT note_id, uid, uname, user_avatar, note_from, note_text FROM ' . $this->db->prefix('yogurt_notes') . ', ' . $this->db->prefix('users'); if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack diff --git a/class/VideoController.php b/class/VideoController.php index fe2cf2b2..907984ae 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; diff --git a/class/VideoHandler.php b/class/VideoHandler.php index 2dfad1ee..5358f49e 100644 --- a/class/VideoHandler.php +++ b/class/VideoHandler.php @@ -63,7 +63,7 @@ public function get($id) /** * insert a new Video in the database * - * @param \XoopsObject $yogurt_video reference to the {@link Video} + * @param \XoopsObject $yogurt_video reference to the {@link Video} * object * @param bool $force * @return bool FALSE if failed, TRUE if already present and unchanged or successful @@ -87,10 +87,10 @@ public function insert(\XoopsObject $yogurt_video, $force = false) if ($yogurt_video->isNew()) { // ajout/modification d'un Video $yogurt_video = new Video(); - $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; - $format .= 'VALUES (%u, %u, %s, %s, %s)'; - $sql = sprintf($format, $this->db->prefix('yogurt_video'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); - $force = true; + $format = 'INSERT INTO %s (video_id, uid_owner, video_desc, youtube_code, main_video)'; + $format .= 'VALUES (%u, %u, %s, %s, %s)'; + $sql = sprintf($format, $this->db->prefix('yogurt_video'), $video_id, $uid_owner, $this->db->quoteString($video_desc), $this->db->quoteString($youtube_code), $this->db->quoteString($main_video)); + $force = true; } else { $format = 'UPDATE %s SET '; $format .= 'video_id=%u, uid_owner=%u, video_desc=%s, youtube_code=%s, main_video=%s'; diff --git a/class/YogurtController.php b/class/YogurtController.php index 8921107d..f26630d6 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -27,9 +27,9 @@ * Module classes */ //require_once __DIR__ . '/Image.php'; -//require_once __DIR__ . '/yogurt_visitors.php'; +//require_once __DIR__ . '/Visitors.php'; //require_once __DIR__ . '/Video.php'; -//require_once __DIR__ . '/yogurt_audio.php'; +//require_once __DIR__ . '/Audio.php'; //require_once __DIR__ . '/Friendpetition.php'; //require_once __DIR__ . '/Friendship.php'; //require_once __DIR__ . '/Reltribeuser.php'; @@ -64,7 +64,7 @@ class YogurtController extends \XoopsObject public $reltribeusersFactory; public $suspensionsFactory; public $tribesFactory; - public $NotesFactory; + public $notesFactory; public $configsFactory; public $section; public $privilegeLevel; @@ -74,7 +74,7 @@ class YogurtController extends \XoopsObject * Constructor * * @param \XoopsDatabase $db - * @param $user + * @param $user */ public function __construct(\XoopsDatabase $db, $user) { @@ -233,7 +233,7 @@ public function getNumbersSections() $criteriaUidVideo = new \Criteria('uid_owner', $this->uidOwner); $nbSections['nbVideos'] = $this->videosFactory->getCount($criteriaUidVideo); $criteriaUidNotes = new \Criteria('note_to', $this->uidOwner); - $nbSections['nbNotes'] = $this->NotesFactory->getCount($criteriaUidNotes); + $nbSections['nbNotes'] = $this->notesFactory->getCount($criteriaUidNotes); return $nbSections; } @@ -250,7 +250,7 @@ public function createFactories() $this->petitionsFactory = new FriendpetitionHandler($this->db); $this->friendshipsFactory = new FriendshipHandler($this->db); $this->reltribeusersFactory = new ReltribeuserHandler($this->db); - $this->NotesFactory = new NotesHandler($this->db); + $this->notesFactory = new NotesHandler($this->db); $this->tribesFactory = new TribesHandler($this->db); $this->configsFactory = new ConfigsHandler($this->db); $this->suspensionsFactory = new SuspensionsHandler($this->db); diff --git a/class/common/FileChecker.php b/class/common/FileChecker.php index 350484cd..2f1d7ad6 100644 --- a/class/common/FileChecker.php +++ b/class/common/FileChecker.php @@ -39,7 +39,7 @@ class FileChecker /** * @param string $file_path * @param string|null $original_file_path - * @param string|null $redirectFile + * @param string|null $redirectFile * @return bool|string */ public static function getFileStatus($file_path, $original_file_path = null, $redirectFile = null) diff --git a/config/config.php b/config/config.php index e296b273..25af9556 100644 --- a/config/config.php +++ b/config/config.php @@ -74,7 +74,8 @@ '/tcpdf', ], - 'renameTables' => [ 'yogurt_seutubo' => 'yogurt_video', + 'renameTables' => [ + 'yogurt_seutubo' => 'yogurt_video', ], 'moduleStats' => [ // 'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1), diff --git a/configs.php b/configs.php index be00ab90..2873e790 100644 --- a/configs.php +++ b/configs.php @@ -45,7 +45,7 @@ $aud = $config->getVar('audio'); $vid = $config->getVar('videos'); $tri = $config->getVar('tribes'); - $scr = $config->getVar('Notes'); + $scr = $config->getVar('notes'); $fri = $config->getVar('friends'); $pcon = $config->getVar('profile_contact'); $pgen = $config->getVar('profile_general'); @@ -82,7 +82,7 @@ $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -97,8 +97,8 @@ $xoopsTpl->assign('lang_configprofilegeneral', _MD_YOGURT_CONFIGSPROFILEGENERAL); $xoopsTpl->assign('lang_configprofilecontact', _MD_YOGURT_CONFIGSPROFILECONTACT); $xoopsTpl->assign('lang_configfriends', _MD_YOGURT_CONFIGSFRIENDS); -$xoopsTpl->assign('lang_configNotes', _MD_YOGURT_CONFIGSNOTES); -$xoopsTpl->assign('lang_configsendNotes', _MD_YOGURT_CONFIGSNOTESSEND); +$xoopsTpl->assign('lang_confignotes', _MD_YOGURT_CONFIGSNOTES); +$xoopsTpl->assign('lang_configsendnotes', _MD_YOGURT_CONFIGSNOTESSEND); $xoopsTpl->assign('lang_configtribes', _MD_YOGURT_CONFIGSTRIBES); $xoopsTpl->assign('lang_configaudio', _MD_YOGURT_CONFIGSAUDIOS); $xoopsTpl->assign('lang_configvideos', _MD_YOGURT_CONFIGSVIDEOS); @@ -114,7 +114,7 @@ $xoopsTpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); //Notes -//$xoopsTpl->assign('Notes',$Notes); +//$xoopsTpl->assign('notes',$notes); $xoopsTpl->assign('lang_answerNote', _MD_YOGURT_ANSWERNOTE); //Owner data @@ -127,7 +127,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -148,4 +148,4 @@ //xoopsToken $xoopsTpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delaudio.php b/delaudio.php index deebf5fa..c343b660 100644 --- a/delaudio.php +++ b/delaudio.php @@ -57,4 +57,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delete_scrap.php b/delete_note.php similarity index 88% rename from delete_scrap.php rename to delete_note.php index d16fabc7..03f5a0df 100644 --- a/delete_scrap.php +++ b/delete_note.php @@ -24,7 +24,7 @@ /** * Factories of tribes */ -$NotesFactory = new Yogurt\NotesHandler($xoopsDB); +$notesFactory = new Yogurt\NotesHandler($xoopsDB); $note_id = \Xmf\Request::getInt('note_id', 0, 'POST'); @@ -44,8 +44,8 @@ /** * Try to delete */ - if (1 == $NotesFactory->getCount($criteria)) { - if ($NotesFactory->deleteAll($criteria)) { + if (1 == $notesFactory->getCount($criteria)) { + if ($notesFactory->deleteAll($criteria)) { redirect_header('notebook.php?uid=' . $uid, 2, _MD_YOGURT_NOTEDELETED); } else { redirect_header('notebook.php?uid=' . $uid, 2, _MD_YOGURT_NOCACHACA); @@ -53,4 +53,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delete_tribe.php b/delete_tribe.php index 4f76ac68..e7b22120 100644 --- a/delete_tribe.php +++ b/delete_tribe.php @@ -56,4 +56,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delfriendship.php b/delfriendship.php index d0fd2823..a4b4023a 100644 --- a/delfriendship.php +++ b/delfriendship.php @@ -50,4 +50,4 @@ redirect_header('friends.php', 3, _MD_YOGURT_FRIENDSHIPTERMINATED); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delpicture.php b/delpicture.php index 87795812..7b1680d8 100644 --- a/delpicture.php +++ b/delpicture.php @@ -66,4 +66,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/delvideo.php b/delvideo.php index e2ba5d28..93c574e8 100644 --- a/delvideo.php +++ b/delvideo.php @@ -51,4 +51,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editdesc.php b/editdesc.php index d4ce7486..808508f6 100644 --- a/editdesc.php +++ b/editdesc.php @@ -72,4 +72,4 @@ $url = XOOPS_URL . '/uploads/thumb_' . $url; $albumFactory->renderFormEdit($caption, $cod_img, $url); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editdescvideo.php b/editdescvideo.php index 6af440c0..e1cdd91c 100644 --- a/editdescvideo.php +++ b/editdescvideo.php @@ -72,4 +72,4 @@ $albumFactory->renderFormEdit($caption, $cod_img, $url); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/editfriendship.php b/editfriendship.php index 423717a9..90546530 100644 --- a/editfriendship.php +++ b/editfriendship.php @@ -27,7 +27,7 @@ $friendshipFactory = new Yogurt\FriendshipHandler($xoopsDB); $friend2_uid = \Xmf\Request::getInt('friend_uid', 0, 'POST'); -$marker = \Xmf\Request::getInt('marker', 0, 'POST'); +$marker = \Xmf\Request::getInt('marker', 0, 'POST'); $friend = new \XoopsUser($friend2_uid); @@ -55,4 +55,4 @@ $friendshipFactory->renderFormSubmit($friend); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/edittribe.php b/edittribe.php index 1a4ee991..2533d652 100644 --- a/edittribe.php +++ b/edittribe.php @@ -65,7 +65,7 @@ $xoopsTpl->assign('tribe_id', $tribe->getVar('tribe_id')); //permissions - $xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); + $xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -93,7 +93,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); - $xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); + $xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -129,4 +129,4 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/edituser.php b/edituser.php index 68534fbc..171390b2 100644 --- a/edituser.php +++ b/edituser.php @@ -23,7 +23,7 @@ // require_once XOOPS_ROOT_PATH . '/language/english/user.php'; //} -require_once dirname(dirname(__DIR__)) . '/class/pagenav.php'; +require_once dirname(dirname(__DIR__)) . '/class/pagenav.php'; require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; diff --git a/fans.php b/fans.php index ecc2f1df..1c848558 100644 --- a/fans.php +++ b/fans.php @@ -76,7 +76,7 @@ $navegacao = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -93,7 +93,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -128,4 +128,4 @@ $xoopsTpl->assign('lang_delete', _MD_YOGURT_DELETE); $xoopsTpl->assign('lang_evaluate', _MD_YOGURT_FRIENDSHIPCONFIGS); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/friends.php b/friends.php index 2cf7ffad..4bdf4a79 100644 --- a/friends.php +++ b/friends.php @@ -74,7 +74,7 @@ $navegacao = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -91,7 +91,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -126,4 +126,4 @@ $xoopsTpl->assign('lang_delete', _MD_YOGURT_DELETE); $xoopsTpl->assign('lang_evaluate', _MD_YOGURT_FRIENDSHIPCONFIGS); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/include/notification.inc.php b/include/notification.inc.php index f28fd1a2..5270aee1 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -74,7 +74,7 @@ function yogurt_iteminfo($category, $item_id) } if ('Note' == $category) { - $sql = 'SELECT note_id, note_from, note_to, note_text FROM ' . $xoopsDB->prefix('yogurt_Notes') . ' WHERE note_from = ' . $item_id . ' LIMIT 1'; + $sql = 'SELECT note_id, note_from, note_to, note_text FROM ' . $xoopsDB->prefix('yogurt_notes') . ' WHERE note_from = ' . $item_id . ' LIMIT 1'; $result = $xoopsDB->query($sql); $result_array = $xoopsDB->fetchArray($result); /** diff --git a/index.php b/index.php index 1a3a7379..ec2c4efd 100644 --- a/index.php +++ b/index.php @@ -160,7 +160,7 @@ //permissions $xoopsTpl->assign('allow_friends', $controller->checkPrivilege('friends')); -$xoopsTpl->assign('allow_notes', $controller->checkPrivilege('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilege('notes')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilege('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilege('pictures')); $xoopsTpl->assign('allow_videos', $controller->checkPrivilege('videos')); @@ -199,7 +199,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); diff --git a/ishot.php b/ishot.php index 5b27622b..9f070542 100644 --- a/ishot.php +++ b/ishot.php @@ -67,4 +67,4 @@ redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 3, _MD_YOGURT_ALREADYVOTED); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/kickfromtribe.php b/kickfromtribe.php index ac301864..76f70158 100644 --- a/kickfromtribe.php +++ b/kickfromtribe.php @@ -54,4 +54,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/language/english/mail_template/scrap_newscrap_notify.tpl b/language/english/mail_template/note_newnote_notify.tpl similarity index 100% rename from language/english/mail_template/scrap_newscrap_notify.tpl rename to language/english/mail_template/note_newnote_notify.tpl diff --git a/language/german/mail_template/scrap_newscrap_notify.tpl b/language/german/mail_template/note_newnote_notify.tpl similarity index 100% rename from language/german/mail_template/scrap_newscrap_notify.tpl rename to language/german/mail_template/note_newnote_notify.tpl diff --git a/language/persian/mail_template/scrap_newscrap_notify.tpl b/language/persian/mail_template/note_newnote_notify.tpl similarity index 100% rename from language/persian/mail_template/scrap_newscrap_notify.tpl rename to language/persian/mail_template/note_newnote_notify.tpl diff --git a/language/portuguesebr/mail_template/scrap_newscrap_notify.tpl b/language/portuguesebr/mail_template/note_newnote_notify.tpl similarity index 100% rename from language/portuguesebr/mail_template/scrap_newscrap_notify.tpl rename to language/portuguesebr/mail_template/note_newnote_notify.tpl diff --git a/mainvideo.php b/mainvideo.php index 2892ffe4..486d6671 100644 --- a/mainvideo.php +++ b/mainvideo.php @@ -51,4 +51,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/makefriends.php b/makefriends.php index f2fefaea..7c55f0a9 100644 --- a/makefriends.php +++ b/makefriends.php @@ -70,4 +70,4 @@ redirect_header(XOOPS_URL . '/modules/yogurt/index.php?uid=' . $uid, 3, _MD_YOGURT_NOCACHACA); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/notebook.php b/notebook.php index 6fc0d749..304fda42 100644 --- a/notebook.php +++ b/notebook.php @@ -49,14 +49,14 @@ $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); $xoopsTpl->assign('allow_videos', $controller->checkPrivilegeBySection('videos')); $xoopsTpl->assign('allow_audios', $controller->checkPrivilegeBySection('audio')); -if (!($Notes = $controller->fecthNotes($nbSections['nbNotes'], $criteria_uid))) { +if (!($notes = $controller->fecthNotes($nbSections['nbNotes'], $criteria_uid))) { $xoopsTpl->assign('lang_noNotesyet', _MD_YOGURT_NONOTESYET); } @@ -69,7 +69,7 @@ $xoopsTpl->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); //Notes -$xoopsTpl->assign('Notes', $Notes); +$xoopsTpl->assign('notes', $notes); $xoopsTpl->assign('lang_answerNote', _MD_YOGURT_ANSWERNOTE); $xoopsTpl->assign('lang_tips', _MD_YOGURT_NOTETIPS); $xoopsTpl->assign('lang_bold', _MD_YOGURT_BOLD); @@ -85,7 +85,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -103,4 +103,4 @@ $xoopsTpl->assign('lang_tribes', _MD_YOGURT_TRIBES); $xoopsTpl->assign('lang_configs', _MD_YOGURT_CONFIGSTITLE); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/preloads/autoloader.php b/preloads/autoloader.php index 5644a5a1..a08a1bde 100644 --- a/preloads/autoloader.php +++ b/preloads/autoloader.php @@ -9,7 +9,7 @@ static function ($class) { $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); // base directory for the namespace prefix - $baseDir = dirname(__DIR__) . '/class/'; + $baseDir = dirname(__DIR__) . '/class/'; // does the class use the namespace prefix? $len = mb_strlen($prefix); diff --git a/private.php b/private.php index 7f4e0551..9f266b13 100644 --- a/private.php +++ b/private.php @@ -53,4 +53,4 @@ } } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/search_tribe.php b/search_tribe.php index c7bda110..effe8875 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -25,12 +25,12 @@ $controller = new Yogurt\ControllerTribes($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); -$start_all = \Xmf\Request::getInt('start_all', 0, 'GET'); -$start_my = \Xmf\Request::getInt('start_my', 0, 'GET'); +$start_all = \Xmf\Request::getInt('start_all', 0, 'GET'); +$start_my = \Xmf\Request::getInt('start_my', 0, 'GET'); $tribe_keyword = trim(htmlspecialchars($_GET['tribe_keyword'], ENT_QUOTES | ENT_HTML5)); /** @@ -71,7 +71,7 @@ $barrinha = $barra_navegacao->renderImageNav(2); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -99,7 +99,7 @@ //$xoopsTpl->assign('nb_tribes',$nbSections['nbTribes']);look at hte end for this nb $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -144,4 +144,4 @@ $xoopsTpl->assign('lang_searchtribe', _MD_YOGURT_TRIBE_SEARCH); $xoopsTpl->assign('lang_tribekeyword', _MD_YOGURT_TRIBE_SEARCHKEYWORD); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/searchmembers.php b/searchmembers.php index afccfac7..59ea0f36 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -463,7 +463,7 @@ $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -480,7 +480,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); diff --git a/submitNote.php b/submitNote.php index 295b40f9..fd4cef0e 100644 --- a/submitNote.php +++ b/submitNote.php @@ -29,7 +29,7 @@ /** * Factories of tribes */ -$NotesFactory = new Yogurt\NotesHandler($xoopsDB); +$notesFactory = new Yogurt\NotesHandler($xoopsDB); /** * Verify Token @@ -42,11 +42,11 @@ $Notebook_uid = $_POST['uid']; $note_text = $myts->displayTarea($_POST['text'], 0, 1, 1, 1, 1); $mainform = (!empty($_POST['mainform'])) ? 1 : 0; -$Note = $NotesFactory->create(); +$Note = $notesFactory->create(); $Note->setVar('note_text', $note_text); $Note->setVar('note_from', $xoopsUser->getVar('uid')); $Note->setVar('note_to', $Notebook_uid); -$NotesFactory->insert($Note); +$notesFactory->insert($Note); $extra_tags['X_OWNER_NAME'] = $xoopsUser::getUnameFromId($Notebook_uid); $extra_tags['X_OWNER_UID'] = $Notebook_uid; $notificationHandler = xoops_getHandler('notification'); diff --git a/submit_configs.php b/submit_configs.php index 6e4c3d20..81bf752d 100644 --- a/submit_configs.php +++ b/submit_configs.php @@ -53,7 +53,7 @@ //$aud = $_POST['aud']; //$tri = $_POST['tribes']; //$fri = $_POST['friends']; -//$scr = $_POST['Notes']; +//$scr = $_POST['notes']; //$pcon = $_POST['profileContact']; //$pgen = $_POST['gen']; //$psta = $_POST['stat']; @@ -80,8 +80,8 @@ if (isset($_POST['tribes'])) { $config->setVar('tribes', $_POST['tribes']); } -if (isset($_POST['Notes'])) { - $config->setVar('Notes', $_POST['Notes']); +if (isset($_POST['notes'])) { + $config->setVar('notes', $_POST['notes']); } if (isset($_POST['friends'])) { $config->setVar('friends', $_POST['friends']); diff --git a/suspend.php b/suspend.php index 44f949b1..2e44f282 100644 --- a/suspend.php +++ b/suspend.php @@ -57,4 +57,4 @@ redirect_header('index.php?uid=' . $uid, 300, _MD_YOGURT_USERSUSPENDED); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/templates/yogurt_navbar.tpl b/templates/yogurt_navbar.tpl index 00f2764b..1a9d1587 100644 --- a/templates/yogurt_navbar.tpl +++ b/templates/yogurt_navbar.tpl @@ -30,7 +30,7 @@
    • class="tabs-selected" <{/if}>> <{$lang_profile}>
    • - <{ if $allow_notes!=-1 }>
    • class="tabs-disabled" <{/if}> <{if $section_name==$lang_Notebook}>class="tabs-selected" <{/if}>><{$lang_Notebook}> (<{$nb_Notes}>)
    • + <{ if $allow_notes!=-1 }>
    • class="tabs-disabled" <{/if}> <{if $section_name==$lang_Notebook}>class="tabs-selected" <{/if}>><{$lang_Notebook}> (<{$nb_notes}>)
    • <{/if}> <{ if $allow_pictures !=-1 }>
    • class="tabs-disabled"<{/if}><{if $section_name==$lang_photos}>class="tabs-selected" <{/if}>><{$lang_photos}> ( <{$nb_photos}> )
    • <{/if}> <{ if $allow_audios !=-1 }>
    • class="tabs-disabled"<{/if}><{if $section_name==$lang_audio}>class="tabs-selected" <{/if}>> <{$lang_audio}> ( <{$nb_audio}> )
    • <{/if}> diff --git a/templates/yogurt_notebook.tpl b/templates/yogurt_notebook.tpl index 9da3d23d..f4efa159 100644 --- a/templates/yogurt_notebook.tpl +++ b/templates/yogurt_notebook.tpl @@ -25,18 +25,18 @@

      <{$section_name}>

      <{ if $lang_noNotesyet=="" }> -<{section name=i loop=$Notes}> +<{section name=i loop=$notes}>
      ">
      -

       <{$Notes[i].uname}> +

       <{$notes[i].uname}>

      - <{ if $Notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> + <{ if $notes[i].user_avatar=="blank.gif" }> <{ else }> <{/if}> <{ if $isOwner==1}>

      - - + +

      @@ -44,14 +44,14 @@

      <{$section_name}> -  <{$Notes[i].text}> - +  <{$notes[i].text}> +

      <{ if $isOwner==1}>
      -
      - + + <{$token}>
      diff --git a/tribe.php b/tribe.php index 07881ff2..5d9f30dd 100644 --- a/tribe.php +++ b/tribe.php @@ -68,7 +68,7 @@ $xoopsTpl->assign('lang_desctribe', _MD_YOGURT_TRIBE_DESC); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -85,7 +85,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -132,4 +132,4 @@ require_once XOOPS_ROOT_PATH . '/include/comment_view.php'; -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/tribes.php b/tribes.php index 4913cb7c..342674f9 100644 --- a/tribes.php +++ b/tribes.php @@ -81,7 +81,7 @@ $maxfilebytes = $xoopsModuleConfig['maxfilesize']; //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -106,7 +106,7 @@ //$xoopsTpl->assign('nb_tribes',$nbSections['nbTribes']);look at hte end for this nb $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); @@ -151,4 +151,4 @@ $xoopsTpl->assign('lang_searchtribe', _MD_YOGURT_TRIBE_SEARCH); $xoopsTpl->assign('lang_tribekeyword', _MD_YOGURT_TRIBE_SEARCHKEYWORD); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/unsuspenduser.php b/unsuspenduser.php index 6ff465f8..691c1204 100644 --- a/unsuspenduser.php +++ b/unsuspenduser.php @@ -52,4 +52,4 @@ redirect_header('index.php?uid=' . $uid, 3, _MD_YOGURT_USERUNSUSPENDED); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/video.php b/video.php index ab19c989..8f900ecf 100644 --- a/video.php +++ b/video.php @@ -71,7 +71,7 @@ $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/yogurt.js'); //permissions -$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('Notes')); +$xoopsTpl->assign('allow_notes', $controller->checkPrivilegeBySection('notes')); $xoopsTpl->assign('allow_friends', $controller->checkPrivilegeBySection('friends')); $xoopsTpl->assign('allow_tribes', $controller->checkPrivilegeBySection('tribes')); $xoopsTpl->assign('allow_pictures', $controller->checkPrivilegeBySection('pictures')); @@ -88,7 +88,7 @@ $xoopsTpl->assign('nb_tribes', $nbSections['nbTribes']); $xoopsTpl->assign('nb_photos', $nbSections['nbPhotos']); $xoopsTpl->assign('nb_videos', $nbSections['nbVideos']); -$xoopsTpl->assign('nb_Notes', $nbSections['nbNotes']); +$xoopsTpl->assign('nb_notes', $nbSections['nbNotes']); $xoopsTpl->assign('nb_friends', $nbSections['nbFriends']); $xoopsTpl->assign('nb_audio', $nbSections['nbAudio']); @@ -130,4 +130,4 @@ //Videos NAvBAr $xoopsTpl->assign('pageNav', $pageNav); -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/video_submited.php b/video_submited.php index ed54de77..33f0f42f 100644 --- a/video_submited.php +++ b/video_submited.php @@ -60,4 +60,4 @@ redirect_header(XOOPS_URL . '/modules/yogurt/video.php?uid=' . (int)$xoopsUser->getVar('uid'), 2, _MD_YOGURT_NOCACHACA); } -require dirname(dirname(__DIR__)) . '/footer.php'; +require dirname(dirname(__DIR__)) . '/footer.php'; diff --git a/xoops_version.php b/xoops_version.php index b55bea85..5ab7627c 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -79,8 +79,8 @@ ], // ------------------- Install/Update ------------------- -// 'onInstall' => 'include/oninstall.php', -// 'onUpdate' => 'include/onupdate.php', + // 'onInstall' => 'include/oninstall.php', + // 'onUpdate' => 'include/onupdate.php', // 'onUninstall' => 'include/onuninstall.php', // ------------------- PayPal --------------------------- 'paypal' => [ From 2c0be8fcd2e43d6c092a8c6d41192268167b86d7 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:40:15 -0400 Subject: [PATCH 33/43] typos, moving to XoopsPersistableObjectHandler --- album.php | 2 +- audio.php | 2 +- class/AudioController.php | 2 +- class/AudioHandler.php | 2 +- class/ConfigsHandler.php | 2 +- class/ControllerNotes.php | 2 +- class/FriendpetitionHandler.php | 2 +- class/FriendshipHandler.php | 2 +- class/ImageHandler.php | 2 +- class/IshotHandler.php | 2 +- class/NotesHandler.php | 2 +- class/ReltribeuserHandler.php | 2 +- class/SuspensionsHandler.php | 2 +- class/TribesHandler.php | 2 +- class/VideoController.php | 2 +- class/VideoHandler.php | 2 +- class/VisitorsHandler.php | 2 +- class/YogurtController.php | 1 + edittribe.php | 2 +- fans.php | 2 +- friends.php | 2 +- index.php | 2 +- language/english/main.php | 2 ++ notebook.php | 2 +- searchmembers.php | 2 +- submit_configs.php | 7 ++++--- tribe.php | 2 +- tribes.php | 2 +- video.php | 2 +- 29 files changed, 33 insertions(+), 29 deletions(-) diff --git a/album.php b/album.php index 09e8fda0..ee9921c0 100644 --- a/album.php +++ b/album.php @@ -25,7 +25,7 @@ $controller = new Yogurt\ControllerPhotos($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/audio.php b/audio.php index 3f74b963..5b879679 100644 --- a/audio.php +++ b/audio.php @@ -25,7 +25,7 @@ $controller = new Yogurt\AudioController($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/class/AudioController.php b/class/AudioController.php index 2791ac82..245b8123 100644 --- a/class/AudioController.php +++ b/class/AudioController.php @@ -47,7 +47,7 @@ class AudioController extends YogurtController { /** - * Fecth audios + * Fetch audios * @param object $criteria * @return array of video objects */ diff --git a/class/AudioHandler.php b/class/AudioHandler.php index 0cc09880..6c246694 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -18,7 +18,7 @@ * AudioHandler class. * This class provides simple mecanisme for yogurt_audio object */ -class AudioHandler extends \XoopsObjectHandler +class AudioHandler extends \XoopsPersistableObjectHandler { /** * create a new Audio diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index 9e3a3386..a079c461 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -17,7 +17,7 @@ * yogurt_configshandler class. * This class provides simple mecanisme for Configs object */ -class ConfigsHandler extends \XoopsObjectHandler +class ConfigsHandler extends \XoopsPersistableObjectHandler { /** * create a new Configs diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index dc5022da..fccc158f 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -70,7 +70,7 @@ class ControllerNotes extends YogurtController /** * @param $nb_notes * @param $criteria - * @return bool + * @return bool|array */ public function fetchNotes($nb_notes, $criteria) { diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index 443da565..2ce13df5 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -17,7 +17,7 @@ * yogurt_friendpetitionhandler class. * This class provides simple mecanisme for Friendpetition object */ -class FriendpetitionHandler extends \XoopsObjectHandler +class FriendpetitionHandler extends \XoopsPersistableObjectHandler { /** * create a new Friendpetition diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index 1c7c5d45..00d96ecb 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -24,7 +24,7 @@ * yogurt_friendshiphandler class. * This class provides simple mecanisme for Friendship object */ -class FriendshipHandler extends \XoopsObjectHandler +class FriendshipHandler extends \XoopsPersistableObjectHandler { /** * create a new Friendship diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 2f9e4cd6..b41af028 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -42,7 +42,7 @@ * yogurt_imageshandler class. * This class provides simple mecanisme for Image object and generate forms for inclusion etc */ -class ImageHandler extends \XoopsObjectHandler +class ImageHandler extends \XoopsPersistableObjectHandler { /** * create a new Image diff --git a/class/IshotHandler.php b/class/IshotHandler.php index 8d9cbc38..bb7a58e3 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -32,7 +32,7 @@ * yogurt_ishothandler class. * This class provides simple mecanisme for Ishot object */ -class IshotHandler extends \XoopsObjectHandler +class IshotHandler extends \XoopsPersistableObjectHandler { /** * create a new Ishot diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 57636193..20dbc46f 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -18,7 +18,7 @@ * NotesHandler class. * This class provides simple mecanisme forNotes object */ -class NotesHandler extends \XoopsObjectHandler +class NotesHandler extends \XoopsPersistableObjectHandler { /** * create a new Notes diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index 6a5b49ef..0f4fb1aa 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -17,7 +17,7 @@ * yogurt_reltribeuserhandler class. * This class provides simple mecanisme for Reltribeuser object */ -class ReltribeuserHandler extends \XoopsObjectHandler +class ReltribeuserHandler extends \XoopsPersistableObjectHandler { /** * create a new Reltribeuser diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index 1580b550..26cdb63e 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -17,7 +17,7 @@ * Suspensionshandler class. * This class provides simple mecanisme for Suspensions object */ -class SuspensionsHandler extends \XoopsObjectHandler +class SuspensionsHandler extends \XoopsPersistableObjectHandler { /** * create a new Suspensions diff --git a/class/TribesHandler.php b/class/TribesHandler.php index d14de41f..a3252188 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -17,7 +17,7 @@ * yogurt_tribeshandler class. * This class provides simple mecanisme for Tribes object */ -class TribesHandler extends \XoopsObjectHandler +class TribesHandler extends \XoopsPersistableObjectHandler { /** * create a new Tribes diff --git a/class/VideoController.php b/class/VideoController.php index 907984ae..27619b39 100644 --- a/class/VideoController.php +++ b/class/VideoController.php @@ -47,7 +47,7 @@ class VideoController extends YogurtController { /** - * Fecth videos + * Fetch videos * @param object $criteria * @return array of video objects */ diff --git a/class/VideoHandler.php b/class/VideoHandler.php index 5358f49e..1dc20d36 100644 --- a/class/VideoHandler.php +++ b/class/VideoHandler.php @@ -17,7 +17,7 @@ * yogurt_videohandler class. * This class provides simple mecanisme for Video object */ -class VideoHandler extends \XoopsObjectHandler +class VideoHandler extends \XoopsPersistableObjectHandler { /** * create a new Video diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index 1ce61f66..c8038066 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -17,7 +17,7 @@ * yogurt_visitorshandler class. * This class provides simple mecanisme for Yogurt\Visitors object */ -class VisitorsHandler extends \XoopsObjectHandler +class VisitorsHandler extends \XoopsPersistableObjectHandler { /** * create a new Visitors diff --git a/class/YogurtController.php b/class/YogurtController.php index f26630d6..3c6318f1 100644 --- a/class/YogurtController.php +++ b/class/YogurtController.php @@ -139,6 +139,7 @@ public function getPermissions() * @desc Check if the user uid exists if not redirect back to where he was */ if (!empty($_GET['uid'])) { + /** @var \XoopsMemberHandler $memberHandler */ $memberHandler = xoops_getHandler('member'); $user = $memberHandler->getUser(\Xmf\Request::getInt('uid', 0, 'GET')); if (!is_object($user)) { diff --git a/edittribe.php b/edittribe.php index 2533d652..03a6a982 100644 --- a/edittribe.php +++ b/edittribe.php @@ -25,7 +25,7 @@ $controller = new Yogurt\ControllerTribes($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/fans.php b/fans.php index 1c848558..ca462222 100644 --- a/fans.php +++ b/fans.php @@ -24,7 +24,7 @@ $controller = new Yogurt\ControllerFriends($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/friends.php b/friends.php index 4bdf4a79..2c93b880 100644 --- a/friends.php +++ b/friends.php @@ -25,7 +25,7 @@ $controller = new Yogurt\ControllerFriends($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/index.php b/index.php index ec2c4efd..c29405f8 100644 --- a/index.php +++ b/index.php @@ -35,7 +35,7 @@ $controller = new \XoopsModules\Yogurt\ControllerIndex($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/language/english/main.php b/language/english/main.php index c5dee8be..6b7150b3 100644 --- a/language/english/main.php +++ b/language/english/main.php @@ -47,6 +47,7 @@ //submit.php (for pictures submission define('_MD_YOGURT_UPLOADED', 'Upload Successful'); + //delpicture.php define('_MD_YOGURT_ASKCONFIRMDELETION', 'Are you sure you want to delete this picture?'); define('_MD_YOGURT_CONFIRMDELETION', 'Yes please delete it!'); @@ -223,6 +224,7 @@ //submit_configs.php define('_MD_YOGURT_CONFIGSSAVE', 'Configuration saved!'); +define('_MD_YOGURT_CONFIGSSAVE_FAILED', 'ERROR: Configuration has not been saved'); //class/yogurt_controller.php define('_MD_YOGURT_NOPRIVILEGE', "The owner of this profile has set the privileges to see it,
      higher than you have now.
      Login to become their friend.
      If they haven't set it, so only they can see,
      then you will be able to view it."); diff --git a/notebook.php b/notebook.php index 304fda42..428e8ce9 100644 --- a/notebook.php +++ b/notebook.php @@ -56,7 +56,7 @@ $xoopsTpl->assign('allow_videos', $controller->checkPrivilegeBySection('videos')); $xoopsTpl->assign('allow_audios', $controller->checkPrivilegeBySection('audio')); -if (!($notes = $controller->fecthNotes($nbSections['nbNotes'], $criteria_uid))) { +if (!($notes = $controller->fetchNotes($nbSections['nbNotes'], $criteria_uid))) { $xoopsTpl->assign('lang_noNotesyet', _MD_YOGURT_NONOTESYET); } diff --git a/searchmembers.php b/searchmembers.php index 59ea0f36..3628f700 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -39,7 +39,7 @@ $controller = new Yogurt\ControllerIndex($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/submit_configs.php b/submit_configs.php index 81bf752d..7541cfa1 100644 --- a/submit_configs.php +++ b/submit_configs.php @@ -95,10 +95,11 @@ if (isset($_POST['stat'])) { $config->setVar('profile_stats', $_POST['stat']); } -if (!$configsFactory->insert($config)) { -} +if ($configsFactory->insert($config)) { redirect_header('configs.php?uid=' . $xoopsUser->getVar('uid'), 3, _MD_YOGURT_CONFIGSSAVE); - +} else { + redirect_header('configs.php?uid=' . $xoopsUser->getVar('uid'), 3, _MD_YOGURT_CONFIGSSAVE_FAILED); +} /** * Close page */ diff --git a/tribe.php b/tribe.php index 5d9f30dd..faf0bf89 100644 --- a/tribe.php +++ b/tribe.php @@ -25,7 +25,7 @@ $controller = new Yogurt\ControllerTribes($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/tribes.php b/tribes.php index 342674f9..5ce164fc 100644 --- a/tribes.php +++ b/tribes.php @@ -25,7 +25,7 @@ $controller = new Yogurt\ControllerTribes($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); diff --git a/video.php b/video.php index 8f900ecf..5386c0d3 100644 --- a/video.php +++ b/video.php @@ -25,7 +25,7 @@ $controller = new Yogurt\VideoController($xoopsDB, $xoopsUser); /** - * Fecthing numbers of tribes friends videos pictures etc... + * Fetching numbers of tribes friends videos pictures etc... */ $nbSections = $controller->getNumbersSections(); From 41fce3af326474062562b3974efe237def1be5cd Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:40:34 -0400 Subject: [PATCH 34/43] Unnecessary double quotes --- album.php | 2 +- audio.php | 2 +- configs.php | 2 +- edittribe.php | 2 +- edituser.php | 4 ++-- fans.php | 2 +- friends.php | 2 +- index.php | 2 +- notebook.php | 2 +- search_tribe.php | 2 +- searchmembers.php | 2 +- tribe.php | 2 +- tribes.php | 2 +- video.php | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/album.php b/album.php index ee9921c0..cc2816a4 100644 --- a/album.php +++ b/album.php @@ -104,7 +104,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/audio.php b/audio.php index 5b879679..9826d279 100644 --- a/audio.php +++ b/audio.php @@ -65,7 +65,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/configs.php b/configs.php index 2873e790..e5b240a9 100644 --- a/configs.php +++ b/configs.php @@ -69,7 +69,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/edittribe.php b/edittribe.php index 03a6a982..413c6c5c 100644 --- a/edittribe.php +++ b/edittribe.php @@ -125,7 +125,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } diff --git a/edituser.php b/edituser.php index 171390b2..e26441d2 100644 --- a/edituser.php +++ b/edituser.php @@ -354,7 +354,7 @@ @unlink($uploader->getSavedDestination()); } else { $oldavatar = $xoopsUser->getVar('user_avatar'); - if (!empty($oldavatar) && 0 === strpos(mb_strtolower($oldavatar), "cavt")) { + if (!empty($oldavatar) && 0 === strpos(mb_strtolower($oldavatar), 'cavt')) { $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); @@ -411,7 +411,7 @@ require XOOPS_ROOT_PATH . '/footer.php'; exit(); } - if ($oldavatar && 0 === strpos(mb_strtolower($oldavatar), "cavt")) { + if ($oldavatar && 0 === strpos(mb_strtolower($oldavatar), 'cavt')) { $avatars = &$avtHandler->getObjects(new \Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && 1 == count($avatars) && is_object($avatars[0])) { $avtHandler->delete($avatars[0]); diff --git a/fans.php b/fans.php index ca462222..3ff850bb 100644 --- a/fans.php +++ b/fans.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/friends.php b/friends.php index 2c93b880..dd7083ad 100644 --- a/friends.php +++ b/friends.php @@ -55,7 +55,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/index.php b/index.php index c29405f8..29b8f28a 100644 --- a/index.php +++ b/index.php @@ -144,7 +144,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/notebook.php b/notebook.php index 428e8ce9..67278fcc 100644 --- a/notebook.php +++ b/notebook.php @@ -36,7 +36,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/search_tribe.php b/search_tribe.php index effe8875..a8343e5e 100644 --- a/search_tribe.php +++ b/search_tribe.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } $xoTheme->addScript(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/js/jquery.js'); diff --git a/searchmembers.php b/searchmembers.php index 3628f700..2079dd70 100644 --- a/searchmembers.php +++ b/searchmembers.php @@ -450,7 +450,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/tribe.php b/tribe.php index faf0bf89..8b8a2a4f 100644 --- a/tribe.php +++ b/tribe.php @@ -118,7 +118,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/tribes.php b/tribes.php index 5ce164fc..52b3d072 100644 --- a/tribes.php +++ b/tribes.php @@ -57,7 +57,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); diff --git a/video.php b/video.php index 5386c0d3..ef068179 100644 --- a/video.php +++ b/video.php @@ -58,7 +58,7 @@ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/yogurt.css'); $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs.css'); // what browser they use if IE then add corrective script. -if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), "msie")) { +if (false !== strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'msie')) { $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/assets/css/jquery.tabs-ie.css'); } //$xoTheme->addStylesheet(XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/lightbox/css/lightbox.css'); From 296ce2026b90c2b2a5d4ab143738f75c1f237ac6 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:44:19 -0400 Subject: [PATCH 35/43] Non-optimal regular expression --- class/common/SysUtility.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class/common/SysUtility.php b/class/common/SysUtility.php index 1b0b4a32..1be70b7f 100644 --- a/class/common/SysUtility.php +++ b/class/common/SysUtility.php @@ -73,7 +73,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) { // do nothing // if tag is a closing tag - } elseif (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) { + } elseif (preg_match('/^<\s*\/(\S+?)\s*>$/s', $line_matchings[1], $tag_matchings)) { // delete tag from $open_tags list $pos = array_search($tag_matchings[1], $open_tags, true); if (false !== $pos) { @@ -88,13 +88,13 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac $truncate .= $line_matchings[1]; } // calculate the length of the plain text part of the line; handle entities as one character - $content_length = mb_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); + $content_length = mb_strlen(preg_replace('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2])); if ($total_length + $content_length > $length) { // the number of characters which are left $left = $length - $total_length; $entities_length = 0; // search for html entities - if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { + if (preg_match_all('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { // calculate the real length of all entities in the legal range foreach ($entities[0] as $entity) { if ($left >= $entity[1] + 1 - $entities_length) { From 7a8fc7570750bef7954a893b298277fad9f6bc6c Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:54:03 -0400 Subject: [PATCH 36/43] renderWhere() --- class/AudioHandler.php | 6 +++--- class/ConfigsHandler.php | 6 +++--- class/FriendpetitionHandler.php | 6 +++--- class/FriendshipHandler.php | 6 +++--- class/ImageHandler.php | 6 +++--- class/IshotHandler.php | 2 +- class/ReltribeuserHandler.php | 6 +++--- class/SuspensionsHandler.php | 6 +++--- class/TribesHandler.php | 8 ++++---- class/VideoHandler.php | 6 +++--- class/VisitorsHandler.php | 6 +++--- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/class/AudioHandler.php b/class/AudioHandler.php index 6c246694..b2c553be 100644 --- a/class/AudioHandler.php +++ b/class/AudioHandler.php @@ -142,7 +142,7 @@ public function delete(\XoopsObject $yogurtAudio, $force = false) /** * retrieve yogurt_audios from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link yogurt_audio} objects */ @@ -180,7 +180,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_audios matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_audios */ public function getCount($criteria = null) @@ -201,7 +201,7 @@ public function getCount($criteria = null) /** * delete yogurt_audios matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/ConfigsHandler.php b/class/ConfigsHandler.php index a079c461..bd3604b1 100644 --- a/class/ConfigsHandler.php +++ b/class/ConfigsHandler.php @@ -178,7 +178,7 @@ public function delete(\XoopsObject $yogurt_configs, $force = false) /** * retrieve yogurt_configss from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Configs} objects */ @@ -216,7 +216,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_configss matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_configss */ public function getCount($criteria = null) @@ -237,7 +237,7 @@ public function getCount($criteria = null) /** * delete yogurt_configss matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/FriendpetitionHandler.php b/class/FriendpetitionHandler.php index 2ce13df5..06c34b80 100644 --- a/class/FriendpetitionHandler.php +++ b/class/FriendpetitionHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_friendpetition, $force = false) /** * retrieve yogurt_friendpetitions from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Friendpetition} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_friendpetitions matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_friendpetitions */ public function getCount($criteria = null) @@ -200,7 +200,7 @@ public function getCount($criteria = null) /** * delete yogurt_friendpetitions matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index 00d96ecb..285e7045 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -148,7 +148,7 @@ public function delete(\XoopsObject $yogurt_friendship, $force = false) /** * retrieve yogurt_friendships from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Friendship} objects */ @@ -186,7 +186,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_friendships matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_friendships */ public function getCount($criteria = null) @@ -207,7 +207,7 @@ public function getCount($criteria = null) /** * delete yogurt_friendships matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/ImageHandler.php b/class/ImageHandler.php index b41af028..1c27163e 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -175,7 +175,7 @@ public function delete(\XoopsObject $yogurt_images, $force = false) /** * retrieve yogurt_imagess from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Image} objects */ @@ -213,7 +213,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_imagess matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_imagess */ public function getCount($criteria = null) @@ -234,7 +234,7 @@ public function getCount($criteria = null) /** * delete yogurt_imagess matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/IshotHandler.php b/class/IshotHandler.php index bb7a58e3..16107e2b 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -156,7 +156,7 @@ public function delete(\XoopsObject $yogurt_ishot, $force = false) /** * retrieve yogurt_ishots from the database * - * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Ishot} objects */ diff --git a/class/ReltribeuserHandler.php b/class/ReltribeuserHandler.php index 0f4fb1aa..89798c22 100644 --- a/class/ReltribeuserHandler.php +++ b/class/ReltribeuserHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_reltribeuser, $force = false) /** * retrieve yogurt_reltribeusers from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Reltribeuser} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_reltribeusers matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_reltribeusers */ public function getCount($criteria = null) @@ -200,7 +200,7 @@ public function getCount($criteria = null) /** * delete yogurt_reltribeusers matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/SuspensionsHandler.php b/class/SuspensionsHandler.php index 26cdb63e..b806f5a0 100644 --- a/class/SuspensionsHandler.php +++ b/class/SuspensionsHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $suspensions, $force = false) /** * retrieve yogurt_suspensionss from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Suspensions} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_suspensionss matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_suspensionss */ public function getCount($criteria = null) @@ -200,7 +200,7 @@ public function getCount($criteria = null) /** * delete yogurt_suspensionss matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/TribesHandler.php b/class/TribesHandler.php index a3252188..1ec0d085 100644 --- a/class/TribesHandler.php +++ b/class/TribesHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_tribes, $force = false) /** * retrieve yogurt_tribess from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Tribes} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * retrieve yogurt_tribess from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Tribes} objects */ @@ -217,7 +217,7 @@ public function getTribes($criteria = null, $id_as_key = false) /** * count yogurt_tribess matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_tribess */ public function getCount($criteria = null) @@ -238,7 +238,7 @@ public function getCount($criteria = null) /** * delete yogurt_tribess matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/VideoHandler.php b/class/VideoHandler.php index 1dc20d36..1c71b9f2 100644 --- a/class/VideoHandler.php +++ b/class/VideoHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_video, $force = false) /** * retrieve yogurt_videos from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Video} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_videos matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_videos */ public function getCount($criteria = null) @@ -200,7 +200,7 @@ public function getCount($criteria = null) /** * delete yogurt_videos matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/VisitorsHandler.php b/class/VisitorsHandler.php index c8038066..08d80092 100644 --- a/class/VisitorsHandler.php +++ b/class/VisitorsHandler.php @@ -141,7 +141,7 @@ public function delete(\XoopsObject $yogurt_visitors, $force = false) /** * retrieve yogurt_visitorss from the database * - * @param \CriteriaElement $criteria {@link \CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@link Yogurt\Visitors} objects */ @@ -179,7 +179,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_visitorss matching a condition * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * @return int count of yogurt_visitorss */ public function getCount($criteria = null) @@ -200,7 +200,7 @@ public function getCount($criteria = null) /** * delete yogurt_visitorss matching a set of conditions * - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * @param bool $force * @return bool FALSE if deletion failed */ From 0b022b334f9ba19c0c17261b7edda52e365e992e Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 06:56:24 -0400 Subject: [PATCH 37/43] CriteriaElement --- class/ControllerNotes.php | 2 +- class/NotesHandler.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/class/ControllerNotes.php b/class/ControllerNotes.php index fccc158f..b59c58ed 100644 --- a/class/ControllerNotes.php +++ b/class/ControllerNotes.php @@ -69,7 +69,7 @@ class ControllerNotes extends YogurtController /** * @param $nb_notes - * @param $criteria + * @param null|\CriteriaElement|\CriteriaCompo $criteria * @return bool|array */ public function fetchNotes($nb_notes, $criteria) diff --git a/class/NotesHandler.php b/class/NotesHandler.php index 20dbc46f..cbb4ab06 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -227,7 +227,7 @@ public function deleteAll($criteria = null) /** * @param $nbNotes - * @param $criteria + * @param null|\CriteriaElement|\CriteriaCompo $criteria * @return array */ public function getNotes($nbNotes, $criteria) @@ -235,7 +235,7 @@ public function getNotes($nbNotes, $criteria) $myts = new \MyTextSanitizer(); $ret = []; $sql = 'SELECT note_id, uid, uname, user_avatar, note_from, note_text FROM ' . $this->db->prefix('yogurt_notes') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack $sql .= ' AND uid = note_from'; From ffec781dfe1697a11c69a347f545f3ff9573c04f Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:18:40 -0400 Subject: [PATCH 38/43] CriteriaElement --- class/IshotHandler.php | 4 ++-- class/NotesHandler.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/class/IshotHandler.php b/class/IshotHandler.php index 16107e2b..4ce314e7 100644 --- a/class/IshotHandler.php +++ b/class/IshotHandler.php @@ -194,7 +194,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_ishots matching a condition * - * @param \XoopsObject $criteria {@link CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} to match * @return int count of yogurt_ishots */ public function getCount($criteria = null) @@ -215,7 +215,7 @@ public function getCount($criteria = null) /** * delete yogurt_ishots matching a set of conditions * - * @param \XoopsObject $criteria {@link CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) diff --git a/class/NotesHandler.php b/class/NotesHandler.php index cbb4ab06..498979ed 100644 --- a/class/NotesHandler.php +++ b/class/NotesHandler.php @@ -150,7 +150,7 @@ public function delete(\XoopsObject $yogurt_notes, $force = false) /** * retrieve yogurt_notes from the database * - * @param \XoopsObject $criteria {@link CriteriaElement} conditions to be met + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} conditions to be met * @param bool $id_as_key use the UID as key for the array? * @return array array of {@linkNotes} objects */ @@ -188,7 +188,7 @@ public function &getObjects($criteria = null, $id_as_key = false) /** * count yogurt_notes matching a condition * - * @param \XoopsObject $criteria {@link CriteriaElement} to match + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} to match * @return int count of yogurt_notes */ public function getCount($criteria = null) @@ -209,7 +209,7 @@ public function getCount($criteria = null) /** * delete yogurt_notes matching a set of conditions * - * @param \XoopsObject $criteria {@link CriteriaElement} + * @param null|\CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} * @return bool FALSE if deletion failed */ public function deleteAll($criteria = null) @@ -235,7 +235,7 @@ public function getNotes($nbNotes, $criteria) $myts = new \MyTextSanitizer(); $ret = []; $sql = 'SELECT note_id, uid, uname, user_avatar, note_from, note_text FROM ' . $this->db->prefix('yogurt_notes') . ', ' . $this->db->prefix('users'); - if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { + if (isset($criteria) && $criteria instanceof \CriteriaElement) { $sql .= ' ' . $criteria->renderWhere(); //attention here this is kind of a hack $sql .= ' AND uid = note_from'; From 74cc9562e20561191f408f1a51ee188664b4ddda Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:19:16 -0400 Subject: [PATCH 39/43] Redundant measure unit --- assets/css/jquery.lightbox-0.3.css | 2 +- assets/css/yogurt.css | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/assets/css/jquery.lightbox-0.3.css b/assets/css/jquery.lightbox-0.3.css index c5262e73..f1d9b178 100644 --- a/assets/css/jquery.lightbox-0.3.css +++ b/assets/css/jquery.lightbox-0.3.css @@ -39,7 +39,7 @@ #lightbox-loading { position: absolute; top: 40%; - left: 0%; + left: 0; height: 25%; width: 100%; text-align: center; diff --git a/assets/css/yogurt.css b/assets/css/yogurt.css index df2ecedb..661dd60c 100644 --- a/assets/css/yogurt.css +++ b/assets/css/yogurt.css @@ -52,7 +52,7 @@ border:none; p#breadcrumbs { display:block; border-bottom: 2px solid; - margin: 0px 0px 5px; + margin: 0 0 5px; padding:2px; } @@ -185,7 +185,7 @@ overflow:hidden; } div#yogurt-profile-tribes h2, div#yogurt-profile-search-results p, div#yogurt-profile-statistics p, div#yogurt-profile-details p, div#yogurt-profile-search-results h2, div#yogurt-profile-search-results h4, div#yogurt-profile-friends h2, div#yogurt-profile-visual h2, div#yogurt-profile-statistics h2, div#yogurt-profile-details h2 { -margin:0px; +margin:0; } /****************************************************************************************************** @@ -206,7 +206,7 @@ overflow:hidden; } div#yogurt-Notes-container h2 { -margin:0px; +margin:0; } img.avatar_Note { @@ -325,12 +325,12 @@ width:50%; h2#yogurt-videos-title { -margin:0px; +margin:0; } div#yogurt-video-form p, div#yogurt-video-form h2{ -margin:0px; +margin:0; } div#yogurt-video-form{ margin:3px; @@ -346,7 +346,7 @@ Audio */ div#yogurt-audio-form p, div#yogurt-audio-form h2, div#yogurt-audio-allaudiocontainer p, div#yogurt-audio-allaudiocontainer h2, h2#yogurt-audio-title{ -margin:0px; +margin:0; } @@ -370,7 +370,7 @@ overflow:hidden; } div#yogurt-friends-container h2{ -margin:0px; +margin:0; } div.yogurt-friend { @@ -460,7 +460,7 @@ overflow:hidden; } div#yogurt-album-visitors h2, div#yogurt-album-container h2, div#yogurt-album-form h2,div#yogurt-album-form p { -margin:0px; +margin:0; } div#yogurt-album-container{ @@ -472,7 +472,7 @@ overflow:hidden; } div.yogurt-album-picture { -margin:0px; +margin:0; width:31%; height:250px; float:left; @@ -509,7 +509,7 @@ overflow:hidden; } div#yogurt-tribe-edit-members h2, div.yogurt-tribe-edit-member h2, form#yogurt-tribe-edit-form h2, form#form_tribe_search h2, form#form_tribe h2, div#yogurt-tribes-container h2, div#yogurt-mytribes-container h2, div#yogurt-tribe-container p,div#yogurt-tribe-container h2{ -margin:0px; +margin:0; } From 9ba0df273813e252168483ee21874edca60b6150 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:19:30 -0400 Subject: [PATCH 40/43] 3.4. Beta 3 --- xoops_version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xoops_version.php b/xoops_version.php index 5ab7627c..aa788032 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -21,8 +21,8 @@ // ------------------- Informations ------------------- // $modversion = [ 'version' => 3.4, - 'module_status' => 'Beta 2', - 'release_date' => '2020/03/28', + 'module_status' => 'Beta 3', + 'release_date' => '2020/04/01', 'name' => _MI_YOGURT_MODULE_NAME, 'description' => _MI_YOGURT_MODULEDESC, 'official' => 0, From 5799e8bb3a2b4c567bd69b1fc158bd6c333a1090 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:20:48 -0400 Subject: [PATCH 41/43] remove second About from Menu --- admin/menu.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/menu.php b/admin/menu.php index 55160a87..3e1c5052 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -46,11 +46,11 @@ 'icon' => $pathIcon32 . '/manage.png', ]; -$adminmenu[] = [ - 'title' => _MI_YOG_ADMENU2, - 'link' => 'admin/main.php?op=about', - 'icon' => $pathIcon32 . '/about.png', -]; +//$adminmenu[] = [ +// 'title' => _MI_YOG_ADMENU2, +// 'link' => 'admin/main.php?op=about', +// 'icon' => $pathIcon32 . '/about.png', +//]; $adminmenu[] = [ 'title' => _MI_YOG_ADMENU2, From 2206ca45bbc7c5a7c6c4ea177ee1914c9d768fe9 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:41:22 -0400 Subject: [PATCH 42/43] images folder fix --- admin/main.php | 26 +++++++++++++------------- class/FriendshipHandler.php | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/admin/main.php b/admin/main.php index 9e4dc74d..e7867a73 100644 --- a/admin/main.php +++ b/admin/main.php @@ -254,15 +254,15 @@ function homedefault() $c = explode('.', $b); echo ""; if ($c[0] > 4 || (4 == $c[0] && $c[1] > 0)) { - echo " "; + echo " "; echo 'Mysql Version:' . $b; } else { - echo " "; + echo " "; echo 'Mysql Version:' . $b . '. You must use a version higher than 4.1 '; } if (extension_loaded('gd')) { echo " - " . _MA_YOG_GDEXTENSIONOK . ' + " . _MA_YOG_GDEXTENSIONOK . ' ' . _MA_YOG_MOREINFO . " Gd Library @@ -270,20 +270,20 @@ function homedefault() } else { echo " - " . _MA_YOG_GDEXTENSIONFALSE . ' ' . _MA_YOG_CONFIGPHPINI . ' + " . _MA_YOG_GDEXTENSIONFALSE . ' ' . _MA_YOG_CONFIGPHPINI . ' ' . _MA_YOG_MOREINFO . " Gd Library "; } if (str_replace('.', '', PHP_VERSION) > 499) { echo " - " . _MA_YOG_PHP5PRESENT . ' ' . PHP_VERSION . ' + " . _MA_YOG_PHP5PRESENT . ' ' . PHP_VERSION . ' '; } else { echo " - " . _MA_YOG_PHP5NOTPRESENT . ' ' . PHP_VERSION . ' + " . _MA_YOG_PHP5NOTPRESENT . ' ' . PHP_VERSION . ' @@ -294,35 +294,35 @@ function homedefault() if ($isframeworksrequirement){ echo " - "; + "; printf(_MA_YOG_FRAMEWORKSTRUE,XOOPS_FRAMEWORKS_VERSION); echo " "; }else { echo " - "._MA_YOG_FRAMEWORKSFALSE." + "._MA_YOG_FRAMEWORKSFALSE." "; } */ if (!is_dir(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { echo " - /uploads/yogurt/mp3/ is not exists + /uploads/yogurt/mp3/ is not exists "; } elseif (!is_writable(XOOPS_ROOT_PATH . '/uploads/yogurt/mp3/')) { echo " - /uploads/yogurt/mp3/ is not writable + /uploads/yogurt/mp3/ is not writable "; } else { echo " - /uploads/yogurt/mp3/ exists and writable + /uploads/yogurt/mp3/ exists and writable "; } - echo " " . sprintf(_MA_YOG_MAXBYTESPHPINI, ini_get('post_max_size')) . ''; + echo " " . sprintf(_MA_YOG_MAXBYTESPHPINI, ini_get('post_max_size')) . ''; if (function_exists('memory_get_usage')) { - echo " " . _MA_YOG_MEMORYLIMIT . ' ' . memory_get_usage() . ''; + echo " " . _MA_YOG_MEMORYLIMIT . ' ' . memory_get_usage() . ''; } echo ''; } diff --git a/class/FriendshipHandler.php b/class/FriendshipHandler.php index 285e7045..1f11388a 100644 --- a/class/FriendshipHandler.php +++ b/class/FriendshipHandler.php @@ -324,7 +324,7 @@ public function renderFormSubmit($friend) $form = new \XoopsThemeForm(_MD_YOGURT_EDITFRIENDSHIP, 'form_editfriendship', 'editfriendship.php', 'post', true); //$field_friend_avatar = new XoopsFormLabel(_MD_YOGURT_PHOTO, "getVar('user_avatar').">"); if ('blank.gif' == $friend->getVar('user_avatar')) { - $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, ''); + $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, ''); } else { $field_friend_avatar = new \XoopsFormLabel(_MD_YOGURT_PHOTO, 'getVar('user_avatar') . '>'); } From 2ae18d9fb0c6f520979ddf3dc60b5304cf558794 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Wed, 1 Apr 2020 07:53:26 -0400 Subject: [PATCH 43/43] Type compatibility --- class/ImageHandler.php | 2 +- class/VideoHandler.php | 2 +- templates/yogurt_navbar.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/class/ImageHandler.php b/class/ImageHandler.php index 1c27163e..b8b005ce 100644 --- a/class/ImageHandler.php +++ b/class/ImageHandler.php @@ -254,7 +254,7 @@ public function deleteAll($criteria = null) * Render a form to send pictures * * @param int $maxbytes the maximum size of a picture - * @param object $xoopsTpl the one in which the form will be rendered + * @param \XoopsTpl $xoopsTpl the one in which the form will be rendered * @return bool TRUE * * obs: Some functions wont work on php 4 so edit lines down under acording to your version diff --git a/class/VideoHandler.php b/class/VideoHandler.php index 1c71b9f2..be4b4c46 100644 --- a/class/VideoHandler.php +++ b/class/VideoHandler.php @@ -219,7 +219,7 @@ public function deleteAll($criteria = null) /** * Render a form to send videos * - * @param object $xoopsTpl the one in which the form will be rendered + * @param \XoopsTpl $xoopsTpl the one in which the form will be rendered * @return bool TRUE * * obs: Some functions wont work on php 4 so edit lines down under acording to your version diff --git a/templates/yogurt_navbar.tpl b/templates/yogurt_navbar.tpl index 1a9d1587..59093f12 100644 --- a/templates/yogurt_navbar.tpl +++ b/templates/yogurt_navbar.tpl @@ -30,7 +30,7 @@