From 4728e72d182f78dc2f5768fdb55d1e142fc92129 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Mon, 17 Jul 2017 16:19:19 +0200 Subject: some love for the installer --- Zotlabs/Module/Setup.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index e5b54cc5f..2134288d6 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -186,14 +186,17 @@ class Setup extends \Zotlabs\Web\Controller { } $db_return_text = ''; if(x(\App::$data, 'db_installed')) { - $txt = '

'; - $txt .= t('Your site database has been installed.') . EOL; + $pass = 'Installation succeeded!'; + $icon = 'check'; + $txt = t('Your site database has been installed.') . EOL; $db_return_text .= $txt; } if(x(\App::$data, 'db_failed')) { + $pass = 'Database install failed!'; + $icon = 'exclamation-triangle'; $txt = t('You may need to import the file "install/schema_xxx.sql" manually using a database client.') . EOL; $txt .= t('Please see the file "install/INSTALL.txt".') . EOL ."


" ; - $txt .= "
".\App::$data['db_failed'] . "
". EOL ; + $txt .= "
" . \App::$data['db_failed'] . "
". EOL ; $db_return_text .= $txt; } if(\DBA::$dba && \DBA::$dba->connected) { @@ -217,8 +220,10 @@ class Setup extends \Zotlabs\Web\Controller { $tpl = get_markup_template('install.tpl'); return replace_macros($tpl, array( '$title' => $install_title, - '$pass' => '', - '$text' => $db_return_text . $this->what_next(), + '$icon' => $icon, + '$pass' => $pass, + '$text' => $db_return_text, + '$what_next' => $this->what_next() )); } @@ -395,7 +400,7 @@ class Setup extends \Zotlabs\Web\Controller { if(!$passed) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; $help .= t('If you don\'t have a command line version of PHP installed on server, you will not be able to run background polling via cron.') . EOL; - $help .= EOL . EOL ; + $help .= EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable. You can leave this blank to continue the installation.')), @@ -443,7 +448,7 @@ class Setup extends \Zotlabs\Web\Controller { userReadableSize($result['max_upload_filesize']), $result['max_file_uploads'] ); - $help .= '
' . t('You can adjust these settings in the server php.ini file.'); + $help .= '

' . t('You can adjust these settings in the server php.ini file.'); $this->check_add($checks, t('PHP upload limits'), true, false, $help); } @@ -735,12 +740,12 @@ class Setup extends \Zotlabs\Web\Controller { $baseurl = z_root(); return - t('

What next

') - ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') + t('

What next?

') + ."
".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.').EOL .t('Please see the file "install/INSTALL.txt".') - ."

" + ."

" .t("Go to your new hub registration page and register as new member. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") - ."

"; + ."
"; } /** -- cgit v1.2.3 From 08c0d78296d4518a5ece4d6a2c05b9be83580aa8 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Tue, 18 Jul 2017 13:56:09 +0200 Subject: issue #827 provide backward compatibility for album links generated in earlier times before the ambiguity of photo album names was solved. This may provide incorrect results if two or more photo albums with the same basename exist in different directories of the file tree; but there is no easy way to solve that ambiguity - which is why the link format changed. --- Zotlabs/Module/Photos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index d993c481e..18d7abc48 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -689,7 +689,7 @@ class Photos extends \Zotlabs\Web\Controller { (SELECT resource_id, max(imgscale) imgscale FROM photo left join attach on folder = '%s' and photo.resource_id = attach.hash WHERE attach.uid = %d AND imgscale <= 4 AND photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id) ph ON (p.resource_id = ph.resource_id AND p.imgscale = ph.imgscale) ORDER BY created $order LIMIT %d OFFSET %d", - dbesc($datum), + dbesc($x['hash']), intval($owner_uid), intval(PHOTO_NORMAL), intval(PHOTO_PROFILE), -- cgit v1.2.3