Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
moraes
Nucleus Guru
Nucleus Guru


Joined: 23 Dec 2001
Posts: 2399
Location: Curitiba, Brazil

Post Posted: Tue Dec 06, 2005 9:59 am   Post subject:
Reply with quote

gRegor wrote:

$count = count($files);

for ($i = 0; $i < $count; $i++) {
if (!is_readable($files[$i]) ) {
array_push($missingfiles, 'File <b>' . $files[$i] . '</b> is missing or not readable.');
}
}[/code]
Shorter, cleaner, and easy to add additional files to the array to be checked.

Nice improvements! Cleaner code is always welcome. Very Happy

Here's a tip to deal with arrays. Arrays in PHP have their own loop iterator, "foreach". So this would be even cleaner:
Code:

   foreach($files as $file) {
      if (!is_readable($file) ) {
         array_push($missingfiles, 'File <b>' . $file . '</b> is missing or not readable.');
      }
   }

No need to count the array anymore. There are cases when you need to check if the argument provided is an array before use foreach, but this is not one of them.

moraes

_________________
tipos.com.br | smalltalking.com

Back to top

View user's profile Send private message Visit poster's website ICQ Number
gRegor
Nucleus PhD


Joined: 14 May 2002
Posts: 715
Location: Indianapolis, IN USA

Post Posted: Thu Dec 08, 2005 5:23 pm   Post subject:
Reply with quote

Good call. Smile
_________________
gRegor
"Live free or die; death is not the worst of evils." .. John Stark

Back to top

View user's profile Send private message Visit poster's website AIM Address ICQ Number
matt_t_hat
Nucleus Geek


Joined: 21 Aug 2005
Posts: 1124
Location: UK

Post Posted: Fri Dec 09, 2005 12:58 pm   Post subject:
Reply with quote

Astounding work. Cool

This is something that is both important and necessary.

A virtual pat on the back for this effort.

_________________
Host Plugins | Blog | Hundred Quid A Day | My Big Fat Arse

Back to top

View user's profile Send private message Visit poster's website
moraes
Nucleus Guru
Nucleus Guru


Joined: 23 Dec 2001
Posts: 2399
Location: Curitiba, Brazil

Post Posted: Mon Dec 12, 2005 1:50 am   Post subject:
Reply with quote

I've done some cleanup today, separating important classes that were sharing the same space:

- ITEMACTIONS from BLOG.php to its own file;
- ACTIONS from SKIN.php to its own file;
- COMMENTACTIONS from COMMENTS.php to its own file;
- BaseActions from PARSER.php to its own file;

Some lost functions from the end of file BLOG.php were moved to globalfunctions (it is commented in the end).

Also, MANAGER::getInstance() now returns a true singleton. Very Happy

m.

_________________
tipos.com.br | smalltalking.com

Back to top

View user's profile Send private message Visit poster's website ICQ Number
gRegor
Nucleus PhD


Joined: 14 May 2002
Posts: 715
Location: Indianapolis, IN USA

Post Posted: Wed Dec 14, 2005 7:37 pm   Post subject:
Reply with quote

Awesome! I saw your message before you edited it (I think it was this one?), sorry for the goof-up with install.php in CVS. I'll do updates in smaller batches.
_________________
gRegor
"Live free or die; death is not the worst of evils." .. John Stark

Back to top

View user's profile Send private message Visit poster's website AIM Address ICQ Number
moraes
Nucleus Guru
Nucleus Guru


Joined: 23 Dec 2001
Posts: 2399
Location: Curitiba, Brazil

Post Posted: Wed Dec 14, 2005 7:59 pm   Post subject:
Reply with quote

gRegor wrote:
Awesome! I saw your message before you edited it (I think it was this one?)

Yes, it was. I thought after I posted it could be misunderstood and it would be better to talk to you personally. But then I haven't saw you on ICQ and couldn't find an e-mail on your site. Smile

m.

_________________
tipos.com.br | smalltalking.com

Back to top

View user's profile Send private message Visit poster's website ICQ Number
gRegor
Nucleus PhD


Joined: 14 May 2002
Posts: 715
Location: Indianapolis, IN USA

Post Posted: Wed Dec 14, 2005 8:03 pm   Post subject:
Reply with quote

Heh, I'm hardly ever on ICQ and yeah... need to get the new version of my site finished up. Smile No worries, I didn't take it badly or anything.
_________________
gRegor
"Live free or die; death is not the worst of evils." .. John Stark

Back to top

View user's profile Send private message Visit poster's website AIM Address ICQ Number
gRegor
Nucleus PhD


Joined: 14 May 2002
Posts: 715
Location: Indianapolis, IN USA

Post Posted: Tue May 09, 2006 11:51 pm   Post subject:
Reply with quote

I've hardly been around the Nucleus development community this semester due to busyness, but now that the semester is over I have a bit more free time and was wondering what the status of this is... should I keep working on this? From the sounds of it a lot of the CORE classes have been rebuilt. I guess I should just checkout the latest code and see what we've got going on. Smile
_________________
gRegor
"Live free or die; death is not the worst of evils." .. John Stark

Back to top

View user's profile Send private message Visit poster's website AIM Address ICQ Number
moraes
Nucleus Guru
Nucleus Guru


Joined: 23 Dec 2001
Posts: 2399
Location: Curitiba, Brazil

Post Posted: Wed May 10, 2006 1:44 am   Post subject:
Reply with quote

gRegor, you are *very* welcome back to your project! As you may have noticed, we've changed from CVS to SVN, and the trunk is no more the focus (right now). Make a checkout of the Subversion repository, go to /branches/NewAdminArea and take a look. Most of the new methods added to the traditional classes (from ADMIN.php) are already documented and formatted, but still there are *a lot* to do.

I'll move the branch to the trunk this week (Legolas merged both, and he is now travelling in Italy), and make it usable (it is not right now), but you'll know when it is done.

cheers!
moraes

_________________
tipos.com.br | smalltalking.com

Back to top

View user's profile Send private message Visit poster's website ICQ Number
gRegor
Nucleus PhD


Joined: 14 May 2002
Posts: 715
Location: Indianapolis, IN USA

Post Posted: Thu Aug 31, 2006 2:00 am   Post subject:
Reply with quote

I'm back at this... at least momentarily. Smile

bookmarklet, forgotpassword, xml-rss just done. nothing major, but I'm working my way through the file structure.

_________________
gRegor
"Live free or die; death is not the worst of evils." .. John Stark

Back to top

View user's profile Send private message Visit poster's website AIM Address ICQ Number
Post new topic Reply to topic
Display posts from previous:   

Goto page Previous  1, 2, 3, 4  Next

Page 2 of 4

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group