From: niekt0 Date: Sat, 18 Dec 2010 15:34:24 +0000 (+0100) Subject: removing constants from code X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=f2e47e33e5b2753b886980b52b26641a62d9bec9;p=mirrors%2FKyberia-bloodline.git removing constants from code --- diff --git a/doc/TODO b/doc/TODO index 062b57a..da40148 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,10 +1,9 @@ +- remove hard-coded constants (everywhere): + - Registration process -> Add welcome texts & move them to one file/node - Temporary requests node does not exists. - Nodes are created with bad vector - (during registration we should generate GnuPG keypair + +(during registration we should generate GnuPG keypair to user_gpg_prv and user_gpg_pub fields in table users) (harvie) - - User mail -> can't delete the mails... Anyway move whole mail handling out of nodes.php (?) @@ -48,7 +47,7 @@ - keep fixing XSS -- Test & scale logarithmic threading +- Fix defaukt template (big tables) - Remove templates from git (they should be only in sql) diff --git a/wwwroot/inc/eventz/masterize.inc b/trash/masterize.inc similarity index 100% rename from wwwroot/inc/eventz/masterize.inc rename to trash/masterize.inc diff --git a/wwwroot/inc/eventz/K.inc b/wwwroot/inc/eventz/K.inc index b954bc4..8a5aca4 100644 --- a/wwwroot/inc/eventz/K.inc +++ b/wwwroot/inc/eventz/K.inc @@ -56,6 +56,7 @@ function K() { $kset->next(); $user_k=$kset->getString('user_k'); + // XXX hard coded $senat_id = 876611; $K_id = 1961061; $comms = getCommanders($K_id); diff --git a/wwwroot/inc/eventz/bookmarks.inc b/wwwroot/inc/eventz/bookmarks.inc index 0a20be5..06bdd75 100644 --- a/wwwroot/inc/eventz/bookmarks.inc +++ b/wwwroot/inc/eventz/bookmarks.inc @@ -8,7 +8,7 @@ - +
diff --git a/wwwroot/inc/rssparse.php b/wwwroot/inc/rssparse.php index 1ebb4db..5d342a8 100644 --- a/wwwroot/inc/rssparse.php +++ b/wwwroot/inc/rssparse.php @@ -11,6 +11,7 @@ $rss->cache_dir = './cache'; $rss->cache_time = 3600; // one hour // load some RSS file +// XXX if ($rs = $rss->get('http://h-k.sk/scripts/google2rss.php?num=15&q=smallpox')) { print_r($rs); diff --git a/wwwroot/inc/senate.inc b/wwwroot/inc/senate.inc index b417173..1182073 100644 --- a/wwwroot/inc/senate.inc +++ b/wwwroot/inc/senate.inc @@ -1,4 +1,76 @@ getString('header_id') == 2091520) { + +// masterize.inc +// moved to trash + +// remove_users.inc +// a lot of different + +// unfriend.inc +// $q = "update nodes set external_link='', node_parent=123456, node_vector='001234560$node_id' whe + +// uprav_zaregistrovanych.inc +// node_parent=2091448 and k>=3 + +// verify.inc +// node_parent=1836516") +// $q="update nodes set node_parent=2091448, +// node_vector='0000010120914480$userid' where node_id='$user + +// vycisti_registracky.inc +// node_parent=2091448 and k<=4 +// $q="delete from nodes where node_vector like '020914480$noda%'"; + +// resource.kyberia.php +// $params['node_parent'] = 2029360; + +// node methodz detto, (add*) + +// get_citizen_count.inc +// nodes.node_id=1961061 + +// get_k_filtred_nodes +// $node_id = 2472165; + +// get_poll.php +// template_id='1549834 + ?> diff --git a/wwwroot/inc/smarty/node_methodz/function.get_search.php.BAK b/wwwroot/inc/smarty/node_methodz/function.get_search.php.BAK deleted file mode 100644 index 6546aa2..0000000 --- a/wwwroot/inc/smarty/node_methodz/function.get_search.php.BAK +++ /dev/null @@ -1,70 +0,0 @@ -".$params['query']."",$output); -preg_match_all("/:::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?):::(.*?)n/i",$output,$matches); -foreach($matches[0] as $key => $value) { -preg_match("/(.*?).xml/i",$matches[2][$key],$ids); -$id=$ids[1]; -echo "".$matches[4][$key]." -(".$matches[6][$key].")
"; -echo $matches[7][$key]."

"; -//echo $matches[5][$key]."

"; -} - - -global $db, $node; - -$q = "SELECT * FROM nodes WHERE node_system_access!='private' AND template_id=3 AND node_name LIKE -'%". -str_replace(array("%", "_"), array('%', '_'), -addslashes($params['query']))."%'"; -$set=$db->query($q); -while($set->next()) { -$rec = $set->getRecord(); -echo "{$rec[node_name]}
"; -} -*/ -global $db, $node; -if (is_numeric($params['offset'])) $offset = $params['offset']; -else $offset = 0; - -if (is_numeric($params['listing_amount'])) $listing_amount = $params['listing_amount']; -else $listing_amount = 32; -$query = addslashes($params['query']); -$q = "select users.login, nodes.* from nodes left join users on - users.user_id = nodes.node_creator where node_name like '$query%'"; -$set = $db->query($q); -while ($set->next()) { - $array[] = $set->getRecord(); -} -$smarty->assign('get_search_short',$array); - -if ($_POST['orderby'] != ("k" || "node_created" || "probability" || -"node_views")) $orderby = "k"; -else $orderby=$_POST['orderby']; - -$q = "select users.login as login, users.*, nodes.*, nodes.node_creator, - node_content, match (node_content.node_content) against ('$query') as - probability from node_content left join users on node_content.node_id = users.user_id - left join nodes on node_content.node_id = nodes.node_id where - node_system_access!='private' and match (node_content.node_content) - against ('$query') order by $orderby desc limit $offset,$listing_amount"; - -$set = $db->query($q); -while ($set->next()) { - $search[] = $set->getRecord(); -} - -$smarty->assign('get_search',$search); -} -?> \ No newline at end of file diff --git a/wwwroot/inc/smarty/node_methodz/function.merge_arrays.php b/wwwroot/inc/smarty/node_methodz/function.merge_arrays.php index 63991f0..e7320d2 100644 --- a/wwwroot/inc/smarty/node_methodz/function.merge_arrays.php +++ b/wwwroot/inc/smarty/node_methodz/function.merge_arrays.php @@ -27,16 +27,6 @@ $array=array_merge($array1,$array2); - /* - if ($_SESSION['user_id']==548) { - print_r($array1); - echo "LALALA"; - print_r($array2); - echo "AAAAAA"; - print_r($array); - } - */ - if ($sort_by=='thread') { $i=0; for($i=0; $iassign('merged',$array); } -?> \ No newline at end of file +?> diff --git a/wwwroot/inc/smarty/node_methodz/function.testm.php b/wwwroot/inc/smarty/node_methodz/function.testm.php deleted file mode 100644 index d26fd61..0000000 --- a/wwwroot/inc/smarty/node_methodz/function.testm.php +++ /dev/null @@ -1,32 +0,0 @@ -query($q); -while ($set->next()) $pole[]=$set->getRecord(); -$smarty->assign('testm',$pole); -} -?> \ No newline at end of file