diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 84212270f..d0175549b 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -433,7 +433,7 @@ class Notifier {
$env_recips = (($private) ? array() : null);
- $details = q("select xchan_hash, xchan_instance_url, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . implode(',',$recipients) . ")");
+ $details = q("select xchan_hash, xchan_instance_url, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . protect_sprintf(implode(',',$recipients)) . ")");
$recip_list = array();
@@ -500,7 +500,7 @@ class Notifier {
// Now we have collected recipients (except for external mentions, FIXME)
// Let's reduce this to a set of hubs; checking that the site is not dead.
- $r = q("select hubloc.*, site.site_crypto, site.site_flags from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ")
+ $r = q("select hubloc.*, site.site_crypto, site.site_flags from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . protect_sprintf(implode(',',$recipients)) . ")
and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) "
);
diff --git a/Zotlabs/Module/Pubsites.php b/Zotlabs/Module/Pubsites.php
index ef02cf099..daec5dde3 100644
--- a/Zotlabs/Module/Pubsites.php
+++ b/Zotlabs/Module/Pubsites.php
@@ -30,7 +30,7 @@ class Pubsites extends \Zotlabs\Web\Controller {
if($ret['success']) {
$j = json_decode($ret['body'],true);
if($j) {
- $o .= '
';
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php
index 3a0116abe..09cc7a4d4 100644
--- a/Zotlabs/Render/Theme.php
+++ b/Zotlabs/Render/Theme.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Render;
+use App;
+
class Theme {
@@ -11,17 +13,28 @@ class Theme {
static $session_theme = null;
static $session_mobile_theme = null;
- static $base_themes = array('redbasic');
+ /**
+ * @brief Array with base or fallback themes.
+ */
+ static $base_themes = array('redbasic');
+
+ /**
+ * @brief Figure out the best matching theme and return it.
+ *
+ * The theme will depend on channel settings, mobile, session, core compatibility, etc.
+ *
+ * @return array
+ */
static public function current(){
- self::$system_theme = ((isset(\App::$config['system']['theme']))
+ self::$system_theme = ((isset(\App::$config['system']['theme']))
? \App::$config['system']['theme'] : '');
- self::$session_theme = ((isset($_SESSION) && x($_SESSION,'theme'))
+ self::$session_theme = ((isset($_SESSION) && x($_SESSION, 'theme'))
? $_SESSION['theme'] : self::$system_theme);
- self::$system_mobile_theme = ((isset(\App::$config['system']['mobile_theme']))
+ self::$system_mobile_theme = ((isset(\App::$config['system']['mobile_theme']))
? \App::$config['system']['mobile_theme'] : '');
- self::$session_mobile_theme = ((isset($_SESSION) && x($_SESSION,'mobile_theme'))
+ self::$session_mobile_theme = ((isset($_SESSION) && x($_SESSION, 'mobile_theme'))
? $_SESSION['mobile_theme'] : self::$system_mobile_theme);
$page_theme = null;
@@ -66,7 +79,7 @@ class Theme {
$chosen_theme = $page_theme;
}
}
- if(array_key_exists('theme_preview',$_GET))
+ if(array_key_exists('theme_preview', $_GET))
$chosen_theme = $_GET['theme_preview'];
// Allow theme selection of the form 'theme_name:schema_name'
@@ -91,14 +104,12 @@ class Theme {
}
// Worst case scenario, the default base theme or themes don't exist; perhaps somebody renamed it/them.
-
- // Find any theme at all and use it.
- $fallback = array_merge(glob('view/theme/*/css/style.css'),glob('view/theme/*/php/style.php'));
+ // Find any theme at all and use it.
+
+ $fallback = array_merge(glob('view/theme/*/css/style.css'), glob('view/theme/*/php/style.php'));
if(count($fallback))
- return(array(str_replace('view/theme/','', substr($fallback[0],0,-14))));
-
-
+ return(array(str_replace('view/theme/', '', substr($fallback[0], 0, -14))));
}
@@ -107,12 +118,11 @@ class Theme {
*
* Provide a sane default if nothing is chosen or the specified theme does not exist.
*
- * @param bool $installing default false
+ * @param bool $installing (optional) default false, if true return the name of the first base theme
*
* @return string
*/
-
- function url($installing = false) {
+ static public function url($installing = false) {
if($installing)
return self::$base_themes[0];
@@ -125,9 +135,10 @@ class Theme {
$opts = '';
$opts = ((\App::$profile_uid) ? '?f=&puid=' . \App::$profile_uid : '');
- $schema_str = ((x(\App::$layout,'schema')) ? '&schema=' . App::$layout['schema'] : '');
+ $schema_str = ((x(\App::$layout,'schema')) ? '&schema=' . App::$layout['schema'] : '');
if(($s) && (! $schema_str))
$schema_str = '&schema=' . $s;
+
$opts .= $schema_str;
if(file_exists('view/theme/' . $t . '/php/style.php'))
@@ -139,7 +150,6 @@ class Theme {
function debug() {
logger('system_theme: ' . self::$system_theme);
logger('session_theme: ' . self::$session_theme);
-
}
}
diff --git a/doc/context/en/cards/help.html b/doc/context/en/cards/help.html
new file mode 100644
index 000000000..9dbed3f97
--- /dev/null
+++ b/doc/context/en/cards/help.html
@@ -0,0 +1,20 @@
+
+
General
+
Cards represent a persistent area for collaboration that is separate from the social stream. They are somewhat more lightweight than webpages and wikis for quick organisation of information and have the advantage of allowing collaboration and commentary. They are well suited for helping to organise complex tasks where there are frequent updates and feedback.
+
+
Add Card
+
+ Creating a new card is very similar to composing a new post.
+
+
+ Page link name: The page link name is the name of the card for the static URL
+
+
+ Title: The title is displayed at the top of the card
+
+
+ Categories: If you have the Post Categories feature enabled for your channel, then you can add categories to the card. These categories populate the Categories list on the left panel and allow filtering your collection of cards.
+