Skip to content

Commit

Permalink
Fix whitespaces and Copyright headers
Browse files Browse the repository at this point in the history
  • Loading branch information
gokmen committed Mar 2, 2012
1 parent f7e74c7 commit 6f35713
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions index.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand All @@ -14,7 +14,7 @@
include("nuf/nuf.class.php");
$cachefile = "cache/".$_GET["page"].".html";

// Serve from the cache if it is the same age or younger than the last
// Serve from the cache if it is the same age or younger than the last
// modification time of the included file (includes/$reqfilename)

$cachetime = 5 * 60;
Expand Down
18 changes: 9 additions & 9 deletions nuf/helper.function.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2012, Nuf (~Fun)
# 2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down Expand Up @@ -72,12 +72,12 @@ function xml2array($url, $get_attributes = 1, $priority = 'tag')
while (!feof($fp))
$contents .= fread($fp, 8192);
fclose($fp);

xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, trim($contents), $xml_values);

xml_parser_free($parser);
if (!$xml_values)
return array (); //Hmm...
Expand Down Expand Up @@ -111,7 +111,7 @@ function xml2array($url, $get_attributes = 1, $priority = 'tag')
}
}
if ($type == "open")
{
{
$parent[$level -1] = & $current;
if (!is_array($current) or (!in_array($tag, array_keys($current))))
{
Expand All @@ -129,11 +129,11 @@ function xml2array($url, $get_attributes = 1, $priority = 'tag')
$repeated_tag_index[$tag . '_' . $level]++;
}
else
{
{
$current[$tag] = array (
$current[$tag],
$result
);
);
$repeated_tag_index[$tag . '_' . $level] = 2;
if (isset ($current[$tag . '_attr']))
{
Expand Down Expand Up @@ -195,5 +195,5 @@ function xml2array($url, $get_attributes = 1, $priority = 'tag')
}
return ($xml_array);
}

?>
6 changes: 3 additions & 3 deletions nuf/nuf.class.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
6 changes: 3 additions & 3 deletions nuf/template.class.php
@@ -1,9 +1,9 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011 - Nuno Freitas <nunofreitas@gmail.com>
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
10 changes: 5 additions & 5 deletions plugins/exchange/plugin.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand All @@ -12,10 +12,10 @@
require_once("exchange_lib.php");

$TCMB = new Exchange(true, 60, "UTF-8");

$Layout->set("exchange:b:usd", $TCMB->ForexBuying("USD"));
$Layout->set("exchange:s:usd", $TCMB->ForexSelling("USD"));
$Layout->set("exchange:b:eur", $TCMB->ForexBuying("EUR"));
$Layout->set("exchange:s:eur", $TCMB->ForexSelling("EUR"));

?>
6 changes: 3 additions & 3 deletions plugins/fancybox/plugin.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2012, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
6 changes: 3 additions & 3 deletions plugins/galleria/plugin.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
6 changes: 3 additions & 3 deletions plugins/google_analytics/plugin.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
6 changes: 3 additions & 3 deletions plugins/markdown/plugin.php
@@ -1,8 +1,8 @@
<?php

# Copyright (C) 2011, Nuf (~Fun)
# 2011 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
Expand Down
10 changes: 5 additions & 5 deletions plugins/weather/plugin.php
@@ -1,16 +1,16 @@
<?php

# Copyright (C) 2012, Nuf (~Fun)
# 2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen
# Copyright (C) 2011-2012, Nuf (~Fun)
# 2011,2012 - Gökmen Göksel <gokmen@goksel.me>
# http://github.com/gokmen

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.

$ar = xml2array("http://www.mgm.gov.tr/FTPDATA/analiz/sonSOA.xml");

function getWeather($raw_list, $city)
{
$min = '';
Expand All @@ -22,7 +22,7 @@ function getWeather($raw_list, $city)
}
return "<!-- Hava durumu alınamıyor -->";
}

foreach(array('ISTANBUL', 'ANKARA', 'IZMIR', 'BURSA', 'EDIRNE') as $city)
$Layout->set("weather:{$city}", getWeather($ar, $city));

Expand Down

0 comments on commit 6f35713

Please sign in to comment.