Version 1.1-alpha7()
------------------------------------------------------------------------
+ * Fixed not showing entries in the quicksearch that have the
+ "no frontpage" entryproperty set (garvinhicking)
+
* Fixed sidebar category plugin to show proper category listing
for permission-based restrictions, when "current autho" mode
is selected (garvinhicking)
/**
* Assign one or multiple template variable
- * @TODO: Why can't this function accept references. This sucks.
*
* @param mixed Either a variable name, or an array of variables
* @param mixed Either null or the variable content.
return true;
}
+/**
+ * Assign one or multiple template variable by reference
+ *
+ * @param string Variable name
+ * @param mixed Referenced variable
+ * @access public
+ * @return null
+ */
+ function assign_by_ref($tpl_var, &$value) {
+ $GLOBALS['tpl'][$tpl_var] =& $value;
+
+ return true;
+ }
+
/**
* Helper function to call a 'serendipity_smarty_xx' function with less parameters.
*
function assign($tpl_var, $value = null, $level = 0) {
if (is_array($tpl_var)) {
foreach ($tpl_var as $key => $val) {
- if ($key != '') {
- $this->createXML($level, $key, $val);
- }
+ $this->createXML($level, $key, $val);
}
} else {
$this->createXML($level, $tpl_var, $value);
return true;
}
+/**
+ * Assign one or multiple template variable by reference
+ *
+ * @param string Variable name
+ * @param mixed Referenced variable
+ * @access public
+ * @return null
+ */
+ function assign_by_ref($tpl_var, &$value) {
+ if (is_array($value)) {
+ foreach ($value as $key => $val) {
+ $this->createXML($level, $key, $val);
+ }
+ } else {
+ $this->createXML($level, $tpl_var, $value);
+ }
+
+ return true;
+ }
+
+/**
+ * Create the XML output for an element
+ *
+ * @param int The intend level
+ * @param mixed The XML element name
+ * @param mixed The XML element value
+ */
function createXML(&$level, &$key, &$val) {
if (is_numeric($key)) {
$openkey = 'item index="' . $key . '"';
$propbag->add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking');
- $propbag->add('version', '1.9');
+ $propbag->add('version', '1.10');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
$conds[] = " (ep_access.property IS NULL OR ep_access.value = 'public')";
}
- if (!isset($serendipity['GET']['category']) && !isset($serendipity['GET']['adminModule']) && $event == 'frontend_fetchentries') {
+ if (!isset($serendipity['GET']['category']) && !isset($serendipity['GET']['adminModule']) && $event == 'frontend_fetchentries' && $addData['source'] != 'search') {
$conds[] = " (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true') ";
$joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_no_frontpage
ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')";