Changeset 1060
- Timestamp:
- 04/29/2008 10:22:48 PM (2 years ago)
- Files:
-
- 1 modified
-
branches/1.1.6.5/actions/include.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1.6.5/actions/include.php
r836 r1060 1 1 <?php 2 /** 3 * Include contents of a target page at the point of invocation 4 * 5 * @package Actions 6 * @version $Id$ 7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 8 * @filesource 9 * 10 * @uses Wakka::HasAccess() 11 * @uses Wakka::LoadPage() 12 * @uses Wakka::Format() 13 */ 14 15 // defaults 16 if(!defined('ERROR_CIRCULAR_REF')) define('ERROR_CIRCULAR_REF', 'Circular reference detected'); 17 if(!defined('ERROR_TARGET_ACL')) define('ERROR_TARGET_ACL', "You aren't allowed to read included page <tt>%s</tt>"); 2 18 3 19 if (!$page) $page = $wikka_vars; 20 $orig_page = $page; 4 21 $page = strtolower($page); 5 22 if (!$this->config["includes"]) $this->config["includes"][] = strtolower($this->tag); … … 11 28 print $this->Format($page["body"]); 12 29 } 13 } else print "<em class='error'>Circular reference detected</em>"; 30 else printf("<em class='error'>".ERROR_TARGET_ACL."</em>", $orig_page); 31 } else print "<em class='error'>".ERROR_CIRCULAR_REF."</em>"; 14 32 15 33 ?>