Skip to content

Commit

Permalink
Merge c54d8c7 into 1769ba9
Browse files Browse the repository at this point in the history
  • Loading branch information
kroky committed Apr 10, 2020
2 parents 1769ba9 + c54d8c7 commit a8fb1da
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions index.php
Expand Up @@ -14,6 +14,7 @@
*/
define('APP_PATH', '');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');
define('DEBUG_MODE', true);
define('CACHE_ID', '');
define('SITE_ID', '');
Expand Down
2 changes: 2 additions & 0 deletions modules/api_login/api.php
Expand Up @@ -8,6 +8,8 @@
/* Constants */
define('DEBUG_MODE', false);
define('APP_PATH', dirname(dirname(dirname(__FILE__))).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');
define('CONFIG_FILE', APP_PATH.'hm3.rc');

/* Init the framework */
Expand Down
6 changes: 3 additions & 3 deletions modules/pgp/modules.php
Expand Up @@ -107,7 +107,7 @@ protected function output() {
return;
}
$pub_keys = $this->get('pgp_public_keys', array());
$res = '<script type="text/javascript" src="modules/pgp/assets/openpgp.min.js"></script>';
$res = '<script type="text/javascript" src="'.WEB_ROOT.'modules/pgp/assets/openpgp.min.js"></script>';
$res .= '<div class="pgp_section">';

$res .= '<span class="pgp_sign"><label for="pgp_sign">'.$this->trans('PGP Sign as').'</label>';
Expand All @@ -132,7 +132,7 @@ protected function output() {
class Hm_Output_pgp_settings_start extends Hm_Output_Module {
protected function output() {
$res = '<div class="pgp_settings"><div class="content_title">'.$this->trans('PGP Settings').'</div>';
$res .= '<script type="text/javascript" src="modules/pgp/assets/openpgp.min.js"></script>';
$res .= '<script type="text/javascript" src="'.WEB_ROOT.'modules/pgp/assets/openpgp.min.js"></script>';
return $res;
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ protected function output() {
*/
class Hm_Output_pgp_msg_controls extends Hm_Output_Module {
protected function output() {
return '<script type="text/javascript" src="modules/pgp/assets/openpgp.min.js"></script>'.
return '<script type="text/javascript" src="'.WEB_ROOT.'modules/pgp/assets/openpgp.min.js"></script>'.
'<div class="pgp_msg_controls"><select class="pgp_private_keys"></select> <input type="button" class="pgp_btn" value="Decrypt" /></div>'.prompt_for_passhrase($this);
}
}
Expand Down
12 changes: 6 additions & 6 deletions modules/smtp/modules.php
Expand Up @@ -652,16 +652,16 @@ protected function output() {
}
$res = '';
if ($html == 1) {
$res .= '<script type="text/javascript" src="modules/smtp/assets/kindeditor/kindeditor-all-min.js"></script>'.
'<link href="modules/smtp/assets/kindeditor/themes/default/default.css" rel="stylesheet" />'.
$res .= '<script type="text/javascript" src="'.WEB_ROOT.'modules/smtp/assets/kindeditor/kindeditor-all-min.js"></script>'.
'<link href="'.WEB_ROOT.'modules/smtp/assets/kindeditor/themes/default/default.css" rel="stylesheet" />'.
'<script type="text/javascript">KindEditor.ready(function(K) { K.create("#compose_body", {items:'.
"['formatblock', 'fontname', 'fontsize', 'forecolor', 'hilitecolor', 'bold',".
"'italic', 'underline', 'strikethrough', 'lineheight', 'table', 'hr', 'pagebreak', 'link', 'unlink',".
"'justifyleft', 'justifycenter', 'justifyright',".
"'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', '|',".
"'undo', 'redo', 'preview', 'print', '|', 'selectall', 'cut', 'copy', 'paste',".
"'plainpaste', 'wordpaste', '|', 'source', 'fullscreen']".
",basePath: 'modules/smtp/assets/kindeditor/'".
",basePath: '".WEB_ROOT."modules/smtp/assets/kindeditor/'".
'})});;</script>';
}
$res .= '<input type="hidden" name="hm_page_key" value="'.$this->html_safe(Hm_Request_Key::generate()).'" />'.
Expand All @@ -681,9 +681,9 @@ protected function output() {
$this->trans('Subject').'" /><textarea id="compose_body" name="compose_body" class="compose_body">'.
$this->html_safe($body).'</textarea>';
if ($html == 2) {
$res .= '<link href="modules/smtp/assets/markdown/editor.css" rel="stylesheet" />'.
'<script type="text/javascript" src="modules/smtp/assets/markdown/editor.js"></script>'.
'<script type="text/javascript" src="modules/smtp/assets/markdown/marked.js"></script>'.
$res .= '<link href="'.WEB_ROOT.'modules/smtp/assets/markdown/editor.css" rel="stylesheet" />'.
'<script type="text/javascript" src="'.WEB_ROOT.'modules/smtp/assets/markdown/editor.js"></script>'.
'<script type="text/javascript" src="'.WEB_ROOT.'modules/smtp/assets/markdown/marked.js"></script>'.
'<script type="text/javascript">var editor = new Editor(); editor.render();</script>';
}
$res .= '<table class="uploaded_files">';
Expand Down
2 changes: 1 addition & 1 deletion modules/themes/modules.php
Expand Up @@ -62,7 +62,7 @@ class Hm_Output_theme_css extends Hm_Output_Module {
*/
protected function output() {
if ($this->get('theme') && in_array($this->get('theme'), array_keys($this->get('themes', array())), true) && $this->get('theme') != 'default') {
return '<link href="modules/themes/assets/'.$this->html_safe($this->get('theme')).'.css?v='.CACHE_ID.'" media="all" rel="stylesheet" type="text/css" />';
return '<link href="'.WEB_ROOT.'modules/themes/assets/'.$this->html_safe($this->get('theme')).'.css?v='.CACHE_ID.'" media="all" rel="stylesheet" type="text/css" />';
}
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/config_gen.php
Expand Up @@ -14,6 +14,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(__FILE__)).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');
chdir(APP_PATH);

/* get the framework */
Expand Down
1 change: 1 addition & 0 deletions scripts/create_account.php
Expand Up @@ -21,6 +21,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(__FILE__)).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');

/* get the framework */
require APP_PATH.'lib/framework.php';
Expand Down
1 change: 1 addition & 0 deletions scripts/create_config.php
Expand Up @@ -9,6 +9,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(__FILE__)).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');

/* get the framework */
require APP_PATH.'lib/framework.php';
Expand Down
1 change: 1 addition & 0 deletions scripts/delete_account.php
Expand Up @@ -20,6 +20,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(__FILE__)).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');

/* get the framework */
require APP_PATH.'lib/framework.php';
Expand Down
1 change: 1 addition & 0 deletions scripts/update_password.php
Expand Up @@ -21,6 +21,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(__FILE__)).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');

/* get the framework */
require APP_PATH.'lib/framework.php';
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/bootstrap.php
Expand Up @@ -11,6 +11,7 @@
/* determine current absolute path used for require statements */
define('APP_PATH', dirname(dirname(dirname(__FILE__))).'/');
define('VENDOR_PATH', APP_PATH.'vendor/');
define('WEB_ROOT', '');

/* random id */
define('SITE_ID', 'randomid');
Expand Down

0 comments on commit a8fb1da

Please sign in to comment.