From 1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 22 Jun 2016 19:08:59 -0700 Subject: db statement debugging --- Zotlabs/Module/Photo.php | 4 ++-- Zotlabs/Module/Profile_photo.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php index 92c9ac3c0..5148c4a94 100644 --- a/Zotlabs/Module/Photo.php +++ b/Zotlabs/Module/Photo.php @@ -62,7 +62,7 @@ class Photo extends \Zotlabs\Web\Controller { intval($uid), intval(PHOTO_PROFILE) ); - if(count($r)) { + if($r) { $data = dbunescbin($r[0]['content']); $mimetype = $r[0]['mimetype']; } @@ -79,7 +79,7 @@ class Photo extends \Zotlabs\Web\Controller { * Other photos */ - /* Check for a cookie to indicate display pixel density, in order to detect high-resolution + /* Check for a cookie to indicate display pixel density, in order to detect high-resolution displays. This procedure was derived from the "Retina Images" by Jeremey Worboys, used in accordance with the Creative Commons Attribution 3.0 Unported License. Project link: https://github.com/Retina-Images/Retina-Images diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 6129a7492..9480a2f7f 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -23,12 +23,11 @@ class Profile_photo extends \Zotlabs\Web\Controller { /* @brief Initalize the profile-photo edit view * - * @param $a Current application * @return void * */ - function init() { + function init() { if(! local_channel()) { return; @@ -46,7 +45,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { * */ - function post() { + function post() { if(! local_channel()) { return; -- cgit v1.2.3 From 515b054a6e6e5030b66753147cff424e0f37bab8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 22 Jun 2016 20:17:19 -0700 Subject: missing class selector when "use photo as profile photo" --- Zotlabs/Module/Profile_photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 9480a2f7f..d1ce9f428 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -348,7 +348,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { } } - profile_photo_crop_ui_head($a, $ph, $hash, $smallest); + $this->profile_photo_crop_ui_head($a, $ph, $hash, $smallest); } $profiles = q("select id, profile_name as name, is_default from profile where uid = %d", -- cgit v1.2.3 From b8c5a91940f75e79b1cd7e7e2148e4acd0ff7d83 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 22 Jun 2016 20:46:44 -0700 Subject: set profile when "use existing photo" --- Zotlabs/Module/Profile_photo.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index d1ce9f428..c02821a3c 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -70,6 +70,8 @@ class Profile_photo extends \Zotlabs\Web\Controller { } } + +logger('profile: ' . $_REQUEST['profile']); // phase 2 - we have finished cropping @@ -268,11 +270,19 @@ class Profile_photo extends \Zotlabs\Web\Controller { notice( t('Permission denied.') . EOL ); return; }; - - // check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); - + $resource_id = argv(2); + // When using an existing photo, we don't have a dialogue to offer a choice of profiles, + // so it gets attached to the default + + $p = q("select id from profile where is_default = 1 and uid = %d", + intval(local_channel()) + ); + if($p) { + $_REQUEST['profile'] = $p[0]['id']; + } + $r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC", intval(local_channel()), @@ -309,7 +319,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { dbesc($channel['xchan_hash']) ); - profile_photo_set_profile_perms(); //Reset default photo permissions to public + profile_photo_set_profile_perms(); // Reset default photo permissions to public \Zotlabs\Daemon\Master::Summon(array('Directory',local_channel())); goaway(z_root() . '/profiles'); } -- cgit v1.2.3 From acf26d5c63c8b3316d713ce08b397f35aae03460 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 23 Jun 2016 01:17:44 -0700 Subject: code cleanup for profile_photos --- Zotlabs/Module/Connedit.php | 2 +- Zotlabs/Module/Cover_photo.php | 4 +- Zotlabs/Module/Profile_photo.php | 101 ++++++++++++++++++++++----------------- Zotlabs/Module/Profperm.php | 2 +- 4 files changed, 62 insertions(+), 47 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 3feba5370..72b854079 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -219,7 +219,7 @@ class Connedit extends \Zotlabs\Web\Controller { //Update profile photo permissions logger('A new profile was assigned - updating profile photos'); - profile_photo_set_profile_perms($profile_id); + profile_photo_set_profile_perms(local_channel(),$profile_id); } diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index a72c3389f..5633976c8 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -40,7 +40,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { * */ - function post() { + function post() { if(! local_channel()) { return; @@ -271,7 +271,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { */ - function get() { + function get() { if(! local_channel()) { notice( t('Permission denied.') . EOL ); diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index c02821a3c..72c92e721 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -53,8 +53,23 @@ class Profile_photo extends \Zotlabs\Web\Controller { check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); - if((x($_POST,'cropfinal')) && ($_POST['cropfinal'] == 1)) { + if((array_key_exists('postfinal',$_POST)) && (intval($_POST['cropfinal']) == 1)) { + // phase 2 - we have finished cropping + + if(argc() != 2) { + notice( t('Image uploaded but image cropping failed.') . EOL ); + return; + } + + $image_id = argv(1); + + if(substr($image_id,-2,1) == '-') { + $scale = substr($image_id,-1,1); + $image_id = substr($image_id,0,-2); + } + + // unless proven otherwise $is_default_profile = 1; @@ -69,25 +84,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { $is_default_profile = 0; } } - -logger('profile: ' . $_REQUEST['profile']); - - - // phase 2 - we have finished cropping - - if(argc() != 2) { - notice( t('Image uploaded but image cropping failed.') . EOL ); - return; - } - - $image_id = argv(1); - - if(substr($image_id,-2,1) == '-') { - $scale = substr($image_id,-1,1); - $image_id = substr($image_id,0,-2); - } - $srcX = $_POST['xstart']; $srcY = $_POST['ystart']; @@ -111,30 +108,38 @@ logger('profile: ' . $_REQUEST['profile']); $aid = get_account_id(); - $p = array('aid' => $aid, 'uid' => local_channel(), 'resource_id' => $base_image['resource_id'], - 'filename' => $base_image['filename'], 'album' => t('Profile Photos')); + $p = [ + 'aid' => $aid, + 'uid' => local_channel(), + 'resource_id' => $base_image['resource_id'], + 'filename' => $base_image['filename'], + 'album' => t('Profile Photos') + ]; - $p['imgscale'] = 4; + $p['imgscale'] = PHOTO_RES_PROFILE_300; $p['photo_usage'] = (($is_default_profile) ? PHOTO_PROFILE : PHOTO_NORMAL); $r1 = $im->save($p); $im->scaleImage(80); - $p['imgscale'] = 5; + $p['imgscale'] = PHOTO_RES_PROFILE_80; $r2 = $im->save($p); $im->scaleImage(48); - $p['imgscale'] = 6; + $p['imgscale'] = PHOTO_RES_PROFILE_48; $r3 = $im->save($p); if($r1 === false || $r2 === false || $r3 === false) { // if one failed, delete them all so we can start over. notice( t('Image resize failed.') . EOL ); - $x = q("delete from photo where resource_id = '%s' and uid = %d and imgscale >= 4 ", + $x = q("delete from photo where resource_id = '%s' and uid = %d and imgscale in ( %d, %d, %d ) ", dbesc($base_image['resource_id']), - local_channel() + local_channel(), + intval(PHOTO_RES_PROFILE_300), + intval(PHOTO_RES_PROFILE_80), + intval(PHOTO_RES_PROFILE_48) ); return; } @@ -184,10 +189,7 @@ logger('profile: ' . $_REQUEST['profile']); // Now copy profile-permissions to pictures, to prevent privacyleaks by automatically created folder 'Profile Pictures' - profile_photo_set_profile_perms($_REQUEST['profile']); - - - + profile_photo_set_profile_perms(local_channel(),$_REQUEST['profile']); } else notice( t('Unable to process image') . EOL); @@ -197,7 +199,9 @@ logger('profile: ' . $_REQUEST['profile']); return; // NOTREACHED } - + // A new photo was uploaded. Store it and save some important details + // in App::$data for use in the cropping function + $hash = photo_new_resource(); $smallest = 0; @@ -221,7 +225,7 @@ logger('profile: ' . $_REQUEST['profile']); $os_storage = false; foreach($i as $ii) { - if(intval($ii['imgscale']) < 2) { + if(intval($ii['imgscale']) < PHOTO_RES_640) { $smallest = intval($ii['imgscale']); $os_storage = intval($ii['os_storage']); $imagedata = $ii['content']; @@ -239,7 +243,10 @@ logger('profile: ' . $_REQUEST['profile']); } return $this->profile_photo_crop_ui_head($a, $ph, $hash, $smallest); - + + // This will "fall through" to the get() method, and since + // App::$data['imagecrop'] is set, it will proceed to cropping + // rather than present the upload form } @@ -294,11 +301,11 @@ logger('profile: ' . $_REQUEST['profile']); } $havescale = false; foreach($r as $rr) { - if($rr['imgscale'] == 5) + if($rr['imgscale'] == PHOTO_RES_PROFILE_80) $havescale = true; } - // set an already loaded photo as profile photo + // set an already loaded and cropped photo as profile photo if(($r[0]['album'] == t('Profile Photos')) && ($havescale)) { // unset any existing profile photos @@ -319,7 +326,7 @@ logger('profile: ' . $_REQUEST['profile']); dbesc($channel['xchan_hash']) ); - profile_photo_set_profile_perms(); // Reset default photo permissions to public + profile_photo_set_profile_perms(local_channel()); // Reset default photo permissions to public \Zotlabs\Daemon\Master::Summon(array('Directory',local_channel())); goaway(z_root() . '/profiles'); } @@ -351,7 +358,7 @@ logger('profile: ' . $_REQUEST['profile']); if($i) { $hash = $i[0]['resource_id']; foreach($i as $ii) { - if(intval($ii['imgscale']) < 2) { + if(intval($ii['imgscale']) < PHOTO_RES_640) { $smallest = intval($ii['imgscale']); } } @@ -359,9 +366,14 @@ logger('profile: ' . $_REQUEST['profile']); } $this->profile_photo_crop_ui_head($a, $ph, $hash, $smallest); + + // falls through with App::$data['imagecrop'] set so we go straight to the cropping section } - $profiles = q("select id, profile_name as name, is_default from profile where uid = %d", + + // present an upload form + + $profiles = q("select id, profile_name as name, is_default from profile where uid = %d order by id asc", intval(local_channel()) ); @@ -388,6 +400,9 @@ logger('profile: ' . $_REQUEST['profile']); return $o; } else { + + // present a cropping form + $filename = \App::$data['imagecrop'] . '-' . \App::$data['imagecrop_resolution']; $resolution = \App::$data['imagecrop_resolution']; $tpl = get_markup_template("cropbody.tpl"); @@ -425,13 +440,13 @@ logger('profile: ' . $_REQUEST['profile']); if($max_length > 0) $ph->scaleImage($max_length); - $width = $ph->getWidth(); - $height = $ph->getHeight(); + \App::$data['width'] = $ph->getWidth(); + \App::$data['height'] = $ph->getHeight(); - if($width < 500 || $height < 500) { + if(\App::$data['width'] < 500 || \App::$data['height'] < 500) { $ph->scaleImageUp(400); - $width = $ph->getWidth(); - $height = $ph->getHeight(); + \App::$data['width'] = $ph->getWidth(); + \App::$data['height'] = $ph->getHeight(); } diff --git a/Zotlabs/Module/Profperm.php b/Zotlabs/Module/Profperm.php index 33e9d1ece..79ce7a7ed 100644 --- a/Zotlabs/Module/Profperm.php +++ b/Zotlabs/Module/Profperm.php @@ -97,7 +97,7 @@ class Profperm extends \Zotlabs\Web\Controller { //Time to update the permissions on the profile-pictures as well - profile_photo_set_profile_perms($profile['id']); + profile_photo_set_profile_perms(local_channel(),$profile['id']); $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'", intval(local_channel()), -- cgit v1.2.3 From e5c66d94f22d0efcdec0796872e9be81bff1bb4e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 23 Jun 2016 05:18:58 -0700 Subject: relocate the cache class --- Zotlabs/Lib/Cache.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Zotlabs/Lib/Cache.php (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Cache.php b/Zotlabs/Lib/Cache.php new file mode 100644 index 000000000..35c8f56ad --- /dev/null +++ b/Zotlabs/Lib/Cache.php @@ -0,0 +1,46 @@ + Date: Thu, 23 Jun 2016 18:12:26 -0700 Subject: change AbConfig to use channel_id instead of channel_hash; which was a mistake in retrospect --- Zotlabs/Lib/AbConfig.php | 32 ++++++++++++++++---------------- Zotlabs/Module/Connedit.php | 2 +- Zotlabs/Module/Follow.php | 2 +- Zotlabs/Module/Import.php | 3 +-- 4 files changed, 19 insertions(+), 20 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/AbConfig.php b/Zotlabs/Lib/AbConfig.php index f2d6522b9..138d0dfea 100644 --- a/Zotlabs/Lib/AbConfig.php +++ b/Zotlabs/Lib/AbConfig.php @@ -5,18 +5,18 @@ namespace Zotlabs\Lib; class AbConfig { - static public function Load($chash,$xhash) { - $r = q("select * from abconfig where chan = '%s' and xchan = '%s'", - dbesc($chash), + static public function Load($chan,$xhash) { + $r = q("select * from abconfig where chan = %d and xchan = '%s'", + intval($chan), dbesc($xhash) ); return $r; } - static public function Get($chash,$xhash,$family,$key) { - $r = q("select * from abconfig where chan = '%s' and xchan = '%s' and cat = '%s' and k = '%s' limit 1", - dbesc($chash), + static public function Get($chan,$xhash,$family,$key) { + $r = q("select * from abconfig where chan = %d and xchan = '%s' and cat = '%s' and k = '%s' limit 1", + intval($chan), dbesc($xhash), dbesc($family), dbesc($key) @@ -28,14 +28,14 @@ class AbConfig { } - static public function Set($chash,$xhash,$family,$key,$value) { + static public function Set($chan,$xhash,$family,$key,$value) { $dbvalue = ((is_array($value)) ? serialize($value) : $value); $dbvalue = ((is_bool($dbvalue)) ? intval($dbvalue) : $dbvalue); - if(self::Get($chash,$xhash,$family,$key) === false) { - $r = q("insert into abconfig ( chan, xchan, cat, k, v ) values ( '%s', '%s', '%s', '%s', '%s' ) ", - dbesc($chash), + if(self::Get($chan,$xhash,$family,$key) === false) { + $r = q("insert into abconfig ( chan, xchan, cat, k, v ) values ( %d, '%s', '%s', '%s', '%s' ) ", + intval($chan), dbesc($xhash), dbesc($family), dbesc($key), @@ -43,9 +43,9 @@ class AbConfig { ); } else { - $r = q("update abconfig set v = '%s' where chan = '%s' and xchan = '%s' and cat = '%s' and k = '%s' ", + $r = q("update abconfig set v = '%s' where chan = %d and xchan = '%s' and cat = '%s' and k = '%s' ", dbesc($dbvalue), - dbesc($chash), + dbesc($chan), dbesc($xhash), dbesc($family), dbesc($key) @@ -58,10 +58,10 @@ class AbConfig { } - static public function Delete($chash,$xhash,$family,$key) { + static public function Delete($chan,$xhash,$family,$key) { - $r = q("delete from abconfig where chan = '%s' and xchan = '%s' and cat = '%s' and k = '%s' ", - dbesc($chash), + $r = q("delete from abconfig where chan = %d and xchan = '%s' and cat = '%s' and k = '%s' ", + intval($chan), dbesc($xhash), dbesc($family), dbesc($key) @@ -70,4 +70,4 @@ class AbConfig { return $r; } -} \ No newline at end of file +} diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 72b854079..feed9cb1a 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -345,7 +345,7 @@ class Connedit extends \Zotlabs\Web\Controller { unset($clone['abook_account']); unset($clone['abook_channel']); - $abconfig = load_abconfig($channel['channel_hash'],$clone['abook_xchan']); + $abconfig = load_abconfig($channel['channel_id'],$clone['abook_xchan']); if($abconfig) $clone['abconfig'] = $abconfig; diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php index 1df382a89..3641330c9 100644 --- a/Zotlabs/Module/Follow.php +++ b/Zotlabs/Module/Follow.php @@ -43,7 +43,7 @@ class Follow extends \Zotlabs\Web\Controller { unset($clone['abook_account']); unset($clone['abook_channel']); - $abconfig = load_abconfig($channel['channel_hash'],$clone['abook_xchan']); + $abconfig = load_abconfig($channel['channel_id'],$clone['abook_xchan']); if($abconfig) $clone['abconfig'] = $abconfig; diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 4a559fe95..e34f5e49e 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -389,8 +389,7 @@ class Import extends \Zotlabs\Web\Controller { if($abconfig) { // @fixme does not handle sync of del_abconfig foreach($abconfig as $abc) { - if($abc['chan'] === $channel['channel_hash']) - set_abconfig($abc['chan'],$abc['xchan'],$abc['cat'],$abc['k'],$abc['v']); + set_abconfig($channel['channel_id'],$abc['xchan'],$abc['cat'],$abc['k'],$abc['v']); } } -- cgit v1.2.3 From fa02a091072e74a2468cfc34f9e38ce1c9ea5196 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 23 Jun 2016 20:05:57 -0700 Subject: SuperCurl to provide a re-usable curl options stack and just change options that are different from one call to the next --- Zotlabs/Lib/SuperCurl.php | 112 +++++++++++++++++++++++++++++++++++++++ Zotlabs/Storage/CalDAVClient.php | 1 - 2 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 Zotlabs/Lib/SuperCurl.php (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/SuperCurl.php b/Zotlabs/Lib/SuperCurl.php new file mode 100644 index 000000000..40ca1addb --- /dev/null +++ b/Zotlabs/Lib/SuperCurl.php @@ -0,0 +1,112 @@ +request_data = $s; + $this->filepos = 0; + } + + public function curl_read($ch,$fh,$size) { + + if($this->filepos < 0) { + unset($fh); + return ''; + } + + $s = substr($this->request_data,$this->filepos,$size); + + if(strlen($s) < $size) + $this->filepos = (-1); + else + $this->filepos = $this->filepos + $size; + + return $s; + } + + + public function __construct($opts = array()) { + $this->set($opts); + } + + private function set($opts = array()) { + if($opts) { + foreach($opts as $k => $v) { + switch($k) { + case 'http_auth': + $this->auth = $v; + break; + case 'custom': + $this->request_method = $v; + break; + case 'url': + $this->url = $v; + break; + case 'data': + $this->set_data($v); + if($v) { + $this->upload = true; + } + else { + $this->upload = false; + } + break; + case 'headers': + $this->headers = $v; + break; + default: + $this->curlopts[$k] = $v; + break; + } + } + } + } + + function exec() { + $opts = $this->curlopts; + if($this->auth) + $opts['http_auth'] = $this->auth; + if($this->custom) + $opts['custom'] = $this->custom; + if($this->headers) + $opts['headers'] = $this->headers; + if($this->upload) { + $opts['upload'] = true; + $opts['infile'] = $this->filehandle; + $opts['infilesize'] = strlen($this->request_data); + $opts['readfunc'] = [ $this, 'curl_read' ] ; + } + + $recurse = 0; + return z_fetch_url($this->url,true,$recurse,(($opts) ? $opts : null)); + + } + + +} diff --git a/Zotlabs/Storage/CalDAVClient.php b/Zotlabs/Storage/CalDAVClient.php index 76c59c569..c1a8db932 100644 --- a/Zotlabs/Storage/CalDAVClient.php +++ b/Zotlabs/Storage/CalDAVClient.php @@ -45,7 +45,6 @@ class CalDAVClient { } private function set_data($s) { - logger('set data called'); $this->request_data = $s; $this->filepos = 0; } -- cgit v1.2.3 From fb93ae21282c86664de6b0d94d613695b3490473 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 24 Jun 2016 02:07:12 -0700 Subject: fix pdledit "list layouts" --- Zotlabs/Module/Pdledit.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php index accfb6fa1..5cb00f165 100644 --- a/Zotlabs/Module/Pdledit.php +++ b/Zotlabs/Module/Pdledit.php @@ -20,7 +20,7 @@ class Pdledit extends \Zotlabs\Web\Controller { } - function get() { + function get() { if(! local_channel()) { notice( t('Permission denied.') . EOL); @@ -32,18 +32,18 @@ class Pdledit extends \Zotlabs\Web\Controller { else { $o .= '
'; $o .= '

' . t('Edit System Page Description') . '

'; - $files = glob('mod/*'); + $files = glob('Zotlabs/Module/*.php'); if($files) { foreach($files as $f) { - $name = basename($f,'.php'); + $name = lcfirst(basename($f,'.php')); $x = theme_include('mod_' . $name . '.pdl'); if($x) { $o .= '' . $name . '
'; } } } - - $o .= '
'; + + $o .= ''; // list module pdl files return $o; -- cgit v1.2.3