Skip to main content
Topic: IRC (Read 112436 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: IRC

Reply #195

(09:47:02 PM) emanuele: quick question: cache_quick_get...is that so useful?
(09:47:58 PM) groundup: A cache function with a callback is good.
(09:48:45 PM) groundup: $function should be renamed to $callback and the documentation changed to reflect that so people understand it.

(09:51:07 PM) groundup: NetBeans is telling me that cache_getMembergroupList() is not used but I am using a highly modified version, can anyone check that?

(10:12:50 PM) Norv: cache_getMembergroupList() is used as callback to cache_quick_get

(09:51:08 PM) emanuele: I would also make $file optional
(09:51:48 PM) emanuele: boardindex.controller line 69

(09:51:57 PM) groundup: require_once(SOURCEDIR . '/' . $file); yeah, SOURCEDIR makes it so you can't include other files there too
(09:54:12 PM) emanuele: (you can always use some relative path... :P), but the main point is that if the function is in the same file is kind of useless to require_once it... (see calendar.subs.php for an example)

(10:55:35 PM) groundup: hmm... I should rewrite that
(10:56:59 PM) groundup: if (empty($message_info['approved']) || $message_info['id_member'] != $user_info['id']) return false; return true;
(11:09:16 PM) TimeVortex: Sounds like you can do even better.
(11:09:28 PM) TimeVortex: return !(empty($message_info['approved']) || $message_info['id_member'] != $user_info['id']);
(05/09/2013 12:28:53 AM) groundup: https://github.com/elkarte/Elkarte/pull/375#commitcomment-3172916 is what I suggested

(11:02:39 PM) groundup: emanuele, I think this is your doing. In Load.php, line 509, $topic = $msgOptions['id_topic']; $msgOptions is never set
(11:08:16 PM) emanuele: mmm...NFI...drop it I'd say...

(05:43:41 AM) groundup: Is there a PHP equivalent function to query_see_board?
(05:56:01 AM) groundup: I created one: https://gist.github.com/joshuaadickerson/5552134
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #196

Quote from: TestMonkey – (11:57:04 PM) emanuele: So, when are we going to release a beta?

I think we could get on an IRC meeting, to figure that one out. We're a bit "late" comparing to intention, and I didn't push on it. (/hides)
I still think the intention was ok and we could try to also see where we stand.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #197

(06:58:12 PM) groundup: For some reason the unused vars PR got some of the loadMemberGroups and getTopicInfo PR. I committed those before I even created that other branch.
(07:11:54 PM) groundup: Ugh, I wish I didn't screw up all of those branches. It is more work to make them right than it was to do them

(10:09:35 PM) groundup: http://www.infoq.com/articles/managing-technical-debt
(10:19:26 PM) ***emanuele usually changes that “if I touch that code everything will break” to: “if I touch code everything will break”

(10:38:11 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/a5f3768fcd264272d167338593433cc6e487089f#commitcomment-3189207 can someone take a look at that

(05:47:36 AM) groundup: If the controller doesn't have a way of passing and hold variables, what use is it? In fact, how is it even a controller? Currently, there is no method for holding data like the member groups other than with $context or similar global variables. When you implement a DIC, that's where it will be, but even then, it is the same thing as a global.
(08:37:44 AM) Norv: It passes to template through $context. It passes (hopefully) to .subs ("model-like") through parameters. It holds almost the entire execution, so what it knows will pass over. If it needs more, then where does it need it?

(03:18:05 PM) Norv: groundup: you're thinking at something like instance variables of use, in the controller?
(03:18:57 PM) Norv: for us atm, there is almost zero need, because a single method is executed for the entire execution flow (related to the content of the action).
(07:57:01 PM) groundup: I am thinking of times when the model needs things passed to it from the controller.
(07:57:06 PM) groundup: *models
(07:58:11 PM) groundup: For instance, members have member groups. The controller gets the members and groups and anything else that "links" to the members.
(08:01:18 PM) groundup: You need to implement a member and topic factory and then have classes for each. Then the member groups are stored in the member factory and its instantiation gets stored in the controller (the base controller, which gets extended by each controller)
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #198

(08:14:37 PM) emanuele: What do you prefer: several similar functions with slightly different behaviours of just one function slightly misused? O.-)
(08:15:03 PM) groundup: Depends
(08:15:05 PM) ***emanuele is lost in this dilemma...
(08:16:05 PM) emanuele: http://pastebin.com/PpFG3buH
(08:16:28 PM) emanuele: the two are basically the same (do not consider recycle for now) somehow
(08:17:05 PM) emanuele: the second could be replaced by array_keys(boardsPosts())
(08:17:51 PM) emanuele: but to be perfectly "nice" I would add yet another one
(08:18:02 PM) emanuele: (that at the moment I don't remember)
(08:18:12 PM) groundup: boardsPosts() doesn't really explain what it is trying to do ;)
(08:18:47 PM) emanuele: well...it grabs the posts of some boards... :P
(08:18:51 PM) groundup: You're just trying to get the number of posts per board? There aren't functions that do that aleady in say Boardindex.subs.php / Boards.subs.php?
(08:21:00 PM) emanuele: not of a bunch of boards (or categories)
(08:22:03 PM) groundup: This is where I have an issue with Norv and TE's idea. If something like this already exists, just add some kind of filtering. Use array_intersect_keys()
(08:22:55 PM) emanuele: mmm...but it doesn't exist :P
(08:23:33 PM) groundup: Oh, that's right, there is no getBoardInfo()
(08:24:31 PM) emanuele: but again it doesn't do what I need...
(08:25:20 PM) groundup: You just want the posts?
(08:25:25 PM) emanuele: it grabs info of info of 1 board and extend it to load the info of all seems a lot..
(08:27:57 PM) groundup: You should break getBoardIndex() down to smaller functions where that query is on its own. Change $user_info['is_guest'] to be a parameter; add filtering to be a parameter
(08:29:44 PM) groundup: Although boardPosts() and boardsByCategories() do exactly what you want, I would have another function that gets from the board table.
(08:30:37 PM) groundup: getBoards() or something like that. Then in boardPosts() and boardsByCategories() I would create the parameters, check to make sure that all of the conditions are met (return errors otherwise) and call getBoards()
(08:34:10 PM) emanuele: yeah, that's one of the possibilities I was thinking
(08:36:05 PM) emanuele: a common function that queries and several others that call that function with different intentions/meanings

(09:18:53 PM) groundup: emanuele, http://www.elkarte.net/index.php?topic=349.msg2250#msg2250
(09:20:43 PM) groundup: I was trying to find more links to support me: http://stackoverflow.com/questions/845895/putting-license-in-each-code-file

(12:57:35 AM) emanuele: https://github.com/emanuele45/Dialogo/blob/master/sources/controllers/MergeTopics.controller.php#L309
(12:57:42 AM) emanuele: Question:
(12:58:03 AM) emanuele: how the query at line 322 is useful?
(12:58:25 AM) emanuele: unless...
(12:58:53 AM) emanuele: nope...can't see when would trigger an error
(12:59:27 AM) emanuele: $boards already contains the two boards of the two topics
(12:59:44 AM) emanuele: and the merge_any permission is checked on that array
(01:01:08 AM) emanuele: arg...found it I think
(01:02:04 AM) emanuele: yeah okay some broken permissions

(01:07:38 AM) emanuele: Another question, that may have a bit more sense
(01:08:39 AM) emanuele: is there any reason that a query doesn't use COUNT when the only reason there is that query is to count the number of rows returned?

(08:19:43 AM) Norv: >> emanuele: is there any reason that a query doesn't use COUNT when the only reason there is that query is to count the number of rows returned?
(08:19:43 AM) Norv: Can't think of any
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #199

(02:54:38 PM) emanuele: I mentioned Norv twice but I didn't realise there was no Norv around... lol
(03:24:21 PM) Norv: lol, pastie please :)
(03:31:27 PM) emanuele: [13:29]   emanuele   Norv, I got lost in some refactoring while working on the ajaxify branch, it will take a moment and will contain some non-pertinent commits... but that's nothing new! lol
(03:53:24 PM) Norv: :D
(04:09:33 PM) emanuele: https://github.com/emanuele45/Dialogo/commit/1c707428b3ad43aeb94f038a13699e34d1947e74
(04:09:52 PM) ***emanuele feels is not 100% nice to see
(04:10:31 PM) emanuele: probably the function can split or simplified...
(04:11:03 PM) emanuele: and YAY for another commit that cuts 250 lines of code! :D :P
(04:40:48 PM) Norv: Oh it looks cool. As far as I can tell from a quick diff
(04:40:57 PM) Norv: canSeeBoards() doesn't exist, does it?
(04:41:26 PM) Norv: ... you're sure it doesn't cut too much lol
(04:41:28 PM) emanuele: yups...that's a left over... :P
(04:41:32 PM) Norv: action_markasread_api()
(04:42:17 PM) emanuele: darn cut&paste...

(04:43:47 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(04:43:48 PM) elk_core: [Elkarte] norv pushed 4 new commits to master: http://git.io/BaE2EA
(04:43:48 PM) elk_core: Elkarte/master 48ba62d Joshua Dickerson: Add hooks for post.subs.php...
(04:43:48 PM) elk_core: Elkarte/master c665432 Joshua Dickerson: Add resizeBBCImages()...
(04:43:48 PM) elk_core: Elkarte/master 97698fc Norv: Pass the currently processed part in the hook....
(04:43:48 PM) elk_core left the room.

(04:44:07 PM) emanuele: oh, no, action_markasread_api() is correct
(04:44:18 PM) emanuele: action_index_api
(04:44:22 PM) Norv: you killed it? Oh
(04:44:43 PM) emanuele: I didn't do a complete refactor
(04:44:57 PM) ***Norv knows Emanuele likes killing things, so it's ready for surprises :D

(05:40:58 PM) emanuele: fixed canSeeBoards https://github.com/emanuele45/Dialogo/commit/ace9d5d1ecae5e0a9e2c38d8d99ec14a27c961dc
(05:41:57 PM) emanuele: And I also documented the functions I wrote before! :D
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #200

(07:29:36 PM) groundup: Does the version of PHP Elkarte is built for allow for lambda functions?
(07:35:42 PM) emanuele: http://www.php.net/manual/en/functions.anonymous.php
(07:35:50 PM) emanuele: apparently are php 5.3+, so no.
(07:36:06 PM) emanuele: at the moment it is 5.1 I think
(07:36:20 PM) emanuele: (maybe 5.2)

(07:37:08 PM) groundup: Damnit! I did it again, I created a bunch of changes on the wrong branch
(07:39:13 PM) groundup: Norv, I am trying to do this PR for Spuds' PBE so that he can grab this and then make a change to his
(07:39:43 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/550c1645f36e72480579e11989db3a2aded3050a an https://github.com/joshuaadickerson/NotElkarte/commit/c5a5215c5dfd21d7571c8462b8b3616d85a78c03

(07:53:56 PM) groundup: in Load.php -> // If we think we have mail to send, let's offer up some possibilities... robots get pain (Now with scheduled task support!)
(07:54:21 PM) groundup: That needs a better home. Just not sure where to put it. It needs to wait until after the theme is loaded, but it shouldn't be in there where the theme is loaded.

(07:56:23 PM) groundup: if (!empty($birthdayEmails)) <-- that never reaches true
(07:57:30 PM) groundup: https://github.com/elkarte/Elkarte/issues/396

(08:25:04 PM) Norv: groundup: why add those two commits to Spuds' PR?
(08:25:12 PM) Norv: They don't seem related

(08:36:22 PM) Norv: https://gist.github.com/norv/5564337
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #201

(08:52:33 PM) Norv: Last call, for database layer: keep compatibility with $smcFunc calls?  Including with the name. I already keep compat with an array... but rename it?
(08:53:32 PM) TehCraw: Die, smcFunc.
(09:37:47 PM) emanuele: No strong feelings...
(09:38:25 PM) emanuele: Just a bit annoying have to use an array for functions

(05/13/2013 12:38:53 AM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(12:38:53 AM) elk_core: [Elkarte] norv pushed 4 new commits to master: http://git.io/GoA3yg
(12:38:54 AM) elk_core: Elkarte/master 669ea7a Jeremy D: Add Frame Security Options header...
(12:38:54 AM) elk_core: Elkarte/master 8ad8583 Jeremy D: obExit actually doesn't get called for ajax calls
(12:38:54 AM) elk_core: Elkarte/master a514c4c Norv: Add helptext....
(12:38:54 AM) elk_core left the room.

(03:04:32 AM) groundup: updateStats is a horribly non-individual-concern function. Nothing about it is shared by an of the other cases

(03:37:51 AM) groundup: Can the recycle board ever be 0? I would think not. So recycle_enable is moot

(09:01:27 AM) groundup: I definitely created and switched to a different branch before committing those. Then I did a PR and it all wound up in one big one.
(09:34:10 AM) groundup: Norv, https://github.com/joshuaadickerson/NotElkarte/commit/4a842b3554bf01b9ded421a759804d4828a95a2c

(12:01:46 PM) Norv: groundup: I think you had already those extra-commits on your master, that's why you ended up with the older ones in your branch.
(12:04:01 PM) Norv: Since you have all this in getAttachment now, I'd do: git checkout master; git pull -f elkarte_remote master
(12:05:06 PM) Norv: (you need to reset your master, and this is one way to do it)
(12:08:52 PM) Norv: Or: git checkout master; git reset --hard 7281526; git pull elkarte_remote master
(01:07:51 PM) Norv: When you're on a branch, you can always do: git log, and look at what's in there. i.e. quick-check that master is in sync. Atm, though, I think you need to make sure you reset your master, first of all.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #202

(04:11:16 PM) emanuele: https://github.com/elkarte/Elkarte/blob/master/sources/controllers/Emailuser.controller.php#L303
(04:11:44 PM) emanuele: Is there any specific reason why $_REQUEST['msg'] is overwritten with the result of the query?
(04:32:56 PM) emanuele: lol I just realised that except the message id the other results of that query are not even used... :P

(05:16:39 PM) Norv: I think that query is intended to recheck the validity of the message, i.e. that it's indeed in the current topic. (it'd get nothing otherwise, with inner join). But the other data, mmm, I don't see the purpose
(05:24:03 PM) Norv: I see no meaning to override it. But this kind of override is done more times in the code. My best assumption is that it didn't hurt, and I'd say it's an exaggeration. Arguably, even the check isn't exactly necessary, since reporttm() doesn't make changes.

(05:33:16 PM) emanuele: Well, I already replaced it with a function and removed the overriding... O:-)
(05:36:37 PM) Norv1: thank you! :)
(05:37:26 PM) emanuele: You know I like drop things... O:-)

(07:18:51 PM) Trekkie101_Away: I seened a roadmap!!
(08:33:41 PM) Norv: Of course you haz.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #203

(05/14/2013 12:03:53 AM) groundup: You know what the most annoying comments in the world are? Ones like this: // Now we get to work around a bug in PHP where it doesn't escape <br />s!
(12:04:38 AM) groundup: WTF is the bug? Give me a link! Maybe it is fixed. If we're including workarounds for something, include why we are working around it and what the workaround is meant to do
(12:11:06 AM) ***emanuele tends to agree

(12:13:43 AM) groundup: Netbeans is pissing me off. It doesn't want to switch branches or close. I guess I have too many branches for it now

(12:15:23 AM) ***groundup hates this - $_GET = htmlspecialchars__recursive($_GET);

(12:15:26 AM) emanuele: you probably have some uncommitted change

(12:15:35 AM) groundup: and this $_REQUEST = $_POST + $_GET;
(12:15:47 AM) emanuele: that conflicts with the other branch

(12:17:27 AM) groundup: Why get rid of magic quotes if you are just going to do it in the application? Or even worse is doing something crazy like htmlspecialchars() on every get variable

(12:18:13 AM) groundup: $_SERVER['BAN_CHECK_IP'] <-- stop touching my g'damn magic globals!
(12:18:17 AM) emanuele: because magic is bad in programming! :D
(12:19:19 AM) groundup: What the F is this about: $_SERVER['REMOTE_ADDR'] = preg_replace('~^::ffff:(\d+\.\d+\.\d+\.\d+)~', '\1', $_SERVER['REMOTE_ADDR']);
(12:19:42 AM) groundup: Ummm... what if I wanted to get exactly what the REMOTE_ADDR is?
(12:21:18 AM) groundup: cleanRequest() really needs to be broken down in to smaller functions. getBanIP() getUserIP()
(12:22:33 AM) groundup: I don't like it when applications don't listen. Die Netbeans, die!
(12:25:25 AM) ***emanuele points at core.inc.php (badbehaviour) line 84
(12:25:52 AM) emanuele: we all like to mess with our REMOTE_ADDR! :D
(12:30:46 AM) groundup: Terrible. Though, that is an excellent example of why not to mess with it. That extension is also editing it. It isn't relying on it to be unchanged, but it could be.
(12:32:19 AM) emanuele: at least it's consistent...somehow :P

(12:36:30 AM) groundup: I think I fixed a bug with SQLite, SET NAMES should be an error/warning
Last Edit: May 13, 2013, 09:54:59 pm by TestMonkey
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #204

(03:54:54 PM) elk_core: [Elkarte] norv opened pull request #399: Database layer (master...database)  http://git.io/qSxsow
(08:17:16 PM) elk_core: [Elkarte] norv opened pull request #401: Html2 md (master...html2Md)  http://git.io/43ziCA

08:17:36 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(08:17:36 PM) elk_core: [Elkarte] norv pushed 19 new commits to master: http://git.io/VUoODw
(08:17:36 PM) elk_core: Elkarte/master 06637c2 Spuds: ! Testing class to replace markdownify...
(08:17:36 PM) elk_core: Elkarte/master bed56db Spuds: ! just extract the body text...
(08:17:37 PM) elk_core: Elkarte/master eb3a535 Spuds: ! Change the way lists are handled to ensure proper indentation when nested...
(08:17:37 PM) elk_core left the room.

(08:18:26 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(08:18:26 PM) elk_core: [Elkarte] norv pushed 111 new commits to master: http://git.io/JHvfIg
(08:18:26 PM) elk_core: Elkarte/master 732ed19 Spuds: ! Initial commit of EmailFormat.class.php used to reflow a message...
(08:18:26 PM) elk_core: Elkarte/master 3e295c3 Spuds: ! minor cleanup to the formatting class...
(08:18:26 PM) elk_core: Elkarte/master f45a25c Spuds: ! cleanup...
(08:18:26 PM) elk_core left the room.

(08:26:46 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(08:26:46 PM) elk_core: [Elkarte] norv pushed 5 new commits to master: http://git.io/l4BerA
(08:26:46 PM) elk_core: Elkarte/master 1d37042 Joshua Dickerson: A couple of more queries removed...
(08:26:46 PM) elk_core: Elkarte/master fce2718 Norv: Fix the function call....
(08:26:46 PM) elk_core: Elkarte/master c0abe75 Norv: Reverse the previous change to associatedTopic() and update the function....
(08:26:46 PM) elk_core left the room.

(09:15:08 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(09:15:08 PM) elk_core: [Elkarte] norv opened pull request #402: Elkpr/397 (master...elkpr/397)  http://git.io/V4M5wg
(09:15:08 PM) elk_core left the room.

(09:18:33 PM) ***emanuele feels he needs to rebase some branches...
(09:27:59 PM) ***Norv doesn't want to think about such thingz... will probably try to finish a couple branches before... rebase those alone (to catch quick fixes and stuff in single commits for a change), and afterwards
(09:28:31 PM) Norv: Nah, half-joking. They aren't so bad, most is in new files.
(09:29:01 PM) emanuele: I know, I'm already scared by those that are coming :P
(09:29:30 PM) Norv: lol
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #205

(09:29:29 PM) groundup: Following the updateStats() changes getting merged, those functions should be moved to their respective Subs files. Also these functions should be moved to View.subs.php (or ViewHelpers.subs.php or TemplateHelpers.php or something like that): constructPageIndex(), comma_format(), standardTime(), relativeTime(), shorten_subject(), shorten_text(), forum_time(), parse_bbc(), parsesmileys(), highlight_php_code(), determineTopicClass(),
(09:30:05 PM) Norv: Agree on moving to Subs, Josh, sure thing. Perhaps I should do it now...
(09:31:06 PM) Norv: Ah wait, we're already in Subs itself lol.

(09:31:32 PM) groundup: In my last job we had this file called Common.php. It was a several MB PHP file with very little comments. Subs.php reminds me of that file.
(09:32:14 PM) Norv: lol
(09:32:38 PM) groundup: I couldn't even open it in my IDE because it would crash. I have a pretty beefy laptop with a good graphics card (1 GB) and 8 GB RAM.
(09:33:46 PM) emanuele: LOL
(09:34:00 PM) emanuele: at least half of Subs is parse_bbc! :P
(09:34:25 PM) groundup: We used CVS too. So, I would pull it down, find what I needed to in Notepad++, save, and commit with TortoiseCVS. Then when I needed to look for a function that I thought might be in it, I would have to search everything else and then that file separately.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #206

(09:35:46 PM) groundup: parse_bbc() could be a lot nicer if it did the first part of checking if it even needs to parse any BBC. If it does, load a separate BBC.subs.php
(09:36:31 PM) groundup: Actually, I might just do that
(09:53:47 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/3db4c38325bb3f63e4698fa09f90aef0a50a7f24
(09:54:42 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/7c320341112b24542a771396f94ee250268ffb7f
(09:54:54 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/c08c0a25c0688291b16ee3a2a3f76df9da4068ac
(09:55:51 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/d34fc42828b082bbcc3d1fa6c30a7fc4bbd67178
(09:57:32 PM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/a0d88a67504eda02b8d183df051e08fe273a0ef4 & https://github.com/joshuaadickerson/NotElkarte/commit/0780a93b0b195d56fe1addcee1850fbfe1e5657d & https://github.com/joshuaadickerson/NotElkarte/commit/15b8e9e9517ef34d602a974ea5f8a71dd58ccfee
(10:00:30 PM) groundup: Norv, I realized that a second after I posted it - https://github.com/norv/elkarte/commit/a7e693b1dedff2d7b373e25b50bf6f6ad30fcbe0#commitcomment-3210980
(10:10:31 PM) Norv: groundup: check out https://github.com/Spuds/Elkarte/tree/parseBBC

(10:13:01 PM) ***Norv haz a feeling Josh isn't committing to the intended branch ... :)
(10:14:01 PM) groundup: At this point I am just committing a bunch of changes. Shouldn't really have too many conflicts thus far. I will worry about fixing the master later
(10:14:34 PM) Norv: I see your new branches continue to have extracommits. You should fix your master - ok.
(10:14:43 PM) groundup: That parseBBC branch is a lot less in Subs.php. Probably a good balance.
(10:15:15 PM) groundup: Still, I would move all of that to some kind of view helper file
(10:15:42 PM) Norv: Checkout Spuds branch, for probable updates to parseBBC, well actually a replacement all together
(10:15:55 PM) groundup: Yeah, I did. That's what I'm talking about now
(10:16:04 PM) Norv1: Ah ok

(10:21:06 PM) elk_core [~elk_core@router1-ext.rs.github.com] entered the room.
(10:21:06 PM) elk_core: [Elkarte] norv opened pull request #403: Josh attachments (master...josh_attachments)  http://git.io/_09HIg
(10:21:06 PM) elk_core left the room.

(10:26:31 PM) elk_tools: [tools] norv pushed 6 new commits to master: http://git.io/9YYCmw
(10:26:31 PM) elk_tools: tools/master b47e720 Norv: Rename to elk....
(10:26:31 PM) elk_tools: tools/master 5655d9a Norv: Name updates....
(10:26:31 PM) elk_tools: tools/master 6b52514 Norv: Starting-up updates of database cleanup script for elk....


(10:36:25 PM) elk_tools [~elk_tools@router1-ext.rs.github.com] entered the room.
(10:36:25 PM) elk_tools: [tools] norv opened pull request #8: Sqlite (master...sqlite)  http://git.io/nFYpvA
(10:36:25 PM) elk_tools left the room.

(11:28:59 PM) groundup: Norv, Decoda requires PHP 5.3. You should bump that minimum version ;)
(11:30:21 PM) TehCraw: 5.3 has more useful stuff in it anyway.
(11:30:28 PM) TehCraw: The json functions for example
(11:32:47 PM) groundup: Oh, wow. I thought it was PHP 5.2 that was required. PHP 5.1 is so damn old... wow
(11:33:30 PM) TehCraw: Sadly there are still some hosts that insist on sticking with the old version.
(11:33:40 PM) groundup: Who is still on 5.1?
(11:34:02 PM) TehCraw: *an old version. I don't know any that are on 5.1
(11:34:15 PM) TehCraw: Although I seem to recall having to talk to one last year about using PHP 4.
(11:34:41 PM) TehCraw: Tried to use an anonymous function and they wouldn't have any of it. :P
(11:35:26 PM) groundup: I think RHEL 5 repo started with 5.2.9. Doubt any Debian based hosts were using older versions.
(05/15/2013 12:02:50 AM) Norv: groundup: last I checked Spuds was using a previous version from Decoda
(12:12:06 AM) groundup: Too bad, that was a good reason to bump the minimum version ;)
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #207

(09:06:10 AM) groundup: Why in the hell is a simple array of buttons cached but other things that actually take time to compute aren't? (see // All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.)

(04:36:32 AM) groundup: The theme init function should have $theme_salt and $theme_version. So instead of ?aph21 being hardcoded in Load.php, it would be $settings['theme_salt']

(04:43:26 AM) groundup: Why did loadTemplate() get a $style_sheets param? I don't think I did that. There should be a separation of concerns there.
(04:47:08 AM) groundup: Things to be removed in LoadTemplate(): // For compatibility reasons, if this is the index template without new functions, include compatible stuff. // Hmmm... doesn't exist?!  I don't suppose the directory is wrong, is it? (check it on install, fatal error otherwise)
(05:03:36 AM) groundup: I bet every template needs an init function. It should contain addJavascriptVar() and most addInlineJavascript() calls
(05:05:00 AM) groundup: With the Combine class, there shouldn't be a reason why there shouldn't be a javascript txt file.
(06:09:18 AM) groundup: https://github.com/joshuaadickerson/NotElkarte/commit/cfcc9a13c21ca3d666208b29c68a8bc041672d53
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #208

(09:20:20 PM) Norv1: emanuele: sorry for the admin search
(09:20:33 PM) Norv1: I forgot about it :'(
(09:21:54 PM) emanuele: no problem, I don't use it... :P
(09:22:08 PM) emanuele: searching the files is usually faster :P
(09:24:39 PM) emanuele: Oh I wanted to ask you something
(09:24:50 PM) emanuele: On the ajaxification of things
(09:25:41 PM) emanuele: I was looking to make messages approval/unapproval, and I realised there is an...unintended behaviour (mostly)
(09:26:16 PM) emanuele: I added the calls to the "_api" methods/functions both in dispatch and in createMenu (or callMenu don't remember)
(09:26:43 PM) emanuele: so, when both are involved the handling becomes a bit...strange
(09:27:36 PM) emanuele: because the menu has to be created anyway, but both "falls back" on the _api functions
(09:27:46 PM) emanuele: it doesn't seem right
(09:28:19 PM) emanuele: I mean I would expect just one path to the _api functions, not a double path almost parallel but partially overlapped
(09:31:38 PM) Norv1: I'm not sure I fully get it - but I recognize the problem - why is it needed in callMenu too (sorry I guess it's obvious to you, but me is trying to understand what we're dealing with here while doing too many thingz at a time)
(09:31:58 PM) Norv1: On another note, what do you think of TE's new template bits?
(09:33:22 PM) ***emanuele didn't check almost anything in the last few days... :-[
(09:33:29 PM) Norv1: I agree with expecting just one path to the _api functions. Maybe we need something, some tweak to the menu calls...
(09:33:47 PM) emanuele: example of approve/unapprove button:
(09:33:48 PM) emanuele: http://localhost/beta_21/index.php?action=moderate;area=postmod;sa=approve;topic=90.0;msg=169;
(09:33:58 PM) emanuele: it points to action=moderate
(09:34:03 PM) Norv1: yes
(09:34:21 PM) emanuele: and it has to process the entire moderation menu including the callMenu
(09:34:29 PM) emanuele: to approve/unapprove something
(09:36:40 PM) Norv1: Still brainfail. I'll need to see the code locally. But, does it block you?
(09:37:19 PM) emanuele: not really (/me is good at workaround things :P ), but it makes the code a bit ugly...
(09:37:33 PM) Norv1: I recognize the problem, but don't remember why I didn't solve it nicely, only worked around it at some point.
(09:37:35 PM) Norv1: LOL
(09:38:10 PM) Norv1: It's for the next round of dispatching updates then. Consider it booked. :D
(09:38:46 PM) emanuele: well, then I'll send a PR with what I've don so far on ajax-fy and I'll save everything else for the next round! :D
(09:39:05 PM) Norv1: That sounds just great!
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #209

(09:39:26 PM) Norv: Oh, may I merge them db stuffs?
(09:39:49 PM) Norv: And, if you want a single round of db stuff (or a much bigger round) say so
(09:40:01 PM) emanuele: sooner or later it has to be merged... :P
(09:40:21 PM) Norv: because this PR only adds the layer, and it updates a number of functions, but not those widely used.
(09:40:36 PM) emanuele: oh that's cool
(09:40:54 PM) emanuele: (and that demonstrate I didn't read a single line of code and very few docs :P )
(09:41:00 PM) Norv: lol

(09:46:51 PM) ***TehCraw slaps emanuele with Martin Fowler
(09:48:17 PM) ***emanuele slaps TehCraw with Marvin
(09:48:39 PM) TehCraw: Do you guys know if it's actually necessary to put the license comment at the beginning of every file, or can I just use @license in my DocBlock and have a LICENSE.txt file in the root?
(09:49:03 PM) ***TehCraw doesn't like really long opening comments.
(09:50:52 PM) Norv: TehCraw: it's not necessary
(09:51:20 PM) TehCraw: Great. Thanks, Norv. :D
(09:51:30 PM) ***emanuele wants fully bloated headers!!!
(09:51:43 PM) Norv: MPL 1.1 headers ftw.
(09:52:35 PM) TehCraw: GPL headers are very long.
(09:54:28 PM) Norv: That too. :D
(09:55:38 PM) ***TehCraw likes MPL better now, thanks to some unnamed person suggesting I use it.
(09:56:09 PM) Norv: :)
(09:56:24 PM) ***Norv is a fan of MPL. sagenods
The best moment for testing your PR is right after you merge it. Can't miss with that one.