This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Json extends \Restful { | |
// Accessible via: | |
// `GET /json/api/run/layout/index` | |
// retrieves controller run data from page and all includes in a layout template | |
// `GET /json/api/run/page/index` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- apps/navigation/lib/Functions.php --> | |
<?php | |
/** | |
* Print the site tree as an HTML list with the current | |
* context open as sub-lists up to the first-level children | |
* of the current page. The currently active page will have | |
* the class `current` and parents will have the class | |
* `parent`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- bootstrap.php --> | |
<?php | |
// set the language homepage for dynamic navigation | |
define ('HOMEPAGE', 'index-' . $i18n->language); | |
// redirect if they request the default homepage | |
if ($_SERVER['REQUEST_URI'] === '/' || $_SERVER['REQUEST_URI'] === '/index') { | |
$controller->redirect ('/' . HOMEPAGE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* these function go to the functions file */ | |
function navigation_has_current_child($children, $pageId){ | |
if(! is_array ($children)){ | |
return false; | |
} else { | |
foreach ($children as $item) { | |
if ($item->attr->id == $pageId || navigation_has_current_child($item->children, $pageId)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuntimeException: Template not found: translator/settings/ | |
Template->render ("translator/settings/", stdClass) | |
288/www/htdocs/v151009/jv/lib/Form.php | |
286. $page->add_script ('/js/jquery.verify_values.js'); | |
287. if ($this->js_validation) { | |
288. return $tpl->render ('admin/default-validation', $o) . $tpl->render ($this->view, $o); | |
289. } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErrorException: Invalid argument supplied for foreach() | |
Debugger::handle_error (2, "Invalid argument supplied for foreach()", "/www/htdocs/v151009/jv/apps/translator/handlers/build.php", 49, array(16)) | |
49/www/htdocs/v151009/jv/apps/translator/handlers/build.php | |
47. foreach ($sources as $source) { | |
48. $files = glob ($source); | |
49. foreach ($files as $file) { | |
50. $data = file_get_contents ($file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /apps/blocks/views/editable.php */ | |
<p class="admin-options"> | |
{% if title %} | |
{% if locked %} | |
<a href="javascript:void(0)" title="{"Editing Locked"}"><img src="/apps/admin/css/admin/lock.png" /></a> | |
{% else %} | |
<a href="/blocks/edit?id={{ id }}&return={{ $_SERVER.REQUEST_URI }}" title="{"Edit Block"}"><img src="/apps/admin/css/admin/edit.png" /></a><a href="/admin/versions?type=Block&id={{ id }}" title="{"Versions"}"><img src="/apps/admin/css/admin/versions.png" /></a><a href="/blocks/delete?id={{ id }}&return={{ $_SERVER.REQUEST_URI }}" title="{"Delete Block"}" onclick="return confirm {% if new_id %}('{"Are you sure you want to delete the default block? This will have impact on all other Pages using this default block"}'){% else %} ('{"Are you sure you want to delete the current block?"}') {% end %};"><img src="/apps/admin/css/admin/delete.png" /></a>{% if new_id %}<a href="/blocks/add?id={{ new_id }}&return={{ $_SERVER.REQUEST_URI }}" title="{"Add Block"}" onclick="return confirm ('{"Are you sure yo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Json extends \Restful { | |
// Accessible via `GET /json/api/page/index | |
public function get_page ($id) { | |
if (! User::require_admin ()) { | |
$page = Webpage::query () | |
->where ('access', 'public') |