aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/HttpMeta.php15
-rw-r--r--Zotlabs/Web/SubModule.php17
2 files changed, 30 insertions, 2 deletions
diff --git a/Zotlabs/Web/HttpMeta.php b/Zotlabs/Web/HttpMeta.php
index 469a9ed8b..ceaa82162 100644
--- a/Zotlabs/Web/HttpMeta.php
+++ b/Zotlabs/Web/HttpMeta.php
@@ -54,8 +54,19 @@ class HttpMeta {
}
}
if($this->check_required()) {
+ $arrayproperties = [ 'og:image' ];
foreach($this->og as $k => $v) {
- $o .= '<meta property="' . $k . '" content="' . urlencode($v) . '" />' . "\r\n" ;
+ if (in_array($k,$arrayproperties)) {
+ if (is_array($v)) {
+ foreach ($v as $v2) {
+ $o .= '<meta property="' . $k . '" content="' . $v2 . '" />' . "\r\n" ;
+ }
+ } else {
+ $o .= '<meta property="' . $k . '" content="' . $v . '" />' . "\r\n" ;
+ }
+ } else {
+ $o .= '<meta property="' . $k . '" content="' . $v . '" />' . "\r\n" ;
+ }
}
}
if($o)
@@ -63,4 +74,4 @@ class HttpMeta {
return $o;
}
-} \ No newline at end of file
+}
diff --git a/Zotlabs/Web/SubModule.php b/Zotlabs/Web/SubModule.php
index 7c8404201..763a55d86 100644
--- a/Zotlabs/Web/SubModule.php
+++ b/Zotlabs/Web/SubModule.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Web;
+use Zotlabs\Extend\Route;
+
/*
* @brief
*
@@ -31,9 +33,23 @@ class SubModule {
$filename = 'Zotlabs/Module/' . ucfirst(argv(0)) . '/'. ucfirst(argv($whicharg)) . '.php';
$modname = '\\Zotlabs\\Module\\' . ucfirst(argv(0)) . '\\' . ucfirst(argv($whicharg));
+
if(file_exists($filename)) {
$this->controller = new $modname();
}
+
+ $routes = Route::get();
+
+ if($routes) {
+ foreach($routes as $route) {
+ if(is_array($route) && strtolower($route[1]) === strtolower(argv(0)) . '/' . strtolower(argv($whicharg))) {
+ include_once($route[0]);
+ if(class_exists($modname)) {
+ $this->controller = new $modname;
+ }
+ }
+ }
+ }
}
/**
@@ -43,6 +59,7 @@ class SubModule {
* @return boolean|mixed
*/
function call($method) {
+
if(! $this->controller)
return false;