cnb / News_Manager-getsimplecms

A blog/news plugin for GetSimple CMS - development extended version
8 stars 10 forks source link

Optimization: no logic in loop condition #48

Closed cnb closed 11 years ago

cnb commented 11 years ago

tablatronix's tip: https://github.com/GetSimpleCMS/GetSimpleCMS/commit/188f8391fd7b729f0a5b6b092be30ac9126a6cc0#commitcomment-2447036

at least here:

functions.php

function nm_get_posts($all=false) {
...
  $data = @getXML(NMPOSTCACHE);
  foreach ($data->item as $item) {

and look for others.

cnb commented 11 years ago

As tablatronix comments, it's not necessary in foreach, only in while and for loops.