This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class PostsController extends Controller | |
| { | |
| public function actionLike($id) | |
| { | |
| $model = $this->loadModel($id); | |
| $model->views = $model->views + 1; | |
| $model->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| minetest.register_on_mapgen_init(function(mgparams) | |
| minetest.set_mapgen_params({mgname="singlenode", water_level=-32000}) | |
| end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Include the Yii Framework | |
| */ | |
| require_once(YII_PATH . DS . 'YiiBase.php'); | |
| /** | |
| * Yii is a helper class serving common framework functionalities. | |
| */ | |
| class Yii extends YiiBase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $runtimePath = '/home/user/app/runtime'; | |
| if (!empty($_GET['project'])) { | |
| if (in_array($_GET['project'], array('app'))) { | |
| file_put_contents($runtimePath . '/update-' . $_GET['project'], ''); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('template_redirect', 'my_404_override'); | |
| add_filter('the_content', 'my_content_override'); | |
| function my_404_override() | |
| { | |
| global $wp_query; | |
| if (true) { | |
| status_header(200); | |
| $wp_query->is_404 = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(isset($_GET['event'])) { | |
| // Does the model have this attribute? If not raise an error | |
| $this->event = $_GET['event']; | |
| $this->id = $_GET['id']; | |
| $this->relayer = $_GET['relayer']; | |
| $this->relayer_phone = $_GET['relayer_phone']; | |
| $this->phone = $_GET['phone']; | |
| $this->text = $_GET['text']; | |
| $this->time = $_GET['time']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gpg --list-keys | |
| /root/.gnupg/pubring.gpg | |
| ------------------------ | |
| pub 1024D/2D15CE4F 2014-01-28 | |
| uid root <root@dom.ain> | |
| sub 2048g/0B8C6ED2 2014-01-28 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * AssetManager | |
| * | |
| * @author Brett O'Donnell <cornernote@gmail.com> | |
| * @copyright 2013 Mr PHP | |
| * @license BSD-3-Clause | |
| */ | |
| class AssetManager extends CAssetManager | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyModel extends CActiveRecord | |
| { | |
| public function relations() | |
| { | |
| return array( | |
| 'parent' => array( | |
| self::BELONGS_TO, | |
| 'MyModel', | |
| 'parent_id', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Initializes the audit module. | |
| */ | |
| public function init() | |
| { | |
| parent::init(); | |
| // setup paths | |
| Yii::setPathOfAlias('audit', dirname(__FILE__)); | |
| $this->setImport(array( |