aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-04 20:27:41 -0800
committerfriendica <info@friendica.com>2013-01-04 20:27:41 -0800
commit37957204215854f2d80ca8b975f275ebda305f7e (patch)
tree26c119582f0ce0229fcb15742745bcc0c4bd4dee /include
parent78a65c7c1b98991574469e8baee9457296827dff (diff)
downloadvolse-hubzilla-37957204215854f2d80ca8b975f275ebda305f7e.tar.gz
volse-hubzilla-37957204215854f2d80ca8b975f275ebda305f7e.tar.bz2
volse-hubzilla-37957204215854f2d80ca8b975f275ebda305f7e.zip
move all the final page construction to a construct_page() function
Diffstat (limited to 'include')
-rw-r--r--include/plugin.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/include/plugin.php b/include/plugin.php
index c13a0ff07..6a35a6187 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -4,14 +4,11 @@
// install and uninstall plugin
if (! function_exists('uninstall_plugin')){
function uninstall_plugin($plugin){
- logger("Addons: uninstalling " . $plugin);
+ logger("Addons: uninstalling " . $plugin, LOGGER_DEBUG);
q("DELETE FROM `addon` WHERE `name` = '%s' ",
dbesc($plugin)
);
- // define THISPLUGIN, make life easy to plugin devs :-)
- define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
-
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
if(function_exists($plugin . '_uninstall')) {
$func = $plugin . '_uninstall';
@@ -23,11 +20,9 @@ if (! function_exists('install_plugin')){
function install_plugin($plugin) {
// silently fail if plugin was removed
- // define THISPLUGIN, make life easy to plugin devs :-)
- define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
-
if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
return false;
+
logger("Addons: installing " . $plugin);
$t = @filemtime('addon/' . $plugin . '/' . $plugin . '.php');
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
@@ -35,7 +30,7 @@ function install_plugin($plugin) {
$func = $plugin . '_install';
$func();
- $plugin_admin = (function_exists($plugin."_plugin_admin")?1:0);
+ $plugin_admin = (function_exists($plugin . "_plugin_admin") ? 1 : 0);
$r = q("INSERT INTO `addon` (`name`, `installed`, `timestamp`, `plugin_admin`) VALUES ( '%s', 1, %d , %d ) ",
dbesc($plugin),
@@ -83,9 +78,6 @@ function reload_plugins() {
$fname = 'addon/' . $pl . '/' . $pl . '.php';
- // define THISPLUGIN, make life easy to plugin devs :-)
- define("THISPLUGIN", $fname);
-
if(file_exists($fname)) {
$t = @filemtime($fname);
foreach($installed as $i) {