diff options
-rw-r--r-- | Zotlabs/Module/Help.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Rbmark.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Setup.php | 8 | ||||
-rw-r--r-- | boot.php | 6 | ||||
-rw-r--r-- | include/menu.php | 7 | ||||
-rw-r--r-- | view/tpl/install.tpl | 4 |
6 files changed, 21 insertions, 14 deletions
diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index 5d52440a5..fd5cacee6 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -210,7 +210,8 @@ class Help extends \Zotlabs\Web\Controller { $content = preg_replace_callback( "/#include (.*?)\;/ism", function ($matches) { - $sub_file_type = array_pop(explode('.', $matches[1])); + $parts = explode('.', $matches[1]); + $sub_file_type = array_pop($parts); $included_content = $this->render_help_file($matches[1], $sub_file_type); return str_replace($matches[0], $included_content, $matches[0]); }, diff --git a/Zotlabs/Module/Rbmark.php b/Zotlabs/Module/Rbmark.php index b1aea2590..df32a97c2 100644 --- a/Zotlabs/Module/Rbmark.php +++ b/Zotlabs/Module/Rbmark.php @@ -73,16 +73,17 @@ class Rbmark extends \Zotlabs\Web\Controller { false, '', $this->get_bookmark_folders(intval($channel_id)), + null, ]; return replace_macros(get_markup_template('rbmark.tpl'), array( '$header' => t('Save Bookmark'), - '$url' => array('url',t('URL of bookmark'),$_REQUEST['url']), - '$title' => array('title',t('Description'),$_REQUEST['title']), + '$url' => array('url',t('URL of bookmark'),$_REQUEST['url'], null, null, null), + '$title' => array('title',t('Description'),$_REQUEST['title'], null, null, null), '$ischat' => ((x($_REQUEST,'ischat')) ? intval($_REQUEST['ischat']) : 0), '$private' => ((x($_REQUEST,'private')) ? intval($_REQUEST['private']) : 0), '$submit' => t('Save'), - '$menu_name' => array('menu_name',t('Or enter new bookmark folder name'),'',''), + '$menu_name' => array('menu_name',t('Or enter new bookmark folder name'),'','', null, null), '$menus' => $menu_select )); } diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index 647415385..7ca3f827c 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -46,9 +46,9 @@ class Setup extends \Zotlabs\Web\Controller { } if(x($_POST, 'pass')) { - $this->install_wizard_pass = intval($_POST['pass']); + self::$install_wizard_pass = intval($_POST['pass']); } else { - $this->install_wizard_pass = 1; + self::$install_wizard_pass = 1; } } @@ -215,9 +215,11 @@ class Setup extends \Zotlabs\Web\Controller { $tpl = get_markup_template('install.tpl'); return replace_macros($tpl, array( '$title' => $install_title, + '$icon' => null, '$pass' => '', '$status' => t('Permission denied.'), '$text' => '', + '$what_next' => null, )); } } @@ -237,7 +239,7 @@ class Setup extends \Zotlabs\Web\Controller { )); } - switch ($this->install_wizard_pass){ + switch (self::$install_wizard_pass){ case 1: { // System check $checks = array(); @@ -1760,9 +1760,9 @@ function login($register = false, $form_id = 'main_login', $hiddens = false, $lo '$login' => t('Login'), '$remote_login' => t('Remote Authentication'), '$form_id' => $form_id, - '$lname' => [$form_id . '_username', $lname_label], - '$lpassword' => [$form_id . '_password', t('Password')], - '$remember_me' => [$form_id . '_remember', t('Remember me'), '', '', [t('No'), t('Yes')]], + '$lname' => [$form_id . '_username', $lname_label, null, null, null, null], + '$lpassword' => [$form_id . '_password', t('Password'), null, null, null, null], + '$remember_me' => [$form_id . '_remember', t('Remember me'), '', '', [t('No'), t('Yes')], null, null], '$hiddens' => $hiddens, '$register' => $reg, '$lostpass' => t('Forgot your password?'), diff --git a/include/menu.php b/include/menu.php index 1f65f987d..2fcf88bca 100644 --- a/include/menu.php +++ b/include/menu.php @@ -166,7 +166,8 @@ function menu_create($arr) { if($r) return false; - $t = datetime_convert(); + $time_created = datetime_convert('UTC', 'UTC', empty($arr['menu_created']) ? 'now' : $arr['menu_created']); + $time_edited = empty($arr['menu_edited']) ? $time_created : datetime_convert('UTC', 'UTC', $arr['menu_edited']); $r = q("insert into menu ( menu_name, menu_desc, menu_flags, menu_channel_id, menu_created, menu_edited ) values( '%s', '%s', %d, %d, '%s', '%s' )", @@ -174,8 +175,8 @@ function menu_create($arr) { dbesc($menu_desc), intval($menu_flags), intval($menu_channel_id), - dbesc(datetime_convert('UTC','UTC',(($arr['menu_created']) ? $arr['menu_created'] : $t))), - dbesc(datetime_convert('UTC','UTC',(($arr['menu_edited']) ? $arr['menu_edited'] : $t))) + dbesc($time_created), + dbesc($time_edited) ); if(! $r) return false; diff --git a/view/tpl/install.tpl b/view/tpl/install.tpl index 5ab722b12..56faa0527 100644 --- a/view/tpl/install.tpl +++ b/view/tpl/install.tpl @@ -2,7 +2,9 @@ <div class="jumbotron"> <h1>{{$title}}</h1> <hr class="my-4"> + {{if $icon}} <h2><i class="fa fa-{{$icon}}"></i> {{$pass}}</h2> + {{/if}} </div> {{if $status}} @@ -11,5 +13,5 @@ <div class="alert alert-info">{{$text}}</div> <br> - {{$what_next}} + {{if $what_next}}{{$what_next}}{{/if}} </div> |