diff options
author | redmatrix <git@macgirvin.com> | 2016-04-18 20:38:38 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-18 20:38:38 -0700 |
commit | 2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289 (patch) | |
tree | 2376d950ba2bdc7753336a3e2b94865c95c238f2 /mod/pdledit.php | |
parent | 2a61817bad96526994c0499f1fc0a843a9cc9405 (diff) | |
download | volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.tar.gz volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.tar.bz2 volse-hubzilla-2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289.zip |
module updates
Diffstat (limited to 'mod/pdledit.php')
-rw-r--r-- | mod/pdledit.php | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/mod/pdledit.php b/mod/pdledit.php deleted file mode 100644 index bf29b2da0..000000000 --- a/mod/pdledit.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -function pdledit_post(&$a) { - if(! local_channel()) - return; - if(! $_REQUEST['module']) - return; - if(! trim($_REQUEST['content'])) { - del_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl'); - goaway(z_root() . '/pdledit/' . $_REQUEST['module']); - } - set_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl',escape_tags($_REQUEST['content'])); - build_sync_packet(); - info( t('Layout updated.') . EOL); - goaway(z_root() . '/pdledit/' . $_REQUEST['module']); -} - - -function pdledit_content(&$a) { - - if(! local_channel()) { - notice( t('Permission denied.') . EOL); - return; - } - - if(argc() > 1) - $module = 'mod_' . argv(1) . '.pdl'; - else { - $o .= '<div class="generic-content-wrapper-styled">'; - $o .= '<h1>' . t('Edit System Page Description') . '</h1>'; - $files = glob('mod/*'); - if($files) { - foreach($files as $f) { - $name = basename($f,'.php'); - $x = theme_include('mod_' . $name . '.pdl'); - if($x) { - $o .= '<a href="pdledit/' . $name . '" >' . $name . '</a><br />'; - } - } - } - - $o .= '</div>'; - - // list module pdl files - return $o; - } - - $t = get_pconfig(local_channel(),'system',$module); - if(! $t) - $t = file_get_contents(theme_include($module)); - if(! $t) { - notice( t('Layout not found.') . EOL); - return ''; - } - - $o = replace_macros(get_markup_template('pdledit.tpl'),array( - '$header' => t('Edit System Page Description'), - '$mname' => t('Module Name:'), - '$help' => t('Layout Help'), - '$module' => argv(1), - '$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'), - '$submit' => t('Submit') - )); - - return $o; -} |