diff options
author | Mario <mario@mariovavti.com> | 2021-05-27 09:45:39 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-05-27 09:45:39 +0000 |
commit | 7776283a479e24955f45eb9993d93d4dde87956a (patch) | |
tree | 6e7638301d13f74038a5c769f5a06867f37832c3 /Zotlabs | |
parent | c9d4802bf14cd135a75f89e4aa06976dfd628af5 (diff) | |
download | volse-hubzilla-7776283a479e24955f45eb9993d93d4dde87956a.tar.gz volse-hubzilla-7776283a479e24955f45eb9993d93d4dde87956a.tar.bz2 volse-hubzilla-7776283a479e24955f45eb9993d93d4dde87956a.zip |
remove zot includes
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Authtest.php | 31 | ||||
-rw-r--r-- | Zotlabs/Module/Fhublocs.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Import.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Notes.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Profiles.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Rbmark.php | 67 | ||||
-rw-r--r-- | Zotlabs/Module/Rpost.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Settings.php | 45 | ||||
-rw-r--r-- | Zotlabs/Module/Wfinger.php | 8 |
9 files changed, 72 insertions, 84 deletions
diff --git a/Zotlabs/Module/Authtest.php b/Zotlabs/Module/Authtest.php index 239ae3bdb..d85af09dc 100644 --- a/Zotlabs/Module/Authtest.php +++ b/Zotlabs/Module/Authtest.php @@ -1,41 +1,38 @@ <?php namespace Zotlabs\Module; -require_once('include/zot.php'); - - class Authtest extends \Zotlabs\Web\Controller { function get() { - - + + $auth_success = false; $o .= '<h3>Magic-Auth Diagnostic</h3>'; - + if(! local_channel()) { notice( t('Permission denied.') . EOL); return $o; } - + $o .= '<form action="authtest" method="get">'; $o .= 'Target URL: <input type="text" style="width: 250px;" name="dest" value="' . $_GET['dest'] .'" />'; - $o .= '<input type="submit" name="submit" value="Submit" /></form>'; - + $o .= '<input type="submit" name="submit" value="Submit" /></form>'; + $o .= '<br /><br />'; - + if(x($_GET,'dest')) { if(strpos($_GET['dest'],'@')) { $_GET['dest'] = $_REQUEST['dest'] = 'https://' . substr($_GET['dest'],strpos($_GET['dest'],'@')+1) . '/channel/' . substr($_GET['dest'],0,strpos($_GET['dest'],'@')); } - + $_REQUEST['test'] = 1; $mod = new Magic(); $x = $mod->init($a); $o .= 'Local Setup returns: ' . print_r($x,true); - - - + + + if($x['url']) { $z = z_fetch_url($x['url'] . '&test=1'); if($z['success']) { @@ -50,12 +47,12 @@ class Authtest extends \Zotlabs\Web\Controller { $o .= 'fetch url failure.' . print_r($z,true); } } - + if(! $auth_success) $o .= 'Authentication Failed!' . EOL; } - + return str_replace("\n",'<br />',$o); } - + } diff --git a/Zotlabs/Module/Fhublocs.php b/Zotlabs/Module/Fhublocs.php index 4918f751b..9dcece715 100644 --- a/Zotlabs/Module/Fhublocs.php +++ b/Zotlabs/Module/Fhublocs.php @@ -3,7 +3,6 @@ namespace Zotlabs\Module; use Zotlabs\Lib\Libzot; -require_once('include/zot.php'); require_once('include/crypto.php'); /* fix missing or damaged hublocs */ diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index bfd248a0f..59db7b4be 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -2,7 +2,6 @@ namespace Zotlabs\Module; -require_once('include/zot.php'); require_once('include/channel.php'); require_once('include/import.php'); require_once('include/perm_upgrade.php'); diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php index b448cff83..452e3df60 100644 --- a/Zotlabs/Module/Notes.php +++ b/Zotlabs/Module/Notes.php @@ -38,7 +38,6 @@ class Notes extends Controller { // push updates to channel clones if((argc() > 1) && (argv(1) === 'sync')) { - require_once('include/zot.php'); Libsync::build_sync_packet(); } diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index 9aa342223..452af4d78 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -600,7 +600,6 @@ class Profiles extends \Zotlabs\Web\Controller { intval(local_channel()) ); if($r) { - require_once('include/zot.php'); Libsync::build_sync_packet(local_channel(),array('profile' => $r)); } diff --git a/Zotlabs/Module/Rbmark.php b/Zotlabs/Module/Rbmark.php index 226cef69e..87b774495 100644 --- a/Zotlabs/Module/Rbmark.php +++ b/Zotlabs/Module/Rbmark.php @@ -6,12 +6,11 @@ require_once('include/crypto.php'); require_once('include/items.php'); require_once('include/taxonomy.php'); require_once('include/conversation.php'); -require_once('include/zot.php'); require_once('include/bookmarks.php'); /** * remote bookmark - * + * * https://yoursite/rbmark?f=&title=&url=&private=&remote_return= * * This can be called via either GET or POST, use POST for long body content as suhosin often limits GET parameter length @@ -31,45 +30,45 @@ class Rbmark extends \Zotlabs\Web\Controller { function post() { if($_POST['submit'] !== t('Save')) return; - + logger('rbmark_post: ' . print_r($_REQUEST,true)); - + $channel = \App::get_channel(); - + $t = array('url' => escape_tags($_REQUEST['url']),'term' => escape_tags($_REQUEST['title'])); bookmark_add($channel,$channel,$t,((x($_REQUEST,'private')) ? intval($_REQUEST['private']) : 0), array('menu_id' => ((x($_REQUEST,'menu_id')) ? intval($_REQUEST['menu_id']) : 0), 'menu_name' => ((x($_REQUEST,'menu_name')) ? escape_tags($_REQUEST['menu_name']) : ''), 'ischat' => ((x($_REQUEST['ischat'])) ? intval($_REQUEST['ischat']) : 0) )); - + goaway(z_root() . '/bookmarks'); - + } - - + + function get() { - + $o = ''; - + if(! local_channel()) { - + // The login procedure is going to bugger our $_REQUEST variables // so save them in the session. - + if(array_key_exists('url',$_REQUEST)) { $_SESSION['bookmark'] = $_REQUEST; } return login(); } - + // If we have saved rbmark session variables, but nothing in the current $_REQUEST, recover the saved variables - + if((! array_key_exists('url',$_REQUEST)) && (array_key_exists('bookmark',$_SESSION))) { $_REQUEST = $_SESSION['bookmark']; unset($_SESSION['bookmark']); } - + if($_REQUEST['remote_return']) { $_SESSION['remote_return'] = $_REQUEST['remote_return']; } @@ -78,12 +77,12 @@ class Rbmark extends \Zotlabs\Web\Controller { goaway($_SESSION['remote_return']); goaway(z_root() . '/bookmarks'); } - + $channel = \App::get_channel(); - - + + $m = menu_list($channel['channel_id'],'',MENU_BOOKMARK); - + $menus = array(); if($m) { $menus = array(0 => ''); @@ -92,10 +91,10 @@ class Rbmark extends \Zotlabs\Web\Controller { } } $menu_select = array('menu_id',t('Select a bookmark folder'),false,'',$menus); - - + + $o .= replace_macros(get_markup_template('rbmark.tpl'), array( - + '$header' => t('Save Bookmark'), '$url' => array('url',t('URL of bookmark'),escape_tags($_REQUEST['url'])), '$title' => array('title',t('Description'),escape_tags($_REQUEST['title'])), @@ -104,18 +103,18 @@ class Rbmark extends \Zotlabs\Web\Controller { '$submit' => t('Save'), '$menu_name' => array('menu_name',t('Or enter new bookmark folder name'),'',''), '$menus' => $menu_select - + )); - - - - - - + + + + + + return $o; - + } - - - + + + } diff --git a/Zotlabs/Module/Rpost.php b/Zotlabs/Module/Rpost.php index ff306d138..80ad289b2 100644 --- a/Zotlabs/Module/Rpost.php +++ b/Zotlabs/Module/Rpost.php @@ -8,7 +8,6 @@ require_once('include/crypto.php'); require_once('include/items.php'); require_once('include/taxonomy.php'); require_once('include/conversation.php'); -require_once('include/zot.php'); /** * remote post diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index 79031c98f..624cbb0c1 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -1,7 +1,6 @@ <?php namespace Zotlabs\Module; /** @file */ -require_once('include/zot.php'); require_once('include/security.php'); class Settings extends \Zotlabs\Web\Controller { @@ -11,68 +10,68 @@ class Settings extends \Zotlabs\Web\Controller { function init() { if(! local_channel()) return; - + if($_SESSION['delegate']) return; - + \App::$profile_uid = local_channel(); - + // default is channel settings in the absence of other arguments - + if(argc() == 1) { // We are setting these values - don't use the argc(), argv() functions here \App::$argc = 2; \App::$argv[] = 'channel'; - } + } $this->sm = new \Zotlabs\Web\SubModule(); } - - + + function post() { - + if(! local_channel()) return; - + if($_SESSION['delegate']) return; - + // logger('mod_settings: ' . print_r($_REQUEST,true)); - + if(argc() > 1) { if($this->sm->call('post') !== false) { return; } } - + goaway(z_root() . '/settings' ); return; // NOTREACHED } - - - + + + function get() { - + nav_set_selected('Settings'); - + if((! local_channel()) || ($_SESSION['delegate'])) { notice( t('Permission denied.') . EOL ); return login(); } - - + + $channel = \App::get_channel(); if($channel) head_set_icon($channel['xchan_photo_s']); - + $o = $this->sm->call('get'); if($o !== false) return $o; $o = ''; - - } + + } } diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php index 46da7f007..6dedc1ef1 100644 --- a/Zotlabs/Module/Wfinger.php +++ b/Zotlabs/Module/Wfinger.php @@ -1,8 +1,6 @@ <?php namespace Zotlabs\Module; -require_once('include/zot.php'); - use Zotlabs\Lib\Keyutils; use Zotlabs\Lib\Libzot; @@ -21,7 +19,7 @@ class Wfinger extends \Zotlabs\Web\Controller { elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) $scheme = 'https'; elseif(x($_SERVER,'HTTP_X_FORWARDED_PROTO') && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) - $scheme = 'https'; + $scheme = 'https'; $zot = intval($_REQUEST['zot']); @@ -69,7 +67,7 @@ class Wfinger extends \Zotlabs\Web\Controller { $channel = substr($channel,1); $channel = substr($channel,0,-1); $pchan = true; - $r = q("select * from pchan left join xchan on pchan_hash = xchan_hash + $r = q("select * from pchan left join xchan on pchan_hash = xchan_hash where pchan_guid = '%s' limit 1", dbesc($channel) ); @@ -78,7 +76,7 @@ class Wfinger extends \Zotlabs\Web\Controller { } } else { - $r = q("select * from channel left join xchan on channel_hash = xchan_hash + $r = q("select * from channel left join xchan on channel_hash = xchan_hash where channel_address = '%s' limit 1", dbesc($channel) ); |